{
 "cells": [
  {
   "cell_type": "raw",
   "id": "7b2eaf0a",
   "metadata": {
    "vscode": {
     "languageId": "raw"
    }
   },
   "source": [
    "---\n",
    "title: Figure-Eight-Knots and Ascher Summands\n",
    "jupyter: python3\n",
    "format:\n",
    "    html:\n",
    "        grid: \n",
    "          margin-width: 350px\n",
    "        mainfont: et-book, Gill Sans, Tahoma, Verdana, Lucida Grande, Helvetica, Arial\n",
    "        monofont: Source Code Pro, Menlo, Monaco, 'Courier New', monospace\n",
    "        backgroundcolor: \"#FFFFF8\"\n",
    "        code-fold: true\n",
    "        code-line-numbers: true\n",
    "execute: \n",
    "  echo: fenced\n",
    "reference-location: margin\n",
    "citation-location: margin   \n",
    "---\n",
    "<link rel = \"stylesheet\" type = \"text/css\" href = \"https://www.khipufieldguide.com/css/tufte_fonts.css\">\n",
    "<link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Source Code Pro\"> \n",
    "<hr/>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "89af111f",
   "metadata": {},
   "source": [
    "# 1.0 Building a Database of Ascher Summands with Figure 8 Knots \n",
    "\n",
    "Aware that there is a potential relationship between [Figure-8-knots and Ascher Sums](./figure_eight_knots_inquiry_2.html), it's time to build dataframes of potential correspondences. Two dataframes are created:\n",
    "\n",
    "1. A [Sums-and-Figure-8-Knots Dataframe](../fieldmarks/analyses/database/figure8knotsums.html) showing Sum Information for all pendant ascher sums, augmented with information about figure-eight-knot cords in the summand ranges.\n",
    "2. A [Left-Handed](../fieldmarks/analyses/database/left_handed_eightknotsumsummary.html) and [Right Handed](../fieldmarks/analyses/database/right_handed_eightknotsumsummary.html) Eight-Knot-Sum-Summary \"contingency table\" of sorts, which summarizes the above table by khipu."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e9a7a52b",
   "metadata": {},
   "source": [
    "# 2.0 Building the Augmented Sums-and-Eight-Knot Dataframe\n",
    "\n",
    "## 2.1 Fields of the Augmented Sums-and-Eight-Knot Dataframe\n",
    "\n",
    "First we build a database of sum/summands by concatenating the data frames for pendant-pendant-sums, colored-pendant-sums, and indexed-pendant sums, ignoring other Ascher sums due to the paucity of occurence. This database, known in the code below as the **pendant_ascher_sums_df** consists of the following information:\n",
    "\n",
    "**KFG Name/Sum Type**\n",
    "\n",
    "* kfg_name - The Khipu Field Guide Name\n",
    "* sum_type - Is it a 'pendant-pendant-sum', 'colored-pendant-sum', or 'indexed-pendant-sum'\n",
    "\n",
    "**Sum Cord**\n",
    "\n",
    "* cord_name - The Ascher sum cord name\n",
    "* cord_index - The sum cord's group/cord index\n",
    "* cord_value - The sum cord's value\n",
    "* cord_color - The Sum Cord's color\n",
    "\n",
    "**Summands**\n",
    "\n",
    "* handedness - Is it a left-handed (<0) or right-handed (>= 0) sum?\n",
    "* num_summands - How many pendant cord summands in the summand range\n",
    "* summand_string - An internal representation for computing use\n",
    "\n",
    "**Figure-8-Knot Information**\n",
    "\n",
    "* has_figure8knot_indicator - Is there a figure-8-knot **\"indicator\"** for the summand range. What is an *indicator*? For now, an indicator is defined as having a left-edge (the first/left pendant cord in a summand range) that is **marked** by a figure-8-knot card, or a right-edge (the last/right pendant cord in a summand range) that is **marked** by a figure-8-knot card. A summand edge cord is *marked* if it has one or more of the following conditions:\n",
    "    \n",
    "    * The edge cord is an eight-knot cord (ie. a [sole-8-knot cord](), or a [trailing-8-knot cord]()\n",
    "    * The edge cord has a subsidiary that is an eight-knot-cord\n",
    "    * Each edge cord has a left (or right) neighbor, bordering the summand range. i.e. if the summand range is p31 to p37 then p30 is the left neighbor and p38 is the right neighbor.  If it has a pendant neighbor, does that neighbor, or it's subsidiaries have an eight-knot cord.\n",
    "\n",
    "    For each sum/summand range, these conditions are tagged in the database as:\n",
    "\n",
    "    * has_left_exact_8knot_cord - a boolean\n",
    "    * has_right_exact_8knot_cord - a boolean\n",
    "    * has_left_close_8knot_cord - a boolean\n",
    "    * has_right_close_8knot_cord - a boolean\n",
    "    * left_exact_pendant_8knot_cord_name - the pendant cordname if it matches condition\n",
    "    * right_exact_pendant_8knot_cord_name - the pendant cordname if it matches condition\n",
    "    * left_exact_subsidiary_8knot_cord_names - the cordnames if they match condition\n",
    "    * right_exact_subsidiary_8knot_cord_names - the cordname if they match condition\n",
    "    * left_close_pendant_cord_names - the left neighbor's pendant cordname if it matches condition\n",
    "    * right_close_pendant_cord_names - the right neighbor's pendant cordname if it matches condition\n",
    "    * left_close_subsidiary_8knot_cord_names - the cordname if they match condition\n",
    "    * right_close_subsidiary_8knot_cord_names - the cordname if they match condition\n",
    "\n",
    "* has_parity_bit\n",
    "    * Finally there is a parity bit flag. This requires greater explanation and will be discussed in the [parity bit section]()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "e4da917e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "        <script>\n",
       "        window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
       "        if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
       "        </script>\n",
       "        <script>/**\n",
       "* plotly.js v3.4.0\n",
       "* Copyright 2012-2026, Plotly, Inc.\n",
       "* All rights reserved.\n",
       "* Licensed under the MIT license\n",
       "*/\n",
       "(\n",
       " function(root, factory) {\n",
       "  if (typeof module === \"object\" && module.exports) {\n",
       "   module.exports = factory();\n",
       "  } else {\n",
       "   root.moduleName = factory();\n",
       "  }\n",
       "} (typeof self !== \"undefined\" ? self : this, () => {\n",
       "\"use strict\";var Plotly=(()=>{var ytt=Object.create;var DS=Object.defineProperty,_tt=Object.defineProperties,xtt=Object.getOwnPropertyDescriptor,btt=Object.getOwnPropertyDescriptors,wtt=Object.getOwnPropertyNames,p6=Object.getOwnPropertySymbols,Ttt=Object.getPrototypeOf,AO=Object.prototype.hasOwnProperty,pee=Object.prototype.propertyIsEnumerable;var vee=(e,t,r)=>t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_g=(e,t)=>{for(var r in t||(t={}))AO.call(t,r)&&vee(e,r,t[r]);if(p6)for(var r of p6(t))pee.call(t,r)&&vee(e,r,t[r]);return e},j1=(e,t)=>_tt(e,btt(t));var gee=(e,t)=>{var r={};for(var n in e)AO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&p6)for(var n of p6(e))t.indexOf(n)<0&&pee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mee=(e,t)=>{for(var r in t)DS(e,r,{get:t[r],enumerable:!0})},yee=(e,t,r,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of wtt(t))!AO.call(e,i)&&i!==r&&DS(e,i,{get:()=>t[i],enumerable:!(n=xtt(t,i))||n.enumerable});return e};var Att=(e,t,r)=>(r=e!=null?ytt(Ttt(e)):{},yee(t||!e||!e.__esModule?DS(r,\"default\",{value:e,enumerable:!0}):r,e)),pb=e=>yee(DS({},\"__esModule\",{value:!0}),e);var g6=ye(_ee=>{\"use strict\";_ee.version=\"3.4.0\"});var bee=ye((xee,m6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof m6!=\"undefined\"&&m6.exports&&(m6.exports=r[t])})(\"Promise\",typeof window!=\"undefined\"?window:xee,function(){\"use strict\";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!=\"undefined\"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},\"x\",{}),t=function(k,E,T,L){return Object.defineProperty(k,E,{value:T,writable:!0,configurable:L!==!1})}}catch(p){t=function(E,T,L){return E[T]=L,E}}n=function(){var k,E,T;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,M){T=new L(C,M),E?E.next=T:k=T,E=T,T=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,E=typeof p;return p!=null&&(E==\"object\"||E==\"function\")&&(k=p.then),typeof k==\"function\"?k:!1}function l(){for(var p=0;p<this.chain.length;p++)u(this,this.state===1?this.chain[p].success:this.chain[p].failure,this.chain[p]);this.chain.length=0}function u(p,k,E){var T,L;try{k===!1?E.reject(p.msg):(k===!0?T=p.msg:T=k.call(void 0,p.msg),T===E.promise?E.reject(TypeError(\"Promise-chain cycle\")):(L=s(T))?L.call(T,E.resolve,E.reject):E.resolve(T))}catch(x){E.reject(x)}}function c(p){var k,E=this;if(!E.triggered){E.triggered=!0,E.def&&(E=E.def);try{(k=s(p))?o(function(){var T=new d(E);try{k.call(p,function(){c.apply(T,arguments)},function(){f.apply(T,arguments)})}catch(L){f.call(T,L)}}):(E.msg=p,E.state=1,E.chain.length>0&&o(l,E))}catch(T){f.call(new d(E),T)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,E,T){for(var L=0;L<k.length;L++)(function(C){p.resolve(k[C]).then(function(g){E(C,g)},T)})(L)}function d(p){this.def=p,this.triggered=!1}function v(p){this.promise=p,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function _(p){if(typeof p!=\"function\")throw TypeError(\"Not a function\");if(this.__NPO__!==0)throw TypeError(\"Not a promise\");this.__NPO__=1;var k=new v(this);this.then=function(T,L){var x={success:typeof T==\"function\"?T:!0,failure:typeof L==\"function\"?L:!1};return x.promise=new this.constructor(function(M,g){if(typeof M!=\"function\"||typeof g!=\"function\")throw TypeError(\"Not a function\");x.resolve=M,x.reject=g}),k.chain.push(x),k.state!==0&&o(l,k),x.promise},this.catch=function(T){return this.then(void 0,T)};try{p.call(void 0,function(T){c.call(k,T)},function(T){f.call(k,T)})}catch(E){f.call(k,E)}}var b=t({},\"constructor\",_,!1);return _.prototype=b,t(b,\"__NPO__\",0,!1),t(_,\"resolve\",function(k){var E=this;return k&&typeof k==\"object\"&&k.__NPO__===1?k:new E(function(L,x){if(typeof L!=\"function\"||typeof x!=\"function\")throw TypeError(\"Not a function\");L(k)})}),t(_,\"reject\",function(k){return new this(function(T,L){if(typeof T!=\"function\"||typeof L!=\"function\")throw TypeError(\"Not a function\");L(k)})}),t(_,\"all\",function(k){var E=this;return i.call(k)!=\"[object Array]\"?E.reject(TypeError(\"Not an array\")):k.length===0?E.resolve([]):new E(function(L,x){if(typeof L!=\"function\"||typeof x!=\"function\")throw TypeError(\"Not a function\");var C=k.length,M=Array(C),g=0;h(E,k,function(A,z){M[A]=z,++g===C&&L(M)},x)})}),t(_,\"race\",function(k){var E=this;return i.call(k)!=\"[object Array]\"?E.reject(TypeError(\"Not an array\")):new E(function(L,x){if(typeof L!=\"function\"||typeof x!=\"function\")throw TypeError(\"Not a function\");h(E,k,function(M,g){L(g)},x)})}),_})});var Oa=ye((prr,y6)=>{(function(){var e={version:\"3.8.2\"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=se[Te];return Ne}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+\"\")},o.setAttributeNS=function(se,Te,Ne){l.call(this,se,Te,Ne+\"\")},u.setProperty=function(se,Te,Ne){c.call(this,se,Te+\"\",Ne)}}e.ascending=f;function f(X,se){return X<se?-1:X>se?1:X>=se?0:NaN}e.descending=function(X,se){return se<X?-1:se>X?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&He>Ye&&(He=Ye)}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&He>Ye&&(He=Ye)}return He},e.max=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&Ye>He&&(He=Ye)}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&Ye>He&&(He=Ye)}return He},e.extent=function(X,se){var Te=-1,Ne=X.length,He,Ye,kt;if(arguments.length===1){for(;++Te<Ne;)if((Ye=X[Te])!=null&&Ye>=Ye){He=kt=Ye;break}for(;++Te<Ne;)(Ye=X[Te])!=null&&(He>Ye&&(He=Ye),kt<Ye&&(kt=Ye))}else{for(;++Te<Ne;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){He=kt=Ye;break}for(;++Te<Ne;)(Ye=se.call(X,X[Te],Te))!=null&&(He>Ye&&(He=Ye),kt<Ye&&(kt=Ye))}return[He,kt]};function h(X){return X===null?NaN:+X}function d(X){return!isNaN(X)}e.sum=function(X,se){var Te=0,Ne=X.length,He,Ye=-1;if(arguments.length===1)for(;++Ye<Ne;)d(He=+X[Ye])&&(Te+=He);else for(;++Ye<Ne;)d(He=+se.call(X,X[Ye],Ye))&&(Te+=He);return Te},e.mean=function(X,se){var Te=0,Ne=X.length,He,Ye=-1,kt=Ne;if(arguments.length===1)for(;++Ye<Ne;)d(He=h(X[Ye]))?Te+=He:--kt;else for(;++Ye<Ne;)d(He=h(se.call(X,X[Ye],Ye)))?Te+=He:--kt;if(kt)return Te/kt},e.quantile=function(X,se){var Te=(X.length-1)*se+1,Ne=Math.floor(Te),He=+X[Ne-1],Ye=Te-Ne;return Ye?He+Ye*(X[Ne]-He):He},e.median=function(X,se){var Te=[],Ne=X.length,He,Ye=-1;if(arguments.length===1)for(;++Ye<Ne;)d(He=h(X[Ye]))&&Te.push(He);else for(;++Ye<Ne;)d(He=h(se.call(X,X[Ye],Ye)))&&Te.push(He);if(Te.length)return e.quantile(Te.sort(f),.5)},e.variance=function(X,se){var Te=X.length,Ne=0,He,Ye,kt=0,nt=-1,jt=0;if(arguments.length===1)for(;++nt<Te;)d(He=h(X[nt]))&&(Ye=He-Ne,Ne+=Ye/++jt,kt+=Ye*(He-Ne));else for(;++nt<Te;)d(He=h(se.call(X,X[nt],nt)))&&(Ye=He-Ne,Ne+=Ye/++jt,kt+=Ye*(He-Ne));if(jt>1)return kt/(jt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne<He;){var Ye=Ne+He>>>1;X(se[Ye],Te)<0?Ne=Ye+1:He=Ye}return Ne},right:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne<He;){var Ye=Ne+He>>>1;X(se[Ye],Te)>0?He=Ye:Ne=Ye+1}return Ne}}}var _=v(f);e.bisectLeft=_.left,e.bisect=e.bisectRight=_.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Ne=arguments.length)<3&&(Te=X.length,Ne<2&&(se=0));for(var Ne=Te-se,He,Ye;Ne;)Ye=Math.random()*Ne--|0,He=X[Ne+se],X[Ne+se]=X[Ye+se],X[Ye+se]=He;return X},e.permute=function(X,se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=X[se[Te]];return Ne},e.pairs=function(X){for(var se=0,Te=X.length-1,Ne,He=X[0],Ye=new Array(Te<0?0:Te);se<Te;)Ye[se]=[Ne=He,He=X[++se]];return Ye},e.transpose=function(X){if(!(Ye=X.length))return[];for(var se=-1,Te=e.min(X,b),Ne=new Array(Te);++se<Te;)for(var He=-1,Ye,kt=Ne[se]=new Array(Ye);++He<Ye;)kt[He]=X[He][se];return Ne};function b(X){return X.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(X){var se=[];for(var Te in X)se.push(Te);return se},e.values=function(X){var se=[];for(var Te in X)se.push(X[Te]);return se},e.entries=function(X){var se=[];for(var Te in X)se.push({key:Te,value:X[Te]});return se},e.merge=function(X){for(var se=X.length,Te,Ne=-1,He=0,Ye,kt;++Ne<se;)He+=X[Ne].length;for(Ye=new Array(He);--se>=0;)for(kt=X[se],Te=kt.length;--Te>=0;)Ye[--He]=kt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error(\"infinite range\");var Ne=[],He=k(p(Te)),Ye=-1,kt;if(X*=He,se*=He,Te*=He,Te<0)for(;(kt=X+Te*++Ye)>se;)Ne.push(kt/He);else for(;(kt=X+Te*++Ye)<se;)Ne.push(kt/He);return Ne};function k(X){for(var se=1;X*se%1;)se*=10;return se}function E(X,se){for(var Te in se)Object.defineProperty(X.prototype,Te,{value:se[Te],enumerable:!1})}e.map=function(X,se){var Te=new T;if(X instanceof T)X.forEach(function(nt,jt){Te.set(nt,jt)});else if(Array.isArray(X)){var Ne=-1,He=X.length,Ye;if(arguments.length===1)for(;++Ne<He;)Te.set(Ne,X[Ne]);else for(;++Ne<He;)Te.set(se.call(X,Ye=X[Ne],Ne),Ye)}else for(var kt in X)Te.set(kt,X[kt]);return Te};function T(){this._=Object.create(null)}var L=\"__proto__\",x=\"\\0\";E(T,{has:g,get:function(X){return this._[C(X)]},set:function(X,se){return this._[C(X)]=se},remove:P,keys:A,values:function(){var X=[];for(var se in this._)X.push(this._[se]);return X},entries:function(){var X=[];for(var se in this._)X.push({key:M(se),value:this._[se]});return X},size:z,empty:O,forEach:function(X){for(var se in this._)X.call(this,M(se),this._[se])}});function C(X){return(X+=\"\")===L||X[0]===x?x+X:X}function M(X){return(X+=\"\")[0]===x?X.slice(1):X}function g(X){return C(X)in this._}function P(X){return(X=C(X))in this._&&delete this._[X]}function A(){var X=[];for(var se in this._)X.push(M(se));return X}function z(){var X=0;for(var se in this._)++X;return X}function O(){for(var X in this._)return!1;return!0}e.nest=function(){var X={},se=[],Te=[],Ne,He;function Ye(nt,jt,gr){if(gr>=se.length)return He?He.call(X,jt):Ne?jt.sort(Ne):jt;for(var yr=-1,Hr=jt.length,qr=se[gr++],_i,bi,Zr,ai=new T,gi;++yr<Hr;)(gi=ai.get(_i=qr(bi=jt[yr])))?gi.push(bi):ai.set(_i,[bi]);return nt?(bi=nt(),Zr=function(Ii,Si){bi.set(Ii,Ye(nt,Si,gr))}):(bi={},Zr=function(Ii,Si){bi[Ii]=Ye(nt,Si,gr)}),ai.forEach(Zr),bi}function kt(nt,jt){if(jt>=se.length)return nt;var gr=[],yr=Te[jt++];return nt.forEach(function(Hr,qr){gr.push({key:Hr,values:kt(qr,jt)})}),yr?gr.sort(function(Hr,qr){return yr(Hr.key,qr.key)}):gr}return X.map=function(nt,jt){return Ye(jt,nt,0)},X.entries=function(nt){return kt(Ye(e.map,nt,0),0)},X.key=function(nt){return se.push(nt),X},X.sortKeys=function(nt){return Te[se.length-1]=nt,X},X.sortValues=function(nt){return Ne=nt,X},X.rollup=function(nt){return He=nt,X},X},e.set=function(X){var se=new U;if(X)for(var Te=0,Ne=X.length;Te<Ne;++Te)se.add(X[Te]);return se};function U(){this._=Object.create(null)}E(U,{has:g,add:function(X){return this._[C(X+=\"\")]=!0,X},remove:P,values:A,size:z,empty:O,forEach:function(X){for(var se in this._)X.call(this,M(se))}}),e.behavior={};function G(X){return X}e.rebind=function(X,se){for(var Te=1,Ne=arguments.length,He;++Te<Ne;)X[He=arguments[Te]]=Z(X,se,se[He]);return X};function Z(X,se,Te){return function(){var Ne=Te.apply(se,arguments);return Ne===se?X:Ne}}function j(X,se){if(se in X)return se;se=se.charAt(0).toUpperCase()+se.slice(1);for(var Te=0,Ne=N.length;Te<Ne;++Te){var He=N[Te]+se;if(He in X)return He}}var N=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];function H(){}e.dispatch=function(){for(var X=new re,se=-1,Te=arguments.length;++se<Te;)X[arguments[se]]=oe(X);return X};function re(){}re.prototype.on=function(X,se){var Te=X.indexOf(\".\"),Ne=\"\";if(Te>=0&&(Ne=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Ne):this[X].on(Ne,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Ne,null);return this}};function oe(X){var se=[],Te=new T;function Ne(){for(var He=se,Ye=-1,kt=He.length,nt;++Ye<kt;)(nt=He[Ye].on)&&nt.apply(this,arguments);return X}return Ne.on=function(He,Ye){var kt=Te.get(He),nt;return arguments.length<2?kt&&kt.on:(kt&&(kt.on=null,se=se.slice(0,nt=se.indexOf(kt)).concat(se.slice(nt+1)),Te.remove(He)),Ye&&se.push(Te.set(He,{on:Ye})),X)},Ne}e.event=null;function _e(){e.event.preventDefault()}function Ce(){for(var X=e.event,se;se=X.sourceEvent;)X=se;return X}function Le(X){for(var se=new re,Te=0,Ne=arguments.length;++Te<Ne;)se[arguments[Te]]=oe(se);return se.of=function(He,Ye){return function(kt){try{var nt=kt.sourceEvent=e.event;kt.target=X,e.event=kt,se[kt.type].apply(He,Ye)}finally{e.event=nt}}},se}e.requote=function(X){return X.replace(ge,\"\\\\$&\")};var ge=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,ie={}.__proto__?function(X,se){X.__proto__=se}:function(X,se){for(var Te in se)X[Te]=se[Te]};function Se(X){return ie(X,Pe),X}var Ee=function(X,se){return se.querySelector(X)},Ae=function(X,se){return se.querySelectorAll(X)},Be=function(X,se){var Te=X.matches||X[j(X,\"matchesSelector\")];return Be=function(Ne,He){return Te.call(Ne,He)},Be(X,se)};typeof Sizzle==\"function\"&&(Ee=function(X,se){return Sizzle(X,se)[0]||null},Ae=Sizzle,Be=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var Pe=e.selection.prototype=[];Pe.select=function(X){var se=[],Te,Ne,He,Ye;X=me(X);for(var kt=-1,nt=this.length;++kt<nt;){se.push(Te=[]),Te.parentNode=(He=this[kt]).parentNode;for(var jt=-1,gr=He.length;++jt<gr;)(Ye=He[jt])?(Te.push(Ne=X.call(Ye,Ye.__data__,jt,kt)),Ne&&\"__data__\"in Ye&&(Ne.__data__=Ye.__data__)):Te.push(null)}return Se(se)};function me(X){return typeof X==\"function\"?X:function(){return Ee(X,this)}}Pe.selectAll=function(X){var se=[],Te,Ne;X=De(X);for(var He=-1,Ye=this.length;++He<Ye;)for(var kt=this[He],nt=-1,jt=kt.length;++nt<jt;)(Ne=kt[nt])&&(se.push(Te=r(X.call(Ne,Ne.__data__,nt,He))),Te.parentNode=Ne);return Se(se)};function De(X){return typeof X==\"function\"?X:function(){return Ae(X,this)}}var ce=\"http://www.w3.org/1999/xhtml\",je={svg:\"http://www.w3.org/2000/svg\",xhtml:ce,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};e.ns={prefix:je,qualify:function(X){var se=X.indexOf(\":\"),Te=X;return se>=0&&(Te=X.slice(0,se))!==\"xmlns\"&&(X=X.slice(se+1)),je.hasOwnProperty(Te)?{space:je[Te],local:X}:X}},Pe.attr=function(X,se){if(arguments.length<2){if(typeof X==\"string\"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function lt(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Ne(){this.removeAttributeNS(X.space,X.local)}function He(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function kt(){var jt=se.apply(this,arguments);jt==null?this.removeAttribute(X):this.setAttribute(X,jt)}function nt(){var jt=se.apply(this,arguments);jt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,jt)}return se==null?X.local?Ne:Te:typeof se==\"function\"?X.local?nt:kt:X.local?Ye:He}function pt(X){return X.trim().replace(/\\s+/g,\" \")}Pe.classed=function(X,se){if(arguments.length<2){if(typeof X==\"string\"){var Te=this.node(),Ne=(X=ot(X)).length,He=-1;if(se=Te.classList){for(;++He<Ne;)if(!se.contains(X[He]))return!1}else for(se=Te.getAttribute(\"class\");++He<Ne;)if(!Vt(X[He]).test(se))return!1;return!0}for(se in X)this.each(ut(se,X[se]));return this}return this.each(ut(X,se))};function Vt(X){return new RegExp(\"(?:^|\\\\s+)\"+e.requote(X)+\"(?:\\\\s+|$)\",\"g\")}function ot(X){return(X+\"\").trim().split(/^|\\s+/)}function ut(X,se){X=ot(X).map(Wt);var Te=X.length;function Ne(){for(var Ye=-1;++Ye<Te;)X[Ye](this,se)}function He(){for(var Ye=-1,kt=se.apply(this,arguments);++Ye<Te;)X[Ye](this,kt)}return typeof se==\"function\"?He:Ne}function Wt(X){var se=Vt(X);return function(Te,Ne){if(He=Te.classList)return Ne?He.add(X):He.remove(X);var He=Te.getAttribute(\"class\")||\"\";Ne?(se.lastIndex=0,se.test(He)||Te.setAttribute(\"class\",pt(He+\" \"+X))):Te.setAttribute(\"class\",pt(He.replace(se,\" \")))}}Pe.style=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=\"\");for(Te in X)this.each(Nt(Te,X[Te],se));return this}if(Ne<2){var He=this.node();return a(He).getComputedStyle(He,null).getPropertyValue(X)}Te=\"\"}return this.each(Nt(X,se,Te))};function Nt(X,se,Te){function Ne(){this.style.removeProperty(X)}function He(){this.style.setProperty(X,se,Te)}function Ye(){var kt=se.apply(this,arguments);kt==null?this.style.removeProperty(X):this.style.setProperty(X,kt,Te)}return se==null?Ne:typeof se==\"function\"?Ye:He}Pe.property=function(X,se){if(arguments.length<2){if(typeof X==\"string\")return this.node()[X];for(se in X)this.each($t(se,X[se]));return this}return this.each($t(X,se))};function $t(X,se){function Te(){delete this[X]}function Ne(){this[X]=se}function He(){var Ye=se.apply(this,arguments);Ye==null?delete this[X]:this[X]=Ye}return se==null?Te:typeof se==\"function\"?He:Ne}Pe.text=function(X){return arguments.length?this.each(typeof X==\"function\"?function(){var se=X.apply(this,arguments);this.textContent=se==null?\"\":se}:X==null?function(){this.textContent=\"\"}:function(){this.textContent=X}):this.node().textContent},Pe.html=function(X){return arguments.length?this.each(typeof X==\"function\"?function(){var se=X.apply(this,arguments);this.innerHTML=se==null?\"\":se}:X==null?function(){this.innerHTML=\"\"}:function(){this.innerHTML=X}):this.node().innerHTML},Pe.append=function(X){return X=sr(X),this.select(function(){return this.appendChild(X.apply(this,arguments))})};function sr(X){function se(){var Ne=this.ownerDocument,He=this.namespaceURI;return He===ce&&Ne.documentElement.namespaceURI===ce?Ne.createElement(X):Ne.createElementNS(He,X)}function Te(){return this.ownerDocument.createElementNS(X.space,X.local)}return typeof X==\"function\"?X:(X=e.ns.qualify(X)).local?Te:se}Pe.insert=function(X,se){return X=sr(X),se=me(se),this.select(function(){return this.insertBefore(X.apply(this,arguments),se.apply(this,arguments)||null)})},Pe.remove=function(){return this.each(Tr)};function Tr(){var X=this.parentNode;X&&X.removeChild(this)}Pe.data=function(X,se){var Te=-1,Ne=this.length,He,Ye;if(!arguments.length){for(X=new Array(Ne=(He=this[0]).length);++Te<Ne;)(Ye=He[Te])&&(X[Te]=Ye.__data__);return X}function kt(yr,Hr){var qr,_i=yr.length,bi=Hr.length,Zr=Math.min(_i,bi),ai=new Array(bi),gi=new Array(bi),Ii=new Array(_i),Si,ei;if(se){var Ln=new T,En=new Array(_i),Un;for(qr=-1;++qr<_i;)(Si=yr[qr])&&(Ln.has(Un=se.call(Si,Si.__data__,qr))?Ii[qr]=Si:Ln.set(Un,Si),En[qr]=Un);for(qr=-1;++qr<bi;)(Si=Ln.get(Un=se.call(Hr,ei=Hr[qr],qr)))?Si!==!0&&(ai[qr]=Si,Si.__data__=ei):gi[qr]=fr(ei),Ln.set(Un,!0);for(qr=-1;++qr<_i;)qr in En&&Ln.get(En[qr])!==!0&&(Ii[qr]=yr[qr])}else{for(qr=-1;++qr<Zr;)Si=yr[qr],ei=Hr[qr],Si?(Si.__data__=ei,ai[qr]=Si):gi[qr]=fr(ei);for(;qr<bi;++qr)gi[qr]=fr(Hr[qr]);for(;qr<_i;++qr)Ii[qr]=yr[qr]}gi.update=ai,gi.parentNode=ai.parentNode=Ii.parentNode=yr.parentNode,nt.push(gi),jt.push(ai),gr.push(Ii)}var nt=Gt([]),jt=Se([]),gr=Se([]);if(typeof X==\"function\")for(;++Te<Ne;)kt(He=this[Te],X.call(He,He.parentNode.__data__,Te));else for(;++Te<Ne;)kt(He=this[Te],X);return jt.enter=function(){return nt},jt.exit=function(){return gr},jt};function fr(X){return{__data__:X}}Pe.datum=function(X){return arguments.length?this.property(\"__data__\",X):this.property(\"__data__\")},Pe.filter=function(X){var se=[],Te,Ne,He;typeof X!=\"function\"&&(X=$e(X));for(var Ye=0,kt=this.length;Ye<kt;Ye++){se.push(Te=[]),Te.parentNode=(Ne=this[Ye]).parentNode;for(var nt=0,jt=Ne.length;nt<jt;nt++)(He=Ne[nt])&&X.call(He,He.__data__,nt,Ye)&&Te.push(He)}return Se(se)};function $e(X){return function(){return Be(this,X)}}Pe.order=function(){for(var X=-1,se=this.length;++X<se;)for(var Te=this[X],Ne=Te.length-1,He=Te[Ne],Ye;--Ne>=0;)(Ye=Te[Ne])&&(He&&He!==Ye.nextSibling&&He.parentNode.insertBefore(Ye,He),He=Ye);return this},Pe.sort=function(X){X=St.apply(this,arguments);for(var se=-1,Te=this.length;++se<Te;)this[se].sort(X);return this.order()};function St(X){return arguments.length||(X=f),function(se,Te){return se&&Te?X(se.__data__,Te.__data__):!se-!Te}}Pe.each=function(X){return Qt(this,function(se,Te,Ne){X.call(se,se.__data__,Te,Ne)})};function Qt(X,se){for(var Te=0,Ne=X.length;Te<Ne;Te++)for(var He=X[Te],Ye=0,kt=He.length,nt;Ye<kt;Ye++)(nt=He[Ye])&&se(nt,Ye,Te);return X}Pe.call=function(X){var se=r(arguments);return X.apply(se[0]=this,se),this},Pe.empty=function(){return!this.node()},Pe.node=function(){for(var X=0,se=this.length;X<se;X++)for(var Te=this[X],Ne=0,He=Te.length;Ne<He;Ne++){var Ye=Te[Ne];if(Ye)return Ye}return null},Pe.size=function(){var X=0;return Qt(this,function(){++X}),X};function Gt(X){return ie(X,_t),X}var _t=[];e.selection.enter=Gt,e.selection.enter.prototype=_t,_t.append=Pe.append,_t.empty=Pe.empty,_t.node=Pe.node,_t.call=Pe.call,_t.size=Pe.size,_t.select=function(X){for(var se=[],Te,Ne,He,Ye,kt,nt=-1,jt=this.length;++nt<jt;){He=(Ye=this[nt]).update,se.push(Te=[]),Te.parentNode=Ye.parentNode;for(var gr=-1,yr=Ye.length;++gr<yr;)(kt=Ye[gr])?(Te.push(He[gr]=Ne=X.call(Ye.parentNode,kt.__data__,gr,nt)),Ne.__data__=kt.__data__):Te.push(null)}return Se(se)},_t.insert=function(X,se){return arguments.length<2&&(se=It(this)),Pe.insert.call(this,X,se)};function It(X){var se,Te;return function(Ne,He,Ye){var kt=X[Ye].update,nt=kt.length,jt;for(Ye!=Te&&(Te=Ye,se=0),He>=se&&(se=He+1);!(jt=kt[se])&&++se<nt;);return jt}}e.select=function(X){var se;return typeof X==\"string\"?(se=[Ee(X,n)],se.parentNode=n.documentElement):(se=[X],se.parentNode=i(X)),Se([se])},e.selectAll=function(X){var se;return typeof X==\"string\"?(se=r(Ae(X,n)),se.parentNode=n.documentElement):(se=r(X),se.parentNode=null),Se([se])},Pe.on=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=!1);for(Te in X)this.each(mt(Te,X[Te],se));return this}if(Ne<2)return(Ne=this.node()[\"__on\"+X])&&Ne._;Te=!1}return this.each(mt(X,se,Te))};function mt(X,se,Te){var Ne=\"__on\"+X,He=X.indexOf(\".\"),Ye=lr;He>0&&(X=X.slice(0,He));var kt=er.get(X);kt&&(X=kt,Ye=wr);function nt(){var yr=this[Ne];yr&&(this.removeEventListener(X,yr,yr.$),delete this[Ne])}function jt(){var yr=Ye(se,r(arguments));nt.call(this),this.addEventListener(X,this[Ne]=yr,yr.$=Te),yr._=se}function gr(){var yr=new RegExp(\"^__on([^.]+)\"+e.requote(X)+\"$\"),Hr;for(var qr in this)if(Hr=qr.match(yr)){var _i=this[qr];this.removeEventListener(Hr[1],_i,_i.$),delete this[qr]}}return He?se?jt:nt:se?H:gr}var er=e.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});n&&er.forEach(function(X){\"on\"+X in n&&er.remove(X)});function lr(X,se){return function(Te){var Ne=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Ne}}}function wr(X,se){var Te=lr(X,se);return function(Ne){var He=this,Ye=Ne.relatedTarget;(!Ye||Ye!==He&&!(Ye.compareDocumentPosition(He)&8))&&Te.call(He,Ne)}}var Lr,ti=0;function Br(X){var se=\".dragsuppress-\"+ ++ti,Te=\"click\"+se,Ne=e.select(a(X)).on(\"touchmove\"+se,_e).on(\"dragstart\"+se,_e).on(\"selectstart\"+se,_e);if(Lr==null&&(Lr=\"onselectstart\"in X?!1:j(X.style,\"userSelect\")),Lr){var He=i(X).style,Ye=He[Lr];He[Lr]=\"none\"}return function(kt){if(Ne.on(se,null),Lr&&(He[Lr]=Ye),kt){var nt=function(){Ne.on(Te,null)};Ne.on(Te,function(){_e(),nt()},!0),setTimeout(nt,0)}}}e.mouse=function(X){return dt(X,Ce())};var Vr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function dt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Ne=Te.createSVGPoint();if(Vr<0){var He=a(X);if(He.scrollX||He.scrollY){Te=e.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\");var Ye=Te[0][0].getScreenCTM();Vr=!(Ye.f||Ye.e),Te.remove()}}return Vr?(Ne.x=se.pageX,Ne.y=se.pageY):(Ne.x=se.clientX,Ne.y=se.clientY),Ne=Ne.matrixTransform(X.getScreenCTM().inverse()),[Ne.x,Ne.y]}var kt=X.getBoundingClientRect();return[se.clientX-kt.left-X.clientLeft,se.clientY-kt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=Ce().changedTouches),se){for(var Ne=0,He=se.length,Ye;Ne<He;++Ne)if((Ye=se[Ne]).identifier===Te)return dt(X,Ye)}},e.behavior.drag=function(){var X=Le(He,\"drag\",\"dragstart\",\"dragend\"),se=null,Te=Ye(H,e.mouse,a,\"mousemove\",\"mouseup\"),Ne=Ye(Ge,e.touch,G,\"touchmove\",\"touchend\");function He(){this.on(\"mousedown.drag\",Te).on(\"touchstart.drag\",Ne)}function Ye(kt,nt,jt,gr,yr){return function(){var Hr=this,qr=e.event.target.correspondingElement||e.event.target,_i=Hr.parentNode,bi=X.of(Hr,arguments),Zr=0,ai=kt(),gi=\".drag\"+(ai==null?\"\":\"-\"+ai),Ii,Si=e.select(jt(qr)).on(gr+gi,En).on(yr+gi,Un),ei=Br(qr),Ln=nt(_i,ai);se?(Ii=se.apply(Hr,arguments),Ii=[Ii.x-Ln[0],Ii.y-Ln[1]]):Ii=[0,0],bi({type:\"dragstart\"});function En(){var ia=nt(_i,ai),Ea,Ia;ia&&(Ea=ia[0]-Ln[0],Ia=ia[1]-Ln[1],Zr|=Ea|Ia,Ln=ia,bi({type:\"drag\",x:ia[0]+Ii[0],y:ia[1]+Ii[1],dx:Ea,dy:Ia}))}function Un(){nt(_i,ai)&&(Si.on(gr+gi,null).on(yr+gi,null),ei(Zr),bi({type:\"dragend\"}))}}}return He.origin=function(kt){return arguments.length?(se=kt,He):se},e.rebind(He,X,\"on\")};function Ge(){return e.event.changedTouches[0].identifier}e.touches=function(X,se){return arguments.length<2&&(se=Ce().touches),se?r(se).map(function(Te){var Ne=dt(X,Te);return Ne.identifier=Te.identifier,Ne}):[]};var Je=1e-6,We=Je*Je,tt=Math.PI,xt=2*tt,Ie=xt-Je,xe=tt/2,ke=tt/180,vt=180/tt;function ir(X){return X>0?1:X<0?-1:0}function ar(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function vr(X){return X>1?0:X<-1?tt:Math.acos(X)}function ii(X){return X>1?xe:X<-1?-xe:Math.asin(X)}function pi(X){return((X=Math.exp(X))-1/X)/2}function $r(X){return((X=Math.exp(X))+1/X)/2}function di(X){return((X=Math.exp(2*X))-1)/(X+1)}function ji(X){return(X=Math.sin(X/2))*X}var In=Math.SQRT2,wi=2,On=4;e.interpolateZoom=function(X,se){var Te=X[0],Ne=X[1],He=X[2],Ye=se[0],kt=se[1],nt=se[2],jt=Ye-Te,gr=kt-Ne,yr=jt*jt+gr*gr,Hr,qr;if(yr<We)qr=Math.log(nt/He)/In,Hr=function(Ii){return[Te+Ii*jt,Ne+Ii*gr,He*Math.exp(In*Ii*qr)]};else{var _i=Math.sqrt(yr),bi=(nt*nt-He*He+On*yr)/(2*He*wi*_i),Zr=(nt*nt-He*He-On*yr)/(2*nt*wi*_i),ai=Math.log(Math.sqrt(bi*bi+1)-bi),gi=Math.log(Math.sqrt(Zr*Zr+1)-Zr);qr=(gi-ai)/In,Hr=function(Ii){var Si=Ii*qr,ei=$r(ai),Ln=He/(wi*_i)*(ei*di(In*Si+ai)-pi(ai));return[Te+Ln*jt,Ne+Ln*gr,He*ei/$r(In*Si+ai)]}}return Hr.duration=qr*1e3,Hr},e.behavior.zoom=function(){var X={x:0,y:0,k:1},se,Te,Ne,He=[960,500],Ye=qn,kt=250,nt=0,jt=\"mousedown.zoom\",gr=\"mousemove.zoom\",yr=\"mouseup.zoom\",Hr,qr=\"touchstart.zoom\",_i,bi=Le(Si,\"zoomstart\",\"zoom\",\"zoomend\"),Zr,ai,gi,Ii;ra||(ra=\"onwheel\"in n?(Fn=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in n?(Fn=function(){return e.event.wheelDelta},\"mousewheel\"):(Fn=function(){return-e.event.detail},\"MozMousePixelScroll\"));function Si(Gn){Gn.on(jt,go).on(ra+\".zoom\",Ms).on(\"dblclick.zoom\",Xs).on(qr,Is)}Si.event=function(Gn){Gn.each(function(){var ja=bi.of(this,arguments),Fo=X;Bo?e.select(this).transition().each(\"start.zoom\",function(){X=this.__chart__||{x:0,y:0,k:1},Ia(ja)}).tween(\"zoom:zoom\",function(){var Uo=He[0],$s=He[1],Sl=Te?Te[0]:Uo/2,bu=Te?Te[1]:$s/2,dl=e.interpolateZoom([(Sl-X.x)/X.k,(bu-X.y)/X.k,Uo/X.k],[(Sl-Fo.x)/Fo.k,(bu-Fo.y)/Fo.k,Uo/Fo.k]);return function(Sc){var Me=dl(Sc),bt=Uo/Me[2];this.__chart__=X={x:Sl-Me[0]*bt,y:bu-Me[1]*bt,k:bt},yo(ja)}}).each(\"interrupt.zoom\",function(){Da(ja)}).each(\"end.zoom\",function(){Da(ja)}):(this.__chart__=X,Ia(ja),yo(ja),Da(ja))})},Si.translate=function(Gn){return arguments.length?(X={x:+Gn[0],y:+Gn[1],k:X.k},Ea(),Si):[X.x,X.y]},Si.scale=function(Gn){return arguments.length?(X={x:X.x,y:X.y,k:null},En(+Gn),Ea(),Si):X.k},Si.scaleExtent=function(Gn){return arguments.length?(Ye=Gn==null?qn:[+Gn[0],+Gn[1]],Si):Ye},Si.center=function(Gn){return arguments.length?(Ne=Gn&&[+Gn[0],+Gn[1]],Si):Ne},Si.size=function(Gn){return arguments.length?(He=Gn&&[+Gn[0],+Gn[1]],Si):He},Si.duration=function(Gn){return arguments.length?(kt=+Gn,Si):kt},Si.x=function(Gn){return arguments.length?(ai=Gn,Zr=Gn.copy(),X={x:0,y:0,k:1},Si):ai},Si.y=function(Gn){return arguments.length?(Ii=Gn,gi=Gn.copy(),X={x:0,y:0,k:1},Si):Ii};function ei(Gn){return[(Gn[0]-X.x)/X.k,(Gn[1]-X.y)/X.k]}function Ln(Gn){return[Gn[0]*X.k+X.x,Gn[1]*X.k+X.y]}function En(Gn){X.k=Math.max(Ye[0],Math.min(Ye[1],Gn))}function Un(Gn,ja){ja=Ln(ja),X.x+=Gn[0]-ja[0],X.y+=Gn[1]-ja[1]}function ia(Gn,ja,Fo,Uo){Gn.__chart__={x:X.x,y:X.y,k:X.k},En(Math.pow(2,Uo)),Un(Te=ja,Fo),Gn=e.select(Gn),kt>0&&(Gn=Gn.transition().duration(kt)),Gn.call(Si.event)}function Ea(){ai&&ai.domain(Zr.range().map(function(Gn){return(Gn-X.x)/X.k}).map(Zr.invert)),Ii&&Ii.domain(gi.range().map(function(Gn){return(Gn-X.y)/X.k}).map(gi.invert))}function Ia(Gn){nt++||Gn({type:\"zoomstart\"})}function yo(Gn){Ea(),Gn({type:\"zoom\",scale:X.k,translate:[X.x,X.y]})}function Da(Gn){--nt||(Gn({type:\"zoomend\"}),Te=null)}function go(){var Gn=this,ja=bi.of(Gn,arguments),Fo=0,Uo=e.select(a(Gn)).on(gr,bu).on(yr,dl),$s=ei(e.mouse(Gn)),Sl=Br(Gn);fa.call(Gn),Ia(ja);function bu(){Fo=1,Un(e.mouse(Gn),$s),yo(ja)}function dl(){Uo.on(gr,null).on(yr,null),Sl(Fo),Da(ja)}}function Is(){var Gn=this,ja=bi.of(Gn,arguments),Fo={},Uo=0,$s,Sl=\".zoom-\"+e.event.changedTouches[0].identifier,bu=\"touchmove\"+Sl,dl=\"touchend\"+Sl,Sc=[],Me=e.select(Gn),bt=Br(Gn);Rr(),Ia(ja),Me.on(jt,null).on(qr,Rr);function zt(){var Gr=e.touches(Gn);return $s=X.k,Gr.forEach(function(mi){mi.identifier in Fo&&(Fo[mi.identifier]=ei(mi))}),Gr}function Rr(){var Gr=e.event.target;e.select(Gr).on(bu,jr).on(dl,Nr),Sc.push(Gr);for(var mi=e.event.changedTouches,Ui=0,qi=mi.length;Ui<qi;++Ui)Fo[mi[Ui].identifier]=null;var Ei=zt(),Hn=Date.now();if(Ei.length===1){if(Hn-_i<500){var en=Ei[0];ia(Gn,en,Fo[en.identifier],Math.floor(Math.log(X.k)/Math.LN2)+1),_e()}_i=Hn}else if(Ei.length>1){var en=Ei[0],Wi=Ei[1],si=en[0]-Wi[0],Mr=en[1]-Wi[1];Uo=si*si+Mr*Mr}}function jr(){var Gr=e.touches(Gn),mi,Ui,qi,Ei;fa.call(Gn);for(var Hn=0,en=Gr.length;Hn<en;++Hn,Ei=null)if(qi=Gr[Hn],Ei=Fo[qi.identifier]){if(Ui)break;mi=qi,Ui=Ei}if(Ei){var Wi=(Wi=qi[0]-mi[0])*Wi+(Wi=qi[1]-mi[1])*Wi,si=Uo&&Math.sqrt(Wi/Uo);mi=[(mi[0]+qi[0])/2,(mi[1]+qi[1])/2],Ui=[(Ui[0]+Ei[0])/2,(Ui[1]+Ei[1])/2],En(si*$s)}_i=null,Un(mi,Ui),yo(ja)}function Nr(){if(e.event.touches.length){for(var Gr=e.event.changedTouches,mi=0,Ui=Gr.length;mi<Ui;++mi)delete Fo[Gr[mi].identifier];for(var qi in Fo)return void zt()}e.selectAll(Sc).on(Sl,null),Me.on(jt,go).on(qr,Is),bt(),Da(ja)}}function Ms(){var Gn=bi.of(this,arguments);Hr?clearTimeout(Hr):(fa.call(this),se=ei(Te=Ne||e.mouse(this)),Ia(Gn)),Hr=setTimeout(function(){Hr=null,Da(Gn)},50),_e(),En(Math.pow(2,Fn()*.002)*X.k),Un(Te,se),yo(Gn)}function Xs(){var Gn=e.mouse(this),ja=Math.log(X.k)/Math.LN2;ia(this,Gn,ei(Gn),e.event.shiftKey?Math.ceil(ja)-1:Math.floor(ja)+1)}return e.rebind(Si,bi,\"on\")};var qn=[0,1/0],Fn,ra;e.color=la;function la(){}la.prototype.toString=function(){return this.rgb()+\"\"},e.hsl=Ut;function Ut(X,se,Te){return this instanceof Ut?(this.h=+X,this.s=+se,void(this.l=+Te)):arguments.length<2?X instanceof Ut?new Ut(X.h,X.s,X.l):Ha(\"\"+X,vo,Ut):new Ut(X,se,Te)}var wt=Ut.prototype=new la;wt.brighter=function(X){return X=Math.pow(.7,arguments.length?X:1),new Ut(this.h,this.s,this.l/X)},wt.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Ut(this.h,this.s,X*this.l)},wt.rgb=function(){return rr(this.h,this.s,this.l)};function rr(X,se,Te){var Ne,He;X=isNaN(X)?0:(X%=360)<0?X+360:X,se=isNaN(se)||se<0?0:se>1?1:se,Te=Te<0?0:Te>1?1:Te,He=Te<=.5?Te*(1+se):Te+se-Te*se,Ne=2*Te-He;function Ye(nt){return nt>360?nt-=360:nt<0&&(nt+=360),nt<60?Ne+(He-Ne)*nt/60:nt<180?He:nt<240?Ne+(He-Ne)*(240-nt)/60:Ne}function kt(nt){return Math.round(Ye(nt)*255)}return new Wa(kt(X+120),kt(X),kt(X-120))}e.hcl=nr;function nr(X,se,Te){return this instanceof nr?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof nr?new nr(X.h,X.c,X.l):X instanceof ri?Sn(X.l,X.a,X.b):Sn((X=jn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new nr(X,se,Te)}var Er=nr.prototype=new la;Er.brighter=function(X){return new nr(this.h,this.c,Math.min(100,this.l+Qr*(arguments.length?X:1)))},Er.darker=function(X){return new nr(this.h,this.c,Math.max(0,this.l-Qr*(arguments.length?X:1)))},Er.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ri(Te,Math.cos(X*=ke)*se,Math.sin(X)*se)}e.lab=ri;function ri(X,se,Te){return this instanceof ri?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ri?new ri(X.l,X.a,X.b):X instanceof nr?Xr(X.h,X.c,X.l):jn((X=Wa(X)).r,X.g,X.b):new ri(X,se,Te)}var Qr=18,Oi=.95047,$i=1,tn=1.08883,fn=ri.prototype=new la;fn.brighter=function(X){return new ri(Math.min(100,this.l+Qr*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ri(Math.max(0,this.l-Qr*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Ne=(X+16)/116,He=Ne+se/500,Ye=Ne-Te/200;return He=Ba(He)*Oi,Ne=Ba(Ne)*$i,Ye=Ba(Ye)*tn,new Wa(ma(3.2404542*He-1.5371385*Ne-.4985314*Ye),ma(-.969266*He+1.8760108*Ne+.041556*Ye),ma(.0556434*He-.2040259*Ne+1.0572252*Ye))}function Sn(X,se,Te){return X>0?new nr(Math.atan2(Te,se)*vt,Math.sqrt(se*se+Te*Te),X):new nr(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(\"\"+X,Wa,rr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Xo(X){return Fa(X)+\"\"}var da=Wa.prototype=new la;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Ne=this.b,He=30;return!se&&!Te&&!Ne?new Wa(He,He,He):(se&&se<He&&(se=He),Te&&Te<He&&(Te=He),Ne&&Ne<He&&(Ne=He),new Wa(Math.min(255,se/X),Math.min(255,Te/X),Math.min(255,Ne/X)))},da.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Wa(X*this.r,X*this.g,X*this.b)},da.hsl=function(){return vo(this.r,this.g,this.b)},da.toString=function(){return\"#\"+Wn(this.r)+Wn(this.g)+Wn(this.b)};function Wn(X){return X<16?\"0\"+Math.max(0,X).toString(16):Math.min(255,X).toString(16)}function Ha(X,se,Te){var Ne=0,He=0,Ye=0,kt,nt,jt;if(kt=/([a-z]+)\\((.*)\\)/.exec(X=X.toLowerCase()),kt)switch(nt=kt[2].split(\",\"),kt[1]){case\"hsl\":return Te(parseFloat(nt[0]),parseFloat(nt[1])/100,parseFloat(nt[2])/100);case\"rgb\":return se(kr(nt[0]),kr(nt[1]),kr(nt[2]))}return(jt=Jr.get(X))?se(jt.r,jt.g,jt.b):(X!=null&&X.charAt(0)===\"#\"&&!isNaN(jt=parseInt(X.slice(1),16))&&(X.length===4?(Ne=(jt&3840)>>4,Ne=Ne>>4|Ne,He=jt&240,He=He>>4|He,Ye=jt&15,Ye=Ye<<4|Ye):X.length===7&&(Ne=(jt&16711680)>>16,He=(jt&65280)>>8,Ye=jt&255)),se(Ne,He,Ye))}function vo(X,se,Te){var Ne=Math.min(X/=255,se/=255,Te/=255),He=Math.max(X,se,Te),Ye=He-Ne,kt,nt,jt=(He+Ne)/2;return Ye?(nt=jt<.5?Ye/(He+Ne):Ye/(2-He-Ne),X==He?kt=(se-Te)/Ye+(se<Te?6:0):se==He?kt=(Te-X)/Ye+2:kt=(X-se)/Ye+4,kt*=60):(kt=NaN,nt=jt>0&&jt<1?0:kt),new Ut(kt,nt,jt)}function jn(X,se,Te){X=Mt(X),se=Mt(se),Te=Mt(Te);var Ne=ua((.4124564*X+.3575761*se+.1804375*Te)/Oi),He=ua((.2126729*X+.7151522*se+.072175*Te)/$i),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/tn);return ri(116*He-16,500*(Ne-He),200*(He-Ye))}function Mt(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function kr(X){var se=parseFloat(X);return X.charAt(X.length-1)===\"%\"?Math.round(se*2.55):se}var Jr=e.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});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function vi(X){return typeof X==\"function\"?X:function(){return X}}e.functor=vi,e.xhr=hn(G);function hn(X){return function(se,Te,Ne){return arguments.length===2&&typeof Te==\"function\"&&(Ne=Te,Te=null),An(se,Te,X,Ne)}}function An(X,se,Te,Ne){var He={},Ye=e.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),kt={},nt=new XMLHttpRequest,jt=null;self.XDomainRequest&&!(\"withCredentials\"in nt)&&/^(http(s)?:)?\\/\\//.test(X)&&(nt=new XDomainRequest),\"onload\"in nt?nt.onload=nt.onerror=gr:nt.onreadystatechange=function(){nt.readyState>3&&gr()};function gr(){var yr=nt.status,Hr;if(!yr&&Li(nt)||yr>=200&&yr<300||yr===304){try{Hr=Te.call(He,nt)}catch(qr){Ye.error.call(He,qr);return}Ye.load.call(He,Hr)}else Ye.error.call(He,nt)}return nt.onprogress=function(yr){var Hr=e.event;e.event=yr;try{Ye.progress.call(He,nt)}finally{e.event=Hr}},He.header=function(yr,Hr){return yr=(yr+\"\").toLowerCase(),arguments.length<2?kt[yr]:(Hr==null?delete kt[yr]:kt[yr]=Hr+\"\",He)},He.mimeType=function(yr){return arguments.length?(se=yr==null?null:yr+\"\",He):se},He.responseType=function(yr){return arguments.length?(jt=yr,He):jt},He.response=function(yr){return Te=yr,He},[\"get\",\"post\"].forEach(function(yr){He[yr]=function(){return He.send.apply(He,[yr].concat(r(arguments)))}}),He.send=function(yr,Hr,qr){if(arguments.length===2&&typeof Hr==\"function\"&&(qr=Hr,Hr=null),nt.open(yr,X,!0),se!=null&&!(\"accept\"in kt)&&(kt.accept=se+\",*/*\"),nt.setRequestHeader)for(var _i in kt)nt.setRequestHeader(_i,kt[_i]);return se!=null&&nt.overrideMimeType&&nt.overrideMimeType(se),jt!=null&&(nt.responseType=jt),qr!=null&&He.on(\"error\",qr).on(\"load\",function(bi){qr(null,bi)}),Ye.beforesend.call(He,nt),nt.send(Hr==null?null:Hr),He},He.abort=function(){return nt.abort(),He},e.rebind(He,Ye,\"on\"),Ne==null?He:He.get(Mn(Ne))}function Mn(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function Li(X){var se=X.responseType;return se&&se!==\"text\"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('[\"'+X+`\n",
       "]`),Ne=X.charCodeAt(0);function He(gr,yr,Hr){arguments.length<3&&(Hr=yr,yr=null);var qr=An(gr,se,yr==null?Ye:kt(yr),Hr);return qr.row=function(_i){return arguments.length?qr.response((yr=_i)==null?Ye:kt(_i)):yr},qr}function Ye(gr){return He.parse(gr.responseText)}function kt(gr){return function(yr){return He.parse(yr.responseText,gr)}}He.parse=function(gr,yr){var Hr;return He.parseRows(gr,function(qr,_i){if(Hr)return Hr(qr,_i-1);var bi=function(Zr){for(var ai={},gi=qr.length,Ii=0;Ii<gi;++Ii)ai[qr[Ii]]=Zr[Ii];return ai};Hr=yr?function(Zr,ai){return yr(bi(Zr),ai)}:bi})},He.parseRows=function(gr,yr){var Hr={},qr={},_i=[],bi=gr.length,Zr=0,ai=0,gi,Ii;function Si(){if(Zr>=bi)return qr;if(Ii)return Ii=!1,Hr;var Ln=Zr;if(gr.charCodeAt(Ln)===34){for(var En=Ln;En++<bi;)if(gr.charCodeAt(En)===34){if(gr.charCodeAt(En+1)!==34)break;++En}Zr=En+2;var Un=gr.charCodeAt(En+1);return Un===13?(Ii=!0,gr.charCodeAt(En+2)===10&&++Zr):Un===10&&(Ii=!0),gr.slice(Ln+1,En).replace(/\"\"/g,'\"')}for(;Zr<bi;){var Un=gr.charCodeAt(Zr++),ia=1;if(Un===10)Ii=!0;else if(Un===13)Ii=!0,gr.charCodeAt(Zr)===10&&(++Zr,++ia);else if(Un!==Ne)continue;return gr.slice(Ln,Zr-ia)}return gr.slice(Ln)}for(;(gi=Si())!==qr;){for(var ei=[];gi!==Hr&&gi!==qr;)ei.push(gi),gi=Si();yr&&(ei=yr(ei,ai++))==null||_i.push(ei)}return _i},He.format=function(gr){if(Array.isArray(gr[0]))return He.formatRows(gr);var yr=new U,Hr=[];return gr.forEach(function(qr){for(var _i in qr)yr.has(_i)||Hr.push(yr.add(_i))}),[Hr.map(jt).join(X)].concat(gr.map(function(qr){return Hr.map(function(_i){return jt(qr[_i])}).join(X)})).join(`\n",
       "`)},He.formatRows=function(gr){return gr.map(nt).join(`\n",
       "`)};function nt(gr){return gr.map(jt).join(X)}function jt(gr){return Te.test(gr)?'\"'+gr.replace(/\\\"/g,'\"\"')+'\"':gr}return He},e.csv=e.dsv(\",\",\"text/csv\"),e.tsv=e.dsv(\"\t\",\"text/tab-separated-values\");var _n,ya,$n,Ma,_o=this[j(this,\"requestAnimationFrame\")]||function(X){setTimeout(X,17)};e.timer=function(){No.apply(this,arguments)};function No(X,se,Te){var Ne=arguments.length;Ne<2&&(se=0),Ne<3&&(Te=Date.now());var He=Te+se,Ye={c:X,t:He,n:null};return ya?ya.n=Ye:_n=Ye,ya=Ye,$n||(Ma=clearTimeout(Ma),$n=1,_o(po)),Ye}function po(){var X=Lo(),se=ko()-X;se>24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),$n=0):($n=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t<Te&&(Te=se.t),se=(X=se).n):se=X?X.n=se.n:_n=se.n;return ya=X,Te}e.round=function(X,se){return se?Math.round(X*(se=Math.pow(10,se)))/se:Math.round(X)},e.geom={};function Ds(X){return X[0]}function Fs(X){return X[1]}e.geom.hull=function(X){var se=Ds,Te=Fs;if(arguments.length)return Ne(X);function Ne(He){if(He.length<3)return[];var Ye=vi(se),kt=vi(Te),nt,jt=He.length,gr=[],yr=[];for(nt=0;nt<jt;nt++)gr.push([+Ye.call(this,He[nt],nt),+kt.call(this,He[nt],nt),nt]);for(gr.sort(ul),nt=0;nt<jt;nt++)yr.push([gr[nt][0],-gr[nt][1]]);var Hr=ll(gr),qr=ll(yr),_i=qr[0]===Hr[0],bi=qr[qr.length-1]===Hr[Hr.length-1],Zr=[];for(nt=Hr.length-1;nt>=0;--nt)Zr.push(He[gr[Hr[nt]][2]]);for(nt=+_i;nt<qr.length-bi;++nt)Zr.push(He[gr[qr[nt]][2]]);return Zr}return Ne.x=function(He){return arguments.length?(se=He,Ne):se},Ne.y=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function ll(X){for(var se=X.length,Te=[0,1],Ne=2,He=2;He<se;He++){for(;Ne>1&&ar(X[Te[Ne-2]],X[Te[Ne-1]],X[He])<=0;)--Ne;Te[Ne++]=He}return Te.slice(0,Ne)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Ne=this[se-1],He=0;++X<se;)Te=Ne,Ne=this[X],He+=Te[1]*Ne[0]-Te[0]*Ne[1];return He*.5},zl.centroid=function(X){var se=-1,Te=this.length,Ne=0,He=0,Ye,kt=this[Te-1],nt;for(arguments.length||(X=-1/(6*this.area()));++se<Te;)Ye=kt,kt=this[se],nt=Ye[0]*kt[1]-kt[0]*Ye[1],Ne+=(Ye[0]+kt[0])*nt,He+=(Ye[1]+kt[1])*nt;return[Ne*X,He*X]},zl.clip=function(X){for(var se,Te=As(X),Ne=-1,He=this.length-As(this),Ye,kt,nt=this[He-1],jt,gr,yr;++Ne<He;){for(se=X.slice(),X.length=0,jt=this[Ne],gr=se[(kt=se.length-Te)-1],Ye=-1;++Ye<kt;)yr=se[Ye],us(yr,nt,jt)?(us(gr,nt,jt)||X.push(il(gr,yr,nt,jt)),X.push(yr)):us(gr,nt,jt)&&X.push(il(gr,yr,nt,jt)),gr=yr;Te&&X.push(X[0]),nt=jt}return X};function us(X,se,Te){return(Te[0]-se[0])*(X[1]-se[1])<(Te[1]-se[1])*(X[0]-se[0])}function il(X,se,Te,Ne){var He=X[0],Ye=Te[0],kt=se[0]-He,nt=Ne[0]-Ye,jt=X[1],gr=Te[1],yr=se[1]-jt,Hr=Ne[1]-gr,qr=(nt*(jt-gr)-Hr*(He-Ye))/(Hr*kt-nt*yr);return[He+qr*kt,jt+qr*yr]}function As(X){var se=X[0],Te=X[X.length-1];return!(se[0]-Te[0]||se[1]-Te[1])}var cl,Ks,zs,Io=[],ls,Yl,Su=[];function nc(){Os(this),this.edge=this.site=this.circle=null}function bs(X){var se=Io.pop()||new nc;return se.site=X,se}function Rn(X){Oo(X),zs.remove(X),Io.push(X),Os(X)}function _a(X){var se=X.circle,Te=se.x,Ne=se.cy,He={x:Te,y:Ne},Ye=X.P,kt=X.N,nt=[X];Rn(X);for(var jt=Ye;jt.circle&&p(Te-jt.circle.x)<Je&&p(Ne-jt.circle.cy)<Je;)Ye=jt.P,nt.unshift(jt),Rn(jt),jt=Ye;nt.unshift(jt),Oo(jt);for(var gr=kt;gr.circle&&p(Te-gr.circle.x)<Je&&p(Ne-gr.circle.cy)<Je;)kt=gr.N,nt.push(gr),Rn(gr),gr=kt;nt.push(gr),Oo(gr);var yr=nt.length,Hr;for(Hr=1;Hr<yr;++Hr)gr=nt[Hr],jt=nt[Hr-1],pl(gr.edge,jt.site,gr.site,He);jt=nt[0],gr=nt[yr-1],gr.edge=rf(jt.site,gr.site,null,He),aa(jt),aa(gr)}function Vu(X){for(var se=X.x,Te=X.y,Ne,He,Ye,kt,nt=zs._;nt;)if(Ye=Ol(nt,Te)-se,Ye>Je)nt=nt.L;else if(kt=se-xo(nt,Te),kt>Je){if(!nt.R){Ne=nt;break}nt=nt.R}else{Ye>-Je?(Ne=nt.P,He=nt):kt>-Je?(Ne=nt,He=nt.N):Ne=He=nt;break}var jt=bs(X);if(zs.insert(Ne,jt),!(!Ne&&!He)){if(Ne===He){Oo(Ne),He=bs(Ne.site),zs.insert(jt,He),jt.edge=He.edge=rf(Ne.site,jt.site),aa(Ne),aa(He);return}if(!He){jt.edge=rf(Ne.site,jt.site);return}Oo(Ne),Oo(He);var gr=Ne.site,yr=gr.x,Hr=gr.y,qr=X.x-yr,_i=X.y-Hr,bi=He.site,Zr=bi.x-yr,ai=bi.y-Hr,gi=2*(qr*ai-_i*Zr),Ii=qr*qr+_i*_i,Si=Zr*Zr+ai*ai,ei={x:(ai*Ii-_i*Si)/gi+yr,y:(qr*Si-Zr*Ii)/gi+Hr};pl(He.edge,gr,bi,ei),jt.edge=rf(gr,X,null,ei),He.edge=rf(X,bi,null,ei),aa(Ne),aa(He)}}function Ol(X,se){var Te=X.site,Ne=Te.x,He=Te.y,Ye=He-se;if(!Ye)return Ne;var kt=X.P;if(!kt)return-1/0;Te=kt.site;var nt=Te.x,jt=Te.y,gr=jt-se;if(!gr)return nt;var yr=nt-Ne,Hr=1/Ye-1/gr,qr=yr/gr;return Hr?(-qr+Math.sqrt(qr*qr-2*Hr*(yr*yr/(-2*gr)-jt+gr/2+He-Ye/2)))/Hr+Ne:(Ne+nt)/2}function xo(X,se){var Te=X.N;if(Te)return Ol(Te,se);var Ne=X.site;return Ne.y===se?Ne.x:1/0}function Kl(X){this.site=X,this.edges=[]}Kl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],Ne=X[0][1],He=X[1][1],Ye,kt,nt,jt,gr=Ks,yr=gr.length,Hr,qr,_i,bi,Zr,ai;yr--;)if(Hr=gr[yr],!(!Hr||!Hr.prepare()))for(_i=Hr.edges,bi=_i.length,qr=0;qr<bi;)ai=_i[qr].end(),nt=ai.x,jt=ai.y,Zr=_i[++qr%bi].start(),Ye=Zr.x,kt=Zr.y,(p(nt-Ye)>Je||p(jt-kt)>Je)&&(_i.splice(qr,0,new Zc(Vf(Hr.site,ai,p(nt-se)<Je&&He-jt>Je?{x:se,y:p(Ye-se)<Je?kt:He}:p(jt-He)<Je&&Te-nt>Je?{x:p(kt-He)<Je?Ye:Te,y:He}:p(nt-Te)<Je&&jt-Ne>Je?{x:Te,y:p(Ye-Te)<Je?kt:Ne}:p(jt-Ne)<Je&&nt-se>Je?{x:p(kt-Ne)<Je?Ye:se,y:Ne}:null),Hr.site,null)),++bi)}function Hl(X,se){return se.angle-X.angle}function ac(){Os(this),this.x=this.y=this.arc=this.site=this.cy=null}function aa(X){var se=X.P,Te=X.N;if(!(!se||!Te)){var Ne=se.site,He=X.site,Ye=Te.site;if(Ne!==Ye){var kt=He.x,nt=He.y,jt=Ne.x-kt,gr=Ne.y-nt,yr=Ye.x-kt,ai=Ye.y-nt,Hr=2*(jt*ai-gr*yr);if(!(Hr>=-We)){var qr=jt*jt+gr*gr,_i=yr*yr+ai*ai,bi=(ai*qr-gr*_i)/Hr,Zr=(jt*_i-yr*qr)/Hr,ai=Zr+nt,gi=Su.pop()||new ac;gi.arc=X,gi.site=He,gi.x=bi+kt,gi.y=ai+Math.sqrt(bi*bi+Zr*Zr),gi.cy=ai,X.circle=gi;for(var Ii=null,Si=Yl._;Si;)if(gi.y<Si.y||gi.y===Si.y&&gi.x<=Si.x)if(Si.L)Si=Si.L;else{Ii=Si.P;break}else if(Si.R)Si=Si.R;else{Ii=Si;break}Yl.insert(Ii,gi),Ii||(ls=gi)}}}}function Oo(X){var se=X.circle;se&&(se.P||(ls=se.N),Yl.remove(se),Su.push(se),Os(se),X.circle=null)}function qo(X,se,Te,Ne){return function(He){var Ye=He.a,kt=He.b,nt=Ye.x,jt=Ye.y,gr=kt.x,yr=kt.y,Hr=0,qr=1,_i=gr-nt,bi=yr-jt,Zr;if(Zr=X-nt,!(!_i&&Zr>0)){if(Zr/=_i,_i<0){if(Zr<Hr)return;Zr<qr&&(qr=Zr)}else if(_i>0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Te-nt,!(!_i&&Zr<0)){if(Zr/=_i,_i<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(_i>0){if(Zr<Hr)return;Zr<qr&&(qr=Zr)}if(Zr=se-jt,!(!bi&&Zr>0)){if(Zr/=bi,bi<0){if(Zr<Hr)return;Zr<qr&&(qr=Zr)}else if(bi>0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Ne-jt,!(!bi&&Zr<0)){if(Zr/=bi,bi<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(bi>0){if(Zr<Hr)return;Zr<qr&&(qr=Zr)}return Hr>0&&(He.a={x:nt+Hr*_i,y:jt+Hr*bi}),qr<1&&(He.b={x:nt+qr*_i,y:jt+qr*bi}),He}}}}}}function ql(X){for(var se=cl,Te=qo(X[0][0],X[0][1],X[1][0],X[1][1]),Ne=se.length,He;Ne--;)He=se[Ne],(!Pc(He,X)||!Te(He)||p(He.a.x-He.b.x)<Je&&p(He.a.y-He.b.y)<Je)&&(He.a=He.b=null,se.splice(Ne,1))}function Pc(X,se){var Te=X.b;if(Te)return!0;var Ne=X.a,He=se[0][0],Ye=se[1][0],kt=se[0][1],nt=se[1][1],jt=X.l,gr=X.r,yr=jt.x,Hr=jt.y,qr=gr.x,_i=gr.y,bi=(yr+qr)/2,Zr=(Hr+_i)/2,ai,gi;if(_i===Hr){if(bi<He||bi>=Ye)return;if(yr>qr){if(!Ne)Ne={x:bi,y:kt};else if(Ne.y>=nt)return;Te={x:bi,y:nt}}else{if(!Ne)Ne={x:bi,y:nt};else if(Ne.y<kt)return;Te={x:bi,y:kt}}}else if(ai=(yr-qr)/(_i-Hr),gi=Zr-ai*bi,ai<-1||ai>1)if(yr>qr){if(!Ne)Ne={x:(kt-gi)/ai,y:kt};else if(Ne.y>=nt)return;Te={x:(nt-gi)/ai,y:nt}}else{if(!Ne)Ne={x:(nt-gi)/ai,y:nt};else if(Ne.y<kt)return;Te={x:(kt-gi)/ai,y:kt}}else if(Hr<_i){if(!Ne)Ne={x:He,y:ai*He+gi};else if(Ne.x>=Ye)return;Te={x:Ye,y:ai*Ye+gi}}else{if(!Ne)Ne={x:Ye,y:ai*Ye+gi};else if(Ne.x<He)return;Te={x:He,y:ai*He+gi}}return X.a=Ne,X.b=Te,!0}function Do(X,se){this.l=X,this.r=se,this.a=this.b=null}function rf(X,se,Te,Ne){var He=new Do(X,se);return cl.push(He),Te&&pl(He,X,se,Te),Ne&&pl(He,se,X,Ne),Ks[X.i].edges.push(new Zc(He,X,se)),Ks[se.i].edges.push(new Zc(He,se,X)),He}function Vf(X,se,Te){var Ne=new Do(X,null);return Ne.a=se,Ne.b=Te,cl.push(Ne),Ne}function pl(X,se,Te,Ne){!X.a&&!X.b?(X.a=Ne,X.l=se,X.r=Te):X.l===Te?X.b=Ne:X.a=Ne}function Zc(X,se,Te){var Ne=X.a,He=X.b;this.edge=X,this.site=se,this.angle=Te?Math.atan2(Te.y-se.y,Te.x-se.x):X.l===se?Math.atan2(He.x-Ne.x,Ne.y-He.y):Math.atan2(Ne.x-He.x,He.y-Ne.y)}Zc.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}};function Jl(){this._=null}function Os(X){X.U=X.C=X.L=X.R=X.P=X.N=null}Jl.prototype={insert:function(X,se){var Te,Ne,He;if(X){if(se.P=X,se.N=X.N,X.N&&(X.N.P=se),X.N=se,X.R){for(X=X.R;X.L;)X=X.L;X.L=se}else X.R=se;Te=X}else this._?(X=Cf(this._),se.P=null,se.N=X,X.P=X.L=se,Te=X):(se.P=se.N=null,this._=se,Te=null);for(se.L=se.R=null,se.U=Te,se.C=!0,X=se;Te&&Te.C;)Ne=Te.U,Te===Ne.L?(He=Ne.R,He&&He.C?(Te.C=He.C=!1,Ne.C=!0,X=Ne):(X===Te.R&&(yu(this,Te),X=Te,Te=X.U),Te.C=!1,Ne.C=!0,oc(this,Ne))):(He=Ne.L,He&&He.C?(Te.C=He.C=!1,Ne.C=!0,X=Ne):(X===Te.L&&(oc(this,Te),X=Te,Te=X.U),Te.C=!1,Ne.C=!0,yu(this,Ne))),Te=X.U;this._.C=!1},remove:function(X){X.N&&(X.N.P=X.P),X.P&&(X.P.N=X.N),X.N=X.P=null;var se=X.U,Te,Ne=X.L,He=X.R,Ye,kt;if(Ne?He?Ye=Cf(He):Ye=Ne:Ye=He,se?se.L===X?se.L=Ye:se.R=Ye:this._=Ye,Ne&&He?(kt=Ye.C,Ye.C=X.C,Ye.L=Ne,Ne.U=Ye,Ye!==He?(se=Ye.U,Ye.U=X.U,X=Ye.R,se.L=X,Ye.R=He,He.U=Ye):(Ye.U=se,se=Ye,X=Ye.R)):(kt=X.C,X=Ye),X&&(X.U=se),!kt){if(X&&X.C){X.C=!1;return}do{if(X===this._)break;if(X===se.L){if(Te=se.R,Te.C&&(Te.C=!1,se.C=!0,yu(this,se),Te=se.R),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.R||!Te.R.C)&&(Te.L.C=!1,Te.C=!0,oc(this,Te),Te=se.R),Te.C=se.C,se.C=Te.R.C=!1,yu(this,se),X=this._;break}}else if(Te=se.L,Te.C&&(Te.C=!1,se.C=!0,oc(this,se),Te=se.L),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.L||!Te.L.C)&&(Te.R.C=!1,Te.C=!0,yu(this,Te),Te=se.L),Te.C=se.C,se.C=Te.L.C=!1,oc(this,se),X=this._;break}Te.C=!0,X=se,se=se.U}while(!X.C);X&&(X.C=!1)}}};function yu(X,se){var Te=se,Ne=se.R,He=Te.U;He?He.L===Te?He.L=Ne:He.R=Ne:X._=Ne,Ne.U=He,Te.U=Ne,Te.R=Ne.L,Te.R&&(Te.R.U=Te),Ne.L=Te}function oc(X,se){var Te=se,Ne=se.L,He=Te.U;He?He.L===Te?He.L=Ne:He.R=Ne:X._=Ne,Ne.U=He,Te.U=Ne,Te.L=Ne.R,Te.L&&(Te.L.U=Te),Ne.R=Te}function Cf(X){for(;X.L;)X=X.L;return X}function sc(X,se){var Te=X.sort(jh).pop(),Ne,He,Ye;for(cl=[],Ks=new Array(X.length),zs=new Jl,Yl=new Jl;;)if(Ye=ls,Te&&(!Ye||Te.y<Ye.y||Te.y===Ye.y&&Te.x<Ye.x))(Te.x!==Ne||Te.y!==He)&&(Ks[Te.i]=new Kl(Te),Vu(Te),Ne=Te.x,He=Te.y),Te=X.pop();else if(Ye)_a(Ye.arc);else break;se&&(ql(se),Ns(se));var kt={cells:Ks,edges:cl};return zs=Yl=cl=Ks=null,kt}function jh(X,se){return se.y-X.y||se.x-X.x}e.geom.voronoi=function(X){var se=Ds,Te=Fs,Ne=se,He=Te,Ye=Lf;if(X)return kt(X);function kt(jt){var gr=new Array(jt.length),yr=Ye[0][0],Hr=Ye[0][1],qr=Ye[1][0],_i=Ye[1][1];return sc(nt(jt),Ye).cells.forEach(function(bi,Zr){var ai=bi.edges,gi=bi.site,Ii=gr[Zr]=ai.length?ai.map(function(Si){var ei=Si.start();return[ei.x,ei.y]}):gi.x>=yr&&gi.x<=qr&&gi.y>=Hr&&gi.y<=_i?[[yr,_i],[qr,_i],[qr,Hr],[yr,Hr]]:[];Ii.point=jt[Zr]}),gr}function nt(jt){return jt.map(function(gr,yr){return{x:Math.round(Ne(gr,yr)/Je)*Je,y:Math.round(He(gr,yr)/Je)*Je,i:yr}})}return kt.links=function(jt){return sc(nt(jt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:jt[gr.l.i],target:jt[gr.r.i]}})},kt.triangles=function(jt){var gr=[];return sc(nt(jt)).cells.forEach(function(yr,Hr){for(var qr=yr.site,_i=yr.edges.sort(Hl),bi=-1,Zr=_i.length,ai,gi,Ii=_i[Zr-1].edge,Si=Ii.l===qr?Ii.r:Ii.l;++bi<Zr;)ai=Ii,gi=Si,Ii=_i[bi].edge,Si=Ii.l===qr?Ii.r:Ii.l,Hr<gi.i&&Hr<Si.i&&cs(qr,gi,Si)<0&&gr.push([jt[Hr],jt[gi.i],jt[Si.i]])}),gr},kt.x=function(jt){return arguments.length?(Ne=vi(se=jt),kt):se},kt.y=function(jt){return arguments.length?(He=vi(Te=jt),kt):Te},kt.clipExtent=function(jt){return arguments.length?(Ye=jt==null?Lf:jt,kt):Ye===Lf?null:Ye},kt.size=function(jt){return arguments.length?kt.clipExtent(jt&&[[0,0],jt]):Ye===Lf?null:Ye&&Ye[1]},kt};var Lf=[[-1e6,-1e6],[1e6,1e6]];function cs(X,se,Te){return(X.x-Te.x)*(se.y-X.y)-(X.x-se.x)*(Te.y-X.y)}e.geom.delaunay=function(X){return e.geom.voronoi().triangles(X)},e.geom.quadtree=function(X,se,Te,Ne,He){var Ye=Ds,kt=Fs,nt;if(nt=arguments.length)return Ye=nf,kt=Gf,nt===3&&(He=Te,Ne=se,Te=se=0),jt(X);function jt(gr){var yr,Hr=vi(Ye),qr=vi(kt),_i,bi,Zr,ai,gi,Ii,Si,ei;if(se!=null)gi=se,Ii=Te,Si=Ne,ei=He;else if(Si=ei=-(gi=Ii=1/0),_i=[],bi=[],ai=gr.length,nt)for(Zr=0;Zr<ai;++Zr)yr=gr[Zr],yr.x<gi&&(gi=yr.x),yr.y<Ii&&(Ii=yr.y),yr.x>Si&&(Si=yr.x),yr.y>ei&&(ei=yr.y),_i.push(yr.x),bi.push(yr.y);else for(Zr=0;Zr<ai;++Zr){var Ln=+Hr(yr=gr[Zr],Zr),En=+qr(yr,Zr);Ln<gi&&(gi=Ln),En<Ii&&(Ii=En),Ln>Si&&(Si=Ln),En>ei&&(ei=En),_i.push(Ln),bi.push(En)}var Un=Si-gi,ia=ei-Ii;Un>ia?ei=Ii+Un:Si=gi+ia;function Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Gn,ja,Fo),Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Gn+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=$l()),Sl?Xs=Uo:ja=Uo,bu?Gn=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo)}var yo=$l();if(yo.add=function(Da){Ea(yo,Da,+Hr(Da,++Zr),+qr(Da,Zr),gi,Ii,Si,ei)},yo.visit=function(Da){fl(Da,yo,gi,Ii,Si,ei)},yo.find=function(Da){return lc(yo,Da[0],Da[1],gi,Ii,Si,ei)},Zr=-1,se==null){for(;++Zr<ai;)Ea(yo,gr[Zr],_i[Zr],bi[Zr],gi,Ii,Si,ei);--Zr}else gr.forEach(yo.add);return _i=bi=gr=yr=null,yo}return jt.x=function(gr){return arguments.length?(Ye=gr,jt):Ye},jt.y=function(gr){return arguments.length?(kt=gr,jt):kt},jt.extent=function(gr){return arguments.length?(gr==null?se=Te=Ne=He=null:(se=+gr[0][0],Te=+gr[0][1],Ne=+gr[1][0],He=+gr[1][1]),jt):se==null?null:[[se,Te],[Ne,He]]},jt.size=function(gr){return arguments.length?(gr==null?se=Te=Ne=He=null:(se=Te=0,Ne=+gr[0],He=+gr[1]),jt):se==null?null:[Ne-se,He-Te]},jt};function nf(X){return X.x}function Gf(X){return X.y}function $l(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fl(X,se,Te,Ne,He,Ye){if(!X(se,Te,Ne,He,Ye)){var kt=(Te+He)*.5,nt=(Ne+Ye)*.5,jt=se.nodes;jt[0]&&fl(X,jt[0],Te,Ne,kt,nt),jt[1]&&fl(X,jt[1],kt,Ne,He,nt),jt[2]&&fl(X,jt[2],Te,nt,kt,Ye),jt[3]&&fl(X,jt[3],kt,nt,He,Ye)}}function lc(X,se,Te,Ne,He,Ye,kt){var nt=1/0,jt;return function gr(yr,Hr,qr,_i,bi){if(!(Hr>Ye||qr>kt||_i<Ne||bi<He)){if(Zr=yr.point){var Zr,ai=se-yr.x,gi=Te-yr.y,Ii=ai*ai+gi*gi;if(Ii<nt){var Si=Math.sqrt(nt=Ii);Ne=se-Si,He=Te-Si,Ye=se+Si,kt=Te+Si,jt=Zr}}for(var ei=yr.nodes,Ln=(Hr+_i)*.5,En=(qr+bi)*.5,Un=se>=Ln,ia=Te>=En,Ea=ia<<1|Un,Ia=Ea+4;Ea<Ia;++Ea)if(yr=ei[Ea&3])switch(Ea&3){case 0:gr(yr,Hr,qr,Ln,En);break;case 1:gr(yr,Ln,qr,_i,En);break;case 2:gr(yr,Hr,En,Ln,bi);break;case 3:gr(yr,Ln,En,_i,bi);break}}}(X,Ne,He,Ye,kt),jt}e.interpolateRgb=Fu;function Fu(X,se){X=e.rgb(X),se=e.rgb(se);var Te=X.r,Ne=X.g,He=X.b,Ye=se.r-Te,kt=se.g-Ne,nt=se.b-He;return function(jt){return\"#\"+Wn(Math.round(Te+Ye*jt))+Wn(Math.round(Ne+kt*jt))+Wn(Math.round(He+nt*jt))}}e.interpolateObject=Es;function Es(X,se){var Te={},Ne={},He;for(He in X)He in se?Te[He]=xl(X[He],se[He]):Ne[He]=X[He];for(He in se)He in X||(Ne[He]=se[He]);return function(Ye){for(He in Te)Ne[He]=Te[He](Ye);return Ne}}e.interpolateNumber=Hs;function Hs(X,se){return X=+X,se=+se,function(Te){return X*(1-Te)+se*Te}}e.interpolateString=Go;function Go(X,se){var Te=ps.lastIndex=uc.lastIndex=0,Ne,He,Ye,kt=-1,nt=[],jt=[];for(X=X+\"\",se=se+\"\";(Ne=ps.exec(X))&&(He=uc.exec(se));)(Ye=He.index)>Te&&(Ye=se.slice(Te,Ye),nt[kt]?nt[kt]+=Ye:nt[++kt]=Ye),(Ne=Ne[0])===(He=He[0])?nt[kt]?nt[kt]+=He:nt[++kt]=He:(nt[++kt]=null,jt.push({i:kt,x:Hs(Ne,He)})),Te=uc.lastIndex;return Te<se.length&&(Ye=se.slice(Te),nt[kt]?nt[kt]+=Ye:nt[++kt]=Ye),nt.length<2?jt[0]?(se=jt[0].x,function(gr){return se(gr)+\"\"}):function(){return se}:(se=jt.length,function(gr){for(var yr=0,Hr;yr<se;++yr)nt[(Hr=jt[yr]).i]=Hr.x(gr);return nt.join(\"\")})}var ps=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,uc=new RegExp(ps.source,\"g\");e.interpolate=xl;function xl(X,se){for(var Te=e.interpolators.length,Ne;--Te>=0&&!(Ne=e.interpolators[Te](X,se)););return Ne}e.interpolators=[function(X,se){var Te=typeof se;return(Te===\"string\"?Jr.has(se.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(se)?Fu:Go:se instanceof la?Fu:Array.isArray(se)?Gu:Te===\"object\"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Ne=[],He=X.length,Ye=se.length,kt=Math.min(X.length,se.length),nt;for(nt=0;nt<kt;++nt)Te.push(xl(X[nt],se[nt]));for(;nt<He;++nt)Ne[nt]=X[nt];for(;nt<Ye;++nt)Ne[nt]=se[nt];return function(jt){for(nt=0;nt<kt;++nt)Ne[nt]=Te[nt](jt);return Ne}}var qs=function(){return G},od=e.map({linear:qs,poly:Hf,quad:function(){return af},cubic:function(){return Hu},sin:function(){return Ic},exp:function(){return yf},circle:function(){return Bl},elastic:Ah,back:Qf,bounce:function(){return _f}}),Po=e.map({in:G,out:Ko,\"in-out\":Pa,\"out-in\":function(X){return Pa(Ko(X))}});e.ease=function(X){var se=X.indexOf(\"-\"),Te=se>=0?X.slice(0,se):X,Ne=se>=0?X.slice(se+1):\"in\";return Te=od.get(Te)||qs,Ne=Po.get(Ne)||G,sd(Ne(Te.apply(null,t.call(arguments,1))))};function sd(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Ko(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Hf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*xe)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function Ah(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(Ne){return 1+X*Math.pow(2,-10*Ne)*Math.sin((Ne-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Ne=X.c,He=X.l,Ye=se.h-Te,kt=se.c-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.c:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return Xr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+\"\"}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Ne=X.s,He=X.l,Ye=se.h-Te,kt=se.s-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.s:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return rr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+\"\"}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Ne=X.a,He=X.b,Ye=se.l-Te,kt=se.a-Ne,nt=se.b-He;return function(jt){return yn(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+\"\"}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,\"g\");return(e.transform=function(Te){if(Te!=null){se.setAttribute(\"transform\",Te);var Ne=se.transform.baseVal.consolidate()}return new jf(Ne?Ne.matrix:Kc)})(X)};function jf(X){var se=[X.a,X.b],Te=[X.c,X.d],Ne=of(se),He=cc(se,Te),Ye=of(Nl(Te,se,-He))||0;se[0]*Te[1]<Te[0]*se[1]&&(se[0]*=-1,se[1]*=-1,Ne*=-1,He*=-1),this.rotate=(Ne?Math.atan2(se[1],se[0]):Math.atan2(-Te[0],Te[1]))*vt,this.translate=[X.e,X.f],this.scale=[Ne,Ye],this.skew=Ye?Math.atan2(He,Ye)*vt:0}jf.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};function cc(X,se){return X[0]*se[0]+X[1]*se[1]}function of(X){var se=Math.sqrt(cc(X,X));return se&&(X[0]/=se,X[1]/=se),se}function Nl(X,se,Te){return X[0]+=Te*se[0],X[1]+=Te*se[1],X}var Kc={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=sf;function Rc(X){return X.length?X.pop()+\",\":\"\"}function gs(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(\"translate(\",null,\",\",null,\")\");Ne.push({i:He-4,x:Hs(X[0],se[0])},{i:He-2,x:Hs(X[1],se[1])})}else(se[0]||se[1])&&Te.push(\"translate(\"+se+\")\")}function Wf(X,se,Te,Ne){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),Ne.push({i:Te.push(Rc(Te)+\"rotate(\",null,\")\")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+\"rotate(\"+se+\")\")}function Wh(X,se,Te,Ne){X!==se?Ne.push({i:Te.push(Rc(Te)+\"skewX(\",null,\")\")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+\"skewX(\"+se+\")\")}function rh(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(Rc(Te)+\"scale(\",null,\",\",null,\")\");Ne.push({i:He-4,x:Hs(X[0],se[0])},{i:He-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+\"scale(\"+se+\")\")}function sf(X,se){var Te=[],Ne=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,Ne),Wf(X.rotate,se.rotate,Te,Ne),Wh(X.skew,se.skew,Te,Ne),rh(X.scale,se.scale,Te,Ne),X=se=null,function(He){for(var Ye=-1,kt=Ne.length,nt;++Ye<kt;)Te[(nt=Ne[Ye]).i]=nt.x(He);return Te.join(\"\")}}function Sh(X,se){return se=(se-=X=+X)||1/se,function(Te){return(Te-X)/se}}function Mu(X,se){return se=(se-=X=+X)||1/se,function(Te){return Math.max(0,Math.min(1,(Te-X)/se))}}e.layout={},e.layout.bundle=function(){return function(X){for(var se=[],Te=-1,Ne=X.length;++Te<Ne;)se.push(ih(X[Te]));return se}};function ih(X){for(var se=X.source,Te=X.target,Ne=Eu(se,Te),He=[se];se!==Ne;)se=se.parent,He.push(se);for(var Ye=He.length;Te!==Ne;)He.splice(Ye,0,Te),Te=Te.parent;return He}function js(X){for(var se=[],Te=X.parent;Te!=null;)se.push(X),X=Te,Te=Te.parent;return se.push(X),se}function Eu(X,se){if(X===se)return X;for(var Te=js(X),Ne=js(se),He=Te.pop(),Ye=Ne.pop(),kt=null;He===Ye;)kt=He,He=Te.pop(),Ye=Ne.pop();return kt}e.layout.chord=function(){var X={},se,Te,Ne,He,Ye=0,kt,nt,jt;function gr(){var Hr={},qr=[],_i=e.range(He),bi=[],Zr,ai,gi,Ii,Si;for(se=[],Te=[],Zr=0,Ii=-1;++Ii<He;){for(ai=0,Si=-1;++Si<He;)ai+=Ne[Ii][Si];qr.push(ai),bi.push(e.range(He)),Zr+=ai}for(kt&&_i.sort(function(yo,Da){return kt(qr[yo],qr[Da])}),nt&&bi.forEach(function(yo,Da){yo.sort(function(go,Is){return nt(Ne[Da][go],Ne[Da][Is])})}),Zr=(xt-Ye*He)/Zr,ai=0,Ii=-1;++Ii<He;){for(gi=ai,Si=-1;++Si<He;){var ei=_i[Ii],Ln=bi[ei][Si],En=Ne[ei][Ln],Un=ai,ia=ai+=En*Zr;Hr[ei+\"-\"+Ln]={index:ei,subindex:Ln,startAngle:Un,endAngle:ia,value:En}}Te[ei]={index:ei,startAngle:gi,endAngle:ai,value:qr[ei]},ai+=Ye}for(Ii=-1;++Ii<He;)for(Si=Ii-1;++Si<He;){var Ea=Hr[Ii+\"-\"+Si],Ia=Hr[Si+\"-\"+Ii];(Ea.value||Ia.value)&&se.push(Ea.value<Ia.value?{source:Ia,target:Ea}:{source:Ea,target:Ia})}jt&&yr()}function yr(){se.sort(function(Hr,qr){return jt((Hr.source.value+Hr.target.value)/2,(qr.source.value+qr.target.value)/2)})}return X.matrix=function(Hr){return arguments.length?(He=(Ne=Hr)&&Ne.length,se=Te=null,X):Ne},X.padding=function(Hr){return arguments.length?(Ye=Hr,se=Te=null,X):Ye},X.sortGroups=function(Hr){return arguments.length?(kt=Hr,se=Te=null,X):kt},X.sortSubgroups=function(Hr){return arguments.length?(nt=Hr,se=null,X):nt},X.sortChords=function(Hr){return arguments.length?(jt=Hr,se&&yr(),X):jt},X.chords=function(){return se||gr(),se},X.groups=function(){return Te||gr(),Te},X},e.layout.force=function(){var X={},se=e.dispatch(\"start\",\"tick\",\"end\"),Te,Ne=[1,1],He,Ye,kt=.9,nt=nl,jt=nh,gr=-30,yr=Mh,Hr=.1,qr=.64,_i=[],bi=[],Zr,ai,gi;function Ii(ei){return function(Ln,En,Un,ia){if(Ln.point!==ei){var Ea=Ln.cx-ei.x,Ia=Ln.cy-ei.y,yo=ia-En,Da=Ea*Ea+Ia*Ia;if(yo*yo/qr<Da){if(Da<yr){var go=Ln.charge/Da;ei.px-=Ea*go,ei.py-=Ia*go}return!0}if(Ln.point&&Da&&Da<yr){var go=Ln.pointCharge/Da;ei.px-=Ea*go,ei.py-=Ia*go}}return!Ln.charge}}X.tick=function(){if((Ye*=.99)<.005)return Te=null,se.end({type:\"end\",alpha:Ye=0}),!0;var ei=_i.length,Ln=bi.length,En,Un,ia,Ea,Ia,yo,Da,go,Is;for(Un=0;Un<Ln;++Un)ia=bi[Un],Ea=ia.source,Ia=ia.target,go=Ia.x-Ea.x,Is=Ia.y-Ea.y,(yo=go*go+Is*Is)&&(yo=Ye*ai[Un]*((yo=Math.sqrt(yo))-Zr[Un])/yo,go*=yo,Is*=yo,Ia.x-=go*(Da=Ea.weight+Ia.weight?Ea.weight/(Ea.weight+Ia.weight):.5),Ia.y-=Is*Da,Ea.x+=go*(Da=1-Da),Ea.y+=Is*Da);if((Da=Ye*Hr)&&(go=Ne[0]/2,Is=Ne[1]/2,Un=-1,Da))for(;++Un<ei;)ia=_i[Un],ia.x+=(go-ia.x)*Da,ia.y+=(Is-ia.y)*Da;if(gr)for(_u(En=e.geom.quadtree(_i),Ye,gi),Un=-1;++Un<ei;)(ia=_i[Un]).fixed||En.visit(Ii(ia));for(Un=-1;++Un<ei;)ia=_i[Un],ia.fixed?(ia.x=ia.px,ia.y=ia.py):(ia.x-=(ia.px-(ia.px=ia.x))*kt,ia.y-=(ia.py-(ia.py=ia.y))*kt);se.tick({type:\"tick\",alpha:Ye})},X.nodes=function(ei){return arguments.length?(_i=ei,X):_i},X.links=function(ei){return arguments.length?(bi=ei,X):bi},X.size=function(ei){return arguments.length?(Ne=ei,X):Ne},X.linkDistance=function(ei){return arguments.length?(nt=typeof ei==\"function\"?ei:+ei,X):nt},X.distance=X.linkDistance,X.linkStrength=function(ei){return arguments.length?(jt=typeof ei==\"function\"?ei:+ei,X):jt},X.friction=function(ei){return arguments.length?(kt=+ei,X):kt},X.charge=function(ei){return arguments.length?(gr=typeof ei==\"function\"?ei:+ei,X):gr},X.chargeDistance=function(ei){return arguments.length?(yr=ei*ei,X):Math.sqrt(yr)},X.gravity=function(ei){return arguments.length?(Hr=+ei,X):Hr},X.theta=function(ei){return arguments.length?(qr=ei*ei,X):Math.sqrt(qr)},X.alpha=function(ei){return arguments.length?(ei=+ei,Ye?ei>0?Ye=ei:(Te.c=null,Te.t=NaN,Te=null,se.end({type:\"end\",alpha:Ye=0})):ei>0&&(se.start({type:\"start\",alpha:Ye=ei}),Te=No(X.tick)),X):Ye},X.start=function(){var ei,Ln=_i.length,En=bi.length,Un=Ne[0],ia=Ne[1],Ea,Ia;for(ei=0;ei<Ln;++ei)(Ia=_i[ei]).index=ei,Ia.weight=0;for(ei=0;ei<En;++ei)Ia=bi[ei],typeof Ia.source==\"number\"&&(Ia.source=_i[Ia.source]),typeof Ia.target==\"number\"&&(Ia.target=_i[Ia.target]),++Ia.source.weight,++Ia.target.weight;for(ei=0;ei<Ln;++ei)Ia=_i[ei],isNaN(Ia.x)&&(Ia.x=yo(\"x\",Un)),isNaN(Ia.y)&&(Ia.y=yo(\"y\",ia)),isNaN(Ia.px)&&(Ia.px=Ia.x),isNaN(Ia.py)&&(Ia.py=Ia.y);if(Zr=[],typeof nt==\"function\")for(ei=0;ei<En;++ei)Zr[ei]=+nt.call(this,bi[ei],ei);else for(ei=0;ei<En;++ei)Zr[ei]=nt;if(ai=[],typeof jt==\"function\")for(ei=0;ei<En;++ei)ai[ei]=+jt.call(this,bi[ei],ei);else for(ei=0;ei<En;++ei)ai[ei]=jt;if(gi=[],typeof gr==\"function\")for(ei=0;ei<Ln;++ei)gi[ei]=+gr.call(this,_i[ei],ei);else for(ei=0;ei<Ln;++ei)gi[ei]=gr;function yo(Da,go){if(!Ea){for(Ea=new Array(Ln),Xs=0;Xs<Ln;++Xs)Ea[Xs]=[];for(Xs=0;Xs<En;++Xs){var Is=bi[Xs];Ea[Is.source.index].push(Is.target),Ea[Is.target.index].push(Is.source)}}for(var Ms=Ea[ei],Xs=-1,Gn=Ms.length,ja;++Xs<Gn;)if(!isNaN(ja=Ms[Xs][Da]))return ja;return Math.random()*go}return X.resume()},X.resume=function(){return X.alpha(.1)},X.stop=function(){return X.alpha(0)},X.drag=function(){if(He||(He=e.behavior.drag().origin(G).on(\"dragstart.force\",Dc).on(\"drag.force\",Si).on(\"dragend.force\",ks)),!arguments.length)return He;this.on(\"mouseover.force\",bc).on(\"mouseout.force\",hu).call(He)};function Si(ei){ei.px=e.event.x,ei.py=e.event.y,X.resume()}return e.rebind(X,se,\"on\")};function Dc(X){X.fixed|=2}function ks(X){X.fixed&=-7}function bc(X){X.fixed|=4,X.px=X.x,X.py=X.y}function hu(X){X.fixed&=-5}function _u(X,se,Te){var Ne=0,He=0;if(X.charge=0,!X.leaf)for(var Ye=X.nodes,kt=Ye.length,nt=-1,jt;++nt<kt;)jt=Ye[nt],jt!=null&&(_u(jt,se,Te),X.charge+=jt.charge,Ne+=jt.charge*jt.cx,He+=jt.charge*jt.cy);if(X.point){X.leaf||(X.point.x+=Math.random()-.5,X.point.y+=Math.random()-.5);var gr=se*Te[X.point.index];X.charge+=X.pointCharge=gr,Ne+=gr*X.point.x,He+=gr*X.point.y}X.cx=Ne/X.charge,X.cy=He/X.charge}var nl=20,nh=1,Mh=1/0;e.layout.hierarchy=function(){var X=Pf,se=bd,Te=xf;function Ne(He){var Ye=[He],kt=[],nt;for(He.depth=0;(nt=Ye.pop())!=null;)if(kt.push(nt),(gr=se.call(Ne,nt,nt.depth))&&(jt=gr.length)){for(var jt,gr,yr;--jt>=0;)Ye.push(yr=gr[jt]),yr.parent=nt,yr.depth=nt.depth+1;Te&&(nt.value=0),nt.children=gr}else Te&&(nt.value=+Te.call(Ne,nt,nt.depth)||0),delete nt.children;return wc(He,function(Hr){var qr,_i;X&&(qr=Hr.children)&&qr.sort(X),Te&&(_i=Hr.parent)&&(_i.value+=Hr.value)}),kt}return Ne.sort=function(He){return arguments.length?(X=He,Ne):X},Ne.children=function(He){return arguments.length?(se=He,Ne):se},Ne.value=function(He){return arguments.length?(Te=He,Ne):Te},Ne.revalue=function(He){return Te&&(Fc(He,function(Ye){Ye.children&&(Ye.value=0)}),wc(He,function(Ye){var kt;Ye.children||(Ye.value=+Te.call(Ne,Ye,Ye.depth)||0),(kt=Ye.parent)&&(kt.value+=Ye.value)})),He},Ne};function zu(X,se){return e.rebind(X,se,\"sort\",\"children\",\"value\"),X.nodes=X,X.links=Ou,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(He=X.children)&&(Ne=He.length))for(var Ne,He;--Ne>=0;)Te.push(He[Ne])}function wc(X,se){for(var Te=[X],Ne=[];(X=Te.pop())!=null;)if(Ne.push(X),(kt=X.children)&&(Ye=kt.length))for(var He=-1,Ye,kt;++He<Ye;)Te.push(kt[He]);for(;(X=Ne.pop())!=null;)se(X)}function bd(X){return X.children}function xf(X){return X.value}function Pf(X,se){return se.value-X.value}function Ou(X){return e.merge(X.map(function(se){return(se.children||[]).map(function(Te){return{source:se,target:Te}})}))}e.layout.partition=function(){var X=e.layout.hierarchy(),se=[1,1];function Te(Ye,kt,nt,jt){var gr=Ye.children;if(Ye.x=kt,Ye.y=Ye.depth*jt,Ye.dx=nt,Ye.dy=jt,gr&&(Hr=gr.length)){var yr=-1,Hr,qr,_i;for(nt=Ye.value?nt/Ye.value:0;++yr<Hr;)Te(qr=gr[yr],kt,_i=qr.value*nt,jt),kt+=_i}}function Ne(Ye){var kt=Ye.children,nt=0;if(kt&&(gr=kt.length))for(var jt=-1,gr;++jt<gr;)nt=Math.max(nt,Ne(kt[jt]));return 1+nt}function He(Ye,kt){var nt=X.call(this,Ye,kt);return Te(nt[0],0,se[0],se[1]/Ne(nt[0])),nt}return He.size=function(Ye){return arguments.length?(se=Ye,He):se},zu(He,X)},e.layout.pie=function(){var X=Number,se=bf,Te=0,Ne=xt,He=0;function Ye(kt){var nt=kt.length,jt=kt.map(function(Ii,Si){return+X.call(Ye,Ii,Si)}),gr=+(typeof Te==\"function\"?Te.apply(this,arguments):Te),yr=(typeof Ne==\"function\"?Ne.apply(this,arguments):Ne)-gr,Hr=Math.min(Math.abs(yr)/nt,+(typeof He==\"function\"?He.apply(this,arguments):He)),qr=Hr*(yr<0?-1:1),_i=e.sum(jt),bi=_i?(yr-nt*qr)/_i:0,Zr=e.range(nt),ai=[],gi;return se!=null&&Zr.sort(se===bf?function(Ii,Si){return jt[Si]-jt[Ii]}:function(Ii,Si){return se(kt[Ii],kt[Si])}),Zr.forEach(function(Ii){ai[Ii]={data:kt[Ii],value:gi=jt[Ii],startAngle:gr,endAngle:gr+=gi*bi+qr,padAngle:Hr}}),ai}return Ye.value=function(kt){return arguments.length?(X=kt,Ye):X},Ye.sort=function(kt){return arguments.length?(se=kt,Ye):se},Ye.startAngle=function(kt){return arguments.length?(Te=kt,Ye):Te},Ye.endAngle=function(kt){return arguments.length?(Ne=kt,Ye):Ne},Ye.padAngle=function(kt){return arguments.length?(He=kt,Ye):He},Ye};var bf={};e.layout.stack=function(){var X=G,se=du,Te=ku,Ne=Xh,He=jl,Ye=lf;function kt(nt,jt){if(!(bi=nt.length))return nt;var gr=nt.map(function(Ii,Si){return X.call(kt,Ii,Si)}),yr=gr.map(function(Ii){return Ii.map(function(Si,ei){return[He.call(kt,Si,ei),Ye.call(kt,Si,ei)]})}),Hr=se.call(kt,yr,jt);gr=e.permute(gr,Hr),yr=e.permute(yr,Hr);var qr=Te.call(kt,yr,jt),_i=gr[0].length,bi,Zr,ai,gi;for(ai=0;ai<_i;++ai)for(Ne.call(kt,gr[0][ai],gi=qr[ai],yr[0][ai][1]),Zr=1;Zr<bi;++Zr)Ne.call(kt,gr[Zr][ai],gi+=yr[Zr-1][ai][1],yr[Zr][ai][1]);return nt}return kt.values=function(nt){return arguments.length?(X=nt,kt):X},kt.order=function(nt){return arguments.length?(se=typeof nt==\"function\"?nt:If.get(nt)||du,kt):se},kt.offset=function(nt){return arguments.length?(Te=typeof nt==\"function\"?nt:Cs.get(nt)||ku,kt):Te},kt.x=function(nt){return arguments.length?(He=nt,kt):He},kt.y=function(nt){return arguments.length?(Ye=nt,kt):Ye},kt.out=function(nt){return arguments.length?(Ne=nt,kt):Ne},kt};function jl(X){return X.x}function lf(X){return X.y}function Xh(X,se,Te){X.y0=se,X.y=Te}var If=e.map({\"inside-out\":function(X){var se=X.length,Te,Ne,He=X.map(Xf),Ye=X.map(Us),kt=e.range(se).sort(function(Hr,qr){return He[Hr]-He[qr]}),nt=0,jt=0,gr=[],yr=[];for(Te=0;Te<se;++Te)Ne=kt[Te],nt<jt?(nt+=Ye[Ne],gr.push(Ne)):(jt+=Ye[Ne],yr.push(Ne));return yr.reverse().concat(gr)},reverse:function(X){return e.range(X.length).reverse()},default:du}),Cs=e.map({silhouette:function(X){var se=X.length,Te=X[0].length,Ne=[],He=0,Ye,kt,nt,jt=[];for(kt=0;kt<Te;++kt){for(Ye=0,nt=0;Ye<se;Ye++)nt+=X[Ye][kt][1];nt>He&&(He=nt),Ne.push(nt)}for(kt=0;kt<Te;++kt)jt[kt]=(He-Ne[kt])/2;return jt},wiggle:function(X){var se=X.length,Te=X[0],Ne=Te.length,He,Ye,kt,nt,jt,gr,yr,Hr,qr,_i=[];for(_i[0]=Hr=qr=0,Ye=1;Ye<Ne;++Ye){for(He=0,nt=0;He<se;++He)nt+=X[He][Ye][1];for(He=0,jt=0,yr=Te[Ye][0]-Te[Ye-1][0];He<se;++He){for(kt=0,gr=(X[He][Ye][1]-X[He][Ye-1][1])/(2*yr);kt<He;++kt)gr+=(X[kt][Ye][1]-X[kt][Ye-1][1])/yr;jt+=gr*X[He][Ye][1]}_i[Ye]=Hr-=nt?jt/nt*yr:0,Hr<qr&&(qr=Hr)}for(Ye=0;Ye<Ne;++Ye)_i[Ye]-=qr;return _i},expand:function(X){var se=X.length,Te=X[0].length,Ne=1/se,He,Ye,kt,nt=[];for(Ye=0;Ye<Te;++Ye){for(He=0,kt=0;He<se;He++)kt+=X[He][Ye][1];if(kt)for(He=0;He<se;He++)X[He][Ye][1]/=kt;else for(He=0;He<se;He++)X[He][Ye][1]=Ne}for(Ye=0;Ye<Te;++Ye)nt[Ye]=0;return nt},zero:ku});function du(X){return e.range(X.length)}function ku(X){for(var se=-1,Te=X[0].length,Ne=[];++se<Te;)Ne[se]=0;return Ne}function Xf(X){for(var se=1,Te=0,Ne=X[0][1],He,Ye=X.length;se<Ye;++se)(He=X[se][1])>Ne&&(Te=se,Ne=He);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,Ne=zc;function He(Ye,qr){for(var nt=[],jt=Ye.map(se,this),gr=Te.call(this,jt,qr),yr=Ne.call(this,gr,jt,qr),Hr,qr=-1,_i=jt.length,bi=yr.length-1,Zr=X?1:1/_i,ai;++qr<bi;)Hr=nt[qr]=[],Hr.dx=yr[qr+1]-(Hr.x=yr[qr]),Hr.y=0;if(bi>0)for(qr=-1;++qr<_i;)ai=jt[qr],ai>=gr[0]&&ai<=gr[1]&&(Hr=nt[e.bisect(yr,ai,1,bi)-1],Hr.y+=Zr,Hr.push(Ye[qr]));return nt}return He.value=function(Ye){return arguments.length?(se=Ye,He):se},He.range=function(Ye){return arguments.length?(Te=vi(Ye),He):Te},He.bins=function(Ye){return arguments.length?(Ne=typeof Ye==\"number\"?function(kt){return Wu(kt,Ye)}:vi(Ye),He):Ne},He.frequency=function(Ye){return arguments.length?(X=!!Ye,He):X},He};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Ne=+X[0],He=(X[1]-Ne)/se,Ye=[];++Te<=se;)Ye[Te]=He*Te+Ne;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Ne;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr=Te[0],yr=Te[1],Hr=Ne==null?Math.sqrt:typeof Ne==\"function\"?Ne:function(){return Ne};if(jt.x=jt.y=0,wc(jt,function(_i){_i.r=+Hr(_i.value)}),wc(jt,ah),se){var qr=se*(Ne?1:Math.max(2*jt.r/gr,2*jt.r/yr))/2;wc(jt,function(_i){_i.r+=qr}),wc(jt,ah),wc(jt,function(_i){_i.r-=qr})}return Tc(jt,gr/2,yr/2,Ne?1:1/Math.max(2*jt.r/gr,2*jt.r/yr)),nt}return He.size=function(Ye){return arguments.length?(Te=Ye,He):Te},He.radius=function(Ye){return arguments.length?(Ne=Ye==null||typeof Ye==\"function\"?Ye:+Ye,He):Ne},He.padding=function(Ye){return arguments.length?(se=+Ye,He):se},zu(He,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Zf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Ne=se.y-X.y,He=X.r+se.r;return .999*He*He>Te*Te+Ne*Ne}function ah(X){if(!(se=X.children)||!(qr=se.length))return;var se,Te=1/0,Ne=-1/0,He=1/0,Ye=-1/0,kt,nt,jt,gr,yr,Hr,qr;function _i(ei){Te=Math.min(ei.x-ei.r,Te),Ne=Math.max(ei.x+ei.r,Ne),He=Math.min(ei.y-ei.r,He),Ye=Math.max(ei.y+ei.r,Ye)}if(se.forEach(Zu),kt=se[0],kt.x=-kt.r,kt.y=0,_i(kt),qr>1&&(nt=se[1],nt.x=nt.r,nt.y=0,_i(nt),qr>2))for(jt=se[2],wl(kt,nt,jt),_i(jt),uf(kt,jt),kt._pack_prev=jt,uf(jt,nt),nt=kt._pack_next,gr=3;gr<qr;gr++){wl(kt,nt,jt=se[gr]);var bi=0,Zr=1,ai=1;for(yr=nt._pack_next;yr!==nt;yr=yr._pack_next,Zr++)if(Wl(yr,jt)){bi=1;break}if(bi==1)for(Hr=kt._pack_prev;Hr!==yr._pack_prev&&!Wl(Hr,jt);Hr=Hr._pack_prev,ai++);bi?(Zr<ai||Zr==ai&&nt.r<kt.r?Zf(kt,nt=yr):Zf(kt=Hr,nt),gr--):(uf(kt,jt),nt=jt,_i(jt))}var gi=(Te+Ne)/2,Ii=(He+Ye)/2,Si=0;for(gr=0;gr<qr;gr++)jt=se[gr],jt.x-=gi,jt.y-=Ii,Si=Math.max(Si,jt.r+Math.sqrt(jt.x*jt.x+jt.y*jt.y));X.r=Si,se.forEach(Oc)}function Zu(X){X._pack_next=X._pack_prev=X}function Oc(X){delete X._pack_next,delete X._pack_prev}function Tc(X,se,Te,Ne){var He=X.children;if(X.x=se+=Ne*X.x,X.y=Te+=Ne*X.y,X.r*=Ne,He)for(var Ye=-1,kt=He.length;++Ye<kt;)Tc(He[Ye],se,Te,Ne)}function wl(X,se,Te){var Ne=X.r+Te.r,He=se.x-X.x,Ye=se.y-X.y;if(Ne&&(He||Ye)){var kt=se.r+Te.r,nt=He*He+Ye*Ye;kt*=kt,Ne*=Ne;var jt=.5+(Ne-kt)/(2*nt),gr=Math.sqrt(Math.max(0,2*kt*(Ne+nt)-(Ne-=nt)*Ne-kt*kt))/(2*nt);Te.x=X.x+jt*He+gr*Ye,Te.y=X.y+jt*Ye-gr*He}else Te.x=X.x+Ne,Te.y=X.y}e.layout.tree=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=null;function He(yr,Hr){var qr=X.call(this,yr,Hr),_i=qr[0],bi=Ye(_i);if(wc(bi,kt),bi.parent.m=-bi.z,Fc(bi,nt),Ne)Fc(_i,gr);else{var Zr=_i,ai=_i,gi=_i;Fc(_i,function(Ln){Ln.x<Zr.x&&(Zr=Ln),Ln.x>ai.x&&(ai=Ln),Ln.depth>gi.depth&&(gi=Ln)});var Ii=se(Zr,ai)/2-Zr.x,Si=Te[0]/(ai.x+se(ai,Zr)/2+Ii),ei=Te[1]/(gi.depth||1);Fc(_i,function(Ln){Ln.x=(Ln.x+Ii)*Si,Ln.y=Ln.depth*ei})}return qr}function Ye(yr){for(var Hr={A:null,children:[yr]},qr=[Hr],_i;(_i=qr.pop())!=null;)for(var bi=_i.children,Zr,ai=0,gi=bi.length;ai<gi;++ai)qr.push((bi[ai]=Zr={_:bi[ai],parent:_i,children:(Zr=bi[ai].children)&&Zr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:ai}).a=Zr);return Hr.children[0]}function kt(yr){var Hr=yr.children,qr=yr.parent.children,_i=yr.i?qr[yr.i-1]:null;if(Hr.length){Bc(yr);var bi=(Hr[0].z+Hr[Hr.length-1].z)/2;_i?(yr.z=_i.z+se(yr._,_i._),yr.m=yr.z-bi):yr.z=bi}else _i&&(yr.z=_i.z+se(yr._,_i._));yr.parent.A=jt(yr,_i,yr.parent.A||qr[0])}function nt(yr){yr._.x=yr.z+yr.parent.m,yr.m+=yr.parent.m}function jt(yr,Hr,qr){if(Hr){for(var _i=yr,bi=yr,Zr=Hr,ai=_i.parent.children[0],gi=_i.m,Ii=bi.m,Si=Zr.m,ei=ai.m,Ln;Zr=cf(Zr),_i=qc(_i),Zr&&_i;)ai=qc(ai),bi=cf(bi),bi.a=yr,Ln=Zr.z+Si-_i.z-gi+se(Zr._,_i._),Ln>0&&(fc(At(Zr,yr,qr),yr,Ln),gi+=Ln,Ii+=Ln),Si+=Zr.m,gi+=_i.m,ei+=ai.m,Ii+=bi.m;Zr&&!cf(bi)&&(bi.t=Zr,bi.m+=Si-Ii),_i&&!qc(ai)&&(ai.t=_i,ai.m+=gi-ei,qr=yr)}return qr}function gr(yr){yr.x*=Te[0],yr.y=yr.depth*Te[1]}return He.separation=function(yr){return arguments.length?(se=yr,He):se},He.size=function(yr){return arguments.length?(Ne=(Te=yr)==null?gr:null,He):Ne?null:Te},He.nodeSize=function(yr){return arguments.length?(Ne=(Te=yr)==null?null:gr,He):Ne?Te:null},zu(He,X)};function vu(X,se){return X.parent==se.parent?1:2}function qc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Ne=Te/(se.i-X.i);se.c-=Ne,se.s+=Te,X.c+=Ne,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Ne=X.children,He=Ne.length,Ye;--He>=0;)Ye=Ne[He],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function At(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=!1;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr,yr=0;wc(jt,function(Zr){var ai=Zr.children;ai&&ai.length?(Zr.x=Cr(ai),Zr.y=Xt(ai)):(Zr.x=gr?yr+=se(Zr,gr):0,Zr.y=0,gr=Zr)});var Hr=Ar(jt),qr=Kr(jt),_i=Hr.x-se(Hr,qr)/2,bi=qr.x+se(qr,Hr)/2;return wc(jt,Ne?function(Zr){Zr.x=(Zr.x-jt.x)*Te[0],Zr.y=(jt.y-Zr.y)*Te[1]}:function(Zr){Zr.x=(Zr.x-_i)/(bi-_i)*Te[0],Zr.y=(1-(jt.y?Zr.y/jt.y:1))*Te[1]}),nt}return He.separation=function(Ye){return arguments.length?(se=Ye,He):se},He.size=function(Ye){return arguments.length?(Ne=(Te=Ye)==null,He):Ne?null:Te},He.nodeSize=function(Ye){return arguments.length?(Ne=(Te=Ye)!=null,He):Ne?Te:null},zu(He,X)};function Xt(X){return 1+e.max(X,function(se){return se.y})}function Cr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function Ar(X){var se=X.children;return se&&se.length?Ar(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Ne=null,He=ki,Ye=!1,kt,nt=\"squarify\",jt=.5*(1+Math.sqrt(5));function gr(Zr,ai){for(var gi=-1,Ii=Zr.length,Si,ei;++gi<Ii;)ei=(Si=Zr[gi]).value*(ai<0?0:ai),Si.area=isNaN(ei)||ei<=0?0:ei}function yr(Zr){var ai=Zr.children;if(ai&&ai.length){var gi=He(Zr),Ii=[],Si=ai.slice(),ei,Ln=1/0,En,Un=nt===\"slice\"?gi.dx:nt===\"dice\"?gi.dy:nt===\"slice-dice\"?Zr.depth&1?gi.dy:gi.dx:Math.min(gi.dx,gi.dy),ia;for(gr(Si,gi.dx*gi.dy/Zr.value),Ii.area=0;(ia=Si.length)>0;)Ii.push(ei=Si[ia-1]),Ii.area+=ei.area,nt!==\"squarify\"||(En=qr(Ii,Un))<=Ln?(Si.pop(),Ln=En):(Ii.area-=Ii.pop().area,_i(Ii,Un,gi,!1),Un=Math.min(gi.dx,gi.dy),Ii.length=Ii.area=0,Ln=1/0);Ii.length&&(_i(Ii,Un,gi,!0),Ii.length=Ii.area=0),ai.forEach(yr)}}function Hr(Zr){var ai=Zr.children;if(ai&&ai.length){var gi=He(Zr),Ii=ai.slice(),Si,ei=[];for(gr(Ii,gi.dx*gi.dy/Zr.value),ei.area=0;Si=Ii.pop();)ei.push(Si),ei.area+=Si.area,Si.z!=null&&(_i(ei,Si.z?gi.dx:gi.dy,gi,!Ii.length),ei.length=ei.area=0);ai.forEach(Hr)}}function qr(Zr,ai){for(var gi=Zr.area,Ii,Si=0,ei=1/0,Ln=-1,En=Zr.length;++Ln<En;)(Ii=Zr[Ln].area)&&(Ii<ei&&(ei=Ii),Ii>Si&&(Si=Ii));return gi*=gi,ai*=ai,gi?Math.max(ai*Si*jt/gi,gi/(ai*ei*jt)):1/0}function _i(Zr,ai,gi,Ii){var Si=-1,ei=Zr.length,Ln=gi.x,En=gi.y,Un=ai?se(Zr.area/ai):0,ia;if(ai==gi.dx){for((Ii||Un>gi.dy)&&(Un=gi.dy);++Si<ei;)ia=Zr[Si],ia.x=Ln,ia.y=En,ia.dy=Un,Ln+=ia.dx=Math.min(gi.x+gi.dx-Ln,Un?se(ia.area/Un):0);ia.z=!0,ia.dx+=gi.x+gi.dx-Ln,gi.y+=Un,gi.dy-=Un}else{for((Ii||Un>gi.dx)&&(Un=gi.dx);++Si<ei;)ia=Zr[Si],ia.x=Ln,ia.y=En,ia.dx=Un,En+=ia.dy=Math.min(gi.y+gi.dy-En,Un?se(ia.area/Un):0);ia.z=!1,ia.dy+=gi.y+gi.dy-En,gi.x+=Un,gi.dx-=Un}}function bi(Zr){var ai=kt||X(Zr),gi=ai[0];return gi.x=gi.y=0,gi.value?(gi.dx=Te[0],gi.dy=Te[1]):gi.dx=gi.dy=0,kt&&X.revalue(gi),gr([gi],gi.dx*gi.dy/gi.value),(kt?Hr:yr)(gi),Ye&&(kt=ai),ai}return bi.size=function(Zr){return arguments.length?(Te=Zr,bi):Te},bi.padding=function(Zr){if(!arguments.length)return Ne;function ai(Si){var ei=Zr.call(bi,Si,Si.depth);return ei==null?ki(Si):Xi(Si,typeof ei==\"number\"?[ei,ei,ei,ei]:ei)}function gi(Si){return Xi(Si,Zr)}var Ii;return He=(Ne=Zr)==null?ki:(Ii=typeof Zr)==\"function\"?ai:(Ii===\"number\"&&(Zr=[Zr,Zr,Zr,Zr]),gi),bi},bi.round=function(Zr){return arguments.length?(se=Zr?Math.round:Number,bi):se!=Number},bi.sticky=function(Zr){return arguments.length?(Ye=Zr,kt=null,bi):Ye},bi.ratio=function(Zr){return arguments.length?(jt=Zr,bi):jt},bi.mode=function(Zr){return arguments.length?(nt=Zr+\"\",bi):nt},zu(bi,X)};function ki(X){return{x:X.x,y:X.y,dx:X.dx,dy:X.dy}}function Xi(X,se){var Te=X.x+se[3],Ne=X.y+se[0],He=X.dx-se[1]-se[3],Ye=X.dy-se[0]-se[2];return He<0&&(Te+=He/2,He=0),Ye<0&&(Ne+=Ye/2,Ye=0),{x:Te,y:Ne,dx:He,dy:Ye}}e.random={normal:function(X,se){var Te=arguments.length;return Te<2&&(se=1),Te<1&&(X=0),function(){var Ne,He,Ye;do Ne=Math.random()*2-1,He=Math.random()*2-1,Ye=Ne*Ne+He*He;while(!Ye||Ye>1);return X+se*Ne*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te<X;Te++)se+=Math.random();return se}}},e.scale={};function dn(X){var se=X[0],Te=X[X.length-1];return se<Te?[se,Te]:[Te,se]}function wn(X){return X.rangeExtent?X.rangeExtent():dn(X.range())}function Nn(X,se,Te,Ne){var He=Te(X[0],X[1]),Ye=Ne(se[0],se[1]);return function(kt){return Ye(He(kt))}}function Yi(X,se){var Te=0,Ne=X.length-1,He=X[Te],Ye=X[Ne],kt;return Ye<He&&(kt=Te,Te=Ne,Ne=kt,kt=He,He=Ye,Ye=kt),X[Te]=se.floor(He),X[Ne]=se.ceil(Ye),X}function Qi(X){return X?{floor:function(se){return Math.floor(se/X)*X},ceil:function(se){return Math.ceil(se/X)*X}}:on}var on={floor:G,ceil:G};function Fi(X,se,Te,Ne){var He=[],Ye=[],kt=0,nt=Math.min(X.length,se.length)-1;for(X[nt]<X[0]&&(X=X.slice().reverse(),se=se.slice().reverse());++kt<=nt;)He.push(Te(X[kt-1],X[kt])),Ye.push(Ne(se[kt-1],se[kt]));return function(jt){var gr=e.bisect(X,jt,1,nt)-1;return Ye[gr](He[gr](jt))}}e.scale.linear=function(){return Qn([0,1],[0,1],xl,!1)};function Qn(X,se,Te,Ne){var He,Ye;function kt(){var jt=Math.min(X.length,se.length)>2?Fi:Nn,gr=Ne?Mu:Sh;return He=jt(X,se,gr,Te),Ye=jt(se,X,gr,xl),nt}function nt(jt){return He(jt)}return nt.invert=function(jt){return Ye(jt)},nt.domain=function(jt){return arguments.length?(X=jt.map(Number),kt()):X},nt.range=function(jt){return arguments.length?(se=jt,kt()):se},nt.rangeRound=function(jt){return nt.range(jt).interpolate(ju)},nt.clamp=function(jt){return arguments.length?(Ne=jt,kt()):Ne},nt.interpolate=function(jt){return arguments.length?(Te=jt,kt()):Te},nt.ticks=function(jt){return Na(X,jt)},nt.tickFormat=function(jt,gr){return d3_scale_linearTickFormat(X,jt,gr)},nt.nice=function(jt){return Ra(X,jt),kt()},nt.copy=function(){return Qn(X,se,Te,Ne)},kt()}function Ca(X,se){return e.rebind(X,se,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Ra(X,se){return Yi(X,Qi(La(X,se)[2])),Yi(X,Qi(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),Ne=Te[1]-Te[0],He=Math.pow(10,Math.floor(Math.log(Ne/se)/Math.LN10)),Ye=se/Ne*He;return Ye<=.15?He*=10:Ye<=.35?He*=5:Ye<=.75&&(He*=2),Te[0]=Math.ceil(Te[0]/He)*He,Te[1]=Math.floor(Te[1]/He)*He+He*.5,Te[2]=He,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Yn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Yn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!==\"e\"):Te-(X===\"%\")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Ne){function He(nt){return(Te?Math.log(nt<0?0:nt):-Math.log(nt>0?0:-nt))/Math.log(se)}function Ye(nt){return Te?Math.pow(se,nt):-Math.pow(se,-nt)}function kt(nt){return X(He(nt))}return kt.invert=function(nt){return Ye(X.invert(nt))},kt.domain=function(nt){return arguments.length?(Te=nt[0]>=0,X.domain((Ne=nt.map(Number)).map(He)),kt):Ne},kt.base=function(nt){return arguments.length?(se=+nt,X.domain(Ne.map(He)),kt):se},kt.nice=function(){var nt=Yi(Ne.map(He),Te?Math:Zo);return X.domain(nt),Ne=nt.map(Ye),kt},kt.ticks=function(){var nt=dn(Ne),jt=[],gr=nt[0],yr=nt[1],Hr=Math.floor(He(gr)),qr=Math.ceil(He(yr)),_i=se%1?2:se;if(isFinite(qr-Hr)){if(Te){for(;Hr<qr;Hr++)for(var bi=1;bi<_i;bi++)jt.push(Ye(Hr)*bi);jt.push(Ye(Hr))}else for(jt.push(Ye(Hr));Hr++<qr;)for(var bi=_i-1;bi>0;bi--)jt.push(Ye(Hr)*bi);for(Hr=0;jt[Hr]<gr;Hr++);for(qr=jt.length;jt[qr-1]>yr;qr--);jt=jt.slice(Hr,qr)}return jt},kt.copy=function(){return bo(X.copy(),se,Te,Ne)},Ca(kt,X)}var Zo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var Ne=as(se),He=as(1/se);function Ye(kt){return X(Ne(kt))}return Ye.invert=function(kt){return He(X.invert(kt))},Ye.domain=function(kt){return arguments.length?(X.domain((Te=kt.map(Number)).map(Ne)),Ye):Te},Ye.ticks=function(kt){return Na(Te,kt)},Ye.tickFormat=function(kt,nt){return d3_scale_linearTickFormat(Te,kt,nt)},Ye.nice=function(kt){return Ye.domain(Ra(Te,kt))},Ye.exponent=function(kt){return arguments.length?(Ne=as(se=kt),He=as(1/se),X.domain(Te.map(Ne)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:\"range\",a:[[]]})};function ws(X,se){var Te,Ne,He;function Ye(nt){return Ne[((Te.get(nt)||(se.t===\"range\"?Te.set(nt,X.push(nt)):NaN))-1)%Ne.length]}function kt(nt,jt){return e.range(X.length).map(function(gr){return nt+jt*gr})}return Ye.domain=function(nt){if(!arguments.length)return X;X=[],Te=new T;for(var jt=-1,gr=nt.length,yr;++jt<gr;)Te.has(yr=nt[jt])||Te.set(yr,X.push(yr));return Ye[se.t].apply(Ye,se.a)},Ye.range=function(nt){return arguments.length?(Ne=nt,He=0,se={t:\"range\",a:arguments},Ye):Ne},Ye.rangePoints=function(nt,jt){arguments.length<2&&(jt=0);var gr=nt[0],yr=nt[1],Hr=X.length<2?(gr=(gr+yr)/2,0):(yr-gr)/(X.length-1+jt);return Ne=kt(gr+Hr*jt/2,Hr),He=0,se={t:\"rangePoints\",a:arguments},Ye},Ye.rangeRoundPoints=function(nt,jt){arguments.length<2&&(jt=0);var gr=nt[0],yr=nt[1],Hr=X.length<2?(gr=yr=Math.round((gr+yr)/2),0):(yr-gr)/(X.length-1+jt)|0;return Ne=kt(gr+Math.round(Hr*jt/2+(yr-gr-(X.length-1+jt)*Hr)/2),Hr),He=0,se={t:\"rangeRoundPoints\",a:arguments},Ye},Ye.rangeBands=function(nt,jt,gr){arguments.length<2&&(jt=0),arguments.length<3&&(gr=jt);var yr=nt[1]<nt[0],Hr=nt[yr-0],qr=nt[1-yr],_i=(qr-Hr)/(X.length-jt+2*gr);return Ne=kt(Hr+_i*gr,_i),yr&&Ne.reverse(),He=_i*(1-jt),se={t:\"rangeBands\",a:arguments},Ye},Ye.rangeRoundBands=function(nt,jt,gr){arguments.length<2&&(jt=0),arguments.length<3&&(gr=jt);var yr=nt[1]<nt[0],Hr=nt[yr-0],qr=nt[1-yr],_i=Math.floor((qr-Hr)/(X.length-jt+2*gr));return Ne=kt(Hr+Math.round((qr-Hr-(X.length-jt)*_i)/2),_i),yr&&Ne.reverse(),He=Math.round(_i*(1-jt)),se={t:\"rangeRoundBands\",a:arguments},Ye},Ye.rangeBand=function(){return He},Ye.rangeExtent=function(){return dn(se.a[0])},Ye.copy=function(){return ws(X,se)},Ye.domain(X)}e.scale.category10=function(){return e.scale.ordinal().range(Ho)},e.scale.category20=function(){return e.scale.ordinal().range(ml)},e.scale.category20b=function(){return e.scale.ordinal().range(Ws)},e.scale.category20c=function(){return e.scale.ordinal().range(Ls)};var Ho=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Xo),ml=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Xo),Ws=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Xo),Ls=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Xo);e.scale.quantile=function(){return va([],[])};function va(X,se){var Te;function Ne(){var Ye=0,kt=se.length;for(Te=[];++Ye<kt;)Te[Ye-1]=e.quantile(X,Ye/kt);return He}function He(Ye){if(!isNaN(Ye=+Ye))return se[e.bisect(Te,Ye)]}return He.domain=function(Ye){return arguments.length?(X=Ye.map(h).filter(d).sort(f),Ne()):X},He.range=function(Ye){return arguments.length?(se=Ye,Ne()):se},He.quantiles=function(){return Te},He.invertExtent=function(Ye){return Ye=se.indexOf(Ye),Ye<0?[NaN,NaN]:[Ye>0?Te[Ye-1]:X[0],Ye<Te.length?Te[Ye]:X[X.length-1]]},He.copy=function(){return va(X,se)},Ne()}e.scale.quantize=function(){return no(0,1,[0,1])};function no(X,se,Te){var Ne,He;function Ye(nt){return Te[Math.max(0,Math.min(He,Math.floor(Ne*(nt-X))))]}function kt(){return Ne=Te.length/(se-X),He=Te.length-1,Ye}return Ye.domain=function(nt){return arguments.length?(X=+nt[0],se=+nt[nt.length-1],kt()):[X,se]},Ye.range=function(nt){return arguments.length?(Te=nt,kt()):Te},Ye.invertExtent=function(nt){return nt=Te.indexOf(nt),nt=nt<0?NaN:nt/Ne+X,[nt,nt+1/Ne]},Ye.copy=function(){return no(X,se,Te)},kt()}e.scale.threshold=function(){return ys([.5],[0,1])};function ys(X,se){function Te(Ne){if(Ne<=Ne)return se[e.bisect(X,Ne)]}return Te.domain=function(Ne){return arguments.length?(X=Ne,Te):X},Te.range=function(Ne){return arguments.length?(se=Ne,Te):se},Te.invertExtent=function(Ne){return Ne=se.indexOf(Ne),[X[Ne-1],X[Ne]]},Te.copy=function(){return ys(X,se)},Te}e.scale.identity=function(){return rs([0,1])};function rs(X){function se(Te){return+Te}return se.invert=se,se.domain=se.range=function(Te){return arguments.length?(X=Te.map(se),se):X},se.ticks=function(Te){return Na(X,Te)},se.tickFormat=function(Te,Ne){return d3_scale_linearTickFormat(X,Te,Ne)},se.copy=function(){return rs(X)},se}e.svg={};function Ql(){return 0}e.svg.arc=function(){var X=Yu,se=Nc,Te=Ql,Ne=Cu,He=pu,Ye=Uc,kt=xu;function nt(){var gr=Math.max(0,+X.apply(this,arguments)),yr=Math.max(0,+se.apply(this,arguments)),Hr=He.apply(this,arguments)-xe,qr=Ye.apply(this,arguments)-xe,_i=Math.abs(qr-Hr),bi=Hr>qr?0:1;if(yr<gr&&(Zr=yr,yr=gr,gr=Zr),_i>=Ie)return jt(yr,bi)+(gr?jt(gr,1-bi):\"\")+\"Z\";var Zr,ai,gi,Ii,Si=0,ei=0,Ln,En,Un,ia,Ea,Ia,yo,Da,go=[];if((Ii=(+kt.apply(this,arguments)||0)/2)&&(gi=Ne===Cu?Math.sqrt(gr*gr+yr*yr):+Ne.apply(this,arguments),bi||(ei*=-1),yr&&(ei=ii(gi/yr*Math.sin(Ii))),gr&&(Si=ii(gi/gr*Math.sin(Ii)))),yr){Ln=yr*Math.cos(Hr+ei),En=yr*Math.sin(Hr+ei),Un=yr*Math.cos(qr-ei),ia=yr*Math.sin(qr-ei);var Is=Math.abs(qr-Hr-2*ei)<=tt?0:1;if(ei&&Ac(Ln,En,Un,ia)===bi^Is){var Ms=(Hr+qr)/2;Ln=yr*Math.cos(Ms),En=yr*Math.sin(Ms),Un=ia=null}}else Ln=En=0;if(gr){Ea=gr*Math.cos(qr-Si),Ia=gr*Math.sin(qr-Si),yo=gr*Math.cos(Hr+Si),Da=gr*Math.sin(Hr+Si);var Xs=Math.abs(Hr-qr+2*Si)<=tt?0:1;if(Si&&Ac(Ea,Ia,yo,Da)===1-bi^Xs){var Gn=(Hr+qr)/2;Ea=gr*Math.cos(Gn),Ia=gr*Math.sin(Gn),yo=Da=null}}else Ea=Ia=0;if(_i>Je&&(Zr=Math.min(Math.abs(yr-gr)/2,+Te.apply(this,arguments)))>.001){ai=gr<yr^bi?0:1;var ja=Zr,Fo=Zr;if(_i<tt){var Uo=yo==null?[Ea,Ia]:Un==null?[Ln,En]:il([Ln,En],[yo,Da],[Un,ia],[Ea,Ia]),$s=Ln-Uo[0],Sl=En-Uo[1],bu=Un-Uo[0],dl=ia-Uo[1],Sc=1/Math.sin(Math.acos(($s*bu+Sl*dl)/(Math.sqrt($s*$s+Sl*Sl)*Math.sqrt(bu*bu+dl*dl)))/2),Me=Math.sqrt(Uo[0]*Uo[0]+Uo[1]*Uo[1]);Fo=Math.min(Zr,(gr-Me)/(Sc-1)),ja=Math.min(Zr,(yr-Me)/(Sc+1))}if(Un!=null){var bt=Ua(yo==null?[Ea,Ia]:[yo,Da],[Ln,En],yr,ja,bi),zt=Ua([Un,ia],[Ea,Ia],yr,ja,bi);Zr===ja?go.push(\"M\",bt[0],\"A\",ja,\",\",ja,\" 0 0,\",ai,\" \",bt[1],\"A\",yr,\",\",yr,\" 0 \",1-bi^Ac(bt[1][0],bt[1][1],zt[1][0],zt[1][1]),\",\",bi,\" \",zt[1],\"A\",ja,\",\",ja,\" 0 0,\",ai,\" \",zt[0]):go.push(\"M\",bt[0],\"A\",ja,\",\",ja,\" 0 1,\",ai,\" \",zt[0])}else go.push(\"M\",Ln,\",\",En);if(yo!=null){var Rr=Ua([Ln,En],[yo,Da],gr,-Fo,bi),jr=Ua([Ea,Ia],Un==null?[Ln,En]:[Un,ia],gr,-Fo,bi);Zr===Fo?go.push(\"L\",jr[0],\"A\",Fo,\",\",Fo,\" 0 0,\",ai,\" \",jr[1],\"A\",gr,\",\",gr,\" 0 \",bi^Ac(jr[1][0],jr[1][1],Rr[1][0],Rr[1][1]),\",\",1-bi,\" \",Rr[1],\"A\",Fo,\",\",Fo,\" 0 0,\",ai,\" \",Rr[0]):go.push(\"L\",jr[0],\"A\",Fo,\",\",Fo,\" 0 0,\",ai,\" \",Rr[0])}else go.push(\"L\",Ea,\",\",Ia)}else go.push(\"M\",Ln,\",\",En),Un!=null&&go.push(\"A\",yr,\",\",yr,\" 0 \",Is,\",\",bi,\" \",Un,\",\",ia),go.push(\"L\",Ea,\",\",Ia),yo!=null&&go.push(\"A\",gr,\",\",gr,\" 0 \",Xs,\",\",1-bi,\" \",yo,\",\",Da);return go.push(\"Z\"),go.join(\"\")}function jt(gr,yr){return\"M0,\"+gr+\"A\"+gr+\",\"+gr+\" 0 1,\"+yr+\" 0,\"+-gr+\"A\"+gr+\",\"+gr+\" 0 1,\"+yr+\" 0,\"+gr}return nt.innerRadius=function(gr){return arguments.length?(X=vi(gr),nt):X},nt.outerRadius=function(gr){return arguments.length?(se=vi(gr),nt):se},nt.cornerRadius=function(gr){return arguments.length?(Te=vi(gr),nt):Te},nt.padRadius=function(gr){return arguments.length?(Ne=gr==Cu?Cu:vi(gr),nt):Ne},nt.startAngle=function(gr){return arguments.length?(He=vi(gr),nt):He},nt.endAngle=function(gr){return arguments.length?(Ye=vi(gr),nt):Ye},nt.padAngle=function(gr){return arguments.length?(kt=vi(gr),nt):kt},nt.centroid=function(){var gr=(+X.apply(this,arguments)+ +se.apply(this,arguments))/2,yr=(+He.apply(this,arguments)+ +Ye.apply(this,arguments))/2-xe;return[Math.cos(yr)*gr,Math.sin(yr)*gr]},nt};var Cu=\"auto\";function Yu(X){return X.innerRadius}function Nc(X){return X.outerRadius}function pu(X){return X.startAngle}function Uc(X){return X.endAngle}function xu(X){return X&&X.padAngle}function Ac(X,se,Te,Ne){return(X-Te)*se-(se-Ne)*X>0?0:1}function Ua(X,se,Te,Ne,He){var Ye=X[0]-se[0],kt=X[1]-se[1],nt=(He?Ne:-Ne)/Math.sqrt(Ye*Ye+kt*kt),jt=nt*kt,gr=-nt*Ye,yr=X[0]+jt,Hr=X[1]+gr,qr=se[0]+jt,_i=se[1]+gr,bi=(yr+qr)/2,Zr=(Hr+_i)/2,ai=qr-yr,gi=_i-Hr,Ii=ai*ai+gi*gi,Si=Te-Ne,ei=yr*_i-qr*Hr,Ln=(gi<0?-1:1)*Math.sqrt(Math.max(0,Si*Si*Ii-ei*ei)),En=(ei*gi-ai*Ln)/Ii,Un=(-ei*ai-gi*Ln)/Ii,ia=(ei*gi+ai*Ln)/Ii,Ea=(-ei*ai+gi*Ln)/Ii,Ia=En-bi,yo=Un-Zr,Da=ia-bi,go=Ea-Zr;return Ia*Ia+yo*yo>Da*Da+go*go&&(En=ia,Un=Ea),[[En-jt,Un-gr],[En*Te/Si,Un*Te/Si]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,Ne=oo,He=Ku,Ye=He.key,kt=.7;function nt(jt){var gr=[],yr=[],Hr=-1,qr=jt.length,_i,bi=vi(se),Zr=vi(Te);function ai(){gr.push(\"M\",He(X(yr),kt))}for(;++Hr<qr;)Ne.call(this,_i=jt[Hr],Hr)?yr.push([+bi.call(this,_i,Hr),+Zr.call(this,_i,Hr)]):yr.length&&(ai(),yr=[]);return yr.length&&ai(),gr.length?gr.join(\"\"):null}return nt.x=function(jt){return arguments.length?(se=jt,nt):se},nt.y=function(jt){return arguments.length?(Te=jt,nt):Te},nt.defined=function(jt){return arguments.length?(Ne=jt,nt):Ne},nt.interpolate=function(jt){return arguments.length?(typeof jt==\"function\"?Ye=He=jt:Ye=(He=hc.get(jt)||Ku).key,nt):Ye},nt.tension=function(jt){return arguments.length?(kt=jt,nt):kt},nt}e.svg.line=function(){return Vc(G)};var hc=e.map({linear:Ku,\"linear-closed\":ue,step:w,\"step-before\":B,\"step-after\":Q,basis:Tt,\"basis-open\":Yt,\"basis-closed\":Kt,bundle:xr,cardinal:Oe,\"cardinal-open\":ee,\"cardinal-closed\":le,monotone:Ft});hc.forEach(function(X,se){se.key=X,se.closed=/-closed$/.test(X)});function Ku(X){return X.length>1?X.join(\"L\"):X+\"Z\"}function ue(X){return X.join(\"L\")+\"Z\"}function w(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"H\",(Ne[0]+(Ne=X[se])[0])/2,\"V\",Ne[1]);return Te>1&&He.push(\"H\",Ne[0]),He.join(\"\")}function B(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"V\",(Ne=X[se])[1],\"H\",Ne[0]);return He.join(\"\")}function Q(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],\",\",Ne[1]];++se<Te;)He.push(\"H\",(Ne=X[se])[0],\"V\",Ne[1]);return He.join(\"\")}function ee(X,se){return X.length<4?Ku(X):X[1]+Ze(X.slice(1,-1),st(X,se))}function le(X,se){return X.length<3?ue(X):X[0]+Ze((X.push(X[0]),X),st([X[X.length-2]].concat(X,[X[1]]),se))}function Oe(X,se){return X.length<3?Ku(X):X[0]+Ze(X,st(X,se))}function Ze(X,se){if(se.length<1||X.length!=se.length&&X.length!=se.length+2)return Ku(X);var Te=X.length!=se.length,Ne=\"\",He=X[0],Ye=X[1],kt=se[0],nt=kt,jt=1;if(Te&&(Ne+=\"Q\"+(Ye[0]-kt[0]*2/3)+\",\"+(Ye[1]-kt[1]*2/3)+\",\"+Ye[0]+\",\"+Ye[1],He=X[1],jt=2),se.length>1){nt=se[1],Ye=X[jt],jt++,Ne+=\"C\"+(He[0]+kt[0])+\",\"+(He[1]+kt[1])+\",\"+(Ye[0]-nt[0])+\",\"+(Ye[1]-nt[1])+\",\"+Ye[0]+\",\"+Ye[1];for(var gr=2;gr<se.length;gr++,jt++)Ye=X[jt],nt=se[gr],Ne+=\"S\"+(Ye[0]-nt[0])+\",\"+(Ye[1]-nt[1])+\",\"+Ye[0]+\",\"+Ye[1]}if(Te){var yr=X[jt];Ne+=\"Q\"+(Ye[0]+nt[0]*2/3)+\",\"+(Ye[1]+nt[1]*2/3)+\",\"+yr[0]+\",\"+yr[1]}return Ne}function st(X,se){for(var Te=[],Ne=(1-se)/2,He,Ye=X[0],kt=X[1],nt=1,jt=X.length;++nt<jt;)He=Ye,Ye=kt,kt=X[nt],Te.push([Ne*(kt[0]-He[0]),Ne*(kt[1]-He[1])]);return Te}function Tt(X){if(X.length<3)return Ku(X);var se=1,Te=X.length,Ne=X[0],He=Ne[0],Ye=Ne[1],kt=[He,He,He,(Ne=X[1])[0]],nt=[Ye,Ye,Ye,Ne[1]],jt=[He,\",\",Ye,\"L\",Ir(Re,kt),\",\",Ir(Re,nt)];for(X.push(X[Te-1]);++se<=Te;)Ne=X[se],kt.shift(),kt.push(Ne[0]),nt.shift(),nt.push(Ne[1]),qe(jt,kt,nt);return X.pop(),jt.push(\"L\",Ne),jt.join(\"\")}function Yt(X){if(X.length<4)return Ku(X);for(var se=[],Te=-1,Ne=X.length,He,Ye=[0],kt=[0];++Te<3;)He=X[Te],Ye.push(He[0]),kt.push(He[1]);for(se.push(Ir(Re,Ye)+\",\"+Ir(Re,kt)),--Te;++Te<Ne;)He=X[Te],Ye.shift(),Ye.push(He[0]),kt.shift(),kt.push(He[1]),qe(se,Ye,kt);return se.join(\"\")}function Kt(X){for(var se,Te=-1,Ne=X.length,He=Ne+4,Ye,kt=[],nt=[];++Te<4;)Ye=X[Te%Ne],kt.push(Ye[0]),nt.push(Ye[1]);for(se=[Ir(Re,kt),\",\",Ir(Re,nt)],--Te;++Te<He;)Ye=X[Te%Ne],kt.shift(),kt.push(Ye[0]),nt.shift(),nt.push(Ye[1]),qe(se,kt,nt);return se.join(\"\")}function xr(X,se){var Te=X.length-1;if(Te)for(var Ne=X[0][0],He=X[0][1],Ye=X[Te][0]-Ne,kt=X[Te][1]-He,nt=-1,jt,gr;++nt<=Te;)jt=X[nt],gr=nt/Te,jt[0]=se*jt[0]+(1-se)*(Ne+gr*Ye),jt[1]=se*jt[1]+(1-se)*(He+gr*kt);return Tt(X)}function Ir(X,se){return X[0]*se[0]+X[1]*se[1]+X[2]*se[2]+X[3]*se[3]}var ve=[0,2/3,1/3,0],be=[0,1/3,2/3,0],Re=[0,1/6,2/3,1/6];function qe(X,se,Te){X.push(\"C\",Ir(ve,se),\",\",Ir(ve,Te),\",\",Ir(be,se),\",\",Ir(be,Te),\",\",Ir(Re,se),\",\",Ir(Re,Te))}function et(X,se){return(se[1]-X[1])/(se[0]-X[0])}function Xe(X){for(var se=0,Te=X.length-1,Ne=[],He=X[0],Ye=X[1],kt=Ne[0]=et(He,Ye);++se<Te;)Ne[se]=(kt+(kt=et(He=Ye,Ye=X[se+1])))/2;return Ne[se]=kt,Ne}function it(X){for(var se=[],Te,Ne,He,Ye,kt=Xe(X),nt=-1,jt=X.length-1;++nt<jt;)Te=et(X[nt],X[nt+1]),p(Te)<Je?kt[nt]=kt[nt+1]=0:(Ne=kt[nt]/Te,He=kt[nt+1]/Te,Ye=Ne*Ne+He*He,Ye>9&&(Ye=Te*3/Math.sqrt(Ye),kt[nt]=Ye*Ne,kt[nt+1]=Ye*He));for(nt=-1;++nt<=jt;)Ye=(X[Math.min(jt,nt+1)][0]-X[Math.max(0,nt-1)][0])/(6*(1+kt[nt]*kt[nt])),se.push([Ye||0,kt[nt]*Ye||0]);return se}function Ft(X){return X.length<3?Ku(X):X[0]+Ze(X,it(X))}e.svg.line.radial=function(){var X=Vc(Ht);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Ht(X){for(var se,Te=-1,Ne=X.length,He,Ye;++Te<Ne;)se=X[Te],He=se[0],Ye=se[1]-xe,se[0]=He*Math.cos(Ye),se[1]=He*Math.sin(Ye);return X}function tr(X){var se=Ds,Te=Ds,Ne=0,He=Fs,Ye=oo,kt=Ku,nt=kt.key,jt=kt,gr=\"L\",yr=.7;function Hr(qr){var _i=[],bi=[],Zr=[],ai=-1,gi=qr.length,Ii,Si=vi(se),ei=vi(Ne),Ln=se===Te?function(){return Un}:vi(Te),En=Ne===He?function(){return ia}:vi(He),Un,ia;function Ea(){_i.push(\"M\",kt(X(Zr),yr),gr,jt(X(bi.reverse()),yr),\"Z\")}for(;++ai<gi;)Ye.call(this,Ii=qr[ai],ai)?(bi.push([Un=+Si.call(this,Ii,ai),ia=+ei.call(this,Ii,ai)]),Zr.push([+Ln.call(this,Ii,ai),+En.call(this,Ii,ai)])):bi.length&&(Ea(),bi=[],Zr=[]);return bi.length&&Ea(),_i.length?_i.join(\"\"):null}return Hr.x=function(qr){return arguments.length?(se=Te=qr,Hr):Te},Hr.x0=function(qr){return arguments.length?(se=qr,Hr):se},Hr.x1=function(qr){return arguments.length?(Te=qr,Hr):Te},Hr.y=function(qr){return arguments.length?(Ne=He=qr,Hr):He},Hr.y0=function(qr){return arguments.length?(Ne=qr,Hr):Ne},Hr.y1=function(qr){return arguments.length?(He=qr,Hr):He},Hr.defined=function(qr){return arguments.length?(Ye=qr,Hr):Ye},Hr.interpolate=function(qr){return arguments.length?(typeof qr==\"function\"?nt=kt=qr:nt=(kt=hc.get(qr)||Ku).key,jt=kt.reverse||kt,gr=kt.closed?\"M\":\"L\",Hr):nt},Hr.tension=function(qr){return arguments.length?(yr=qr,Hr):yr},Hr}B.reverse=Q,Q.reverse=B,e.svg.area=function(){return tr(G)},e.svg.area.radial=function(){var X=tr(Ht);return X.radius=X.x,delete X.x,X.innerRadius=X.x0,delete X.x0,X.outerRadius=X.x1,delete X.x1,X.angle=X.y,delete X.y,X.startAngle=X.y0,delete X.y0,X.endAngle=X.y1,delete X.y1,X};function dr(X){return X.source}function Sr(X){return X.target}e.svg.chord=function(){var X=dr,se=Sr,Te=Or,Ne=pu,He=Uc;function Ye(yr,Hr){var qr=kt(this,X,yr,Hr),_i=kt(this,se,yr,Hr);return\"M\"+qr.p0+jt(qr.r,qr.p1,qr.a1-qr.a0)+(nt(qr,_i)?gr(qr.r,qr.p1,qr.r,qr.p0):gr(qr.r,qr.p1,_i.r,_i.p0)+jt(_i.r,_i.p1,_i.a1-_i.a0)+gr(_i.r,_i.p1,qr.r,qr.p0))+\"Z\"}function kt(yr,Hr,qr,_i){var bi=Hr.call(yr,qr,_i),Zr=Te.call(yr,bi,_i),ai=Ne.call(yr,bi,_i)-xe,gi=He.call(yr,bi,_i)-xe;return{r:Zr,a0:ai,a1:gi,p0:[Zr*Math.cos(ai),Zr*Math.sin(ai)],p1:[Zr*Math.cos(gi),Zr*Math.sin(gi)]}}function nt(yr,Hr){return yr.a0==Hr.a0&&yr.a1==Hr.a1}function jt(yr,Hr,qr){return\"A\"+yr+\",\"+yr+\" 0 \"+ +(qr>tt)+\",1 \"+Hr}function gr(yr,Hr,qr,_i){return\"Q 0,0 \"+_i}return Ye.radius=function(yr){return arguments.length?(Te=vi(yr),Ye):Te},Ye.source=function(yr){return arguments.length?(X=vi(yr),Ye):X},Ye.target=function(yr){return arguments.length?(se=vi(yr),Ye):se},Ye.startAngle=function(yr){return arguments.length?(Ne=vi(yr),Ye):Ne},Ye.endAngle=function(yr){return arguments.length?(He=vi(yr),Ye):He},Ye};function Or(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Sr,Te=Wr;function Ne(He,Ye){var kt=X.call(this,He,Ye),nt=se.call(this,He,Ye),jt=(kt.y+nt.y)/2,gr=[kt,{x:kt.x,y:jt},{x:nt.x,y:jt},nt];return gr=gr.map(Te),\"M\"+gr[0]+\"C\"+gr[1]+\" \"+gr[2]+\" \"+gr[3]}return Ne.source=function(He){return arguments.length?(X=vi(He),Ne):X},Ne.target=function(He){return arguments.length?(se=vi(He),Ne):se},Ne.projection=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function Wr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Wr,Te=X.projection;return X.projection=function(Ne){return arguments.length?Te(ni(se=Ne)):se},X};function ni(X){return function(){var se=X.apply(this,arguments),Te=se[0],Ne=se[1]-xe;return[Te*Math.cos(Ne),Te*Math.sin(Ne)]}}e.svg.symbol=function(){var X=cn,se=Pi;function Te(Ne,He){return(Cn.get(X.call(this,Ne,He))||ln)(se.call(this,Ne,He))}return Te.type=function(Ne){return arguments.length?(X=vi(Ne),Te):X},Te.size=function(Ne){return arguments.length?(se=vi(Ne),Te):se},Te};function Pi(){return 64}function cn(){return\"circle\"}function ln(X){var se=Math.sqrt(X/tt);return\"M0,\"+se+\"A\"+se+\",\"+se+\" 0 1,1 0,\"+-se+\"A\"+se+\",\"+se+\" 0 1,1 0,\"+se+\"Z\"}var Cn=e.map({circle:ln,cross:function(X){var se=Math.sqrt(X/5)/2;return\"M\"+-3*se+\",\"+-se+\"H\"+-se+\"V\"+-3*se+\"H\"+se+\"V\"+-se+\"H\"+3*se+\"V\"+se+\"H\"+se+\"V\"+3*se+\"H\"+-se+\"V\"+se+\"H\"+-3*se+\"Z\"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return\"M0,\"+-se+\"L\"+Te+\",0 0,\"+se+\" \"+-Te+\",0Z\"},square:function(X){var se=Math.sqrt(X)/2;return\"M\"+-se+\",\"+-se+\"L\"+se+\",\"+-se+\" \"+se+\",\"+se+\" \"+-se+\",\"+se+\"Z\"},\"triangle-down\":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return\"M0,\"+Te+\"L\"+se+\",\"+-Te+\" \"+-se+\",\"+-Te+\"Z\"},\"triangle-up\":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return\"M0,\"+-Te+\"L\"+se+\",\"+Te+\" \"+-se+\",\"+Te+\"Z\"}});e.svg.symbolTypes=Cn.keys();var Kn=Math.sqrt(3),Aa=Math.tan(30*ke);Pe.transition=function(X){for(var se=Bo||++mo,Te=To(X),Ne=[],He,Ye,kt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},nt=-1,jt=this.length;++nt<jt;){Ne.push(He=[]);for(var gr=this[nt],yr=-1,Hr=gr.length;++yr<Hr;)(Ye=gr[yr])&&hl(Ye,yr,Te,se,kt),He.push(Ye)}return Co(Ne,Te,se)},Pe.interrupt=function(X){return this.each(X==null?fa:$a(To(X)))};var fa=$a(To());function $a(X){return function(){var se,Te,Ne;(se=this[X])&&(Ne=se[Te=se.active])&&(Ne.timer.c=null,Ne.timer.t=NaN,--se.count?delete se[Te]:delete this[X],se.active+=.5,Ne.event&&Ne.event.interrupt.call(this,this.__data__,Ne.index))}}function Co(X,se,Te){return ie(X,Qa),X.namespace=se,X.id=Te,X}var Qa=[],mo=0,Bo,Ps;Qa.call=Pe.call,Qa.empty=Pe.empty,Qa.node=Pe.node,Qa.size=Pe.size,e.transition=function(X,se){return X&&X.transition?Bo?X.transition(se):X:e.selection().transition(X)},e.transition.prototype=Qa,Qa.select=function(X){var se=this.id,Te=this.namespace,Ne=[],He,Ye,kt;X=me(X);for(var nt=-1,jt=this.length;++nt<jt;){Ne.push(He=[]);for(var gr=this[nt],yr=-1,Hr=gr.length;++yr<Hr;)(kt=gr[yr])&&(Ye=X.call(kt,kt.__data__,yr,nt))?(\"__data__\"in kt&&(Ye.__data__=kt.__data__),hl(Ye,yr,Te,se,kt[Te][se]),He.push(Ye)):He.push(null)}return Co(Ne,Te,se)},Qa.selectAll=function(X){var se=this.id,Te=this.namespace,Ne=[],He,Ye,kt,nt,jt;X=De(X);for(var gr=-1,yr=this.length;++gr<yr;)for(var Hr=this[gr],qr=-1,_i=Hr.length;++qr<_i;)if(kt=Hr[qr]){jt=kt[Te][se],Ye=X.call(kt,kt.__data__,qr,gr),Ne.push(He=[]);for(var bi=-1,Zr=Ye.length;++bi<Zr;)(nt=Ye[bi])&&hl(nt,bi,Te,se,jt),He.push(nt)}return Co(Ne,Te,se)},Qa.filter=function(X){var se=[],Te,Ne,He;typeof X!=\"function\"&&(X=$e(X));for(var Ye=0,kt=this.length;Ye<kt;Ye++){se.push(Te=[]);for(var Ne=this[Ye],nt=0,jt=Ne.length;nt<jt;nt++)(He=Ne[nt])&&X.call(He,He.__data__,nt,Ye)&&Te.push(He)}return Co(se,this.namespace,this.id)},Qa.tween=function(X,se){var Te=this.id,Ne=this.namespace;return arguments.length<2?this.node()[Ne][Te].tween.get(X):Qt(this,se==null?function(He){He[Ne][Te].tween.remove(X)}:function(He){He[Ne][Te].tween.set(X,se)})};function Ts(X,se,Te,Ne){var He=X.id,Ye=X.namespace;return Qt(X,typeof Te==\"function\"?function(kt,nt,jt){kt[Ye][He].tween.set(se,Ne(Te.call(kt,kt.__data__,nt,jt)))}:(Te=Ne(Te),function(kt){kt[Ye][He].tween.set(se,Te)}))}Qa.attr=function(X,se){if(arguments.length<2){for(se in X)this.attr(se,X[se]);return this}var Te=X==\"transform\"?sf:xl,Ne=e.ns.qualify(X);function He(){this.removeAttribute(Ne)}function Ye(){this.removeAttributeNS(Ne.space,Ne.local)}function kt(jt){return jt==null?He:(jt+=\"\",function(){var gr=this.getAttribute(Ne),yr;return gr!==jt&&(yr=Te(gr,jt),function(Hr){this.setAttribute(Ne,yr(Hr))})})}function nt(jt){return jt==null?Ye:(jt+=\"\",function(){var gr=this.getAttributeNS(Ne.space,Ne.local),yr;return gr!==jt&&(yr=Te(gr,jt),function(Hr){this.setAttributeNS(Ne.space,Ne.local,yr(Hr))})})}return Ts(this,\"attr.\"+X,se,Ne.local?nt:kt)},Qa.attrTween=function(X,se){var Te=e.ns.qualify(X);function Ne(Ye,kt){var nt=se.call(this,Ye,kt,this.getAttribute(Te));return nt&&function(jt){this.setAttribute(Te,nt(jt))}}function He(Ye,kt){var nt=se.call(this,Ye,kt,this.getAttributeNS(Te.space,Te.local));return nt&&function(jt){this.setAttributeNS(Te.space,Te.local,nt(jt))}}return this.tween(\"attr.\"+X,Te.local?He:Ne)},Qa.style=function(X,se,Te){var Ne=arguments.length;if(Ne<3){if(typeof X!=\"string\"){Ne<2&&(se=\"\");for(Te in X)this.style(Te,X[Te],se);return this}Te=\"\"}function He(){this.style.removeProperty(X)}function Ye(kt){return kt==null?He:(kt+=\"\",function(){var nt=a(this).getComputedStyle(this,null).getPropertyValue(X),jt;return nt!==kt&&(jt=xl(nt,kt),function(gr){this.style.setProperty(X,jt(gr),Te)})})}return Ts(this,\"style.\"+X,se,Ye)},Qa.styleTween=function(X,se,Te){arguments.length<3&&(Te=\"\");function Ne(He,Ye){var kt=se.call(this,He,Ye,a(this).getComputedStyle(this,null).getPropertyValue(X));return kt&&function(nt){this.style.setProperty(X,kt(nt),Te)}}return this.tween(\"style.\"+X,Ne)},Qa.text=function(X){return Ts(this,\"text\",X,wo)};function wo(X){return X==null&&(X=\"\"),function(){this.textContent=X}}Qa.remove=function(){var X=this.namespace;return this.each(\"end.transition\",function(){var se;this[X].count<2&&(se=this.parentNode)&&se.removeChild(this)})},Qa.ease=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].ease:(typeof X!=\"function\"&&(X=e.ease.apply(e,arguments)),Qt(this,function(Ne){Ne[Te][se].ease=X}))},Qa.delay=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].delay:Qt(this,typeof X==\"function\"?function(Ne,He,Ye){Ne[Te][se].delay=+X.call(Ne,Ne.__data__,He,Ye)}:(X=+X,function(Ne){Ne[Te][se].delay=X}))},Qa.duration=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].duration:Qt(this,typeof X==\"function\"?function(Ne,He,Ye){Ne[Te][se].duration=Math.max(1,X.call(Ne,Ne.__data__,He,Ye))}:(X=Math.max(1,X),function(Ne){Ne[Te][se].duration=X}))},Qa.each=function(X,se){var Te=this.id,Ne=this.namespace;if(arguments.length<2){var He=Ps,Ye=Bo;try{Bo=Te,Qt(this,function(kt,nt,jt){Ps=kt[Ne][Te],X.call(kt,kt.__data__,nt,jt)})}finally{Ps=He,Bo=Ye}}else Qt(this,function(kt){var nt=kt[Ne][Te];(nt.event||(nt.event=e.dispatch(\"start\",\"end\",\"interrupt\"))).on(X,se)});return this},Qa.transition=function(){for(var X=this.id,se=++mo,Te=this.namespace,Ne=[],He,Ye,kt,nt,jt=0,gr=this.length;jt<gr;jt++){Ne.push(He=[]);for(var Ye=this[jt],yr=0,Hr=Ye.length;yr<Hr;yr++)(kt=Ye[yr])&&(nt=kt[Te][X],hl(kt,yr,Te,se,{time:nt.time,ease:nt.ease,delay:nt.delay+nt.duration,duration:nt.duration})),He.push(kt)}return Co(Ne,Te,se)};function To(X){return X==null?\"__transition__\":\"__transition_\"+X+\"__\"}function hl(X,se,Te,Ne,He){var Ye=X[Te]||(X[Te]={active:0,count:0}),kt=Ye[Ne],nt,jt,gr,yr,Hr;function qr(Zr){var ai=kt.delay;if(jt.t=ai+nt,ai<=Zr)return _i(Zr-ai);jt.c=_i}function _i(Zr){var ai=Ye.active,gi=Ye[ai];gi&&(gi.timer.c=null,gi.timer.t=NaN,--Ye.count,delete Ye[ai],gi.event&&gi.event.interrupt.call(X,X.__data__,gi.index));for(var Ii in Ye)if(+Ii<Ne){var Si=Ye[Ii];Si.timer.c=null,Si.timer.t=NaN,--Ye.count,delete Ye[Ii]}jt.c=bi,No(function(){return jt.c&&bi(Zr||1)&&(jt.c=null,jt.t=NaN),1},0,nt),Ye.active=Ne,kt.event&&kt.event.start.call(X,X.__data__,se),Hr=[],kt.tween.forEach(function(ei,Ln){(Ln=Ln.call(X,X.__data__,se))&&Hr.push(Ln)}),yr=kt.ease,gr=kt.duration}function bi(Zr){for(var ai=Zr/gr,gi=yr(ai),Ii=Hr.length;Ii>0;)Hr[--Ii].call(X,gi);if(ai>=1)return kt.event&&kt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Ne]:delete X[Te],1}kt||(nt=He.time,jt=No(qr,0,nt),kt=Ye[Ne]={tween:new T,time:nt,timer:jt,delay:He.delay,duration:He.duration,ease:He.ease,index:se},He=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Ne=6,He=3,Ye=[10],kt=null,nt;function jt(gr){gr.each(function(){var yr=e.select(this),Hr=this.__chart__||X,qr=this.__chart__=X.copy(),_i=kt==null?qr.ticks?qr.ticks.apply(qr,Ye):qr.domain():kt,bi=nt==null?qr.tickFormat?qr.tickFormat.apply(qr,Ye):G:nt,Zr=yr.selectAll(\".tick\").data(_i,qr),ai=Zr.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",Je),gi=e.transition(Zr.exit()).style(\"opacity\",Je).remove(),Ii=e.transition(Zr.order()).style(\"opacity\",1),Si=Math.max(Te,0)+He,ei,Ln=wn(qr),En=yr.selectAll(\".domain\").data([0]),Un=(En.enter().append(\"path\").attr(\"class\",\"domain\"),e.transition(En));ai.append(\"line\"),ai.append(\"text\");var ia=ai.select(\"line\"),Ea=Ii.select(\"line\"),Ia=Zr.select(\"text\").text(bi),yo=ai.select(\"text\"),Da=Ii.select(\"text\"),go=se===\"top\"||se===\"left\"?-1:1,Is,Ms,Xs,Gn;if(se===\"bottom\"||se===\"top\"?(ei=au,Is=\"x\",Xs=\"y\",Ms=\"x2\",Gn=\"y2\",Ia.attr(\"dy\",go<0?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),Un.attr(\"d\",\"M\"+Ln[0]+\",\"+go*Ne+\"V0H\"+Ln[1]+\"V\"+go*Ne)):(ei=Js,Is=\"y\",Xs=\"x\",Ms=\"y2\",Gn=\"x2\",Ia.attr(\"dy\",\".32em\").style(\"text-anchor\",go<0?\"end\":\"start\"),Un.attr(\"d\",\"M\"+go*Ne+\",\"+Ln[0]+\"H0V\"+Ln[1]+\"H\"+go*Ne)),ia.attr(Gn,go*Te),yo.attr(Xs,go*Si),Ea.attr(Ms,0).attr(Gn,go*Te),Da.attr(Is,0).attr(Xs,go*Si),qr.rangeBand){var ja=qr,Fo=ja.rangeBand()/2;Hr=qr=function(Uo){return ja(Uo)+Fo}}else Hr.rangeBand?Hr=qr:gi.call(ei,qr,Hr);ai.call(ei,Hr,qr),Ii.call(ei,qr,qr)})}return jt.scale=function(gr){return arguments.length?(X=gr,jt):X},jt.orient=function(gr){return arguments.length?(se=gr in Lu?gr+\"\":Ul,jt):se},jt.ticks=function(){return arguments.length?(Ye=r(arguments),jt):Ye},jt.tickValues=function(gr){return arguments.length?(kt=gr,jt):kt},jt.tickFormat=function(gr){return arguments.length?(nt=gr,jt):nt},jt.tickSize=function(gr){var yr=arguments.length;return yr?(Te=+gr,Ne=+arguments[yr-1],jt):Te},jt.innerTickSize=function(gr){return arguments.length?(Te=+gr,jt):Te},jt.outerTickSize=function(gr){return arguments.length?(Ne=+gr,jt):Ne},jt.tickPadding=function(gr){return arguments.length?(He=+gr,jt):He},jt.tickSubdivide=function(){return arguments.length&&jt},jt};var Ul=\"bottom\",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr(\"transform\",function(Ne){var He=se(Ne);return\"translate(\"+(isFinite(He)?He:Te(Ne))+\",0)\"})}function Js(X,se,Te){X.attr(\"transform\",function(Ne){var He=se(Ne);return\"translate(0,\"+(isFinite(He)?He:Te(Ne))+\")\"})}e.svg.brush=function(){var X=Le(yr,\"brushstart\",\"brush\",\"brushend\"),se=null,Te=null,Ne=[0,0],He=[0,0],Ye,kt,nt=!0,jt=!0,gr=dc[0];function yr(Zr){Zr.each(function(){var ai=e.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",bi).on(\"touchstart.brush\",bi),gi=ai.selectAll(\".background\").data([0]);gi.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),ai.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var Ii=ai.selectAll(\".resize\").data(gr,G);Ii.exit().remove(),Ii.enter().append(\"g\").attr(\"class\",function(En){return\"resize \"+En}).style(\"cursor\",function(En){return eu[En]}).append(\"rect\").attr(\"x\",function(En){return/[ew]$/.test(En)?-3:null}).attr(\"y\",function(En){return/^[ns]/.test(En)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),Ii.style(\"display\",yr.empty()?\"none\":null);var Si=e.transition(ai),ei=e.transition(gi),Ln;se&&(Ln=wn(se),ei.attr(\"x\",Ln[0]).attr(\"width\",Ln[1]-Ln[0]),qr(Si)),Te&&(Ln=wn(Te),ei.attr(\"y\",Ln[0]).attr(\"height\",Ln[1]-Ln[0]),_i(Si)),Hr(Si)})}yr.event=function(Zr){Zr.each(function(){var ai=X.of(this,arguments),gi={x:Ne,y:He,i:Ye,j:kt},Ii=this.__chart__||gi;this.__chart__=gi,Bo?e.select(this).transition().each(\"start.brush\",function(){Ye=Ii.i,kt=Ii.j,Ne=Ii.x,He=Ii.y,ai({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var Si=Gu(Ne,gi.x),ei=Gu(He,gi.y);return Ye=kt=null,function(Ln){Ne=gi.x=Si(Ln),He=gi.y=ei(Ln),ai({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){Ye=gi.i,kt=gi.j,ai({type:\"brush\",mode:\"resize\"}),ai({type:\"brushend\"})}):(ai({type:\"brushstart\"}),ai({type:\"brush\",mode:\"resize\"}),ai({type:\"brushend\"}))})};function Hr(Zr){Zr.selectAll(\".resize\").attr(\"transform\",function(ai){return\"translate(\"+Ne[+/e$/.test(ai)]+\",\"+He[+/^s/.test(ai)]+\")\"})}function qr(Zr){Zr.select(\".extent\").attr(\"x\",Ne[0]),Zr.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",Ne[1]-Ne[0])}function _i(Zr){Zr.select(\".extent\").attr(\"y\",He[0]),Zr.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",He[1]-He[0])}function bi(){var Zr=this,ai=e.select(e.event.target),gi=X.of(Zr,arguments),Ii=e.select(Zr),Si=ai.datum(),ei=!/^(n|s)$/.test(Si)&&se,Ln=!/^(e|w)$/.test(Si)&&Te,En=ai.classed(\"extent\"),Un=Br(Zr),ia,Ea=e.mouse(Zr),Ia,yo=e.select(a(Zr)).on(\"keydown.brush\",Is).on(\"keyup.brush\",Ms);if(e.event.changedTouches?yo.on(\"touchmove.brush\",Xs).on(\"touchend.brush\",ja):yo.on(\"mousemove.brush\",Xs).on(\"mouseup.brush\",ja),Ii.interrupt().selectAll(\"*\").interrupt(),En)Ea[0]=Ne[0]-Ea[0],Ea[1]=He[0]-Ea[1];else if(Si){var Da=+/w$/.test(Si),go=+/^n/.test(Si);Ia=[Ne[1-Da]-Ea[0],He[1-go]-Ea[1]],Ea[0]=Ne[Da],Ea[1]=He[go]}else e.event.altKey&&(ia=Ea.slice());Ii.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),e.select(\"body\").style(\"cursor\",ai.style(\"cursor\")),gi({type:\"brushstart\"}),Xs();function Is(){e.event.keyCode==32&&(En||(ia=null,Ea[0]-=Ne[1],Ea[1]-=He[1],En=2),_e())}function Ms(){e.event.keyCode==32&&En==2&&(Ea[0]+=Ne[1],Ea[1]+=He[1],En=0,_e())}function Xs(){var Fo=e.mouse(Zr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),En||(e.event.altKey?(ia||(ia=[(Ne[0]+Ne[1])/2,(He[0]+He[1])/2]),Ea[0]=Ne[+(Fo[0]<ia[0])],Ea[1]=He[+(Fo[1]<ia[1])]):ia=null),ei&&Gn(Fo,se,0)&&(qr(Ii),Uo=!0),Ln&&Gn(Fo,Te,1)&&(_i(Ii),Uo=!0),Uo&&(Hr(Ii),gi({type:\"brush\",mode:En?\"move\":\"resize\"}))}function Gn(Fo,Uo,$s){var Sl=wn(Uo),bu=Sl[0],dl=Sl[1],Sc=Ea[$s],Me=$s?He:Ne,bt=Me[1]-Me[0],zt,Rr;if(En&&(bu-=Sc,dl-=bt+Sc),zt=($s?jt:nt)?Math.max(bu,Math.min(dl,Fo[$s])):Fo[$s],En?Rr=(zt+=Sc)+bt:(ia&&(Sc=Math.max(bu,Math.min(dl,2*ia[$s]-zt))),Sc<zt?(Rr=zt,zt=Sc):Rr=Sc),Me[0]!=zt||Me[1]!=Rr)return $s?kt=null:Ye=null,Me[0]=zt,Me[1]=Rr,!0}function ja(){Xs(),Ii.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",yr.empty()?\"none\":null),e.select(\"body\").style(\"cursor\",null),yo.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),Un(),gi({type:\"brushend\"})}}return yr.x=function(Zr){return arguments.length?(se=Zr,gr=dc[!se<<1|!Te],yr):se},yr.y=function(Zr){return arguments.length?(Te=Zr,gr=dc[!se<<1|!Te],yr):Te},yr.clamp=function(Zr){return arguments.length?(se&&Te?(nt=!!Zr[0],jt=!!Zr[1]):se?nt=!!Zr:Te&&(jt=!!Zr),yr):se&&Te?[nt,jt]:se?nt:Te?jt:null},yr.extent=function(Zr){var ai,gi,Ii,Si,ei;return arguments.length?(se&&(ai=Zr[0],gi=Zr[1],Te&&(ai=ai[0],gi=gi[0]),Ye=[ai,gi],se.invert&&(ai=se(ai),gi=se(gi)),gi<ai&&(ei=ai,ai=gi,gi=ei),(ai!=Ne[0]||gi!=Ne[1])&&(Ne=[ai,gi])),Te&&(Ii=Zr[0],Si=Zr[1],se&&(Ii=Ii[1],Si=Si[1]),kt=[Ii,Si],Te.invert&&(Ii=Te(Ii),Si=Te(Si)),Si<Ii&&(ei=Ii,Ii=Si,Si=ei),(Ii!=He[0]||Si!=He[1])&&(He=[Ii,Si])),yr):(se&&(Ye?(ai=Ye[0],gi=Ye[1]):(ai=Ne[0],gi=Ne[1],se.invert&&(ai=se.invert(ai),gi=se.invert(gi)),gi<ai&&(ei=ai,ai=gi,gi=ei))),Te&&(kt?(Ii=kt[0],Si=kt[1]):(Ii=He[0],Si=He[1],Te.invert&&(Ii=Te.invert(Ii),Si=Te.invert(Si)),Si<Ii&&(ei=Ii,Ii=Si,Si=ei))),se&&Te?[[ai,Ii],[gi,Si]]:se?[ai,gi]:Te&&[Ii,Si])},yr.clear=function(){return yr.empty()||(Ne=[0,0],He=[0,0],Ye=kt=null),yr},yr.empty=function(){return!!se&&Ne[0]==Ne[1]||!!Te&&He[0]==He[1]},e.rebind(yr,X,\"on\")};var eu={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},dc=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]];e.text=hn(function(X){return X.responseText}),e.json=function(X,se){return An(X,\"application/json\",Tl,se)};function Tl(X){return JSON.parse(X.responseText)}e.html=function(X,se){return An(X,\"text/html\",Al,se)};function Al(X){var se=n.createRange();return se.selectNode(n.body),se.createContextualFragment(X.responseText)}e.xml=hn(function(X){return X.responseXML}),typeof y6==\"object\"&&y6.exports?y6.exports=e:this.d3=e}).apply(self)});var SO=ye((_6,wee)=>{(function(e,t){typeof _6==\"object\"&&typeof wee!=\"undefined\"?t(_6):(e=e||self,t(e.d3=e.d3||{}))})(_6,function(e){\"use strict\";var t=new Date,r=new Date;function n($e,St,Qt,Gt){function _t(It){return $e(It=arguments.length===0?new Date:new Date(+It)),It}return _t.floor=function(It){return $e(It=new Date(+It)),It},_t.ceil=function(It){return $e(It=new Date(It-1)),St(It,1),$e(It),It},_t.round=function(It){var mt=_t(It),er=_t.ceil(It);return It-mt<er-It?mt:er},_t.offset=function(It,mt){return St(It=new Date(+It),mt==null?1:Math.floor(mt)),It},_t.range=function(It,mt,er){var lr=[],wr;if(It=_t.ceil(It),er=er==null?1:Math.floor(er),!(It<mt)||!(er>0))return lr;do lr.push(wr=new Date(+It)),St(It,er),$e(It);while(wr<It&&It<mt);return lr},_t.filter=function(It){return n(function(mt){if(mt>=mt)for(;$e(mt),!It(mt);)mt.setTime(mt-1)},function(mt,er){if(mt>=mt)if(er<0)for(;++er<=0;)for(;St(mt,-1),!It(mt););else for(;--er>=0;)for(;St(mt,1),!It(mt););})},Qt&&(_t.count=function(It,mt){return t.setTime(+It),r.setTime(+mt),$e(t),$e(r),Math.floor(Qt(t,r))},_t.every=function(It){return It=Math.floor(It),!isFinite(It)||!(It>0)?null:It>1?_t.filter(Gt?function(mt){return Gt(mt)%It===0}:function(mt){return _t.count(0,mt)%It===0}):_t}),_t}var i=n(function(){},function($e,St){$e.setTime(+$e+St)},function($e,St){return St-$e});i.every=function($e){return $e=Math.floor($e),!isFinite($e)||!($e>0)?null:$e>1?n(function(St){St.setTime(Math.floor(St/$e)*$e)},function(St,Qt){St.setTime(+St+Qt*$e)},function(St,Qt){return(Qt-St)/$e}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function($e){$e.setTime($e-$e.getMilliseconds())},function($e,St){$e.setTime(+$e+St*o)},function($e,St){return(St-$e)/o},function($e){return $e.getUTCSeconds()}),h=f.range,d=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getMinutes()}),v=d.range,_=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o-$e.getMinutes()*s)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getHours()}),b=_.range,p=n(function($e){$e.setHours(0,0,0,0)},function($e,St){$e.setDate($e.getDate()+St)},function($e,St){return(St-$e-(St.getTimezoneOffset()-$e.getTimezoneOffset())*s)/u},function($e){return $e.getDate()-1}),k=p.range;function E($e){return n(function(St){St.setDate(St.getDate()-(St.getDay()+7-$e)%7),St.setHours(0,0,0,0)},function(St,Qt){St.setDate(St.getDate()+Qt*7)},function(St,Qt){return(Qt-St-(Qt.getTimezoneOffset()-St.getTimezoneOffset())*s)/c})}var T=E(0),L=E(1),x=E(2),C=E(3),M=E(4),g=E(5),P=E(6),A=T.range,z=L.range,O=x.range,U=C.range,G=M.range,Z=g.range,j=P.range,N=n(function($e){$e.setDate(1),$e.setHours(0,0,0,0)},function($e,St){$e.setMonth($e.getMonth()+St)},function($e,St){return St.getMonth()-$e.getMonth()+(St.getFullYear()-$e.getFullYear())*12},function($e){return $e.getMonth()}),H=N.range,re=n(function($e){$e.setMonth(0,1),$e.setHours(0,0,0,0)},function($e,St){$e.setFullYear($e.getFullYear()+St)},function($e,St){return St.getFullYear()-$e.getFullYear()},function($e){return $e.getFullYear()});re.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setFullYear(Math.floor(St.getFullYear()/$e)*$e),St.setMonth(0,1),St.setHours(0,0,0,0)},function(St,Qt){St.setFullYear(St.getFullYear()+Qt*$e)})};var oe=re.range,_e=n(function($e){$e.setUTCSeconds(0,0)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getUTCMinutes()}),Ce=_e.range,Le=n(function($e){$e.setUTCMinutes(0,0,0)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getUTCHours()}),ge=Le.range,ie=n(function($e){$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCDate($e.getUTCDate()+St)},function($e,St){return(St-$e)/u},function($e){return $e.getUTCDate()-1}),Se=ie.range;function Ee($e){return n(function(St){St.setUTCDate(St.getUTCDate()-(St.getUTCDay()+7-$e)%7),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCDate(St.getUTCDate()+Qt*7)},function(St,Qt){return(Qt-St)/c})}var Ae=Ee(0),Be=Ee(1),Pe=Ee(2),me=Ee(3),De=Ee(4),ce=Ee(5),je=Ee(6),lt=Ae.range,pt=Be.range,Vt=Pe.range,ot=me.range,ut=De.range,Wt=ce.range,Nt=je.range,$t=n(function($e){$e.setUTCDate(1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCMonth($e.getUTCMonth()+St)},function($e,St){return St.getUTCMonth()-$e.getUTCMonth()+(St.getUTCFullYear()-$e.getUTCFullYear())*12},function($e){return $e.getUTCMonth()}),sr=$t.range,Tr=n(function($e){$e.setUTCMonth(0,1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCFullYear($e.getUTCFullYear()+St)},function($e,St){return St.getUTCFullYear()-$e.getUTCFullYear()},function($e){return $e.getUTCFullYear()});Tr.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setUTCFullYear(Math.floor(St.getUTCFullYear()/$e)*$e),St.setUTCMonth(0,1),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCFullYear(St.getUTCFullYear()+Qt*$e)})};var fr=Tr.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=_,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=T,e.timeSundays=A,e.timeThursday=M,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=O,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=T,e.timeWeeks=A,e.timeYear=re,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Wt,e.utcHour=Le,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Ce,e.utcMonday=Be,e.utcMondays=pt,e.utcMonth=$t,e.utcMonths=sr,e.utcSaturday=je,e.utcSaturdays=Nt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=lt,e.utcThursday=De,e.utcThursdays=ut,e.utcTuesday=Pe,e.utcTuesdays=Vt,e.utcWednesday=me,e.utcWednesdays=ot,e.utcWeek=Ae,e.utcWeeks=lt,e.utcYear=Tr,e.utcYears=fr,Object.defineProperty(e,\"__esModule\",{value:!0})})});var f3=ye((x6,Tee)=>{(function(e,t){typeof x6==\"object\"&&typeof Tee!=\"undefined\"?t(x6,SO()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(x6,function(e,t){\"use strict\";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,We){return{y:Ge,m:Je,d:We,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,We=Ge.date,tt=Ge.time,xt=Ge.periods,Ie=Ge.days,xe=Ge.shortDays,ke=Ge.months,vt=Ge.shortMonths,ir=h(xt),ar=d(xt),vr=h(Ie),ii=d(Ie),pi=h(xe),$r=d(xe),di=h(ke),ji=d(ke),In=h(vt),wi=d(vt),On={a:$i,A:tn,b:fn,B:yn,c:null,d:N,e:N,f:Ce,H,I:re,j:oe,L:_e,m:Le,M:ge,p:Sn,q:Ba,Q:mt,s:er,S:ie,u:Se,U:Ee,V:Ae,w:Be,W:Pe,x:null,X:null,y:me,Y:De,Z:ce,\"%\":It},qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:je,e:je,f:ut,H:lt,I:pt,j:Vt,L:ot,m:Wt,M:Nt,p:Xo,q:da,Q:mt,s:er,S:$t,u:sr,U:Tr,V:fr,w:$e,W:St,x:null,X:null,y:Qt,Y:Gt,Z:_t,\"%\":It},Fn={a:rr,A:nr,b:Er,B:Xr,c:ri,d:M,e:M,f:U,H:P,I:P,j:g,L:O,m:C,M:A,p:wt,q:x,Q:Z,s:j,S:z,u:_,U:b,V:p,w:v,W:k,x:Qr,X:Oi,y:T,Y:E,Z:L,\"%\":G};On.x=ra(We,On),On.X=ra(tt,On),On.c=ra(Je,On),qn.x=ra(We,qn),qn.X=ra(tt,qn),qn.c=ra(Je,qn);function ra(Wn,Ha){return function(vo){var jn=[],Mt=-1,kr=0,Jr=Wn.length,vi,hn,An;for(vo instanceof Date||(vo=new Date(+vo));++Mt<Jr;)Wn.charCodeAt(Mt)===37&&(jn.push(Wn.slice(kr,Mt)),(hn=o[vi=Wn.charAt(++Mt)])!=null?vi=Wn.charAt(++Mt):hn=vi===\"e\"?\" \":\"0\",(An=Ha[vi])&&(vi=An(vo,hn)),jn.push(vi),kr=Mt+1);return jn.push(Wn.slice(kr,Mt)),jn.join(\"\")}}function la(Wn,Ha){return function(vo){var jn=i(1900,void 0,1),Mt=Ut(jn,Wn,vo+=\"\",0),kr,Jr;if(Mt!=vo.length)return null;if(\"Q\"in jn)return new Date(jn.Q);if(\"s\"in jn)return new Date(jn.s*1e3+(\"L\"in jn?jn.L:0));if(Ha&&!(\"Z\"in jn)&&(jn.Z=0),\"p\"in jn&&(jn.H=jn.H%12+jn.p*12),jn.m===void 0&&(jn.m=\"q\"in jn?jn.q:0),\"V\"in jn){if(jn.V<1||jn.V>53)return null;\"w\"in jn||(jn.w=1),\"Z\"in jn?(kr=n(i(jn.y,0,1)),Jr=kr.getUTCDay(),kr=Jr>4||Jr===0?t.utcMonday.ceil(kr):t.utcMonday(kr),kr=t.utcDay.offset(kr,(jn.V-1)*7),jn.y=kr.getUTCFullYear(),jn.m=kr.getUTCMonth(),jn.d=kr.getUTCDate()+(jn.w+6)%7):(kr=r(i(jn.y,0,1)),Jr=kr.getDay(),kr=Jr>4||Jr===0?t.timeMonday.ceil(kr):t.timeMonday(kr),kr=t.timeDay.offset(kr,(jn.V-1)*7),jn.y=kr.getFullYear(),jn.m=kr.getMonth(),jn.d=kr.getDate()+(jn.w+6)%7)}else(\"W\"in jn||\"U\"in jn)&&(\"w\"in jn||(jn.w=\"u\"in jn?jn.u%7:\"W\"in jn?1:0),Jr=\"Z\"in jn?n(i(jn.y,0,1)).getUTCDay():r(i(jn.y,0,1)).getDay(),jn.m=0,jn.d=\"W\"in jn?(jn.w+6)%7+jn.W*7-(Jr+5)%7:jn.w+jn.U*7-(Jr+6)%7);return\"Z\"in jn?(jn.H+=jn.Z/100|0,jn.M+=jn.Z%100,n(jn)):r(jn)}}function Ut(Wn,Ha,vo,jn){for(var Mt=0,kr=Ha.length,Jr=vo.length,vi,hn;Mt<kr;){if(jn>=Jr)return-1;if(vi=Ha.charCodeAt(Mt++),vi===37){if(vi=Ha.charAt(Mt++),hn=Fn[vi in o?Ha.charAt(Mt++):vi],!hn||(jn=hn(Wn,vo,jn))<0)return-1}else if(vi!=vo.charCodeAt(jn++))return-1}return jn}function wt(Wn,Ha,vo){var jn=ir.exec(Ha.slice(vo));return jn?(Wn.p=ar[jn[0].toLowerCase()],vo+jn[0].length):-1}function rr(Wn,Ha,vo){var jn=pi.exec(Ha.slice(vo));return jn?(Wn.w=$r[jn[0].toLowerCase()],vo+jn[0].length):-1}function nr(Wn,Ha,vo){var jn=vr.exec(Ha.slice(vo));return jn?(Wn.w=ii[jn[0].toLowerCase()],vo+jn[0].length):-1}function Er(Wn,Ha,vo){var jn=In.exec(Ha.slice(vo));return jn?(Wn.m=wi[jn[0].toLowerCase()],vo+jn[0].length):-1}function Xr(Wn,Ha,vo){var jn=di.exec(Ha.slice(vo));return jn?(Wn.m=ji[jn[0].toLowerCase()],vo+jn[0].length):-1}function ri(Wn,Ha,vo){return Ut(Wn,Je,Ha,vo)}function Qr(Wn,Ha,vo){return Ut(Wn,We,Ha,vo)}function Oi(Wn,Ha,vo){return Ut(Wn,tt,Ha,vo)}function $i(Wn){return xe[Wn.getDay()]}function tn(Wn){return Ie[Wn.getDay()]}function fn(Wn){return vt[Wn.getMonth()]}function yn(Wn){return ke[Wn.getMonth()]}function Sn(Wn){return xt[+(Wn.getHours()>=12)]}function Ba(Wn){return 1+~~(Wn.getMonth()/3)}function ua(Wn){return xe[Wn.getUTCDay()]}function ma(Wn){return Ie[Wn.getUTCDay()]}function Wa(Wn){return vt[Wn.getUTCMonth()]}function Fa(Wn){return ke[Wn.getUTCMonth()]}function Xo(Wn){return xt[+(Wn.getUTCHours()>=12)]}function da(Wn){return 1+~~(Wn.getUTCMonth()/3)}return{format:function(Wn){var Ha=ra(Wn+=\"\",On);return Ha.toString=function(){return Wn},Ha},parse:function(Wn){var Ha=la(Wn+=\"\",!1);return Ha.toString=function(){return Wn},Ha},utcFormat:function(Wn){var Ha=ra(Wn+=\"\",qn);return Ha.toString=function(){return Wn},Ha},utcParse:function(Wn){var Ha=la(Wn+=\"\",!0);return Ha.toString=function(){return Wn},Ha}}}var o={\"-\":\"\",_:\" \",0:\"0\"},s=/^\\s*\\d+/,l=/^%/,u=/[\\\\^$*+?|[\\]().{}]/g;function c(Ge,Je,We){var tt=Ge<0?\"-\":\"\",xt=(tt?-Ge:Ge)+\"\",Ie=xt.length;return tt+(Ie<We?new Array(We-Ie+1).join(Je)+xt:xt)}function f(Ge){return Ge.replace(u,\"\\\\$&\")}function h(Ge){return new RegExp(\"^(?:\"+Ge.map(f).join(\"|\")+\")\",\"i\")}function d(Ge){for(var Je={},We=-1,tt=Ge.length;++We<tt;)Je[Ge[We].toLowerCase()]=We;return Je}function v(Ge,Je,We){var tt=s.exec(Je.slice(We,We+1));return tt?(Ge.w=+tt[0],We+tt[0].length):-1}function _(Ge,Je,We){var tt=s.exec(Je.slice(We,We+1));return tt?(Ge.u=+tt[0],We+tt[0].length):-1}function b(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.U=+tt[0],We+tt[0].length):-1}function p(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.V=+tt[0],We+tt[0].length):-1}function k(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.W=+tt[0],We+tt[0].length):-1}function E(Ge,Je,We){var tt=s.exec(Je.slice(We,We+4));return tt?(Ge.y=+tt[0],We+tt[0].length):-1}function T(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.y=+tt[0]+(+tt[0]>68?1900:2e3),We+tt[0].length):-1}function L(Ge,Je,We){var tt=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(Je.slice(We,We+6));return tt?(Ge.Z=tt[1]?0:-(tt[2]+(tt[3]||\"00\")),We+tt[0].length):-1}function x(Ge,Je,We){var tt=s.exec(Je.slice(We,We+1));return tt?(Ge.q=tt[0]*3-3,We+tt[0].length):-1}function C(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.m=tt[0]-1,We+tt[0].length):-1}function M(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.d=+tt[0],We+tt[0].length):-1}function g(Ge,Je,We){var tt=s.exec(Je.slice(We,We+3));return tt?(Ge.m=0,Ge.d=+tt[0],We+tt[0].length):-1}function P(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.H=+tt[0],We+tt[0].length):-1}function A(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.M=+tt[0],We+tt[0].length):-1}function z(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.S=+tt[0],We+tt[0].length):-1}function O(Ge,Je,We){var tt=s.exec(Je.slice(We,We+3));return tt?(Ge.L=+tt[0],We+tt[0].length):-1}function U(Ge,Je,We){var tt=s.exec(Je.slice(We,We+6));return tt?(Ge.L=Math.floor(tt[0]/1e3),We+tt[0].length):-1}function G(Ge,Je,We){var tt=l.exec(Je.slice(We,We+1));return tt?We+tt[0].length:-1}function Z(Ge,Je,We){var tt=s.exec(Je.slice(We));return tt?(Ge.Q=+tt[0],We+tt[0].length):-1}function j(Ge,Je,We){var tt=s.exec(Je.slice(We));return tt?(Ge.s=+tt[0],We+tt[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function re(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function Ce(Ge,Je){return _e(Ge,Je)+\"000\"}function Le(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function ge(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Ee(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function Ae(Ge,Je){var We=Ge.getDay();return Ge=We>=4||We===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function Be(Ge){return Ge.getDay()}function Pe(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function me(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function De(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?\"-\":(Je*=-1,\"+\"))+c(Je/60|0,\"0\",2)+c(Je%60,\"0\",2)}function je(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function lt(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function pt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Vt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function ot(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function ut(Ge,Je){return ot(Ge,Je)+\"000\"}function Wt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Nt(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function $t(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function sr(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function Tr(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function fr(Ge,Je){var We=Ge.getUTCDay();return Ge=We>=4||We===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function $e(Ge){return Ge.getUTCDay()}function St(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Qt(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Gt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function _t(){return\"+0000\"}function It(){return\"%\"}function mt(Ge){return+Ge}function er(Ge){return Math.floor(+Ge/1e3)}var lr;wr({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});function wr(Ge){return lr=a(Ge),e.timeFormat=lr.format,e.timeParse=lr.parse,e.utcFormat=lr.utcFormat,e.utcParse=lr.utcParse,lr}var Lr=\"%Y-%m-%dT%H:%M:%S.%LZ\";function ti(Ge){return Ge.toISOString()}var Br=Date.prototype.toISOString?ti:e.utcFormat(Lr);function Vr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var dt=+new Date(\"2000-01-01T00:00:00.000Z\")?Vr:e.utcParse(Lr);e.isoFormat=Br,e.isoParse=dt,e.timeFormatDefaultLocale=wr,e.timeFormatLocale=a,Object.defineProperty(e,\"__esModule\",{value:!0})})});var MO=ye((b6,Aee)=>{(function(e,t){typeof b6==\"object\"&&typeof Aee!=\"undefined\"?t(b6):(e=typeof globalThis!=\"undefined\"?globalThis:e||self,t(e.d3=e.d3||{}))})(b6,function(e){\"use strict\";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString(\"en\").replace(/,/g,\"\"):C.toString(10)}function r(C,M){if((g=(C=M?C.toExponential(M-1):C.toExponential()).indexOf(\"e\"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(g,P){for(var A=g.length,z=[],O=0,U=C[0],G=0;A>0&&U>0&&(G+U+1>P&&(U=Math.max(1,P-G)),z.push(g.substring(A-=U,A+U)),!((G+=U+1)>P));)U=C[O=(O+1)%C.length];return z.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function s(C){if(!(M=o.exec(C)))throw new Error(\"invalid format: \"+C);var M;return new l({fill:M[1],align:M[2],sign:M[3],symbol:M[4],zero:M[5],width:M[6],comma:M[7],precision:M[8]&&M[8].slice(1),trim:M[9],type:M[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?\" \":C.fill+\"\",this.align=C.align===void 0?\">\":C.align+\"\",this.sign=C.sign===void 0?\"-\":C.sign+\"\",this.symbol=C.symbol===void 0?\"\":C.symbol+\"\",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?\"\":C.type+\"\"}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(this.width===void 0?\"\":Math.max(1,this.width|0))+(this.comma?\",\":\"\")+(this.precision===void 0?\"\":\".\"+Math.max(0,this.precision|0))+(this.trim?\"~\":\"\")+this.type};function u(C){e:for(var M=C.length,g=1,P=-1,A;g<M;++g)switch(C[g]){case\".\":P=A=g;break;case\"0\":P===0&&(P=g),A=g;break;default:if(!+C[g])break e;P>0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(A+1):C}var c;function f(C,M){var g=r(C,M);if(!g)return C+\"\";var P=g[0],A=g[1],z=A-(c=Math.max(-8,Math.min(8,Math.floor(A/3)))*3)+1,O=P.length;return z===O?P:z>O?P+new Array(z-O+1).join(\"0\"):z>0?P.slice(0,z)+\".\"+P.slice(z):\"0.\"+new Array(1-z).join(\"0\")+r(C,Math.max(0,M+z-1))[0]}function h(C,M){var g=r(C,M);if(!g)return C+\"\";var P=g[0],A=g[1];return A<0?\"0.\"+new Array(-A).join(\"0\")+P:P.length>A+1?P.slice(0,A+1)+\".\"+P.slice(A+1):P+new Array(A-P.length+2).join(\"0\")}var d={\"%\":function(C,M){return(C*100).toFixed(M)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+\"\"},d:t,e:function(C,M){return C.toExponential(M)},f:function(C,M){return C.toFixed(M)},g:function(C,M){return C.toPrecision(M)},o:function(C){return Math.round(C).toString(8)},p:function(C,M){return h(C*100,M)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var _=Array.prototype.map,b=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xB5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function p(C){var M=C.grouping===void 0||C.thousands===void 0?v:i(_.call(C.grouping,Number),C.thousands+\"\"),g=C.currency===void 0?\"\":C.currency[0]+\"\",P=C.currency===void 0?\"\":C.currency[1]+\"\",A=C.decimal===void 0?\".\":C.decimal+\"\",z=C.numerals===void 0?v:a(_.call(C.numerals,String)),O=C.percent===void 0?\"%\":C.percent+\"\",U=C.minus===void 0?\"-\":C.minus+\"\",G=C.nan===void 0?\"NaN\":C.nan+\"\";function Z(N){N=s(N);var H=N.fill,re=N.align,oe=N.sign,_e=N.symbol,Ce=N.zero,Le=N.width,ge=N.comma,ie=N.precision,Se=N.trim,Ee=N.type;Ee===\"n\"?(ge=!0,Ee=\"g\"):d[Ee]||(ie===void 0&&(ie=12),Se=!0,Ee=\"g\"),(Ce||H===\"0\"&&re===\"=\")&&(Ce=!0,H=\"0\",re=\"=\");var Ae=_e===\"$\"?g:_e===\"#\"&&/[boxX]/.test(Ee)?\"0\"+Ee.toLowerCase():\"\",Be=_e===\"$\"?P:/[%p]/.test(Ee)?O:\"\",Pe=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function De(ce){var je=Ae,lt=Be,pt,Vt,ot;if(Ee===\"c\")lt=Pe(ce)+lt,ce=\"\";else{ce=+ce;var ut=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Pe(Math.abs(ce),ie),Se&&(ce=u(ce)),ut&&+ce==0&&oe!==\"+\"&&(ut=!1),je=(ut?oe===\"(\"?oe:U:oe===\"-\"||oe===\"(\"?\"\":oe)+je,lt=(Ee===\"s\"?b[8+c/3]:\"\")+lt+(ut&&oe===\"(\"?\")\":\"\"),me){for(pt=-1,Vt=ce.length;++pt<Vt;)if(ot=ce.charCodeAt(pt),48>ot||ot>57){lt=(ot===46?A+ce.slice(pt+1):ce.slice(pt))+lt,ce=ce.slice(0,pt);break}}}ge&&!Ce&&(ce=M(ce,1/0));var Wt=je.length+ce.length+lt.length,Nt=Wt<Le?new Array(Le-Wt+1).join(H):\"\";switch(ge&&Ce&&(ce=M(Nt+ce,Nt.length?Le-lt.length:1/0),Nt=\"\"),re){case\"<\":ce=je+ce+lt+Nt;break;case\"=\":ce=je+Nt+ce+lt;break;case\"^\":ce=Nt.slice(0,Wt=Nt.length>>1)+je+ce+lt+Nt.slice(Wt);break;default:ce=Nt+je+ce+lt;break}return z(ce)}return De.toString=function(){return N+\"\"},De}function j(N,H){var re=Z((N=s(N),N.type=\"f\",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-oe),Ce=b[8+oe/3];return function(Le){return re(_e*Le)+Ce}}return{format:Z,formatPrefix:j}}var k;E({decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],minus:\"-\"});function E(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function T(C){return Math.max(0,-n(Math.abs(C)))}function L(C,M){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(M)/3)))*3-n(Math.abs(C)))}function x(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=E,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=T,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,\"__esModule\",{value:!0})})});var Mee=ye((grr,See)=>{\"use strict\";See.exports=function(e){for(var t=e.length,r,n=0;n<t;n++)if(r=e.charCodeAt(n),(r<9||r>13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((mrr,Eee)=>{\"use strict\";var Stt=Mee();Eee.exports=function(e){var t=typeof e;if(t===\"string\"){var r=e;if(e=+e,e===0&&Stt(r))return!1}else if(t!==\"number\")return!1;return e-e<1}});var fs=ye((yrr,kee)=>{\"use strict\";kee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:\"\\u2212\"}});var EO=ye((w6,Cee)=>{(function(e,t){typeof w6==\"object\"&&typeof Cee!=\"undefined\"?t(w6):(e=typeof globalThis!=\"undefined\"?globalThis:e||self,t(e[\"base64-arraybuffer\"]={}))})(w6,function(e){\"use strict\";for(var t=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",r=typeof Uint8Array==\"undefined\"?[]:new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;var i=function(o){var s=new Uint8Array(o),l,u=s.length,c=\"\";for(l=0;l<u;l+=3)c+=t[s[l]>>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+\"=\":u%3===1&&(c=c.substring(0,c.length-2)+\"==\"),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]===\"=\"&&(s--,o[o.length-2]===\"=\"&&s--);var _=new ArrayBuffer(s),b=new Uint8Array(_);for(u=0;u<l;u+=4)f=r[o.charCodeAt(u)],h=r[o.charCodeAt(u+1)],d=r[o.charCodeAt(u+2)],v=r[o.charCodeAt(u+3)],b[c++]=f<<2|h>>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return _};e.decode=a,e.encode=i,Object.defineProperty(e,\"__esModule\",{value:!0})})});var Ty=ye((_rr,Lee)=>{\"use strict\";Lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)===\"[object Object]\":Object.prototype.toString.call(t)===\"[object Object]\"&&Object.getPrototypeOf(t).hasOwnProperty(\"hasOwnProperty\")}});var vv=ye(xg=>{\"use strict\";var Mtt=EO().decode,Ett=Ty(),kO=Array.isArray,ktt=ArrayBuffer,Ctt=DataView;function Pee(e){return ktt.isView(e)&&!(e instanceof Ctt)}xg.isTypedArray=Pee;function T6(e){return kO(e)||Pee(e)}xg.isArrayOrTypedArray=T6;function Ltt(e){return!T6(e[0])}xg.isArray1D=Ltt;xg.ensureArray=function(e,t){return kO(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray==\"undefined\"?void 0:Uint8ClampedArray,i1:typeof Int8Array==\"undefined\"?void 0:Int8Array,u1:typeof Uint8Array==\"undefined\"?void 0:Uint8Array,i2:typeof Int16Array==\"undefined\"?void 0:Int16Array,u2:typeof Uint16Array==\"undefined\"?void 0:Uint16Array,i4:typeof Int32Array==\"undefined\"?void 0:Int32Array,u4:typeof Uint32Array==\"undefined\"?void 0:Uint32Array,f4:typeof Float32Array==\"undefined\"?void 0:Float32Array,f8:typeof Float64Array==\"undefined\"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function CO(e){return e.constructor===ArrayBuffer}xg.isArrayBuffer=CO;xg.decodeTypedArraySpec=function(e){var t=[],r=Ptt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: \"'+n+'\"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;CO(o)||(o=Mtt(o));var s=r.shape===void 0?[o.byteLength/a]:(\"\"+r.shape).split(\",\");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c<u;c++)t[c]=new i(o,d,f),d+=h;else if(l===3){u=+s[1];for(var v=+s[2],_=0;_<v;_++)for(t[_]=[],c=0;c<u;c++)t[_][c]=new i(o,d,f),d+=h}else throw new Error(\"ndim: \"+l+'is not supported with the shape:\"'+r.shape+'\"');return t.bdata=r.bdata,t.dtype=r.dtype,t.shape=s.reverse().join(\",\"),e._inputArray=t,t};xg.isTypedArraySpec=function(e){return Ett(e)&&e.hasOwnProperty(\"dtype\")&&typeof e.dtype==\"string\"&&e.hasOwnProperty(\"bdata\")&&(typeof e.bdata==\"string\"||CO(e.bdata))&&(e.shape===void 0||e.hasOwnProperty(\"shape\")&&(typeof e.shape==\"string\"||typeof e.shape==\"number\"))};function Ptt(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}xg.concat=function(){var e=[],t=!0,r=0,n,i,a,o,s,l,u,c;for(a=0;a<arguments.length;a++)o=arguments[a],l=o.length,l&&(i?e.push(o):(i=o,s=l),kO(o)?n=!1:(t=!1,r?n!==o.constructor&&(n=!1):n=o.constructor),r+=l);if(!r)return[];if(!e.length)return i;if(t)return i.concat.apply(i,e);if(n){for(u=new n(r),u.set(i),a=0;a<e.length;a++)o=e[a],u.set(o,s),s+=o.length;return u}for(u=new Array(r),c=0;c<i.length;c++)u[c]=i[c];for(a=0;a<e.length;a++){for(o=e[a],c=0;c<o.length;c++)u[s+c]=o[c];s+=c}return u};xg.maxRowLength=function(e){return Iee(e,Math.max,0)};xg.minRowLength=function(e){return Iee(e,Math.min,1/0)};function Iee(e,t,r){if(T6(e))if(T6(e[0])){for(var n=r,i=0;i<e.length;i++)n=t(n,e[i].length);return n}else return e.length;return 0}});var FS=ye((brr,Oee)=>{\"use strict\";var Ree=Eo(),PO=vv().isArrayOrTypedArray;Oee.exports=function(t,r){if(Ree(r))r=String(r);else if(typeof r!=\"string\"||r.slice(-4)===\"[-1]\")throw\"bad property string\";var n=r.split(\".\"),i,a,o,s;for(s=0;s<n.length;s++)if(String(n[s]).slice(0,2)===\"__\")throw\"bad property string\";for(s=0;s<n.length;){if(i=String(n[s]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/),i){if(i[1])n[s]=i[1];else if(s===0)n.splice(0,1);else throw\"bad property string\";for(a=i[2].slice(1,-1).split(\"][\"),o=0;o<a.length;o++)s++,n.splice(s,0,Number(a[o]))}s++}return typeof t!=\"object\"?Ftt(t,r,n):{set:Fee(t,n,r),get:Dee(t,n),astr:r,parts:n,obj:t}};function Dee(e,t){return function(r){var n=e,i,a,o,s,l;for(s=0;s<t.length-1;s++){if(i=t[s],i===-1){for(a=!0,o=[],l=0;l<n.length;l++)o[l]=Dee(n[l],t.slice(s+1))(r),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(typeof i==\"number\"&&!PO(n)||(n=n[i],typeof n!=\"object\"||n===null))return}if(!(typeof n!=\"object\"||n===null)&&(o=n[t[s]],!(!r&&o===null)))return o}}var Itt=/(^|\\.)args\\[/;function LO(e,t){return e===void 0||e===null&&!t.match(Itt)}function Fee(e,t,r){return function(n){var i=e,a=\"\",o=[[e,a]],s=LO(n,r),l,u;for(u=0;u<t.length-1;u++){if(l=t[u],typeof l==\"number\"&&!PO(i))throw\"array index but container is not an array\";if(l===-1){if(s=!Dtt(i,t.slice(u+1),n,r),s)break;return}if(!zee(i,l,t[u+1],s))break;if(i=i[l],typeof i!=\"object\"||i===null)throw\"container is not an object\";a=Rtt(a,l),o.push([i,a])}if(s){if(u===t.length-1&&(delete i[t[u]],Array.isArray(i)&&+t[u]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[t[u]]=n}}function Rtt(e,t){var r=t;return Ree(t)?r=\"[\"+t+\"]\":e&&(r=\".\"+t),e+r}function Dtt(e,t,r,n){var i=PO(r),a=!0,o=r,s=n.replace(\"-1\",0),l=i?!1:LO(r,s),u=t[0],c;for(c=0;c<e.length;c++)s=n.replace(\"-1\",c),i&&(o=r[c%r.length],l=LO(o,s)),l&&(a=!1),zee(e,c,u,l)&&Fee(e[c],t,n.replace(\"-1\",c))(o);return a}function zee(e,t,r,n){if(e[t]===void 0){if(n)return!1;typeof r==\"number\"?e[t]=[]:e[t]={}}return!0}function Ftt(e,t,r){return{set:function(){throw\"bad container\"},get:function(){},astr:t,parts:r,obj:e}}});var Uee=ye((wrr,Nee)=>{\"use strict\";var h3=FS(),ztt=/^\\w*$/,Ott=0,qee=1,A6=2,Bee=3,gb=4;Nee.exports=function(t,r,n,i){n=n||\"name\",i=i||\"value\";var a,o,s,l={};r&&r.length?(s=h3(t,r),o=s.get()):o=t,r=r||\"\";var u={};if(o)for(a=0;a<o.length;a++)u[o[a][n]]=a;var c=ztt.test(i),f={set:function(h,d){var v=d===null?gb:Ott;if(!o){if(!s||v===gb)return;o=[],s.set(o)}var _=u[h];if(_===void 0){if(v===gb)return;v=v|Bee,_=o.length,u[h]=_}else d!==(c?o[_][i]:h3(o[_],i).get())&&(v=v|A6);var b=o[_]=o[_]||{};return b[n]=h,c?b[i]=d:h3(b,i).set(d),d!==null&&(v=v&~gb),l[_]=l[_]|v,f},get:function(h){if(o){var d=u[h];if(d!==void 0)return c?o[d][i]:h3(o[d],i).get()}},rename:function(h,d){var v=u[h];return v===void 0||(l[v]=l[v]|qee,u[d]=v,delete u[h],o[v][n]=d),f},remove:function(h){var d=u[h];if(d===void 0)return f;var v=o[d];if(Object.keys(v).length>2)return l[d]=l[d]|A6,f.set(h,null);if(c){for(a=d;a<o.length;a++)l[a]=l[a]|Bee;for(a=d;a<o.length;a++)u[o[a][n]]--;o.splice(d,1),delete u[h]}else h3(v,i).set(null),l[d]=l[d]|A6|gb;return f},constructUpdate:function(){for(var h,d,v={},_=Object.keys(l),b=0;b<_.length;b++)d=_[b],h=r+\"[\"+d+\"]\",o[d]?(l[d]&qee&&(v[h+\".\"+n]=o[d][n]),l[d]&A6&&(c?v[h+\".\"+i]=l[d]&gb?null:o[d][i]:v[h+\".\"+i]=l[d]&gb?null:h3(o[d],i).get())):v[h]=null;return v}};return f}});var Gee=ye((Trr,Vee)=>{\"use strict\";var qtt=/^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/,Btt=/^[^\\.\\[\\]]+$/;Vee.exports=function(e,t){for(;t;){var r=e.match(qtt);if(r)e=r[1];else if(e.match(Btt))e=\"\";else throw new Error(\"bad relativeAttr call:\"+[e,t]);if(t.charAt(0)===\"^\")t=t.slice(1);else break}return e&&t.charAt(0)!==\"[\"?e+\".\"+t:e+t}});var S6=ye((Arr,Hee)=>{\"use strict\";var Ntt=Eo();Hee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Ntt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Xee=ye((Srr,Wee)=>{\"use strict\";var jee=vv().isArrayOrTypedArray,zS=Ty();Wee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)===\"_\"||typeof i==\"function\"){if(n in t)continue;t[n]=i}else if(jee(i)&&jee(a)&&zS(i[0])){if(n===\"customdata\"||n===\"ids\")continue;for(var o=Math.min(i.length,a.length),s=0;s<o;s++)a[s]!==i[s]&&zS(i[s])&&zS(a[s])&&e(a[s],i[s])}else zS(i)&&zS(a)&&(e(a,i),Object.keys(a).length||delete t[n])}}});var d3=ye((Mrr,Zee)=>{\"use strict\";function Utt(e,t){var r=e%t;return r<0?r+t:r}function Vtt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Zee.exports={mod:Utt,modHalf:Vtt}});var fd=ye((Err,M6)=>{(function(e){var t=/^\\s+/,r=/\\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,De){if(me=me||\"\",De=De||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,De);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=De.format||ce.format,this._gradientType=De.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<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 me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),De,ce,je,lt,pt,Vt;return De=me.r/255,ce=me.g/255,je=me.b/255,De<=.03928?lt=De/12.92:lt=e.pow((De+.055)/1.055,2.4),ce<=.03928?pt=ce/12.92:pt=e.pow((ce+.055)/1.055,2.4),je<=.03928?Vt=je/12.92:Vt=e.pow((je+.055)/1.055,2.4),.2126*lt+.7152*pt+.0722*Vt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),je=i(me.v*100);return this._a==1?\"hsv(\"+De+\", \"+ce+\"%, \"+je+\"%)\":\"hsva(\"+De+\", \"+ce+\"%, \"+je+\"%, \"+this._roundA+\")\"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),je=i(me.l*100);return this._a==1?\"hsl(\"+De+\", \"+ce+\"%, \"+je+\"%)\":\"hsla(\"+De+\", \"+ce+\"%, \"+je+\"%, \"+this._roundA+\")\"},toHex:function(me){return _(this._r,this._g,this._b,me)},toHexString:function(me){return\"#\"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return\"#\"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?\"rgb(\"+i(this._r)+\", \"+i(this._g)+\", \"+i(this._b)+\")\":\"rgba(\"+i(this._r)+\", \"+i(this._g)+\", \"+i(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+\"%\",g:i(H(this._g,255)*100)+\"%\",b:i(H(this._b,255)*100)+\"%\",a:this._a}},toPercentageRgbString:function(){return this._a==1?\"rgb(\"+i(H(this._r,255)*100)+\"%, \"+i(H(this._g,255)*100)+\"%, \"+i(H(this._b,255)*100)+\"%)\":\"rgba(\"+i(H(this._r,255)*100)+\"%, \"+i(H(this._g,255)*100)+\"%, \"+i(H(this._b,255)*100)+\"%, \"+this._roundA+\")\"},toName:function(){return this._a===0?\"transparent\":this._a<1?!1:Z[_(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var De=\"#\"+p(this._r,this._g,this._b,this._a),ce=De,je=this._gradientType?\"GradientType = 1, \":\"\";if(me){var lt=l(me);ce=\"#\"+p(lt._r,lt._g,lt._b,lt._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+je+\"startColorstr=\"+De+\",endColorstr=\"+ce+\")\"},toString:function(me){var De=!!me;me=me||this._format;var ce=!1,je=this._a<1&&this._a>=0,lt=!De&&je&&(me===\"hex\"||me===\"hex6\"||me===\"hex3\"||me===\"hex4\"||me===\"hex8\"||me===\"name\");return lt?me===\"name\"&&this._a===0?this.toName():this.toRgbString():(me===\"rgb\"&&(ce=this.toRgbString()),me===\"prgb\"&&(ce=this.toPercentageRgbString()),(me===\"hex\"||me===\"hex6\")&&(ce=this.toHexString()),me===\"hex3\"&&(ce=this.toHexString(!0)),me===\"hex4\"&&(ce=this.toHex8String(!0)),me===\"hex8\"&&(ce=this.toHex8String()),me===\"name\"&&(ce=this.toName()),me===\"hsl\"&&(ce=this.toHslString()),me===\"hsv\"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,De){var ce=me.apply(null,[this].concat([].slice.call(De)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,De){return me.apply(null,[this].concat([].slice.call(De)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},l.fromRatio=function(me,De){if(typeof me==\"object\"){var ce={};for(var je in me)me.hasOwnProperty(je)&&(je===\"a\"?ce[je]=me[je]:ce[je]=ge(me[je]));me=ce}return l(me,De)};function u(me){var De={r:0,g:0,b:0},ce=1,je=null,lt=null,pt=null,Vt=!1,ot=!1;return typeof me==\"string\"&&(me=Be(me)),typeof me==\"object\"&&(Ae(me.r)&&Ae(me.g)&&Ae(me.b)?(De=c(me.r,me.g,me.b),Vt=!0,ot=String(me.r).substr(-1)===\"%\"?\"prgb\":\"rgb\"):Ae(me.h)&&Ae(me.s)&&Ae(me.v)?(je=ge(me.s),lt=ge(me.v),De=v(me.h,je,lt),Vt=!0,ot=\"hsv\"):Ae(me.h)&&Ae(me.s)&&Ae(me.l)&&(je=ge(me.s),pt=ge(me.l),De=h(me.h,je,pt),Vt=!0,ot=\"hsl\"),me.hasOwnProperty(\"a\")&&(ce=me.a)),ce=N(ce),{ok:Vt,format:me.format||ot,r:a(255,o(De.r,0)),g:a(255,o(De.g,0)),b:a(255,o(De.b,0)),a:ce}}function c(me,De,ce){return{r:H(me,255)*255,g:H(De,255)*255,b:H(ce,255)*255}}function f(me,De,ce){me=H(me,255),De=H(De,255),ce=H(ce,255);var je=o(me,De,ce),lt=a(me,De,ce),pt,Vt,ot=(je+lt)/2;if(je==lt)pt=Vt=0;else{var ut=je-lt;switch(Vt=ot>.5?ut/(2-je-lt):ut/(je+lt),je){case me:pt=(De-ce)/ut+(De<ce?6:0);break;case De:pt=(ce-me)/ut+2;break;case ce:pt=(me-De)/ut+4;break}pt/=6}return{h:pt,s:Vt,l:ot}}function h(me,De,ce){var je,lt,pt;me=H(me,360),De=H(De,100),ce=H(ce,100);function Vt(Wt,Nt,$t){return $t<0&&($t+=1),$t>1&&($t-=1),$t<1/6?Wt+(Nt-Wt)*6*$t:$t<1/2?Nt:$t<2/3?Wt+(Nt-Wt)*(2/3-$t)*6:Wt}if(De===0)je=lt=pt=ce;else{var ot=ce<.5?ce*(1+De):ce+De-ce*De,ut=2*ce-ot;je=Vt(ut,ot,me+1/3),lt=Vt(ut,ot,me),pt=Vt(ut,ot,me-1/3)}return{r:je*255,g:lt*255,b:pt*255}}function d(me,De,ce){me=H(me,255),De=H(De,255),ce=H(ce,255);var je=o(me,De,ce),lt=a(me,De,ce),pt,Vt,ot=je,ut=je-lt;if(Vt=je===0?0:ut/je,je==lt)pt=0;else{switch(je){case me:pt=(De-ce)/ut+(De<ce?6:0);break;case De:pt=(ce-me)/ut+2;break;case ce:pt=(me-De)/ut+4;break}pt/=6}return{h:pt,s:Vt,v:ot}}function v(me,De,ce){me=H(me,360)*6,De=H(De,100),ce=H(ce,100);var je=e.floor(me),lt=me-je,pt=ce*(1-De),Vt=ce*(1-lt*De),ot=ce*(1-(1-lt)*De),ut=je%6,Wt=[ce,Vt,pt,pt,ot,ce][ut],Nt=[ot,ce,ce,Vt,pt,pt][ut],$t=[pt,pt,ot,ce,ce,Vt][ut];return{r:Wt*255,g:Nt*255,b:$t*255}}function _(me,De,ce,je){var lt=[Le(i(me).toString(16)),Le(i(De).toString(16)),Le(i(ce).toString(16))];return je&&lt[0].charAt(0)==lt[0].charAt(1)&&lt[1].charAt(0)==lt[1].charAt(1)&&lt[2].charAt(0)==lt[2].charAt(1)?lt[0].charAt(0)+lt[1].charAt(0)+lt[2].charAt(0):lt.join(\"\")}function b(me,De,ce,je,lt){var pt=[Le(i(me).toString(16)),Le(i(De).toString(16)),Le(i(ce).toString(16)),Le(ie(je))];return lt&&pt[0].charAt(0)==pt[0].charAt(1)&&pt[1].charAt(0)==pt[1].charAt(1)&&pt[2].charAt(0)==pt[2].charAt(1)&&pt[3].charAt(0)==pt[3].charAt(1)?pt[0].charAt(0)+pt[1].charAt(0)+pt[2].charAt(0)+pt[3].charAt(0):pt.join(\"\")}function p(me,De,ce,je){var lt=[Le(ie(je)),Le(i(me).toString(16)),Le(i(De).toString(16)),Le(i(ce).toString(16))];return lt.join(\"\")}l.equals=function(me,De){return!me||!De?!1:l(me).toRgbString()==l(De).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})};function k(me,De){De=De===0?0:De||10;var ce=l(me).toHsl();return ce.s-=De/100,ce.s=re(ce.s),l(ce)}function E(me,De){De=De===0?0:De||10;var ce=l(me).toHsl();return ce.s+=De/100,ce.s=re(ce.s),l(ce)}function T(me){return l(me).desaturate(100)}function L(me,De){De=De===0?0:De||10;var ce=l(me).toHsl();return ce.l+=De/100,ce.l=re(ce.l),l(ce)}function x(me,De){De=De===0?0:De||10;var ce=l(me).toRgb();return ce.r=o(0,a(255,ce.r-i(255*-(De/100)))),ce.g=o(0,a(255,ce.g-i(255*-(De/100)))),ce.b=o(0,a(255,ce.b-i(255*-(De/100)))),l(ce)}function C(me,De){De=De===0?0:De||10;var ce=l(me).toHsl();return ce.l-=De/100,ce.l=re(ce.l),l(ce)}function M(me,De){var ce=l(me).toHsl(),je=(ce.h+De)%360;return ce.h=je<0?360+je:je,l(ce)}function g(me){var De=l(me).toHsl();return De.h=(De.h+180)%360,l(De)}function P(me){var De=l(me).toHsl(),ce=De.h;return[l(me),l({h:(ce+120)%360,s:De.s,l:De.l}),l({h:(ce+240)%360,s:De.s,l:De.l})]}function A(me){var De=l(me).toHsl(),ce=De.h;return[l(me),l({h:(ce+90)%360,s:De.s,l:De.l}),l({h:(ce+180)%360,s:De.s,l:De.l}),l({h:(ce+270)%360,s:De.s,l:De.l})]}function z(me){var De=l(me).toHsl(),ce=De.h;return[l(me),l({h:(ce+72)%360,s:De.s,l:De.l}),l({h:(ce+216)%360,s:De.s,l:De.l})]}function O(me,De,ce){De=De||6,ce=ce||30;var je=l(me).toHsl(),lt=360/ce,pt=[l(me)];for(je.h=(je.h-(lt*De>>1)+720)%360;--De;)je.h=(je.h+lt)%360,pt.push(l(je));return pt}function U(me,De){De=De||6;for(var ce=l(me).toHsv(),je=ce.h,lt=ce.s,pt=ce.v,Vt=[],ot=1/De;De--;)Vt.push(l({h:je,s:lt,v:pt})),pt=(pt+ot)%1;return Vt}l.mix=function(me,De,ce){ce=ce===0?0:ce||50;var je=l(me).toRgb(),lt=l(De).toRgb(),pt=ce/100,Vt={r:(lt.r-je.r)*pt+je.r,g:(lt.g-je.g)*pt+je.g,b:(lt.b-je.b)*pt+je.b,a:(lt.a-je.a)*pt+je.a};return l(Vt)},l.readability=function(me,De){var ce=l(me),je=l(De);return(e.max(ce.getLuminance(),je.getLuminance())+.05)/(e.min(ce.getLuminance(),je.getLuminance())+.05)},l.isReadable=function(me,De,ce){var je=l.readability(me,De),lt,pt;switch(pt=!1,lt=Pe(ce),lt.level+lt.size){case\"AAsmall\":case\"AAAlarge\":pt=je>=4.5;break;case\"AAlarge\":pt=je>=3;break;case\"AAAsmall\":pt=je>=7;break}return pt},l.mostReadable=function(me,De,ce){var je=null,lt=0,pt,Vt,ot,ut;ce=ce||{},Vt=ce.includeFallbackColors,ot=ce.level,ut=ce.size;for(var Wt=0;Wt<De.length;Wt++)pt=l.readability(me,De[Wt]),pt>lt&&(lt=pt,je=l(De[Wt]));return l.isReadable(me,je,{level:ot,size:ut})||!Vt?je:(ce.includeFallbackColors=!1,l.mostReadable(me,[\"#fff\",\"#000\"],ce))};var G=l.names={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",burntsienna:\"ea7e5d\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"663399\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},Z=l.hexNames=j(G);function j(me){var De={};for(var ce in me)me.hasOwnProperty(ce)&&(De[me[ce]]=ce);return De}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function H(me,De){_e(me)&&(me=\"100%\");var ce=Ce(me);return me=a(De,o(0,parseFloat(me))),ce&&(me=parseInt(me*De,10)/100),e.abs(me-De)<1e-6?1:me%De/parseFloat(De)}function re(me){return a(1,o(0,me))}function oe(me){return parseInt(me,16)}function _e(me){return typeof me==\"string\"&&me.indexOf(\".\")!=-1&&parseFloat(me)===1}function Ce(me){return typeof me==\"string\"&&me.indexOf(\"%\")!=-1}function Le(me){return me.length==1?\"0\"+me:\"\"+me}function ge(me){return me<=1&&(me=me*100+\"%\"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Se(me){return oe(me)/255}var Ee=function(){var me=\"[-\\\\+]?\\\\d+%?\",De=\"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\",ce=\"(?:\"+De+\")|(?:\"+me+\")\",je=\"[\\\\s|\\\\(]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")\\\\s*\\\\)?\",lt=\"[\\\\s|\\\\(]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")[,|\\\\s]+(\"+ce+\")\\\\s*\\\\)?\";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp(\"rgb\"+je),rgba:new RegExp(\"rgba\"+lt),hsl:new RegExp(\"hsl\"+je),hsla:new RegExp(\"hsla\"+lt),hsv:new RegExp(\"hsv\"+je),hsva:new RegExp(\"hsva\"+lt),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 Ae(me){return!!Ee.CSS_UNIT.exec(me)}function Be(me){me=me.replace(t,\"\").replace(r,\"\").toLowerCase();var De=!1;if(G[me])me=G[me],De=!0;else if(me==\"transparent\")return{r:0,g:0,b:0,a:0,format:\"name\"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:De?\"name\":\"hex8\"}:(ce=Ee.hex6.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:De?\"name\":\"hex\"}:(ce=Ee.hex4.exec(me))?{r:oe(ce[1]+\"\"+ce[1]),g:oe(ce[2]+\"\"+ce[2]),b:oe(ce[3]+\"\"+ce[3]),a:Se(ce[4]+\"\"+ce[4]),format:De?\"name\":\"hex8\"}:(ce=Ee.hex3.exec(me))?{r:oe(ce[1]+\"\"+ce[1]),g:oe(ce[2]+\"\"+ce[2]),b:oe(ce[3]+\"\"+ce[3]),format:De?\"name\":\"hex\"}:!1}function Pe(me){var De,ce;return me=me||{level:\"AA\",size:\"small\"},De=(me.level||\"AA\").toUpperCase(),ce=(me.size||\"small\").toLowerCase(),De!==\"AA\"&&De!==\"AAA\"&&(De=\"AA\"),ce!==\"small\"&&ce!==\"large\"&&(ce=\"small\"),{level:De,size:ce}}typeof M6!=\"undefined\"&&M6.exports?M6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(BS=>{\"use strict\";var Yee=Ty(),OS=Array.isArray;function Gtt(e,t){var r,n;for(r=0;r<e.length;r++){if(n=e[r],n!==null&&typeof n==\"object\")return!1;n!==void 0&&(t[r]=n)}return!0}BS.extendFlat=function(){return qS(arguments,!1,!1,!1)};BS.extendDeep=function(){return qS(arguments,!0,!1,!1)};BS.extendDeepAll=function(){return qS(arguments,!0,!0,!1)};BS.extendDeepNoArrays=function(){return qS(arguments,!0,!1,!0)};function qS(e,t,r,n){var i=e[0],a=e.length,o,s,l,u,c,f,h;if(a===2&&OS(i)&&OS(e[1])&&i.length===0){if(h=Gtt(e[1],i),h)return i;i.splice(0,i.length)}for(var d=1;d<a;d++){o=e[d];for(s in o)l=i[s],u=o[s],n&&OS(u)?i[s]=u:t&&u&&(Yee(u)||(c=OS(u)))?(c?(c=!1,f=l&&OS(l)?l:[]):f=l&&Yee(l)?l:{},i[s]=qS([f,u],t,r,n)):(typeof u!=\"undefined\"||r)&&(i[s]=u)}return i}});var ec=ye((Crr,Kee)=>{\"use strict\";Kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:\"integer\",min:1,max:1e3,extras:[\"normal\",\"bold\"],dflt:\"normal\"};e.noNumericWeightValues&&(i.valType=\"enumerated\",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:\"string\",noBlank:!0,strict:!0,editType:r},size:{valType:\"number\",min:1,editType:r},color:{valType:\"color\",editType:n},weight:i,style:{editType:r,valType:\"enumerated\",values:[\"normal\",\"italic\"],dflt:\"normal\"},variant:e.noFontVariant?void 0:{editType:r,valType:\"enumerated\",values:t||[\"normal\",\"small-caps\",\"all-small-caps\",\"all-petite-caps\",\"petite-caps\",\"unicase\"],dflt:\"normal\"},textcase:e.noFontTextcase?void 0:{editType:r,valType:\"enumerated\",values:[\"normal\",\"word caps\",\"upper\",\"lower\"],dflt:\"normal\"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:\"flaglist\",flags:[\"under\",\"over\",\"through\"],extras:[\"none\"],dflt:\"none\"},shadow:e.noFontShadow?void 0:{editType:r,valType:\"string\",dflt:e.autoShadowDflt?\"auto\":\"none\"},editType:r};return e.autoSize&&(a.size.dflt=\"auto\"),e.autoColor&&(a.color.dflt=\"auto\"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var NS=ye((Lrr,Jee)=>{\"use strict\";Jee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\"Arial, sans-serif\",HOVERMINTIME:50,HOVERID:\"-hover\"}});var W1=ye((Prr,ete)=>{\"use strict\";var $ee=NS(),Qee=ec(),IO=Qee({editType:\"none\"});IO.family.dflt=$ee.HOVERFONT;IO.size.dflt=$ee.HOVERFONTSIZE;ete.exports={clickmode:{valType:\"flaglist\",flags:[\"event\",\"select\"],dflt:\"event\",editType:\"plot\",extras:[\"none\"]},dragmode:{valType:\"enumerated\",values:[\"zoom\",\"pan\",\"select\",\"lasso\",\"drawclosedpath\",\"drawopenpath\",\"drawline\",\"drawrect\",\"drawcircle\",\"orbit\",\"turntable\",!1],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1,\"x unified\",\"y unified\"],dflt:\"closest\",editType:\"modebar\"},hoversubplots:{valType:\"enumerated\",values:[\"single\",\"overlaying\",\"axis\"],dflt:\"overlaying\",editType:\"none\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:-1,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:IO,grouptitlefont:Qee({editType:\"none\"}),align:{valType:\"enumerated\",values:[\"left\",\"right\",\"auto\"],dflt:\"auto\",editType:\"none\"},namelength:{valType:\"integer\",min:-1,dflt:15,editType:\"none\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"none\"},editType:\"none\"},selectdirection:{valType:\"enumerated\",values:[\"h\",\"v\",\"d\",\"any\"],dflt:\"any\",editType:\"none\"}}});var v3=ye((Irr,tte)=>{\"use strict\";var Htt=ec(),US=W1().hoverlabel,VS=Ao().extendFlat;tte.exports={hoverlabel:{bgcolor:VS({},US.bgcolor,{arrayOk:!0}),bordercolor:VS({},US.bordercolor,{arrayOk:!0}),font:Htt({arrayOk:!0,editType:\"none\"}),align:VS({},US.align,{arrayOk:!0}),namelength:VS({},US.namelength,{arrayOk:!0}),showarrow:VS({},US.showarrow),editType:\"none\"}}});var Gl=ye((Rrr,rte)=>{\"use strict\";var jtt=ec(),Wtt=v3();rte.exports={type:{valType:\"enumerated\",values:[],dflt:\"scatter\",editType:\"calc+clearAxisTypes\",_noTemplating:!0},visible:{valType:\"enumerated\",values:[!0,!1,\"legendonly\"],dflt:!0,editType:\"calc\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},legend:{valType:\"subplotid\",dflt:\"legend\",editType:\"style\"},legendgroup:{valType:\"string\",dflt:\"\",editType:\"style\"},legendgrouptitle:{text:{valType:\"string\",dflt:\"\",editType:\"style\"},font:jtt({editType:\"style\"}),editType:\"style\"},legendrank:{valType:\"number\",dflt:1e3,editType:\"style\"},legendwidth:{valType:\"number\",min:0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"style\"},name:{valType:\"string\",editType:\"style\"},uid:{valType:\"string\",editType:\"plot\",anim:!0},ids:{valType:\"data_array\",editType:\"calc\",anim:!0},customdata:{valType:\"data_array\",editType:\"calc\"},meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},selectedpoints:{valType:\"any\",editType:\"calc\"},hoverinfo:{valType:\"flaglist\",flags:[\"x\",\"y\",\"z\",\"text\",\"name\"],extras:[\"all\",\"none\",\"skip\"],arrayOk:!0,dflt:\"all\",editType:\"none\"},hoverlabel:Wtt.hoverlabel,stream:{token:{valType:\"string\",noBlank:!0,strict:!0,editType:\"calc\"},maxpoints:{valType:\"number\",min:0,max:1e4,dflt:500,editType:\"calc\"},editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"}}});var mb=ye((Drr,ate)=>{\"use strict\";var Xtt=fd(),E6={Greys:[[0,\"rgb(0,0,0)\"],[1,\"rgb(255,255,255)\"]],YlGnBu:[[0,\"rgb(8,29,88)\"],[.125,\"rgb(37,52,148)\"],[.25,\"rgb(34,94,168)\"],[.375,\"rgb(29,145,192)\"],[.5,\"rgb(65,182,196)\"],[.625,\"rgb(127,205,187)\"],[.75,\"rgb(199,233,180)\"],[.875,\"rgb(237,248,217)\"],[1,\"rgb(255,255,217)\"]],Greens:[[0,\"rgb(0,68,27)\"],[.125,\"rgb(0,109,44)\"],[.25,\"rgb(35,139,69)\"],[.375,\"rgb(65,171,93)\"],[.5,\"rgb(116,196,118)\"],[.625,\"rgb(161,217,155)\"],[.75,\"rgb(199,233,192)\"],[.875,\"rgb(229,245,224)\"],[1,\"rgb(247,252,245)\"]],YlOrRd:[[0,\"rgb(128,0,38)\"],[.125,\"rgb(189,0,38)\"],[.25,\"rgb(227,26,28)\"],[.375,\"rgb(252,78,42)\"],[.5,\"rgb(253,141,60)\"],[.625,\"rgb(254,178,76)\"],[.75,\"rgb(254,217,118)\"],[.875,\"rgb(255,237,160)\"],[1,\"rgb(255,255,204)\"]],Bluered:[[0,\"rgb(0,0,255)\"],[1,\"rgb(255,0,0)\"]],RdBu:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(106,137,247)\"],[.5,\"rgb(190,190,190)\"],[.6,\"rgb(220,170,132)\"],[.7,\"rgb(230,145,90)\"],[1,\"rgb(178,10,28)\"]],Reds:[[0,\"rgb(220,220,220)\"],[.2,\"rgb(245,195,157)\"],[.4,\"rgb(245,160,105)\"],[1,\"rgb(178,10,28)\"]],Blues:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(40,60,190)\"],[.5,\"rgb(70,100,245)\"],[.6,\"rgb(90,120,245)\"],[.7,\"rgb(106,137,247)\"],[1,\"rgb(220,220,220)\"]],Picnic:[[0,\"rgb(0,0,255)\"],[.1,\"rgb(51,153,255)\"],[.2,\"rgb(102,204,255)\"],[.3,\"rgb(153,204,255)\"],[.4,\"rgb(204,204,255)\"],[.5,\"rgb(255,255,255)\"],[.6,\"rgb(255,204,255)\"],[.7,\"rgb(255,153,255)\"],[.8,\"rgb(255,102,204)\"],[.9,\"rgb(255,102,102)\"],[1,\"rgb(255,0,0)\"]],Rainbow:[[0,\"rgb(150,0,90)\"],[.125,\"rgb(0,0,200)\"],[.25,\"rgb(0,25,255)\"],[.375,\"rgb(0,152,255)\"],[.5,\"rgb(44,255,150)\"],[.625,\"rgb(151,255,0)\"],[.75,\"rgb(255,234,0)\"],[.875,\"rgb(255,111,0)\"],[1,\"rgb(255,0,0)\"]],Portland:[[0,\"rgb(12,51,131)\"],[.25,\"rgb(10,136,186)\"],[.5,\"rgb(242,211,56)\"],[.75,\"rgb(242,143,56)\"],[1,\"rgb(217,30,30)\"]],Jet:[[0,\"rgb(0,0,131)\"],[.125,\"rgb(0,60,170)\"],[.375,\"rgb(5,255,255)\"],[.625,\"rgb(255,255,0)\"],[.875,\"rgb(250,0,0)\"],[1,\"rgb(128,0,0)\"]],Hot:[[0,\"rgb(0,0,0)\"],[.3,\"rgb(230,0,0)\"],[.6,\"rgb(255,210,0)\"],[1,\"rgb(255,255,255)\"]],Blackbody:[[0,\"rgb(0,0,0)\"],[.2,\"rgb(230,0,0)\"],[.4,\"rgb(230,210,0)\"],[.7,\"rgb(255,255,255)\"],[1,\"rgb(160,200,255)\"]],Earth:[[0,\"rgb(0,0,130)\"],[.1,\"rgb(0,180,180)\"],[.2,\"rgb(40,210,40)\"],[.4,\"rgb(230,230,50)\"],[.6,\"rgb(120,70,20)\"],[1,\"rgb(255,255,255)\"]],Electric:[[0,\"rgb(0,0,0)\"],[.15,\"rgb(30,0,100)\"],[.4,\"rgb(120,0,100)\"],[.6,\"rgb(160,90,0)\"],[.8,\"rgb(230,200,0)\"],[1,\"rgb(255,250,220)\"]],Viridis:[[0,\"#440154\"],[.06274509803921569,\"#48186a\"],[.12549019607843137,\"#472d7b\"],[.18823529411764706,\"#424086\"],[.25098039215686274,\"#3b528b\"],[.3137254901960784,\"#33638d\"],[.3764705882352941,\"#2c728e\"],[.4392156862745098,\"#26828e\"],[.5019607843137255,\"#21918c\"],[.5647058823529412,\"#1fa088\"],[.6274509803921569,\"#28ae80\"],[.6901960784313725,\"#3fbc73\"],[.7529411764705882,\"#5ec962\"],[.8156862745098039,\"#84d44b\"],[.8784313725490196,\"#addc30\"],[.9411764705882353,\"#d8e219\"],[1,\"#fde725\"]],Cividis:[[0,\"rgb(0,32,76)\"],[.058824,\"rgb(0,42,102)\"],[.117647,\"rgb(0,52,110)\"],[.176471,\"rgb(39,63,108)\"],[.235294,\"rgb(60,74,107)\"],[.294118,\"rgb(76,85,107)\"],[.352941,\"rgb(91,95,109)\"],[.411765,\"rgb(104,106,112)\"],[.470588,\"rgb(117,117,117)\"],[.529412,\"rgb(131,129,120)\"],[.588235,\"rgb(146,140,120)\"],[.647059,\"rgb(161,152,118)\"],[.705882,\"rgb(176,165,114)\"],[.764706,\"rgb(192,177,109)\"],[.823529,\"rgb(209,191,102)\"],[.882353,\"rgb(225,204,92)\"],[.941176,\"rgb(243,219,79)\"],[1,\"rgb(255,233,69)\"]]},ite=E6.RdBu;function Ztt(e,t){if(t||(t=ite),!e)return t;function r(){try{e=E6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e==\"string\"&&(r(),typeof e==\"string\"&&r()),nte(e)?e:t}function nte(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var n=e[r];if(n.length!==2||+n[0]<t||!Xtt(n[1]).isValid())return!1;t=+n[0]}return!0}function Ytt(e){return E6[e]!==void 0?!0:nte(e)}ate.exports={scales:E6,defaultScale:ite,get:Ztt,isValid:Ytt}});var Ih=ye(yb=>{\"use strict\";yb.defaults=[\"#1f77b4\",\"#ff7f0e\",\"#2ca02c\",\"#d62728\",\"#9467bd\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\",\"#17becf\"];yb.defaultLine=\"#444\";yb.lightLine=\"#eee\";yb.background=\"#fff\";yb.borderLine=\"#BEC8D9\";yb.lightFraction=100*10/11});var ka=ye((zrr,ote)=>{\"use strict\";var wp=fd(),Ktt=Eo(),Jtt=vv().isTypedArray,hd=ote.exports={},k6=Ih();hd.defaults=k6.defaults;var $tt=hd.defaultLine=k6.defaultLine;hd.lightLine=k6.lightLine;var DO=hd.background=k6.background;hd.tinyRGB=function(e){var t=e.toRgb();return\"rgb(\"+Math.round(t.r)+\", \"+Math.round(t.g)+\", \"+Math.round(t.b)+\")\"};hd.rgb=function(e){return hd.tinyRGB(wp(e))};hd.opacity=function(e){return e?wp(e).getAlpha():0};hd.addOpacity=function(e,t){var r=wp(e).toRgb();return\"rgba(\"+Math.round(r.r)+\", \"+Math.round(r.g)+\", \"+Math.round(r.b)+\", \"+t+\")\"};hd.combine=function(e,t){var r=wp(e).toRgb();if(r.a===1)return wp(e).toRgbString();var n=wp(t||DO).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return wp(a).toRgbString()};hd.interpolate=function(e,t,r){var n=wp(e).toRgb(),i=wp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return wp(a).toRgbString()};hd.contrast=function(e,t,r){var n=wp(e);n.getAlpha()!==1&&(n=wp(hd.combine(e,DO)));var i=n.isDark()?t?n.lighten(t):DO:r?n.darken(r):$tt;return i.toString()};hd.stroke=function(e,t){var r=wp(t);e.style({stroke:hd.tinyRGB(r),\"stroke-opacity\":r.getAlpha()})};hd.fill=function(e,t){var r=wp(t);e.style({fill:hd.tinyRGB(r),\"fill-opacity\":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!=\"object\")){var t=Object.keys(e),r,n,i,a;for(r=0;r<t.length;r++)if(i=t[r],a=e[i],i.slice(-5)===\"color\")if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=RO(a[n]);else e[i]=RO(a);else if(i.slice(-10)===\"colorscale\"&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=RO(a[n][1]));else if(Array.isArray(a)){var o=a[0];if(!Array.isArray(o)&&o&&typeof o==\"object\")for(n=0;n<a.length;n++)hd.clean(a[n])}else a&&typeof a==\"object\"&&!Jtt(a)&&hd.clean(a)}};function RO(e){if(Ktt(e)||typeof e!=\"string\")return e;var t=e.trim();if(t.slice(0,3)!==\"rgb\")return e;var r=t.match(/^rgba?\\s*\\(([^()]*)\\)$/);if(!r)return e;var n=r[1].trim().split(/\\s*[\\s,]\\s*/),i=t.charAt(3)===\"a\"&&n.length===4;if(!i&&n.length!==3)return e;for(var a=0;a<n.length;a++){if(!n[a].length||(n[a]=Number(n[a]),!(n[a]>=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+\", \"+Math.round(n[1]*255)+\", \"+Math.round(n[2]*255);return i?\"rgba(\"+o+\", \"+n[3]+\")\":\"rgb(\"+o+\")\"}});var X1=ye((Orr,ste)=>{\"use strict\";ste.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var p3=ye(lte=>{\"use strict\";lte.counter=function(e,t,r,n){var i=(t||\"\")+(r?\"\":\"$\"),a=n===!1?\"\":\"^\";return e===\"xy\"?new RegExp(a+\"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?\"+i):new RegExp(a+e+\"([2-9]|[1-9][0-9]+)?\"+i)}});var hte=ye(Tp=>{\"use strict\";var FO=Eo(),ute=fd(),cte=Ao().extendFlat,Qtt=Gl(),ert=mb(),trt=ka(),rrt=X1().DESELECTDIM,g3=FS(),fte=p3().counter,irt=d3().modHalf,bg=vv().isArrayOrTypedArray,Z1=vv().isTypedArraySpec,Y1=vv().decodeTypedArraySpec;Tp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(bg(e)?e:Z1(e)?Y1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var i=String(r[n]);if(i.charAt(0)===\"/\"&&i.charAt(i.length-1)===\"/\"){var a=new RegExp(i.slice(1,-1));if(a.test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r,n){let i=a=>a===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Z1(e)&&(e=Y1(e)),!FO(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Z1(e)&&(e=Y1(e)),e%1||!FO(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!=\"string\"){var i=typeof e==\"number\";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),ute(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return ute(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(ert.get(e,r))}},angle:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),e===\"auto\"?t.set(\"auto\"):FO(e)?t.set(irt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||fte(r);let a=o=>typeof o==\"string\"&&i.test(o);a(e)||n.arrayOk&&bg(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!=\"string\"?!1:!!fte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!=\"string\"){t.set(r);return}for(var i=e.split(\"+\"),a=0;a<i.length;){var o=i[a];n.flags.indexOf(o)===-1||i.indexOf(o)<a?i.splice(a,1):a++}i.length?t.set(i.join(\"+\")):t.set(r)}},any:{coerceFunction:function(e,t,r){e===void 0?t.set(r):t.set(Z1(e)?Y1(e):e)}},info_array:{coerceFunction:function(e,t,r,n){function i(k,E,T){var L,x={set:function(C){L=C}};return T===void 0&&(T=E.dflt),Tp.valObjectMeta[E.valType].coerceFunction(k,x,T,E),L}if(Z1(e)&&(e=Y1(e)),!bg(e)){t.set(r);return}var a=n.dimensions===2||n.dimensions===\"1-2\"&&Array.isArray(e)&&bg(e[0]),o=n.items,s=[],l=Array.isArray(o),u=l&&a&&bg(o[0]),c=a&&l&&!u,f=l&&!c?o.length:e.length,h,d,v,_,b,p;if(r=Array.isArray(r)?r:[],a)for(h=0;h<f;h++)for(s[h]=[],v=bg(e[h])?e[h]:[],c?b=o.length:l?b=o[h].length:b=v.length,d=0;d<b;d++)c?_=o[d]:l?_=o[h][d]:_=o,p=i(v[d],_,(r[h]||[])[d]),p!==void 0&&(s[h][d]=p);else for(h=0;h<f;h++)p=i(e[h],l?o[h]:o,r[h]),p!==void 0&&(s[h]=p);t.set(s)},validateFunction:function(e,t){if(!bg(e))return!1;var r=t.items,n=Array.isArray(r),i=t.dimensions===2;if(!t.freeLength&&e.length!==r.length)return!1;for(var a=0;a<e.length;a++)if(i){if(!bg(e[a])||!t.freeLength&&e[a].length!==r[a].length)return!1;for(var o=0;o<e[a].length;o++)if(!C6(e[a][o],n?r[a][o]:r))return!1}else if(!C6(e[a],n?r[a]:r))return!1;return!0}}};Tp.coerce=function(e,t,r,n,i){var a=g3(r,n).get(),o=g3(e,n),s=g3(t,n),l=o.get(),u=t._template;if(l===void 0&&u&&(l=g3(u,n).get(),u=0),i===void 0&&(i=a.dflt),a.arrayOk){if(bg(l))return s.set(l),l;if(Z1(l))return l=Y1(l),s.set(l),l}var c=Tp.valObjectMeta[a.valType].coerceFunction;c(l,s,i,a);var f=s.get();return u&&f===i&&!C6(l,a)&&(l=g3(u,n).get(),c(l,s,i,a),f=s.get()),f};Tp.coerce2=function(e,t,r,n,i){var a=g3(e,n),o=Tp.coerce(e,t,r,n,i),s=a.get();return s!=null?o:!1};Tp.coerceFont=function(e,t,r,n){n||(n={}),r=cte({},r),r=cte(r,n.overrideDflt||{});var i={family:e(t+\".family\",r.family),size:e(t+\".size\",r.size),color:e(t+\".color\",r.color),weight:e(t+\".weight\",r.weight),style:e(t+\".style\",r.style)};if(n.noFontVariant||(i.variant=e(t+\".variant\",r.variant)),n.noFontLineposition||(i.lineposition=e(t+\".lineposition\",r.lineposition)),n.noFontTextcase||(i.textcase=e(t+\".textcase\",r.textcase)),!n.noFontShadow){var a=r.shadow;a===\"none\"&&n.autoShadowDflt&&(a=\"auto\"),i.shadow=e(t+\".shadow\",a)}return i};Tp.coercePattern=function(e,t,r,n){var i=e(t+\".shape\"),a;if(i||(a=e(t+\".path\")),i||a){i&&e(t+\".solidity\"),e(t+\".size\");var o=e(t+\".fillmode\"),s=o===\"overlay\";if(!n){var l=e(t+\".bgcolor\",s?r:void 0);e(t+\".fgcolor\",s?trt.contrast(l):r)}e(t+\".fgopacity\",s?.5:1)}};Tp.coerceHoverinfo=function(e,t,r){var n=t._module.attributes,i=n.hoverinfo?n:Qtt,a=i.hoverinfo,o;if(r._dataLength===1){var s=a.dflt===\"all\"?a.flags.slice():a.dflt.split(\"+\");s.splice(s.indexOf(\"name\"),1),o=s.join(\"+\")}return Tp.coerce(e,t,i,\"hoverinfo\",o)};Tp.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r=e.marker.opacity;if(r!==void 0){var n,i;!bg(r)&&!e.selected&&!e.unselected&&(n=r,i=rrt*r),t(\"selected.marker.opacity\",n),t(\"unselected.marker.opacity\",i)}}};function C6(e,t){var r=Tp.valObjectMeta[t.valType];if(t.arrayOk&&bg(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var n={},i=n,a={set:function(o){i=o}};return r.coerceFunction(e,a,n,t),i!==n}Tp.validate=C6});var _b=ye((Nrr,gte)=>{\"use strict\";var dte={staticPlot:{valType:\"boolean\",dflt:!1},typesetMath:{valType:\"boolean\",dflt:!0},plotlyServerURL:{valType:\"string\",dflt:\"\"},editable:{valType:\"boolean\",dflt:!1},edits:{annotationPosition:{valType:\"boolean\",dflt:!1},annotationTail:{valType:\"boolean\",dflt:!1},annotationText:{valType:\"boolean\",dflt:!1},axisTitleText:{valType:\"boolean\",dflt:!1},colorbarPosition:{valType:\"boolean\",dflt:!1},colorbarTitleText:{valType:\"boolean\",dflt:!1},legendPosition:{valType:\"boolean\",dflt:!1},legendText:{valType:\"boolean\",dflt:!1},shapePosition:{valType:\"boolean\",dflt:!1},titleText:{valType:\"boolean\",dflt:!1}},editSelection:{valType:\"boolean\",dflt:!0},autosizable:{valType:\"boolean\",dflt:!1},responsive:{valType:\"boolean\",dflt:!1},fillFrame:{valType:\"boolean\",dflt:!1},frameMargins:{valType:\"number\",dflt:0,min:0,max:.5},scrollZoom:{valType:\"flaglist\",flags:[\"cartesian\",\"gl3d\",\"geo\",\"mapbox\",\"map\"],extras:[!0,!1],dflt:\"gl3d+geo+map\"},doubleClick:{valType:\"enumerated\",values:[!1,\"reset\",\"autosize\",\"reset+autosize\"],dflt:\"reset+autosize\"},doubleClickDelay:{valType:\"number\",dflt:300,min:0},showAxisDragHandles:{valType:\"boolean\",dflt:!0},showAxisRangeEntryBoxes:{valType:\"boolean\",dflt:!0},showTips:{valType:\"boolean\",dflt:!0},showLink:{valType:\"boolean\",dflt:!1},linkText:{valType:\"string\",dflt:\"Edit chart\",noBlank:!0},sendData:{valType:\"boolean\",dflt:!0},showSources:{valType:\"any\",dflt:!1},displayModeBar:{valType:\"enumerated\",values:[\"hover\",!0,!1],dflt:\"hover\"},showSendToCloud:{valType:\"boolean\",dflt:!1},showEditInChartStudio:{valType:\"boolean\",dflt:!1},modeBarButtonsToRemove:{valType:\"any\",dflt:[]},modeBarButtonsToAdd:{valType:\"any\",dflt:[]},modeBarButtons:{valType:\"any\",dflt:!1},toImageButtonOptions:{valType:\"any\",dflt:{}},displaylogo:{valType:\"boolean\",dflt:!0},watermark:{valType:\"boolean\",dflt:!1},plotGlPixelRatio:{valType:\"number\",dflt:2,min:1,max:4},setBackground:{valType:\"any\",dflt:\"transparent\"},topojsonURL:{valType:\"string\",noBlank:!0,dflt:\"https://cdn.plot.ly/un/\"},mapboxAccessToken:{valType:\"string\",dflt:null},logging:{valType:\"integer\",min:0,max:2,dflt:1},notifyOnLogging:{valType:\"integer\",min:0,max:2,dflt:0},queueLength:{valType:\"integer\",min:0,dflt:0},locale:{valType:\"string\",dflt:\"en-US\"},locales:{valType:\"any\",dflt:{}}},vte={};function pte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),pte(n,t[r]))}}pte(dte,vte);gte.exports={configAttributes:dte,dfltConfig:vte}});var OO=ye((Urr,mte)=>{\"use strict\";var zO=Oa(),nrt=Eo(),GS=[];mte.exports=function(e,t){if(GS.indexOf(e)!==-1)return;GS.push(e);var r=1e3;nrt(t)?r=t:t===\"long\"&&(r=3e3);var n=zO.select(\"body\").selectAll(\".plotly-notifier\").data([0]);n.enter().append(\"div\").classed(\"plotly-notifier\",!0);var i=n.selectAll(\".notifier-note\").data(GS);function a(o){o.duration(700).style(\"opacity\",0).each(\"end\",function(s){var l=GS.indexOf(s);l!==-1&&GS.splice(l,1),zO.select(this).remove()})}i.enter().append(\"div\").classed(\"notifier-note\",!0).style(\"opacity\",0).each(function(o){var s=zO.select(this);s.append(\"button\").classed(\"notifier-close\",!0).html(\"&times;\").on(\"click\",function(){s.transition().call(a)});for(var l=s.append(\"p\"),u=o.split(/<br\\s*\\/?>/g),c=0;c<u.length;c++)c&&l.append(\"br\"),l.append(\"span\").text(u[c]);t===\"stick\"?s.transition().duration(350).style(\"opacity\",1):s.transition().duration(700).style(\"opacity\",1).transition().delay(r).call(a)})}});var K1=ye((Vrr,yte)=>{\"use strict\";var m3=_b().dfltConfig,qO=OO(),BO=yte.exports={};BO.log=function(){var e;if(m3.logging>1){var t=[\"LOG:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(m3.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);qO(r.join(\"<br>\"),\"long\")}};BO.warn=function(){var e;if(m3.logging>0){var t=[\"WARN:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(m3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);qO(r.join(\"<br>\"),\"stick\")}};BO.error=function(){var e;if(m3.logging>0){var t=[\"ERROR:\"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(m3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);qO(r.join(\"<br>\"),\"stick\")}}});var L6=ye((Grr,_te)=>{\"use strict\";_te.exports=function(){}});var NO=ye((Hrr,xte)=>{\"use strict\";xte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i<t.length;i++)if(t[i]instanceof RegExp&&t[i].toString()===n)return t;t.push(r)}else(r||r===0)&&t.indexOf(r)===-1&&t.push(r);return t}});var wte=ye((jrr,bte)=>{bte.exports=art;function art(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ate=ye((Wrr,Tte)=>{Tte.exports=ort;function ort(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],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}});var Mte=ye((Xrr,Ste)=>{Ste.exports=srt;function srt(e,t){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}});var UO=ye((Zrr,Ete)=>{Ete.exports=lrt;function lrt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Cte=ye((Yrr,kte)=>{kte.exports=urt;function urt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Pte=ye((Krr,Lte)=>{Lte.exports=crt;function crt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15],k=r*s-n*o,E=r*l-i*o,T=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,M=c*_-f*v,g=c*b-h*v,P=c*p-d*v,A=f*b-h*_,z=f*p-d*_,O=h*p-d*b,U=k*O-E*z+T*A+L*P-x*g+C*M;return U?(U=1/U,e[0]=(s*O-l*z+u*A)*U,e[1]=(i*z-n*O-a*A)*U,e[2]=(_*C-b*x+p*L)*U,e[3]=(h*x-f*C-d*L)*U,e[4]=(l*P-o*O-u*g)*U,e[5]=(r*O-i*P+a*g)*U,e[6]=(b*T-v*C-p*E)*U,e[7]=(c*C-h*T+d*E)*U,e[8]=(o*z-s*P+u*M)*U,e[9]=(n*P-r*z-a*M)*U,e[10]=(v*x-_*T+p*k)*U,e[11]=(f*T-c*x-d*k)*U,e[12]=(s*g-o*A-l*M)*U,e[13]=(r*A-n*g+i*M)*U,e[14]=(_*E-v*L-b*k)*U,e[15]=(c*L-f*E+h*k)*U,e):null}});var Rte=ye((Jrr,Ite)=>{Ite.exports=frt;function frt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+_*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+_*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+_*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*_)-c*(s*p-u*_)+v*(s*d-u*f),e[9]=-(r*(f*p-d*_)-c*(n*p-a*_)+v*(n*d-a*f)),e[10]=r*(s*p-u*_)-o*(n*p-a*_)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*_)-c*(s*b-l*_)+v*(s*h-l*f)),e[13]=r*(f*b-h*_)-c*(n*b-i*_)+v*(n*h-i*f),e[14]=-(r*(s*b-l*_)-o*(n*b-i*_)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var Fte=ye(($rr,Dte)=>{Dte.exports=hrt;function hrt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],_=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,E=t*l-i*a,T=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,M=u*_-f*d,g=u*b-h*d,P=c*_-f*v,A=c*b-h*v,z=f*b-h*_;return p*z-k*A+E*P+T*g-L*M+x*C}});var Ote=ye((Qrr,zte)=>{zte.exports=drt;function drt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],_=t[12],b=t[13],p=t[14],k=t[15],E=r[0],T=r[1],L=r[2],x=r[3];return e[0]=E*n+T*s+L*f+x*_,e[1]=E*i+T*l+L*h+x*b,e[2]=E*a+T*u+L*d+x*p,e[3]=E*o+T*c+L*v+x*k,E=r[4],T=r[5],L=r[6],x=r[7],e[4]=E*n+T*s+L*f+x*_,e[5]=E*i+T*l+L*h+x*b,e[6]=E*a+T*u+L*d+x*p,e[7]=E*o+T*c+L*v+x*k,E=r[8],T=r[9],L=r[10],x=r[11],e[8]=E*n+T*s+L*f+x*_,e[9]=E*i+T*l+L*h+x*b,e[10]=E*a+T*u+L*d+x*p,e[11]=E*o+T*c+L*v+x*k,E=r[12],T=r[13],L=r[14],x=r[15],e[12]=E*n+T*s+L*f+x*_,e[13]=E*i+T*l+L*h+x*b,e[14]=E*a+T*u+L*d+x*p,e[15]=E*o+T*c+L*v+x*k,e}});var Bte=ye((eir,qte)=>{qte.exports=vrt;function vrt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,_,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],_=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=_,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+_*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Ute=ye((tir,Nte)=>{Nte.exports=prt;function prt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Gte=ye((rir,Vte)=>{Vte.exports=grt;function grt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z,O,U,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],_=t[4],b=t[5],p=t[6],k=t[7],E=t[8],T=t[9],L=t[10],x=t[11],C=i*i*c+u,M=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,A=a*a*c+u,z=o*a*c+i*l,O=i*o*c+a*l,U=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+_*M+E*g,e[1]=h*C+b*M+T*g,e[2]=d*C+p*M+L*g,e[3]=v*C+k*M+x*g,e[4]=f*P+_*A+E*z,e[5]=h*P+b*A+T*z,e[6]=d*P+p*A+L*z,e[7]=v*P+k*A+x*z,e[8]=f*O+_*U+E*G,e[9]=h*O+b*U+T*G,e[10]=d*O+p*U+L*G,e[11]=v*O+k*U+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var jte=ye((iir,Hte)=>{Hte.exports=mrt;function mrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Xte=ye((nir,Wte)=>{Wte.exports=yrt;function yrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Yte=ye((air,Zte)=>{Zte.exports=_rt;function _rt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(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[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Jte=ye((oir,Kte)=>{Kte.exports=xrt;function xrt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Qte=ye((sir,$te)=>{$te.exports=brt;function brt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,_=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+_),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+_),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var tre=ye((lir,ere)=>{ere.exports=wrt;function wrt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ire=ye((uir,rre)=>{rre.exports=Trt;function Trt(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var are=ye((cir,nre)=>{nre.exports=Art;function Art(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sre=ye((fir,ore)=>{ore.exports=Srt;function Srt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ure=ye((hir,lre)=>{lre.exports=Mrt;function Mrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fre=ye((dir,cre)=>{cre.exports=Ert;function Ert(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,_=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+_,e[7]=0,e[8]=h+b,e[9]=d-_,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var dre=ye((vir,hre)=>{hre.exports=krt;function krt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var pre=ye((pir,vre)=>{vre.exports=Crt;function Crt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var mre=ye((gir,gre)=>{gre.exports=Lrt;function Lrt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var _re=ye((mir,yre)=>{yre.exports=Prt;function Prt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var bre=ye((yir,xre)=>{var Irt=UO();xre.exports=Rrt;function Rrt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],_=t[1],b=t[2],p=n[0],k=n[1],E=n[2],T=r[0],L=r[1],x=r[2];return Math.abs(v-T)<1e-6&&Math.abs(_-L)<1e-6&&Math.abs(b-x)<1e-6?Irt(e):(c=v-T,f=_-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-E*f,a=E*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*_+o*b),e[13]=-(s*v+l*_+u*b),e[14]=-(c*v+f*_+h*b),e[15]=1,e)}});var Tre=ye((_ir,wre)=>{wre.exports=Drt;function Drt(e){return\"mat4(\"+e[0]+\", \"+e[1]+\", \"+e[2]+\", \"+e[3]+\", \"+e[4]+\", \"+e[5]+\", \"+e[6]+\", \"+e[7]+\", \"+e[8]+\", \"+e[9]+\", \"+e[10]+\", \"+e[11]+\", \"+e[12]+\", \"+e[13]+\", \"+e[14]+\", \"+e[15]+\")\"}});var VO=ye((xir,Are)=>{Are.exports={create:wte(),clone:Ate(),copy:Mte(),identity:UO(),transpose:Cte(),invert:Pte(),adjoint:Rte(),determinant:Fte(),multiply:Ote(),translate:Bte(),scale:Ute(),rotate:Gte(),rotateX:jte(),rotateY:Xte(),rotateZ:Yte(),fromRotation:Jte(),fromRotationTranslation:Qte(),fromScaling:tre(),fromTranslation:ire(),fromXRotation:are(),fromYRotation:sre(),fromZRotation:ure(),fromQuat:fre(),frustum:dre(),perspective:pre(),perspectiveFromFieldOfView:mre(),ortho:_re(),lookAt:bre(),str:Tre()}});var P6=ye(fh=>{\"use strict\";var Frt=VO();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r};fh.transposeRagged=function(e){var t=0,r=e.length,n,i;for(n=0;n<r;n++)t=Math.max(t,e[n].length);var a=new Array(t);for(n=0;n<t;n++)for(a[n]=new Array(r),i=0;i<r;i++)a[n][i]=e[i][n];return a};fh.dot=function(e,t){if(!(e.length&&t.length)||e.length!==t.length)return null;var r=e.length,n,i;if(e[0].length)for(n=new Array(r),i=0;i<r;i++)n[i]=fh.dot(e[i],t);else if(t[0].length){var a=fh.transposeRagged(t);for(n=new Array(a.length),i=0;i<a.length;i++)n[i]=fh.dot(e,a[i])}else for(n=0,i=0;i<r;i++)n+=e[i]*t[i];return n};fh.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]};fh.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]};fh.rotationXYMatrix=function(e,t,r){return fh.dot(fh.dot(fh.translationMatrix(t,r),fh.rotationMatrix(e)),fh.translationMatrix(-t,-r))};fh.apply3DTransform=function(e){return function(){var t=arguments,r=arguments.length===1?t[0]:[t[0],t[1],t[2]||0];return fh.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}};fh.apply2DTransform=function(e){return function(){var t=arguments;t.length===3&&(t=t[0]);var r=arguments.length===1?t[0]:[t[0],t[1]];return fh.dot(e,[r[0],r[1],1]).slice(0,2)}};fh.apply2DTransform2=function(e){var t=fh.apply2DTransform(e);return function(r){return t(r.slice(0,2)).concat(t(r.slice(2,4)))}};fh.convertCssMatrix=function(e){if(e){var t=e.length;if(t===16)return e;if(t===6)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};fh.inverseTransformMatrix=function(e){var t=[];return Frt.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}});var HS=ye((wir,Lre)=>{\"use strict\";var zrt=Oa(),Sre=K1(),Ort=P6(),qrt=VO();function Brt(e){var t;if(typeof e==\"string\"){if(t=document.getElementById(e),t===null)throw new Error(\"No DOM element with id '\"+e+\"' exists on the page.\");return t}else if(e==null)throw new Error(\"DOM element provided is null or undefined\");return e}function Nrt(e){var t=zrt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed(\"js-plotly-plot\")}function Mre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Urt(e,t){Ere(\"global\",e,t)}function Ere(e,t,r){var n=\"plotly.js-style-\"+e,i=document.getElementById(n);if(!(i&&i.matches(\".no-inline-styles\"))){i||(i=document.createElement(\"style\"),i.setAttribute(\"id\",n),i.appendChild(document.createTextNode(\"\")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+\"{\"+r+\"}\",0):a.addRule?a.addRule(t,r,0):Sre.warn(\"addStyleRule failed\"):Sre.warn(\"Cannot addRelatedStyleRule, probably due to strict CSP...\")}}function Vrt(e){var t=\"plotly.js-style-\"+e,r=document.getElementById(t);r&&Mre(r)}function Grt(e,t,r,n,i,a){var o=n.split(\":\"),s=i.split(\":\"),l=\"data-btn-style-event-added\";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener(\"mouseenter\",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener(\"mouseleave\",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Hrt(e){var t=Cre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=kre(n);if(i){var a=Ort.convertCssMatrix(i);r=qrt.multiply(r,r,a)}}),r}function kre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue(\"-webkit-transform\")||t.getPropertyValue(\"-moz-transform\")||t.getPropertyValue(\"-ms-transform\")||t.getPropertyValue(\"-o-transform\")||t.getPropertyValue(\"transform\");return r===\"none\"?null:r.replace(\"matrix\",\"\").replace(\"3d\",\"\").slice(1,-1).split(\",\").map(function(n){return+n})}function Cre(e){for(var t=[];jrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot==\"function\"&&e instanceof ShadowRoot&&(e=e.host);return t}function jrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Wrt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Lre.exports={getGraphDiv:Brt,isPlotDiv:Nrt,removeElement:Mre,addStyleRule:Urt,addRelatedStyleRule:Ere,deleteRelatedStyleRule:Vrt,setStyleOnHover:Grt,getFullTransformMatrix:Hrt,getElementTransformMatrix:kre,getElementAndAncestors:Cre,equalDomRects:Wrt}});var jS=ye((Tir,Pre)=>{\"use strict\";Pre.exports={mode:{valType:\"enumerated\",dflt:\"afterall\",values:[\"immediate\",\"next\",\"afterall\"]},direction:{valType:\"enumerated\",values:[\"forward\",\"reverse\"],dflt:\"forward\"},fromcurrent:{valType:\"boolean\",dflt:!1},frame:{duration:{valType:\"number\",min:0,dflt:500},redraw:{valType:\"boolean\",dflt:!0}},transition:{duration:{valType:\"number\",min:0,dflt:500,editType:\"none\"},easing:{valType:\"enumerated\",dflt:\"cubic-in-out\",values:[\"linear\",\"quad\",\"cubic\",\"sin\",\"exp\",\"circle\",\"elastic\",\"back\",\"bounce\",\"linear-in\",\"quad-in\",\"cubic-in\",\"sin-in\",\"exp-in\",\"circle-in\",\"elastic-in\",\"back-in\",\"bounce-in\",\"linear-out\",\"quad-out\",\"cubic-out\",\"sin-out\",\"exp-out\",\"circle-out\",\"elastic-out\",\"back-out\",\"bounce-out\",\"linear-in-out\",\"quad-in-out\",\"cubic-in-out\",\"sin-in-out\",\"exp-in-out\",\"circle-in-out\",\"elastic-in-out\",\"back-in-out\",\"bounce-in-out\"],editType:\"none\"},ordering:{valType:\"enumerated\",values:[\"layout first\",\"traces first\"],dflt:\"layout first\",editType:\"none\"}}}});var mc=ye((Air,qre)=>{\"use strict\";var Rre=Ao().extendFlat,Xrt=Ty(),Dre={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"clearAxisTypes\",\"plot\",\"style\",\"markerSize\",\"colorbars\"]},Fre={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"plot\",\"legend\",\"ticks\",\"axrange\",\"layoutstyle\",\"modebar\",\"camera\",\"arraydraw\",\"colorbars\"]},Zrt=Dre.flags.slice().concat([\"fullReplot\"]),Yrt=Fre.flags.slice().concat(\"layoutReplot\");qre.exports={traces:Dre,layout:Fre,traceFlags:function(){return Ire(Zrt)},layoutFlags:function(){return Ire(Yrt)},update:function(e,t){var r=t.editType;if(r&&r!==\"none\")for(var n=r.split(\"+\"),i=0;i<n.length;i++)e[n[i]]=!0},overrideAll:zre};function Ire(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function zre(e,t,r){var n=Rre({},e);for(var i in n){var a=n[i];Xrt(a)&&(n[i]=Ore(a,t,r,i))}return r===\"from-root\"&&(n.editType=t),n}function Ore(e,t,r,n){if(e.valType){var i=Rre({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var a=0;a<e.items.length;a++)i.items[a]=Ore(e.items[a],t,\"from-root\")}return i}else return zre(e,t,n.charAt(0)===\"_\"?\"nested\":\"from-root\")}});var Pd=ye(GO=>{\"use strict\";GO.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"};GO.pattern={shape:{valType:\"enumerated\",values:[\"\",\"/\",\"\\\\\",\"x\",\"-\",\"|\",\"+\",\".\"],dflt:\"\",arrayOk:!0,editType:\"style\"},path:{valType:\"string\",arrayOk:!0,editType:\"style\"},fillmode:{valType:\"enumerated\",values:[\"replace\",\"overlay\"],dflt:\"replace\",editType:\"style\"},bgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgcolor:{valType:\"color\",arrayOk:!0,editType:\"style\"},fgopacity:{valType:\"number\",editType:\"style\",min:0,max:1},size:{valType:\"number\",min:0,dflt:8,arrayOk:!0,editType:\"style\"},solidity:{valType:\"number\",min:0,max:1,dflt:.3,arrayOk:!0,editType:\"style\"},editType:\"style\"}});var HO=ye((Mir,Bre)=>{\"use strict\";Bre.exports={FORMAT_LINK:\"https://github.com/d3/d3-format/tree/v1.4.5#d3-format\",DATE_FORMAT_LINK:\"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format\"}});var Ll=ye(y3=>{\"use strict\";var{DATE_FORMAT_LINK:Krt,FORMAT_LINK:Jrt}=HO(),$rt=[\"Variables that can't be found will be replaced with the specifier.\",'For example, a template of \"data: %{x}, %{y}\" will result in a value of \"data: 1, %{y}\" if x is 1 and y is missing.',\"Variables with an undefined value will be replaced with the fallback value.\"].join(\" \");function Qrt({supportOther:e}={}){return[\"Variables are inserted using %{variable},\",'for example \"y: %{y}\"'+(e?\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.\":\".\"),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\".`,Jrt,\"for details on the formatting syntax.\",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\".`,Krt,\"for details on the date formatting syntax.\",$rt].join(\" \")}y3.templateFormatStringDescription=Qrt;y3.hovertemplateAttrs=({editType:e=\"none\",arrayOk:t}={},r={})=>_g({valType:\"string\",dflt:\"\",editType:e},t!==!1?{arrayOk:!0}:{});y3.texttemplateAttrs=({editType:e=\"calc\",arrayOk:t}={},r={})=>_g({valType:\"string\",dflt:\"\",editType:e},t!==!1?{arrayOk:!0}:{});y3.shapeTexttemplateAttrs=({editType:e=\"arraydraw\",newshape:t}={},r={})=>({valType:\"string\",dflt:\"\",editType:e});y3.templatefallbackAttrs=({editType:e=\"none\"}={})=>({valType:\"any\",dflt:\"-\",editType:e})});var D6=ye((Cir,jre)=>{\"use strict\";function J1(e,t){return t?t.d2l(e):e}function Nre(e,t){return t?t.l2d(e):e}function eit(e){return e.x0}function tit(e){return e.x1}function rit(e){return e.y0}function iit(e){return e.y1}function Ure(e){return e.x0shift||0}function Vre(e){return e.x1shift||0}function Gre(e){return e.y0shift||0}function Hre(e){return e.y1shift||0}function I6(e,t){return J1(e.x1,t)+Vre(e)-J1(e.x0,t)-Ure(e)}function R6(e,t,r){return J1(e.y1,r)+Hre(e)-J1(e.y0,r)-Gre(e)}function nit(e,t){return Math.abs(I6(e,t))}function ait(e,t,r){return Math.abs(R6(e,t,r))}function oit(e,t,r){return e.type!==\"line\"?void 0:Math.sqrt(Math.pow(I6(e,t),2)+Math.pow(R6(e,t,r),2))}function sit(e,t){return Nre((J1(e.x1,t)+Vre(e)+J1(e.x0,t)+Ure(e))/2,t)}function lit(e,t,r){return Nre((J1(e.y1,r)+Hre(e)+J1(e.y0,r)+Gre(e))/2,r)}function uit(e,t,r){return e.type!==\"line\"?void 0:R6(e,t,r)/I6(e,t)}var cit=[\"x0\",\"x1\",\"y0\",\"y1\",\"dy\",\"height\",\"ycenter\"],fit=[\"x0\",\"x1\",\"y0\",\"y1\",\"dx\",\"width\",\"xcenter\"];jre.exports={x0:eit,x1:tit,y0:rit,y1:iit,slope:uit,dx:I6,dy:R6,width:nit,height:ait,length:oit,xcenter:sit,ycenter:lit,simpleXVariables:cit,simpleYVariables:fit}});var Zre=ye((Lir,Xre)=>{\"use strict\";var hit=mc().overrideAll,xb=Gl(),Wre=ec(),dit=Pd().dash,$1=Ao().extendFlat,{shapeTexttemplateAttrs:vit,templatefallbackAttrs:pit}=Ll(),git=D6();Xre.exports=hit({newshape:{visible:$1({},xb.visible,{}),showlegend:{valType:\"boolean\",dflt:!1},legend:$1({},xb.legend,{}),legendgroup:$1({},xb.legendgroup,{}),legendgrouptitle:{text:$1({},xb.legendgrouptitle.text,{}),font:Wre({})},legendrank:$1({},xb.legendrank,{}),legendwidth:$1({},xb.legendwidth,{}),line:{color:{valType:\"color\"},width:{valType:\"number\",min:0,dflt:4},dash:$1({},dit,{dflt:\"solid\"})},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\"},opacity:{valType:\"number\",min:0,max:1,dflt:1},layer:{valType:\"enumerated\",values:[\"below\",\"above\",\"between\"],dflt:\"above\"},drawdirection:{valType:\"enumerated\",values:[\"ortho\",\"horizontal\",\"vertical\",\"diagonal\"],dflt:\"diagonal\"},name:$1({},xb.name,{}),label:{text:{valType:\"string\",dflt:\"\"},texttemplate:vit({newshape:!0},{keys:Object.keys(git)}),texttemplatefallback:pit({editType:\"arraydraw\"}),font:Wre({}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\",\"start\",\"middle\",\"end\"]},textangle:{valType:\"angle\",dflt:\"auto\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"]},padding:{valType:\"number\",dflt:3,min:0}}},activeshape:{fillcolor:{valType:\"color\",dflt:\"rgb(255,0,255)\",description:\"Sets the color filling the active shape' interior.\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5}}},\"none\",\"from-root\")});var Kre=ye((Pir,Yre)=>{\"use strict\";var mit=Pd().dash,yit=Ao().extendFlat;Yre.exports={newselection:{mode:{valType:\"enumerated\",values:[\"immediate\",\"gradual\"],dflt:\"immediate\",editType:\"none\"},line:{color:{valType:\"color\",editType:\"none\"},width:{valType:\"number\",min:1,dflt:1,editType:\"none\"},dash:yit({},mit,{dflt:\"dot\",editType:\"none\"}),editType:\"none\"},editType:\"none\"},activeselection:{fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"none\"},opacity:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"none\"},editType:\"none\"}}});var F6=ye((Iir,Jre)=>{\"use strict\";Jre.exports=function(e){var t=e.editType;return{t:{valType:\"number\",dflt:0,editType:t},r:{valType:\"number\",dflt:0,editType:t},b:{valType:\"number\",dflt:0,editType:t},l:{valType:\"number\",dflt:0,editType:t},editType:t}}});var _3=ye((Rir,tie)=>{\"use strict\";var jO=ec(),_it=jS(),z6=Ih(),$re=Zre(),Qre=Kre(),xit=F6(),eie=Ao().extendFlat,O6=jO({editType:\"calc\"});O6.family.dflt='\"Open Sans\", verdana, arial, sans-serif';O6.size.dflt=12;O6.color.dflt=z6.defaultLine;tie.exports={font:O6,title:{text:{valType:\"string\",editType:\"layoutstyle\"},font:jO({editType:\"layoutstyle\"}),subtitle:{text:{valType:\"string\",editType:\"layoutstyle\"},font:jO({editType:\"layoutstyle\"}),editType:\"layoutstyle\"},xref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yref:{valType:\"enumerated\",dflt:\"container\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},x:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"layoutstyle\"},y:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"left\",\"center\",\"right\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",dflt:\"auto\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"layoutstyle\"},pad:eie(xit({editType:\"layoutstyle\"}),{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},editType:\"layoutstyle\"},uniformtext:{mode:{valType:\"enumerated\",values:[!1,\"hide\",\"show\"],dflt:!1,editType:\"plot\"},minsize:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"},autosize:{valType:\"boolean\",dflt:!1,editType:\"none\"},width:{valType:\"number\",min:10,dflt:700,editType:\"plot\"},height:{valType:\"number\",min:10,dflt:450,editType:\"plot\"},minreducedwidth:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},minreducedheight:{valType:\"number\",min:2,dflt:64,editType:\"plot\"},margin:{l:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},r:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},t:{valType:\"number\",min:0,dflt:100,editType:\"plot\"},b:{valType:\"number\",min:0,dflt:80,editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},autoexpand:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},computed:{valType:\"any\",editType:\"none\"},paper_bgcolor:{valType:\"color\",dflt:z6.background,editType:\"plot\"},plot_bgcolor:{valType:\"color\",dflt:z6.background,editType:\"layoutstyle\"},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},separators:{valType:\"string\",editType:\"plot\"},hidesources:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:{valType:\"boolean\",editType:\"legend\"},colorway:{valType:\"colorlist\",dflt:z6.defaults,editType:\"calc\"},datarevision:{valType:\"any\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editrevision:{valType:\"any\",editType:\"none\"},selectionrevision:{valType:\"any\",editType:\"none\"},template:{valType:\"any\",editType:\"calc\"},newshape:$re.newshape,activeshape:$re.activeshape,newselection:Qre.newselection,activeselection:Qre.activeselection,meta:{valType:\"any\",arrayOk:!0,editType:\"plot\"},transition:eie({},_it.transition,{editType:\"none\"})}});var rie=ye(()=>{(function(){if(!document.getElementById(\"a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0\")){var e=document.createElement(\"style\");e.id=\"a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0\",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var qa=ye(el=>{\"use strict\";var x3=K1(),iie=L6(),nie=NO(),bit=Ty(),wit=HS().addStyleRule,aie=Ao(),Tit=Gl(),Ait=_3(),Sit=aie.extendFlat,WO=aie.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error(\"No argument passed to Plotly.register.\");for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error(\"Invalid module was attempted to be registered!\");switch(n.moduleType){case\"trace\":Mit(n);break;case\"transform\":Cit(n);break;case\"component\":kit(n);break;case\"locale\":Lit(n);break;case\"apiMethod\":var i=n.name;el.apiMethodRegistry[i]=n.fn;break;default:throw new Error(\"Invalid module was attempted to be registered!\")}}};el.getModule=function(e){var t=el.modules[uie(e)];return t?t._module:!1};el.traceIs=function(e,t){if(e=uie(e),e===\"various\")return!1;var r=el.modules[e];return r||(e&&x3.log(\"Unrecognized trace type \"+e+\".\"),r=el.modules[Tit.type.dflt]),!!r.categories[t]};el.getComponentMethod=function(e,t){var r=el.componentsRegistry[e];return r&&r[t]||iie};el.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return el.apiMethodRegistry[e].apply(null,t)};function Mit(e){var t=e.name,r=e.categories,n=e.meta;if(el.modules[t]){x3.log(\"Type \"+t+\" already registered\");return}el.subplotsRegistry[e.basePlotModule.name]||Eit(e.basePlotModule);for(var i={},a=0;a<r.length;a++)i[r[a]]=!0,el.allCategories[r[a]]=!0;el.modules[t]={_module:e,categories:i},n&&Object.keys(n).length&&(el.modules[t].meta=n),el.allTypes.push(t);for(var o in el.componentsRegistry)sie(o,t);e.layoutAttributes&&Sit(el.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,l=s.name;if(l===\"mapbox\"){var u=s.constants.styleRules;for(var c in u)wit(\".js-plotly-plot .plotly .mapboxgl-\"+c,u[c])}l===\"map\"&&rie(),(l===\"geo\"||l===\"mapbox\"||l===\"map\")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function Eit(e){var t=e.name;if(el.subplotsRegistry[t]){x3.log(\"Plot type \"+t+\" already registered.\");return}oie(e),el.subplotsRegistry[t]=e;for(var r in el.componentsRegistry)lie(r,e.name)}function kit(e){if(typeof e.name!=\"string\")throw new Error(\"Component module *name* must be a string.\");var t=e.name;el.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&nie(el.layoutArrayContainers,t),oie(e));for(var r in el.modules)sie(t,r);for(var n in el.subplotsRegistry)lie(t,n);e.schema&&e.schema.layout&&WO(Ait,e.schema.layout)}function Cit(e){if(typeof e.name!=\"string\")throw new Error(\"Transform module *name* must be a string.\");var t=\"Transform module \"+e.name,r=typeof e.transform==\"function\",n=typeof e.calcTransform==\"function\";if(!r&&!n)throw new Error(t+\" is missing a *transform* or *calcTransform* method.\");r&&n&&x3.log([t+\" has both a *transform* and *calcTransform* methods.\",\"Please note that all *transform* methods are executed\",\"before all *calcTransform* methods.\"].join(\" \")),bit(e.attributes)||x3.log(t+\" registered without an *attributes* object.\"),typeof e.supplyDefaults!=\"function\"&&x3.log(t+\" registered without a *supplyDefaults* method.\")}function Lit(e){var t=e.name,r=t.split(\"-\")[0],n=e.dictionary,i=e.format,a=n&&Object.keys(n).length,o=i&&Object.keys(i).length,s=el.localeRegistry,l=s[t];if(l||(s[t]=l={}),r!==t){var u=s[r];u||(s[r]=u={}),a&&u.dictionary===l.dictionary&&(u.dictionary=n),o&&u.format===l.format&&(u.format=i)}a&&(l.dictionary=n),o&&(l.format=i)}function oie(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)nie(el.layoutArrayRegexes,t[r])}}function sie(e,t){var r=el.componentsRegistry[e].schema;if(!(!r||!r.traces)){var n=r.traces[t];n&&WO(el.modules[t]._module.attributes,n)}}function lie(e,t){var r=el.componentsRegistry[e].schema;if(!(!r||!r.subplots)){var n=el.subplotsRegistry[t],i=n.layoutAttributes,a=n.attr===\"subplot\"?n.name:n.attr;Array.isArray(a)&&(a=a[0]);var o=r.subplots[a];i&&o&&WO(i,o)}}function uie(e){return typeof e==\"object\"&&(e=e.type),e}});var yie=ye(hh=>{\"use strict\";var Pit=f3().timeFormat,gie=Eo(),XO=K1(),e_=d3().mod,T3=fs(),_0=T3.BADNUM,Ap=T3.ONEDAY,WS=T3.ONEHOUR,Q1=T3.ONEMIN,w3=T3.ONESEC,XS=T3.EPOCHJD,Ay=qa(),cie=f3().utcFormat,Iit=/^\\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,Rit=/^\\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,fie=new Date().getFullYear()-70;function Sy(e){return e&&Ay.componentsRegistry.calendars&&typeof e==\"string\"&&e!==\"gregorian\"}hh.dateTick0=function(e,t){var r=Dit(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Ap*(t-1),hh.ms2DateTime(n,0,e)};function Dit(e,t){return Sy(e)?t?Ay.getComponentMethod(\"calendars\",\"CANONICAL_SUNDAY\")[e]:Ay.getComponentMethod(\"calendars\",\"CANONICAL_TICK\")[e]:t?\"2000-01-02\":\"2000-01-01\"}hh.dfltRange=function(e){return Sy(e)?Ay.getComponentMethod(\"calendars\",\"DFLTRANGE\")[e]:[\"2000-01-01\",\"2001-01-01\"]};hh.isJSDate=function(e){return typeof e==\"object\"&&e!==null&&typeof e.getTime==\"function\"};var B6,N6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*Q1,n=(e.getUTCMinutes()-e.getMinutes())*Q1+(e.getUTCSeconds()-e.getSeconds())*w3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*Q1;r=r-i/2+e_(n-r+i/2,i)}return e=Number(e)-r,e>=B6&&e<=N6?e:_0}if(typeof e!=\"string\"&&typeof e!=\"number\")return _0;e=String(e);var a=Sy(t),o=e.charAt(0);a&&(o===\"G\"||o===\"g\")&&(e=e.slice(1),t=\"\");var s=a&&t.slice(0,7)===\"chinese\",l=e.match(s?Rit:Iit);if(!l)return _0;var u=l[1],c=l[3]||\"1\",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var _;try{var b=Ay.getComponentMethod(\"calendars\",\"getCal\")(t);if(s){var p=c.charAt(c.length-1)===\"i\";c=parseInt(c,10),_=b.newDate(u,b.toMonthIndex(u,c,p),f)}else _=b.newDate(u,Number(c),f)}catch(E){return _0}return _?(_.toJD()-XS)*Ap+h*WS+d*Q1+v*w3:_0}u.length===2?u=(Number(u)+2e3-fie)%100+fie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?_0:k.getTime()+v*w3};B6=hh.MIN_MS=hh.dateTime2ms(\"-9999\");N6=hh.MAX_MS=hh.dateTime2ms(\"9999-12-31 23:59:59.9999\");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function b3(e,t){return String(e+Math.pow(10,t)).slice(1)}var q6=90*Ap,hie=3*WS,die=5*Q1;hh.ms2DateTime=function(e,t,r){if(typeof e!=\"number\"||!(e>=B6&&e<=N6))return _0;t||(t=0);var n=Math.floor(e_(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(Sy(r)){var f=Math.floor(i/Ap)+XS,h=Math.floor(e_(e,Ap));try{a=Ay.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(f).formatDate(\"yyyy-mm-dd\")}catch(d){a=cie(\"G%Y-%m-%d\")(new Date(i))}if(a.charAt(0)===\"-\")for(;a.length<11;)a=\"-0\"+a.slice(1);else for(;a.length<10;)a=\"0\"+a;o=t<q6?Math.floor(h/WS):0,s=t<q6?Math.floor(h%WS/Q1):0,l=t<hie?Math.floor(h%Q1/w3):0,u=t<die?h%w3*10+n:0}else c=new Date(i),a=cie(\"%Y-%m-%d\")(c),o=t<q6?c.getUTCHours():0,s=t<q6?c.getUTCMinutes():0,l=t<hie?c.getUTCSeconds():0,u=t<die?c.getUTCMilliseconds()*10+n:0;return mie(a,o,s,l,u)};hh.ms2DateTimeLocal=function(e){if(!(e>=B6+Ap&&e<=N6-Ap))return _0;var t=Math.floor(e_(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Pit(\"%Y-%m-%d\")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return mie(n,i,a,o,s)};function mie(e,t,r,n,i){if((t||r||n||i)&&(e+=\" \"+b3(t,2)+\":\"+b3(r,2),(n||i)&&(e+=\":\"+b3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+=\".\"+b3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e==\"number\"&&isFinite(e)){if(Sy(r))return XO.error(\"JS Dates and milliseconds are incompatible with world calendars\",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return XO.error(\"unrecognized date\",e),t;return e};var Fit=/%\\d?f/g,zit=/%h/g,Oit={1:\"1\",2:\"1\",3:\"2\",4:\"2\"};function vie(e,t,r,n){e=e.replace(Fit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,\"\")||\"0\";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(zit,function(){return Oit[r(\"%q\")(i)]}),Sy(n))try{e=Ay.getComponentMethod(\"calendars\",\"worldCalFmt\")(e,t,n)}catch(a){return\"Invalid\"}return r(e)(i)}var qit=[59,59.9,59.99,59.999,59.9999];function Bit(e,t){var r=e_(e+.05,Ap),n=b3(Math.floor(r/WS),2)+\":\"+b3(e_(Math.floor(r/Q1),60),2);if(t!==\"M\"){gie(t)||(t=0);var i=Math.min(e_(e/w3,60),qit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=Sy(i)&&i,!t)if(r===\"y\")t=a.year;else if(r===\"m\")t=a.month;else if(r===\"d\")t=a.dayMonth+`\n",
       "`+a.year;else return Bit(e,r)+`\n",
       "`+vie(a.dayMonthYear,e,n,i);return vie(t,e,n,i)};var pie=3*Ap;hh.incrementMonth=function(e,t,r){r=Sy(r)&&r;var n=e_(e,Ap);if(e=Math.round(e-n),r)try{var i=Math.round(e/Ap)+XS,a=Ay.getComponentMethod(\"calendars\",\"getCal\")(r),o=a.fromJD(i);return t%12?a.add(o,t,\"m\"):a.add(o,t/12,\"y\"),(o.toJD()-XS)*Ap+n}catch(l){XO.error(\"invalid ms \"+e+\" in calendar \"+r)}var s=new Date(e+pie);return s.setUTCMonth(s.getUTCMonth()+t)+n-pie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=Sy(t)&&Ay.getComponentMethod(\"calendars\",\"getCal\")(t),u=0;u<e.length;u++){if(s=e[u],!gie(s)){a++;continue}if(!(s%Ap))if(l)try{o=l.fromJD(s/Ap+XS),o.day()===1?o.month()===1?r++:n++:i++}catch(f){}else o=new Date(s),o.getUTCDate()===1?o.getUTCMonth()===0?r++:n++:i++}n+=r,i+=n;var c=e.length-a;return{exactYears:r/c,exactMonths:n/c,exactDays:i/c}}});var ZS=ye((qir,_ie)=>{\"use strict\";_ie.exports=function(t){return t}});var U6=ye(My=>{\"use strict\";var Nit=Eo(),Uit=K1(),Vit=ZS(),Git=fs().BADNUM,ZO=1e-9;My.findBin=function(e,t,r){if(Nit(t.start))return r?Math.ceil((e-t.start)/t.size-ZO)-1:Math.floor((e-t.start)/t.size+ZO);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Hit:jit:l=r?Xit:Wit,e+=o*ZO*(r?-1:1)*(o>=0?1:-1);n<i&&a++<100;)s=Math.floor((n+i)/2),l(t[s],e)?n=s+1:i=s;return a>90&&Uit.log(\"Long binary search...\"),n-1};function Hit(e,t){return e<t}function jit(e,t){return e<=t}function Wit(e,t){return e>t}function Xit(e,t){return e>=t}My.sorterAsc=function(e,t){return e-t};My.sorterDes=function(e,t){return t-e};My.distinctVals=function(e){var t=e.slice();t.sort(My.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Git;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};My.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n<i&&o++<100;)a=u((n+i)/2),t[a]<=e?n=a+s:i=a-l;return t[n]};My.sort=function(e,t){for(var r=0,n=0,i=1;i<e.length;i++){var a=t(e[i],e[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};My.findIndexOfMin=function(e,t){t=t||Vit;for(var r=1/0,n,i=0;i<e.length;i++){var a=t(e[i]);a<r&&(r=a,n=i)}return n}});var t_=ye((Nir,xie)=>{\"use strict\";xie.exports=function(t){return Object.keys(t).sort()}});var bie=ye(dh=>{\"use strict\";var YS=Eo(),Zit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),YS(t)||(t=!1),Zit(r[0])){for(a=new Array(n),i=0;i<n;i++)a[i]=dh.aggNums(e,t,r[i]);r=a}for(i=0;i<n;i++)YS(t)?YS(r[i])&&(t=e(+t,+r[i])):t=r[i];return t};dh.len=function(e){return dh.aggNums(function(t){return t+1},0,e)};dh.mean=function(e,t){return t||(t=dh.len(e)),dh.aggNums(function(r,n){return r+n},0,e)/t};dh.geometricMean=function(e,t){return t||(t=dh.len(e)),Math.pow(dh.aggNums(function(r,n){return r*n},1,e),1/t)};dh.midRange=function(e){if(!(e===void 0||e.length===0))return(dh.aggNums(Math.max,null,e)+dh.aggNums(Math.min,null,e))/2};dh.variance=function(e,t,r){return t||(t=dh.len(e)),YS(r)||(r=dh.mean(e,t)),dh.aggNums(function(n,i){return n+Math.pow(i-r,2)},0,e)/t};dh.stdev=function(e,t,r){return Math.sqrt(dh.variance(e,t,r))};dh.median=function(e){var t=e.slice().sort();return dh.interp(t,.5)};dh.interp=function(e,t){if(!YS(t))throw\"n should be a finite number\";if(t=t*e.length-.5,t<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Mie=ye((Vir,Sie)=>{\"use strict\";var wie=d3(),YO=wie.mod,Yit=wie.modHalf,KS=Math.PI,r_=2*KS;function Kit(e){return e/180*KS}function Jit(e){return e/KS*180}function KO(e){return Math.abs(e[1]-e[0])>r_-1e-14}function Tie(e,t){return Yit(t-e,r_)}function $it(e,t){return Math.abs(Tie(e,t))}function Aie(e,t){if(KO(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),r=YO(r,r_),n=YO(n,r_),r>n&&(n+=r_);var i=YO(e,r_),a=i+r_;return i>=r&&i<=n||a>=r&&a<=n}function Qit(e,t,r,n){if(!Aie(t,n))return!1;var i,a;return r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),e>=i&&e<=a}function JO(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=KO([r,n]),l,u,c,f,h;s?(l=0,u=KS,c=r_):r<n?(l=r,c=n):(l=n,c=r),e<t?(f=e,h=t):(f=t,h=e);function d(p,k){return[p*Math.cos(k)+i,a-p*Math.sin(k)]}var v=Math.abs(c-l)<=KS?0:1;function _(p,k,E){return\"A\"+[p,p]+\" \"+[0,v,E]+\" \"+d(p,k)}var b;return s?f===null?b=\"M\"+d(h,l)+_(h,u,0)+_(h,c,0)+\"Z\":b=\"M\"+d(f,l)+_(f,u,0)+_(f,c,0)+\"ZM\"+d(h,l)+_(h,u,1)+_(h,c,1)+\"Z\":f===null?(b=\"M\"+d(h,l)+_(h,c,0),o&&(b+=\"L0,0Z\")):b=\"M\"+d(f,l)+\"L\"+d(h,l)+_(h,c,0)+\"L\"+d(f,c)+_(f,l,1)+\"Z\",b}function ent(e,t,r,n,i){return JO(null,e,t,r,n,i,0)}function tnt(e,t,r,n,i){return JO(null,e,t,r,n,i,1)}function rnt(e,t,r,n,i,a){return JO(e,t,r,n,i,a,1)}Sie.exports={deg2rad:Kit,rad2deg:Jit,angleDelta:Tie,angleDist:$it,isFullCircle:KO,isAngleInsideSector:Aie,isPtInsideSector:Qit,pathArc:ent,pathSector:tnt,pathAnnulus:rnt}});var Eie=ye(bb=>{\"use strict\";bb.isLeftAnchor=function(t){return t.xanchor===\"left\"||t.xanchor===\"auto\"&&t.x<=1/3};bb.isCenterAnchor=function(t){return t.xanchor===\"center\"||t.xanchor===\"auto\"&&t.x>1/3&&t.x<2/3};bb.isRightAnchor=function(t){return t.xanchor===\"right\"||t.xanchor===\"auto\"&&t.x>=2/3};bb.isTopAnchor=function(t){return t.yanchor===\"top\"||t.yanchor===\"auto\"&&t.y>=2/3};bb.isMiddleAnchor=function(t){return t.yanchor===\"middle\"||t.yanchor===\"auto\"&&t.y>1/3&&t.y<2/3};bb.isBottomAnchor=function(t){return t.yanchor===\"bottom\"||t.yanchor===\"auto\"&&t.y<=1/3}});var Lie=ye(wb=>{\"use strict\";var $O=d3().mod;wb.segmentsIntersect=Cie;function Cie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var _=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||_<0||_>1?null:{x:e+l*_,y:t+f*_}}wb.segmentDistance=function(t,r,n,i,a,o,s,l){if(Cie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,_=Math.min(V6(u,c,d,a-t,o-r),V6(u,c,d,s-t,l-r),V6(f,h,v,t-a,r-o),V6(f,h,v,n-a,i-o));return Math.sqrt(_)};function V6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var G6,QO,kie;wb.getTextLocation=function(t,r,n,i){if((t!==QO||i!==kie)&&(G6={},QO=t,kie=i),G6[n])return G6[n];var a=t.getPointAtLength($O(n-i/2,r)),o=t.getPointAtLength($O(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength($O(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return G6[n]=f,f};wb.clearLocationCache=function(){QO=null};wb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(_){var b=t.getPointAtLength(_);_===0?f=b:_===u&&(h=b);var p=b.x<i?i-b.x:b.x>a?b.x-a:0,k=b.y<o?o-b.y:b.y>s?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};wb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u<s;){if(h=(c+f)/2,d=t.getPointAtLength(h),v=d[n]-r,Math.abs(v)<o)return d;l*v>0?f=h:c=h,u++}return d}});var H6=ye(JS=>{\"use strict\";var Ey={};JS.throttle=function(t,r,n){var i=Ey[t],a=Date.now();if(!i){for(var o in Ey)Ey[o].ts<a-6e4&&delete Ey[o];i=Ey[t]={ts:0,timer:null}}Pie(i);function s(){n(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}if(a>i.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};JS.done=function(e){var t=Ey[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};JS.clear=function(e){if(e)Pie(Ey[e]),delete Ey[e];else for(var t in Ey)JS.clear(t)};function Pie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Rie=ye((Wir,Iie)=>{\"use strict\";Iie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener(\"resize\",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Die=ye((Xir,j6)=>{\"use strict\";j6.exports=eq;j6.exports.isMobile=eq;j6.exports.default=eq;var int=/(android|bb\\d+|meego).+mobile|armv7l|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[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,nnt=/CrOS/,ant=/android|ipad|playbook|silk/i;function eq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!=\"undefined\"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers[\"user-agent\"]==\"string\"&&(t=t.headers[\"user-agent\"]),typeof t!=\"string\")return!1;let r=int.test(t)&&!nnt.test(t)||!!e.tablet&&ant.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf(\"Macintosh\")!==-1&&t.indexOf(\"Safari\")!==-1&&(r=!0),r}});var zie=ye((Zir,Fie)=>{\"use strict\";var ont=Eo(),snt=Die();Fie.exports=function(t){var r;if(t&&t.hasOwnProperty(\"userAgent\")?r=t.userAgent:r=lnt(),typeof r!=\"string\")return!0;var n=snt({ua:{headers:{\"user-agent\":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(\" \"),a=1;a<i.length;a++){var o=i[a];if(o.indexOf(\"Safari\")!==-1)for(var s=a-1;s>-1;s--){var l=i[s];if(l.slice(0,8)===\"Version/\"){var u=l.slice(8).split(\".\")[0];if(ont(u)&&(u=+u),u>=13)return!0}}}return n};function lnt(){var e;return typeof navigator!=\"undefined\"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers[\"user-agent\"]==\"string\"&&(e=e.headers[\"user-agent\"]),e}});var qie=ye((Yir,Oie)=>{\"use strict\";var unt=Oa();Oie.exports=function(t,r,n){var i=t.selectAll(\"g.\"+n.replace(/\\s/g,\".\")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append(\"g\").attr(\"class\",n),i.order();var a=t.classed(\"rangeplot\")?\"nodeRangePlot3\":\"node3\";return i.each(function(o){o[0][a]=unt.select(this)}),i}});var Nie=ye((Kir,Bie)=>{\"use strict\";var cnt=qa();Bie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=cnt.localeRegistry}var u=n.split(\"-\")[0];if(u===n)break;n=u}return r}});var tq=ye((Jir,Uie)=>{\"use strict\";Uie.exports=function(t){for(var r={},n=[],i=0,a=0;a<t.length;a++){var o=t[a];r[o]!==1&&(r[o]=1,n[i++]=o)}return n}});var Gie=ye(($ir,Vie)=>{\"use strict\";Vie.exports=function(t){for(var r=dnt(t)?hnt:fnt,n=[],i=0;i<t.length;i++){var a=t[i];r(a)&&n.push(a)}return n};function fnt(e){return e.visible===!0}function hnt(e){var t=e[0].trace;return t.visible===!0&&t._length!==0}function dnt(e){return Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace}});var jie=ye((Qir,Hie)=>{\"use strict\";Hie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf(\"e+\")===-1&&(i=+l)}}return i}});var Xie=ye((enr,Wie)=>{\"use strict\";var vnt=Eo(),pnt=fs().BADNUM,gnt=/^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;Wie.exports=function(t){return typeof t==\"string\"&&(t=t.replace(gnt,\"\")),vnt(t)?Number(t):pnt}});var Dr=ye((tnr,one)=>{\"use strict\";var $S=Oa(),mnt=f3().utcFormat,ynt=MO().format,Qie=Eo(),ene=fs(),tne=ene.FP_SAFE,_nt=-tne,Zie=ene.BADNUM,Mi=one.exports={};Mi.adjustFormat=function(t){return!t||/^\\d[.]\\df/.test(t)||/[.]\\d%/.test(t)?t:t===\"0.f\"?\"~f\":/^\\d%/.test(t)?\"~%\":/^\\ds/.test(t)?\"~s\":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?\"~\"+t:t};var Yie={};Mi.warnBadFormat=function(e){var t=String(e);Yie[t]||(Yie[t]=1,Mi.warn('encountered bad format: \"'+t+'\"'))};Mi.noFormat=function(e){return String(e)};Mi.numberFormat=function(e){var t;try{t=ynt(Mi.adjustFormat(e))}catch(r){return Mi.warnBadFormat(e),Mi.noFormat}return t};Mi.nestedProperty=FS();Mi.keyedContainer=Uee();Mi.relativeAttr=Gee();Mi.isPlainObject=Ty();Mi.toLogRange=S6();Mi.relinkPrivateKeys=Xee();var i_=vv();Mi.isArrayBuffer=i_.isArrayBuffer;Mi.isTypedArray=i_.isTypedArray;Mi.isArrayOrTypedArray=i_.isArrayOrTypedArray;Mi.isArray1D=i_.isArray1D;Mi.ensureArray=i_.ensureArray;Mi.concat=i_.concat;Mi.maxRowLength=i_.maxRowLength;Mi.minRowLength=i_.minRowLength;var rne=d3();Mi.mod=rne.mod;Mi.modHalf=rne.modHalf;var n_=hte();Mi.valObjectMeta=n_.valObjectMeta;Mi.coerce=n_.coerce;Mi.coerce2=n_.coerce2;Mi.coerceFont=n_.coerceFont;Mi.coercePattern=n_.coercePattern;Mi.coerceHoverinfo=n_.coerceHoverinfo;Mi.coerceSelectionMarkerOpacity=n_.coerceSelectionMarkerOpacity;Mi.validate=n_.validate;var jp=yie();Mi.dateTime2ms=jp.dateTime2ms;Mi.isDateTime=jp.isDateTime;Mi.ms2DateTime=jp.ms2DateTime;Mi.ms2DateTimeLocal=jp.ms2DateTimeLocal;Mi.cleanDate=jp.cleanDate;Mi.isJSDate=jp.isJSDate;Mi.formatDate=jp.formatDate;Mi.incrementMonth=jp.incrementMonth;Mi.dateTick0=jp.dateTick0;Mi.dfltRange=jp.dfltRange;Mi.findExactDates=jp.findExactDates;Mi.MIN_MS=jp.MIN_MS;Mi.MAX_MS=jp.MAX_MS;var Tb=U6();Mi.findBin=Tb.findBin;Mi.sorterAsc=Tb.sorterAsc;Mi.sorterDes=Tb.sorterDes;Mi.distinctVals=Tb.distinctVals;Mi.roundUp=Tb.roundUp;Mi.sort=Tb.sort;Mi.findIndexOfMin=Tb.findIndexOfMin;Mi.sortObjectKeys=t_();var ky=bie();Mi.aggNums=ky.aggNums;Mi.len=ky.len;Mi.mean=ky.mean;Mi.geometricMean=ky.geometricMean;Mi.median=ky.median;Mi.midRange=ky.midRange;Mi.variance=ky.variance;Mi.stdev=ky.stdev;Mi.interp=ky.interp;var wg=P6();Mi.init2dArray=wg.init2dArray;Mi.transposeRagged=wg.transposeRagged;Mi.dot=wg.dot;Mi.translationMatrix=wg.translationMatrix;Mi.rotationMatrix=wg.rotationMatrix;Mi.rotationXYMatrix=wg.rotationXYMatrix;Mi.apply3DTransform=wg.apply3DTransform;Mi.apply2DTransform=wg.apply2DTransform;Mi.apply2DTransform2=wg.apply2DTransform2;Mi.convertCssMatrix=wg.convertCssMatrix;Mi.inverseTransformMatrix=wg.inverseTransformMatrix;var gm=Mie();Mi.deg2rad=gm.deg2rad;Mi.rad2deg=gm.rad2deg;Mi.angleDelta=gm.angleDelta;Mi.angleDist=gm.angleDist;Mi.isFullCircle=gm.isFullCircle;Mi.isAngleInsideSector=gm.isAngleInsideSector;Mi.isPtInsideSector=gm.isPtInsideSector;Mi.pathArc=gm.pathArc;Mi.pathSector=gm.pathSector;Mi.pathAnnulus=gm.pathAnnulus;var S3=Eie();Mi.isLeftAnchor=S3.isLeftAnchor;Mi.isCenterAnchor=S3.isCenterAnchor;Mi.isRightAnchor=S3.isRightAnchor;Mi.isTopAnchor=S3.isTopAnchor;Mi.isMiddleAnchor=S3.isMiddleAnchor;Mi.isBottomAnchor=S3.isBottomAnchor;var M3=Lie();Mi.segmentsIntersect=M3.segmentsIntersect;Mi.segmentDistance=M3.segmentDistance;Mi.getTextLocation=M3.getTextLocation;Mi.clearLocationCache=M3.clearLocationCache;Mi.getVisibleSegment=M3.getVisibleSegment;Mi.findPointOnPath=M3.findPointOnPath;var Z6=Ao();Mi.extendFlat=Z6.extendFlat;Mi.extendDeep=Z6.extendDeep;Mi.extendDeepAll=Z6.extendDeepAll;Mi.extendDeepNoArrays=Z6.extendDeepNoArrays;var rq=K1();Mi.log=rq.log;Mi.warn=rq.warn;Mi.error=rq.error;var xnt=p3();Mi.counterRegex=xnt.counter;var iq=H6();Mi.throttle=iq.throttle;Mi.throttleDone=iq.done;Mi.clearThrottle=iq.clear;var Tg=HS();Mi.getGraphDiv=Tg.getGraphDiv;Mi.isPlotDiv=Tg.isPlotDiv;Mi.removeElement=Tg.removeElement;Mi.addStyleRule=Tg.addStyleRule;Mi.addRelatedStyleRule=Tg.addRelatedStyleRule;Mi.deleteRelatedStyleRule=Tg.deleteRelatedStyleRule;Mi.setStyleOnHover=Tg.setStyleOnHover;Mi.getFullTransformMatrix=Tg.getFullTransformMatrix;Mi.getElementTransformMatrix=Tg.getElementTransformMatrix;Mi.getElementAndAncestors=Tg.getElementAndAncestors;Mi.equalDomRects=Tg.equalDomRects;Mi.clearResponsive=Rie();Mi.preserveDrawingBuffer=zie();Mi.makeTraceGroups=qie();Mi._=Nie();Mi.notifier=OO();Mi.filterUnique=tq();Mi.filterVisible=Gie();Mi.pushUnique=NO();Mi.increment=jie();Mi.cleanNumber=Xie();Mi.ensureNumber=function(t){return Qie(t)?(t=Number(t),t>tne||t<_nt?Zie:t):Zie};Mi.isIndex=function(e,t){return t!==void 0&&e>=t?!1:Qie(e)&&e>=0&&e%1===0};Mi.noop=L6();Mi.identity=ZS();Mi.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r};Mi.swapAttrs=function(e,t,r,n){r||(r=\"x\"),n||(n=\"y\");for(var i=0;i<t.length;i++){var a=t[i],o=Mi.nestedProperty(e,a.replace(\"?\",r)),s=Mi.nestedProperty(e,a.replace(\"?\",n)),l=o.get();o.set(s.get()),s.set(l)}};Mi.raiseToTop=function(t){t.parentNode.appendChild(t)};Mi.cancelTransition=function(e){return e.transition().duration(0)};Mi.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Mi.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Mi.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s<a;s++)o[s]=t(e[s],r,n,i);return o};Mi.randstr=function e(t,r,n,i){if(n||(n=16),r===void 0&&(r=24),r<=0)return\"0\";var a=Math.log(Math.pow(2,r))/Math.log(n),o=\"\",s,l,u;for(s=2;a===1/0;s*=2)a=Math.log(Math.pow(2,r/s))/Math.log(n)*s;var c=a-Math.floor(a);for(s=0;s<Math.floor(a);s++)u=Math.floor(Math.random()*n).toString(n),o=u+o;c&&(l=Math.pow(n,c),u=Math.floor(Math.random()*l).toString(n),o=u+o);var f=parseInt(o,n);return t&&t[o]||f!==1/0&&f>=Math.pow(2,r)?i>10?(Mi.warn(\"randstr failed uniqueness\"),o):e(t,r,n,(i||0)+1):o};Mi.OptionControl=function(e,t){e||(e={}),t||(t=\"opt\");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r[\"_\"+t]=e,r};Mi.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s<i;s++)a[s]=(1-Math.cos(Math.PI*(s+1)/t))/(2*t);for(s=0;s<r;s++){for(c=0,l=0;l<i;l++)u=s+l+1-t,u<-r?u-=n*Math.round(u/n):u>=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Mi.syncOrAsync=function(e,t,r){var n,i;function a(){return Mi.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Mi.stripTrailingSlash=function(e){return e.slice(-1)===\"/\"?e.slice(0,-1):e};Mi.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a<r.length;a++)o=e[r[a]],o!=null?n=!0:i=!1;if(n&&!i)for(a=0;a<r.length;a++)e[r[a]]=t[r[a]]}};Mi.mergeArray=function(e,t,r,n){var i=typeof n==\"function\";if(Mi.isArrayOrTypedArray(e))for(var a=Math.min(e.length,t.length),o=0;o<a;o++){var s=e[o];t[o][r]=i?n(s):s}};Mi.mergeArrayCastPositive=function(e,t,r){return Mi.mergeArray(e,t,r,function(n){var i=+n;return isFinite(i)&&i>0?i:0})};Mi.fillArray=function(e,t,r,n){if(n=n||Mi.identity,Mi.isArrayOrTypedArray(e))for(var i=0;i<t.length;i++)t[i][r]=n(e[i])};Mi.castOption=function(e,t,r,n){n=n||Mi.identity;var i=Mi.nestedProperty(e,r).get();return Mi.isArrayOrTypedArray(i)?Array.isArray(t)&&Mi.isArrayOrTypedArray(i[t[0]])?n(i[t[0]][t[1]]):n(i[t]):i};Mi.extractOption=function(e,t,r,n){if(r in e)return e[r];var i=Mi.nestedProperty(t,n).get();if(!Array.isArray(i))return i};function ine(e){var t={};for(var r in e)for(var n=e[r],i=0;i<n.length;i++)t[n[i]]=+r;return t}Mi.tagSelected=function(e,t,r){var n=t.selectedpoints,i=t._indexToPoints,a;i&&(a=ine(i));function o(f){return f!==void 0&&f<e.length}for(var s=0;s<n.length;s++){var l=n[s];if(Mi.isIndex(l)||Mi.isArrayOrTypedArray(l)&&Mi.isIndex(l[0])&&Mi.isIndex(l[1])){var u=a?a[l]:l,c=r?r[u]:u;o(c)&&(e[c].selected=1)}}};Mi.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=ine(r),i=[],a=0;a<t.length;a++){var o=t[a];if(Mi.isIndex(o)){var s=n[o];Mi.isIndex(s)&&i.push(s)}}return i}else return t};Mi.getTargetArray=function(e,t){var r=t.target;if(typeof r==\"string\"&&r){var n=Mi.nestedProperty(e,r).get();return Mi.isArrayOrTypedArray(n)?n:!1}else if(Mi.isArrayOrTypedArray(r))return r;return!1};function nne(e,t,r){var n={};typeof t!=\"object\"&&(t={});var i=r===\"pieLike\"?-1:3,a=Object.keys(e),o,s,l;for(o=0;o<a.length;o++)s=a[o],l=e[s],!(s.charAt(0)===\"_\"||typeof l==\"function\")&&(s===\"module\"?n[s]=l:Array.isArray(l)?s===\"colorscale\"||i===-1?n[s]=l.slice():n[s]=l.slice(0,i):Mi.isTypedArray(l)?i===-1?n[s]=l.subarray():n[s]=l.subarray(0,i):l&&typeof l==\"object\"?n[s]=nne(e[s],t[s],r):n[s]=l);for(a=Object.keys(t),o=0;o<a.length;o++)s=a[o],l=t[s],(typeof l!=\"object\"||!(s in n)||typeof n[s]!=\"object\")&&(n[s]=l);return n}Mi.minExtend=nne;Mi.titleCase=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};Mi.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])!==-1)return!0;return!1};var bnt=/Version\\/[\\d\\.]+.*Safari/;Mi.isSafari=function(){return bnt.test(window.navigator.userAgent)};var wnt=/iPad|iPhone|iPod/;Mi.isIOS=function(){return wnt.test(window.navigator.userAgent)};var Tnt=/Macintosh.+AppleWebKit.+Gecko\\)$/;Mi.isMacWKWebView=()=>Tnt.test(window.navigator.userAgent);var Ant=/Firefox\\/(\\d+)\\.\\d+/;Mi.getFirefoxVersion=function(){var e=Ant.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Mi.isD3Selection=function(e){return e instanceof $S.selection};Mi.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?\".\"+r:\"\"));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Mi.ensureSingleById=function(e,t,r,n){var i=e.select(t+\"#\"+r);if(i.size())return i;var a=e.append(t).attr(\"id\",r);return n&&a.call(n),a};Mi.objectFromPath=function(e,t){for(var r=e.split(\".\"),n,i=n={},a=0;a<r.length;a++){var o=r[a],s=null,l=r[a].match(/(.*)\\[([0-9]+)\\]/);l?(o=l[1],s=l[2],n=n[o]=[],a===r.length-1?n[s]=t:n[s]={},n=n[s]):(a===r.length-1?n[o]=t:n[o]={},n=n[o])}return i};var Snt=/^([^\\[\\.]+)\\.(.+)?/,Mnt=/^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;function W6(e){return e.slice(0,2)===\"__\"}Mi.expandObjectPaths=function(e){var t,r,n,i,a,o,s;if(typeof e==\"object\"&&!Array.isArray(e)){for(r in e)if(e.hasOwnProperty(r))if(t=r.match(Snt)){if(i=e[r],n=t[1],W6(n))continue;delete e[r],e[n]=Mi.extendDeepNoArrays(e[n]||{},Mi.objectFromPath(r,Mi.expandObjectPaths(i))[n])}else if(t=r.match(Mnt)){if(i=e[r],n=t[1],W6(n))continue;if(a=parseInt(t[2]),delete e[r],e[n]=e[n]||[],t[3]===\".\")s=t[4],o=e[n][a]=e[n][a]||{},Mi.extendDeepNoArrays(o,Mi.objectFromPath(s,Mi.expandObjectPaths(i)));else{if(W6(n))continue;e[n][a]=Mi.expandObjectPaths(i)}}else{if(W6(r))continue;e[r]=Mi.expandObjectPaths(e[r])}}return e};Mi.numSeparate=function(e,t,r){if(r||(r=!1),typeof t!=\"string\"||t.length===0)throw new Error(\"Separator string required for formatting!\");typeof e==\"number\"&&(e=String(e));var n=/(\\d+)(\\d{3})/,i=t.charAt(0),a=t.charAt(1),o=e.split(\".\"),s=o[0],l=o.length>1?i+o[1]:\"\";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,\"$1\"+a+\"$2\");return s+l};Mi.TEMPLATE_STRING_REGEX=/%{([^\\s%{}:]*)([:|\\|][^}]*)?}/g;var ane=/^\\w*$/;Mi.templateString=function(e,t){var r={};return e.replace(Mi.TEMPLATE_STRING_REGEX,function(n,i){var a;return ane.test(i)?a=t[i]:(r[i]=r[i]||Mi.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:\"\"})};var Ent={max:10,count:0,name:\"hovertemplate\"};Mi.hovertemplateString=e=>nq(j1(_g({},e),{opts:Ent}));var knt={max:10,count:0,name:\"texttemplate\"};Mi.texttemplateString=e=>nq(j1(_g({},e),{opts:knt}));var Cnt=/^(\\S+)([\\*\\/])(-?\\d+(\\.\\d+)?)$/;function Lnt(e){var t=e.match(Cnt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Pnt={max:10,count:0,name:\"texttemplate\",parseMultDiv:!0};Mi.texttemplateStringForShapes=e=>nq(j1(_g({},e),{opts:Pnt}));var Kie=/^[:|\\|]/;function nq({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Mi.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=[\"xother\",\"yother\"].includes(s),c=[\"_xother\",\"_yother\"].includes(s),f=[\"_xother_\",\"_yother_\"].includes(s),h=[\"xother_\",\"yother_\"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,_=null;if(i.parseMultDiv){var b=Lnt(s);s=b.key,v=b.op,_=b.number}let p;if(d){if(n[s]===void 0)return\"\";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if(ane.test(s)||(p=Mi.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,M=r===!1?o:r;return L<x&&Mi.warn([`Variable '${s}' in ${C} could not be found!`,\"Please verify that the template is correct.\",`Using value: '${M}'.`].join(\" \")),L===x&&Mi.warn(`Too many '${C}' warnings - additional warnings will be suppressed.`),i.count++,M}if(v===\"*\"&&(p*=_),v===\"/\"&&(p/=_),l){var k;if(l[0]===\":\"&&(k=t?t.numberFormat:Mi.numberFormat,p!==\"\"&&(p=k(l.replace(Kie,\"\"))(p))),l[0]===\"|\"){k=t?t.timeFormat:mnt;var E=Mi.dateTime2ms(p);p=Mi.formatDate(E,l.replace(Kie,\"\"),!1,k)}}else{var T=s+\"Label\";n.hasOwnProperty(T)&&(p=n[T])}return d&&(p=\"(\"+p+\")\",(c||f)&&(p=\" \"+p),(h||f)&&(p=p+\" \")),p})}var X6=48,Jie=57;Mi.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,i=0,a=0;a<r;a++){var o=e.charCodeAt(a)||0,s=t.charCodeAt(a)||0,l=o>=X6&&o<=Jie,u=s>=X6&&s<=Jie;if(l&&(n=10*n+o-X6),u&&(i=10*i+s-X6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var A3=2e9;Mi.seedPseudoRandom=function(){A3=2e9};Mi.pseudoRandom=function(){var e=A3;return A3=(69069*A3+1)%4294967296,Math.abs(A3-e)<429496729?Mi.pseudoRandom():A3/4294967296};Mi.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Mi.extractOption(e,t,\"htx\",\"hovertext\");if(Mi.isValidTextValue(i))return n(i);var a=Mi.extractOption(e,t,\"tx\",\"text\");if(Mi.isValidTextValue(a))return n(a)};Mi.isValidTextValue=function(e){return e||e===0};Mi.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+\"%\",n=0;n<t;n++)r.indexOf(\".\")!==-1&&(r=r.replace(\"0%\",\"%\"),r=r.replace(\".%\",\"%\"));return r};Mi.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||t===\"none\"};Mi.strTranslate=function(e,t){return e||t?\"translate(\"+e+\",\"+t+\")\":\"\"};Mi.strRotate=function(e){return e?\"rotate(\"+e+\")\":\"\"};Mi.strScale=function(e){return e!==1?\"scale(\"+e+\")\":\"\"};Mi.getTextTransform=function(e){var t=e.noCenter,r=e.textX,n=e.textY,i=e.targetX,a=e.targetY,o=e.anchorX||0,s=e.anchorY||0,l=e.rotate,u=e.scale;return u?u>1&&(u=1):u=0,Mi.strTranslate(i-u*(r+o),a-u*(n+s))+Mi.strScale(u)+(l?\"rotate(\"+l+(t?\"\":\" \"+r+\" \"+n)+\")\":\"\")};Mi.setTransormAndDisplay=function(e,t){e.attr(\"transform\",Mi.getTextTransform(t)),e.style(\"display\",t.scale?null:\"none\")};Mi.ensureUniformFontSize=function(e,t){var r=Mi.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Mi.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Mi.bigFont=function(e){return Math.round(1.2*e)};var $ie=Mi.getFirefoxVersion(),Int=$ie!==null&&$ie<86;Mi.getPositionFromD3Event=function(){return Int?[$S.event.layerX,$S.event.layerY]:[$S.event.offsetX,$S.event.offsetY]}});var une=ye(()=>{\"use strict\";var Rnt=Dr(),sne={\"X,X div\":'direction:ltr;font-family:\"Open Sans\",verdana,arial,sans-serif;margin:0;padding:0;border:0;',\"X input,X button\":'font-family:\"Open Sans\",verdana,arial,sans-serif;',\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg a\":\"fill:#447adb;\",\"X svg a:hover\":\"fill:#3c6dc5;\",\"X .main-svg\":\"position:absolute;top:0;left:0;pointer-events:none;\",\"X .main-svg .draglayer\":\"pointer-events:all;\",\"X .cursor-default\":\"cursor:default;\",\"X .cursor-pointer\":\"cursor:pointer;\",\"X .cursor-crosshair\":\"cursor:crosshair;\",\"X .cursor-move\":\"cursor:move;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .cursor-grab\":\"cursor:-webkit-grab;cursor:grab;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;\",\"X .ease-bg\":\"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;\",\"X .modebar--hover>:not(.watermark)\":\"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;\",\"X:hover .modebar--hover .modebar-group\":\"opacity:1;\",\"X:focus-within .modebar--hover .modebar-group\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-group a\":\"display:grid;place-content:center;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);\",\"X .modebar-btn svg\":\"position:relative;\",\"X .modebar-btn:focus-visible\":\"outline:1px solid #000;outline-offset:1px;border-radius:3px;\",\"X .modebar.vertical\":\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\",\"X .modebar.vertical svg\":\"top:-1px;\",\"X .modebar.vertical .modebar-group\":\"display:block;float:none;padding-left:0px;padding-bottom:8px;\",\"X .modebar.vertical .modebar-group .modebar-btn\":\"display:block;text-align:center;\",\"X [data-title]:before,X [data-title]:after\":\"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%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":'content:\"\";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',\"X [data-title]:after\":\"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\",\"X .vertical [data-title]:before,X .vertical [data-title]:after\":\"top:0%;right:200%;\",\"X .vertical [data-title]:before\":\"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;\",Y:'font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',\"Y p\":\"margin:0;\",\"Y .notifier-note\":\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\",\"Y .notifier-close\":\"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\",\"Y .notifier-close:hover\":\"color:#444;text-decoration:none;cursor:pointer;\"};for(aq in sne)lne=aq.replace(/^,/,\" ,\").replace(/X/g,\".js-plotly-plot .plotly\").replace(/Y/g,\".plotly-notifier\"),Rnt.addStyleRule(lne,sne[aq]);var lne,aq});var oq=ye((anr,cne)=>{cne.exports=!0});var lq=ye((onr,fne)=>{\"use strict\";var Dnt=oq(),sq;typeof window.matchMedia==\"function\"?sq=!window.matchMedia(\"(hover: none)\").matches:sq=Dnt;fne.exports=sq});var Ab=ye((snr,uq)=>{\"use strict\";var E3=typeof Reflect==\"object\"?Reflect:null,hne=E3&&typeof E3.apply==\"function\"?E3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Y6;E3&&typeof E3.ownKeys==\"function\"?Y6=E3.ownKeys:Object.getOwnPropertySymbols?Y6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Y6=function(t){return Object.getOwnPropertyNames(t)};function Fnt(e){console&&console.warn&&console.warn(e)}var vne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}uq.exports=Jc;uq.exports.once=Bnt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var dne=10;function K6(e){if(typeof e!=\"function\")throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,\"defaultMaxListeners\",{enumerable:!0,get:function(){return dne},set:function(e){if(typeof e!=\"number\"||e<0||vne(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");dne=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!=\"number\"||t<0||vne(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this};function pne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return pne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t===\"error\",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l==\"function\")hne(l,this,r);else for(var u=l.length,c=xne(l,u),n=0;n<u;++n)hne(c[n],this,r);return!0};function gne(e,t,r,n){var i,a,o;if(K6(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(\"newListener\",t,r.listener?r.listener:r),a=e._events),o=a[t]),o===void 0)o=a[t]=r,++e._eventsCount;else if(typeof o==\"function\"?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=pne(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error(\"Possible EventEmitter memory leak detected. \"+o.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");s.name=\"MaxListenersExceededWarning\",s.emitter=e,s.type=t,s.count=o.length,Fnt(s)}return e}Jc.prototype.addListener=function(t,r){return gne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return gne(this,t,r,!0)};function znt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function mne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=znt.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return K6(r),this.on(t,mne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return K6(r),this.prependListener(t,mne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(K6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit(\"removeListener\",t,n.listener||r));else if(typeof n!=\"function\"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Ont(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit(\"removeListener\",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i<a.length;++i)o=a[i],o!==\"removeListener\"&&this.removeAllListeners(o);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r==\"function\")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function yne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i==\"function\"?r?[i.listener||i]:[i]:r?qnt(i):xne(i,i.length)}Jc.prototype.listeners=function(t){return yne(this,t,!0)};Jc.prototype.rawListeners=function(t){return yne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount==\"function\"?e.listenerCount(t):_ne.call(e,t)};Jc.prototype.listenerCount=_ne;function _ne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r==\"function\")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?Y6(this._events):[]};function xne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Ont(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function qnt(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function Bnt(e,t){return new Promise(function(r,n){function i(o){e.removeListener(t,a),n(o)}function a(){typeof e.removeListener==\"function\"&&e.removeListener(\"error\",i),r([].slice.call(arguments))}bne(e,t,a,{once:!0}),t!==\"error\"&&Nnt(e,i,{once:!0})})}function Nnt(e,t,r){typeof e.on==\"function\"&&bne(e,\"error\",t,r)}function bne(e,t,r,n){if(typeof e.on==\"function\")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener==\"function\")e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)});else throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof e)}});var k3=ye((lnr,wne)=>{\"use strict\";var cq=Ab().EventEmitter,Unt={init:function(e){if(e._ev instanceof cq)return e;var t=new cq,r=new cq;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener==\"function\"&&e.addEventListener(\"wheel\",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s<a.length-1;s++)o(a[s]);return n=o(a[s]),n},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};wne.exports=Unt});var Sne=ye((unr,Ane)=>{\"use strict\";var Tne=Dr(),Vnt=_b().dfltConfig;function Gnt(e,t){for(var r=[],n,i=0;i<t.length;i++)n=t[i],n===e?r[i]=n:typeof n==\"object\"?r[i]=Array.isArray(n)?Tne.extendDeep([],n):Tne.extendDeepAll({},n):r[i]=n;return r}var Cy={};Cy.add=function(e,t,r,n,i){var a,o;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},o=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(o,e.undoQueue.queue.length-o,a),e.undoQueue.index+=1):a=e.undoQueue.queue[o-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(i)),e.undoQueue.queue.length>Vnt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Cy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Cy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Cy.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.undo.calls.length;n++)Cy.plotDo(t,r.undo.calls[n],r.undo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1}};Cy.redo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.redo.calls.length;n++)Cy.plotDo(t,r.redo.calls[n],r.redo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}};Cy.plotDo=function(e,t,r){e.autoplay=!0,r=Gnt(e,r),t.apply(null,r)};Ane.exports=Cy});var fq=ye((cnr,Mne)=>{\"use strict\";Mne.exports={_isLinkedToArray:\"frames_entry\",group:{valType:\"string\"},name:{valType:\"string\"},traces:{valType:\"any\"},baseframe:{valType:\"string\"},data:{valType:\"any\"},layout:{valType:\"any\"}}});var P3=ye(ed=>{\"use strict\";var x0=qa(),QS=Dr(),$6=Gl(),hq=_3(),Hnt=fq(),jnt=jS(),Wnt=_b().configAttributes,Ene=mc(),Ag=QS.extendDeepAll,C3=QS.isPlainObject,Xnt=QS.isArrayOrTypedArray,Q6=QS.nestedProperty,Znt=QS.valObjectMeta,dq=\"_isSubplotObj\",eL=\"_isLinkedToArray\",Ynt=\"_arrayAttrRegexps\",Cne=\"_deprecated\",vq=[dq,eL,Ynt,Cne];ed.IS_SUBPLOT_OBJ=dq;ed.IS_LINKED_TO_ARRAY=eL;ed.DEPRECATED=Cne;ed.UNDERSCORE_ATTRS=vq;ed.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Jnt(t)}),{defs:{valObjects:Znt,metaKeys:vq.concat([\"description\",\"role\",\"editType\",\"impliedEdits\"]),editType:{traces:Ene.traces,layout:Ene.layout},impliedEdits:{}},traces:e,layout:$nt(),frames:Qnt(),animation:L3(jnt),config:L3(Wnt)}};ed.crawl=function(e,t,r,n){var i=r||0;n=n||\"\",Object.keys(e).forEach(function(a){var o=e[a];if(vq.indexOf(a)===-1){var s=(n?n+\".\":\"\")+a;t(o,a,e,i,s),!ed.isValObject(o)&&C3(o)&&a!==\"impliedEdits\"&&ed.crawl(o,t,i+1,s)}})};ed.isValObject=function(e){return e&&e.valType!==void 0};ed.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType===\"data_array\"||l.arrayOk===!0)&&!(r[f-1]===\"colorbar\"&&(u===\"ticktext\"||u===\"tickvals\"));h&&s(i,0,\"\")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Xnt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d<f.length;d++)C3(f[d])&&s(f[d],u+1,h+\"[\"+d+\"].\")}else C3(f)&&s(f,u+1,h+\".\")}return i=e,a=\"\",ed.crawl($6,o),e._module&&e._module.attributes&&ed.crawl(e._module.attributes,o),t};ed.getTraceValObject=function(e,t){var r=t[0],n=1,i,a,o=e._module;if(o||(o=(x0.modules[e.type||$6.type.dflt]||{})._module),!o)return!1;if(i=o.attributes,a=i&&i[r],!a){var s=o.basePlotModule;s&&s.attributes&&(a=s.attributes[r])}return a||(a=$6[r]),Lne(a,t,n)};ed.getLayoutValObject=function(e,t){var r=Knt(e,t[0]);return Lne(r,t,1)};function Knt(e,t){var r,n,i,a,o=e._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if(i=o[r],i.attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!s&&i.layoutAttributes&&(s=i.layoutAttributes)}var l=i.baseLayoutAttrOverrides;if(l&&t in l)return l[t]}if(s)return s}var u=e._modules;if(u){for(r=0;r<u.length;r++)if(a=u[r].layoutAttributes,a&&t in a)return a[t]}for(n in x0.componentsRegistry){if(i=x0.componentsRegistry[n],i.name===\"colorscale\"&&t.indexOf(\"coloraxis\")===0)return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in hq?hq[t]:!1}function Lne(e,t,r){if(!e)return!1;if(e._isLinkedToArray){if(J6(t[r]))r++;else if(r<t.length)return!1}for(;r<t.length;r++){var n=e[t[r]];if(C3(n))e=n;else break;if(r===t.length-1)break;if(e._isLinkedToArray){if(r++,!J6(t[r]))return!1}else if(e.valType===\"info_array\"){r++;var i=t[r];if(!J6(i))return!1;var a=e.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!J6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function J6(e){return e===Math.round(e)&&e>=0}function Jnt(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=Ag({},$6),a=Ag({},t.attributes);ed.crawl(a,function(l,u,c,f,h){Q6(i,h).set(void 0),l===void 0&&Q6(a,h).set(void 0)}),Ag(n,i),x0.traceIs(e,\"noOpacity\")&&delete n.opacity,x0.traceIs(e,\"showLegend\")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,\"noHover\")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,Ag(n,a),r.attributes&&Ag(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:L3(n)};if(t.layoutAttributes){var s={};Ag(s,t.layoutAttributes),o.layoutAttributes=L3(s)}return t.animatable||ed.crawl(o,function(l){ed.isValObject(l)&&\"anim\"in l&&delete l.anim}),o}function $nt(){var e={},t,r;Ag(e,hq);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n<r.attr.length;n++)kne(e,r,r.attr[n]);else{var i=r.attr===\"subplot\"?r.name:r.attr;kne(e,r,i)}for(t in x0.componentsRegistry){r=x0.componentsRegistry[t];var a=r.schema;if(a&&(a.subplots||a.layout)){var o=a.subplots;if(o&&o.xaxis&&!o.yaxis)for(var s in o.xaxis)delete e.yaxis[s];delete e.xaxis.shift,delete e.xaxis.autoshift}else r.name===\"colorscale\"?Ag(e,r.layoutAttributes):r.layoutAttributes&&iat(e,r.layoutAttributes,r.name)}return{layoutAttributes:L3(e)}}function Qnt(){var e={frames:Ag({},Hnt)};return L3(e),e.frames}function L3(e){return eat(e),tat(e),rat(e),e}function eat(e){function t(n){return{valType:\"string\",editType:\"none\"}}function r(n,i,a){ed.isValObject(n)?(n.arrayOk===!0||n.valType===\"data_array\")&&(a[i+\"src\"]=t(i)):C3(n)&&(n.role=\"object\")}ed.crawl(e,r)}function tat(e){function t(r,n,i){if(r){var a=r[eL];a&&(delete r[eL],i[n]={items:{}},i[n].items[a]=r,i[n].role=\"object\")}}ed.crawl(e,t)}function rat(e){function t(r){for(var n in r)if(C3(r[n]))t(r[n]);else if(Array.isArray(r[n]))for(var i=0;i<r[n].length;i++)t(r[n][i]);else r[n]instanceof RegExp&&(r[n]=r[n].toString())}t(e)}function kne(e,t,r){var n=Q6(e,r),i=Ag({},t.layoutAttributes);i[dq]=!0,n.set(i)}function iat(e,t,r){var n=Q6(e,r);n.set(Ag(n.get()||{},t))}});var vl=ye(Sb=>{\"use strict\";var I3=Dr(),nat=Gl(),a_=\"templateitemname\",pq={name:{valType:\"string\",editType:\"none\"}};pq[a_]={valType:\"string\",editType:\"calc\"};Sb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pq.name,t[a_]=pq[a_],t};Sb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=I3.coerce(a,{},nat,\"type\");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};Sb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);I3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};Sb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Ine(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[a_]=u[a_];if(!Pne(f))return c._template=i,c;for(var h=0;h<a.length;h++){var d=a[h];if(d.name===f)return o[f]=1,c._template=d,c}return c[r]=u[r]||!1,c._template=!1,c}function l(){for(var u=[],c=0;c<a.length;c++){var f=a[c],h=f.name;if(Pne(h)&&!o[h]){var d={_template:f,name:h,_input:{_templateitemname:h}};d[a_]=f[a_],u.push(d),o[h]=1}}return u}return{newItem:s,defaultItems:l}};function Pne(e){return e&&typeof e==\"string\"}function Ine(e){var t=e.length-1;return e.charAt(t)!==\"s\"&&I3.warn(\"bad argument to arrayDefaultKey: \"+e),e.slice(0,-1)+\"defaults\"}Sb.arrayDefaultKey=Ine;Sb.arrayEditor=function(e,t,r){var n=(I3.nestedProperty(e,t).get()||[]).length,i=r._index,a=i>=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+\"[\"+i+\"]\",s;function l(){s={},a&&(s[o]={},s[o][a_]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?I3.nestedProperty(s[o],d).set(v):s[o+\".\"+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var _=f();for(var b in _)I3.nestedProperty(e,b).set(_[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Rh=ye((dnr,Rne)=>{\"use strict\";var eM=p3().counter;Rne.exports={idRegex:{x:eM(\"x\",\"( domain)?\"),y:eM(\"y\",\"( domain)?\")},attrRegex:eM(\"[xy]axis\"),xAxisMatch:eM(\"xaxis\"),yAxisMatch:eM(\"yaxis\"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:\"hour\",WEEKDAY_PATTERN:\"day of week\",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\"imagelayer\",\"heatmaplayer\",\"contourcarpetlayer\",\"contourlayer\",\"funnellayer\",\"waterfalllayer\",\"barlayer\",\"carpetlayer\",\"violinlayer\",\"boxlayer\",\"ohlclayer\",\"scattercarpetlayer\",\"scatterlayer\"],clipOnAxisFalseQuery:[\".scatterlayer\",\".barlayer\",\".funnellayer\",\".waterfalllayer\"],layerValue2layerClass:{\"above traces\":\"above\",\"below traces\":\"below\"},zindexSeparator:\"z\"}});var hf=ye(Sp=>{\"use strict\";var aat=qa(),gq=Rh();Sp.id2name=function(t){if(!(typeof t!=\"string\"||!t.match(gq.AX_ID_PATTERN))){var r=t.split(\" \")[0].slice(1);return r===\"1\"&&(r=\"\"),t.charAt(0)+\"axis\"+r}};Sp.name2id=function(t){if(t.match(gq.AX_NAME_PATTERN)){var r=t.slice(5);return r===\"1\"&&(r=\"\"),t.charAt(0)+r}};Sp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!=\"string\"||!t.match(gq.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(\" \")[0].slice(1).replace(/^0+/,\"\");return a===\"1\"&&(a=\"\"),t.charAt(0)+a+(i&&n?\" domain\":\"\")}};Sp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Sp.listIds(e,t),a=new Array(i.length),o;for(o=0;o<i.length;o++){var s=i[o];a[o]=n[s.charAt(0)+\"axis\"+s.slice(1)]}if(!r){var l=n._subplots.gl3d||[];for(o=0;o<l.length;o++){var u=n[l[o]];t?a.push(u[t+\"axis\"]):a.push(u.xaxis,u.yaxis,u.zaxis)}}return a};Sp.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+\"axis\"]:n.xaxis.concat(n.yaxis)};Sp.getFromId=function(e,t,r){var n=e._fullLayout;return t=t===void 0||typeof t!=\"string\"?t:t.replace(\" domain\",\"\"),r===\"x\"?t=t.replace(/y[0-9]*/,\"\"):r===\"y\"&&(t=t.replace(/x[0-9]*/,\"\")),n[Sp.id2name(t)]};Sp.getFromTrace=function(e,t,r){var n=e._fullLayout,i=null;if(aat.traceIs(t,\"gl3d\")){var a=t.scene;a.slice(0,5)===\"scene\"&&(i=n[a][r+\"axis\"])}else i=Sp.getFromId(e,t[r+\"axis\"]||r);return i};Sp.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Sp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(\" \")[0]:!1};function Dne(e,t){if(t&&t.length){for(var r=0;r<t.length;r++)if(t[r][e])return!0}return!1}Sp.isLinked=function(e,t){return Dne(t,e._axisMatchGroups)||Dne(t,e._axisConstraintGroups)}});var o_=ye((pnr,Fne)=>{\"use strict\";function oat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(\".outline-controllers\").remove()}function sat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(\".select-outline\").remove(),e._fullLayout._outlining=!1}Fne.exports={clearOutlineControllers:oat,clearOutline:sat}});var tL=ye((gnr,zne)=>{\"use strict\";zne.exports={scattermode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},scattergap:{valType:\"number\",min:0,max:1,editType:\"calc\"}}});var Id=ye(iL=>{\"use strict\";var rL=qa(),mnr=Rh().SUBPLOT_PATTERN;iL.getSubplotCalcData=function(e,t,r){var n=rL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o<e.length;o++){var s=e[o],l=s[0].trace;l[i]===r&&a.push(s)}return a};iL.getModuleCalcData=function(e,t,r){var n=[],i=[],a;if(typeof t==\"string\"?a=rL.getModule(t).plot:typeof t==\"function\"?a=t:a=t.plot,!a)return[n,e];for(var o=r,s=0;s<e.length;s++){var l=e[s],u=l[0].trace,c=u.zorder!==void 0;u.visible!==!0||u._length===0||(u._module&&u._module.plot===a&&(!c||u.zorder===o)?n.push(l):i.push(l))}return[n,i]};iL.getSubplotData=function(t,r,n){if(!rL.subplotsRegistry[r])return[];for(var i=rL.subplotsRegistry[r].attr,a=[],o,s,l,u=0;u<t.length;u++)o=t[u],o[i]===n&&a.push(o);return a}});var Nne=ye(Mb=>{\"use strict\";var lat=qa(),R3=Dr();Mb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=Mb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){One(e,o,i.cache),i.check=function(){if(a){var c=One(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],l=0;l<s.length;l++)e._internalOn(s[l],i.check);i.remove=function(){for(var u=0;u<s.length;u++)e._removeInternalListener(s[u],i.check)}}else R3.log(\"Unable to automatically bind plot updates to API command\"),i.lookupTable={},i.remove=function(){};return i.disable=function(){a=!1},i.enable=function(){a=!0},t&&(t._commandObserver=i),i};Mb.hasSimpleAPICommandBindings=function(e,t,r){var n,i=t.length,a;for(n=0;n<i;n++){var o,s=t[n],l=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!l)return!1;var c=Mb.computeAPICommandBindings(e,l,u);if(c.length!==1)return!1;if(!a)a=c[0],Array.isArray(a.traces)&&a.traces.sort();else{if(o=c[0],o.type!==a.type||o.prop!==a.prop)return!1;if(Array.isArray(a.traces))if(Array.isArray(o.traces)){o.traces.sort();for(var f=0;f<a.traces.length;f++)if(a.traces[f]!==o.traces[f])return!1}else return!1;else if(o.prop!==a.prop)return!1}o=c[0];var h=o.value;if(Array.isArray(h))if(h.length===1)h=h[0];else return!1;r&&(r[h]=n)}return a};function One(e,t,r){var n,i,a,o=!1;if(t.type===\"data\")n=e._fullData[t.traces!==null?t.traces[0]:0];else if(t.type===\"layout\")n=e._fullLayout;else return!1;return i=R3.nestedProperty(n,t.prop).get(),a=r[t.type]=r[t.type]||{},a.hasOwnProperty(t.prop)&&a[t.prop]!==i&&(o=!0),a[t.prop]=i,{changed:o,value:i}}Mb.executeAPICommand=function(e,t,r){if(t===\"skip\")return Promise.resolve();var n=lat.apiMethodRegistry[t],i=[e];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)i.push(r[a]);return n.apply(null,i).catch(function(o){return R3.warn(\"API call to Plotly.\"+t+\" rejected.\",o),Promise.reject(o)})};Mb.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case\"restyle\":n=Bne(e,r);break;case\"relayout\":n=qne(e,r);break;case\"update\":n=Bne(e,[r[0],r[2]]).concat(qne(e,[r[1]]));break;case\"animate\":n=uat(e,r);break;default:n=[]}return n};function uat(e,t){return Array.isArray(t[0])&&t[0].length===1&&[\"string\",\"number\"].indexOf(typeof t[0][0])!==-1?[{type:\"layout\",prop:\"_currentFrame\",value:t[0][0].toString()}]:[]}function qne(e,t){var r=[],n=t[0],i={};if(typeof n==\"string\")i[n]=t[1];else if(R3.isPlainObject(n))i=n;else return r;return mq(i,function(a,o,s){r.push({type:\"layout\",prop:a,value:s})},\"\",0),r}function Bne(e,t){var r,n,i,a,o=[];if(n=t[0],i=t[1],r=t[2],a={},typeof n==\"string\")a[n]=i;else if(R3.isPlainObject(n))a=n,r===void 0&&(r=i);else return o;return r===void 0&&(r=null),mq(a,function(s,l,u){var c,f;if(Array.isArray(u)){f=u.slice();var h=Math.min(f.length,e.data.length);r&&(h=Math.min(h,r.length)),c=[];for(var d=0;d<h;d++)c[d]=r?r[d]:d}else f=u,c=r?r.slice():null;if(c===null)Array.isArray(f)&&(f=f[0]);else if(Array.isArray(c)){if(!Array.isArray(f)){var v=f;f=[];for(var _=0;_<c.length;_++)f[_]=v}f.length=Math.min(c.length,f.length)}o.push({type:\"data\",prop:s,traces:c,value:f})},\"\",0),o}function mq(e,t,r,n){Object.keys(e).forEach(function(i){var a=e[i];if(i[0]!==\"_\"){var o=r+(n>0?\".\":\"\")+i;R3.isPlainObject(a)?mq(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((xnr,eae)=>{\"use strict\";var Xne=Oa(),cat=f3().timeFormatLocale,fat=MO().formatLocale,tM=Eo(),hat=EO(),Xl=qa(),Zne=P3(),dat=vl(),Ga=Dr(),Yne=ka(),Une=fs().BADNUM,Mp=hf(),vat=o_().clearOutline,pat=tL(),yq=jS(),gat=fq(),mat=Id().getModuleCalcData,Vne=Ga.relinkPrivateKeys,Eb=Ga._,xa=eae.exports={};Ga.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=_3();var aL=Nne();xa.executeAPICommand=aL.executeAPICommand;xa.computeAPICommandBindings=aL.computeAPICommandBindings;xa.manageCommandObserver=aL.manageCommandObserver;xa.hasSimpleAPICommandBindings=aL.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Ga.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod(\"annotations\",\"draw\")(e),Xl.getComponentMethod(\"legend\",\"draw\")(e),Xl.getComponentMethod(\"colorbar\",\"draw\")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Ga.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ga.isHidden(e))&&i(new Error(\"Resize must be passed a displayed plot div element.\")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ga.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call(\"relayout\",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ga.ensureSingle(t._paper,\"text\",\"js-plot-link-container\",function(l){l.style({\"font-family\":'\"Open Sans\", Arial, sans-serif',\"font-size\":\"12px\",fill:Yne.defaultLine,\"pointer-events\":\"all\"}).each(function(){var u=Xne.select(this);u.append(\"tspan\").classed(\"js-link-to-tool\",!0),u.append(\"tspan\").classed(\"js-link-spacer\",!0),u.append(\"tspan\").classed(\"js-sourcelinks\",!0)})}),n=r.node(),i={y:t._paper.attr(\"height\")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i[\"text-anchor\"]=\"start\",i.x=5):(i[\"text-anchor\"]=\"end\",i.x=t._paper.attr(\"width\")-7),r.attr(i);var a=r.select(\".js-link-to-tool\"),o=r.select(\".js-link-spacer\"),s=r.select(\".js-sourcelinks\");e._context.showSources&&e._context.showSources(e),e._context.showLink&&yat(e,a),o.text(a.text()&&s.text()?\" - \":\"\")}};function yat(e,t){t.text(\"\");var r=t.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(e._context.linkText+\" \\xBB\");if(e._context.sendData)r.on(\"click\",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit(\"plotly_beforeexport\");var r=Xne.select(e).append(\"div\").attr(\"id\",\"hiddenform\").style(\"display\",\"none\"),n=r.append(\"form\").attr({action:t+\"/external\",method:\"post\",target:\"_blank\"}),i=n.append(\"input\").attr({type:\"text\",name:\"data\"});return i.node().value=xa.graphJson(e,!1,\"keepdata\"),n.node().submit(),r.remove(),e.emit(\"plotly_afterexport\"),!1}};var _at=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"],xat=[\"year\",\"month\",\"dayMonth\",\"dayMonthYear\"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:Eb(e,\"Click to enter Plot title\"),subtitle:Eb(e,\"Click to enter Plot subtitle\"),x:Eb(e,\"Click to enter X axis title\"),y:Eb(e,\"Click to enter Y axis title\"),colorbar:Eb(e,\"Click to enter Colorscale title\"),annotation:Eb(e,\"new text\")},i._traceWord=Eb(e,\"trace\");var h=Gne(e,_at);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var _=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=_&&(b||p);k?xa.plotAutoSize(e,a,i):_&&xa.sanitizeMargins(i),!b&&_&&(a.width=i.width,a.height=i.height)}i._d3locale=Tat(h,i.separators),i._extraFormat=Gne(e,xat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=wat(),T=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=bat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(T.x),C=Object.keys(T.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod(\"grid\",\"sizeDefaults\")(a,i),f=0;f<x.length;f++)Ga.pushUnique(E.xaxis,x[f]);for(f=0;f<C.length;f++)Ga.pushUnique(E.yaxis,C[f]);for(var M in L)Ga.pushUnique(E.cartesian,M)}if(i._has=xa._hasPlotType.bind(i),o.length===s.length)for(f=0;f<s.length;f++)Vne(s[f],o[f]);xa.supplyLayoutModuleDefaults(a,i,s,e._transitionData);var g=i._visibleModules,P=[];for(f=0;f<g.length;f++){var A=g[f].crossTraceDefaults;A&&Ga.pushUnique(P,A)}for(f=0;f<P.length;f++)P[f](s,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name===\"splom\"&&x.length>15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has(\"cartesian\")),O=!!(i._has&&i._has(\"cartesian\")),U=z,G=O;U&&!G?n._bgLayer.remove():G&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&vat({_fullLayout:n}),Aat(s,i),Vne(i,n),Xl.getComponentMethod(\"colorscale\",\"crossTraceDefaults\")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]=\"old\";for(f=0;f<s.length;f++)N=s[f]._fullInput.uid,j[N]||(Z[N]={}),j[N]=\"new\";for(N in j)j[N]===\"old\"&&delete Z[N];Kne(i),Xl.getComponentMethod(\"rangeslider\",\"makeData\")(i),!r&&u.length===s.length&&xa.supplyDefaultsUpdateCalc(u,s)};xa.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=(e[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o=a._arrayAttrs,s,l,u;for(s=0;s<o.length;s++)l=o[s],u=Ga.nestedProperty(a,l).get().slice(),Ga.nestedProperty(n,l).set(u)}i.trace=n}}};function bat(e,t){var r=t.length,n=[],i,a;for(i=0;i<e.length;i++){var o=e[i]._fullInput;o!==a&&n.push(o),a=o}var s=n.length,l=new Array(r),u={};function c(d,v){l[v]=d,u[d]=1}function f(d,v){if(d&&typeof d==\"string\"&&!u[d])return c(d,v),!0}for(i=0;i<r;i++){var h=t[i].uid;typeof h==\"number\"&&(h=String(h)),!f(h,i)&&(i<s&&f(n[i].uid,i)||c(Ga.randstr(u),i))}return l}function wat(){var e=Xl.collectableSubplotTypes,t={},r,n;if(!e){e=[];var i=Xl.subplotsRegistry;for(var a in i){var o=i[a],s=o.attr;if(s&&(e.push(a),Array.isArray(s)))for(n=0;n<s.length;n++)Ga.pushUnique(e,s[n])}}for(r=0;r<e.length;r++)t[e[r]]=[];return t}function Gne(e,t){var r=e._context.locale;r||(r=\"en-US\");var n=!1,i={};function a(f){for(var h=!0,d=0;d<t.length;d++){var v=t[d];i[v]||(f[v]?i[v]=f[v]:h=!1)}h&&(n=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,l=0;l<2;l++){var u=(s[r]||{}).format;if(u&&(a(u),n))break;s=Xl.localeRegistry}var c=r.split(\"-\")[0];if(n||c===r)break;r=c}return n||a(Xl.localeRegistry.en.format),i}function Tat(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(r){try{r=fat(e).format(Ga.adjustFormat(r))}catch(n){return Ga.warnBadFormat(r),Ga.noFormat}return r},timeFormat:cat(e).utcFormat}}function Aat(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i<e.length;i++){var a=e[i];a.meta?n[a.index]=a._meta={meta:a.meta}:t.meta&&(a._meta={meta:t.meta}),t.meta&&(a._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}xa.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])};xa._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var i=n[t].name;if(i===e)return!0;var a=Xl.modules[i];if(a&&a.categories[e])return!0}return!1};xa.cleanPlot=function(e,t,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(e,t,r,n)}var l=n._has&&n._has(\"gl\"),u=t._has&&t._has(\"gl\");l&&!u&&n._glcontainer!==void 0&&(n._glcontainer.selectAll(\".gl-canvas\").remove(),n._glcontainer.selectAll(\".no-webgl\").remove(),n._glcanvas=null);var c=!!n._infolayer;e:for(i=0;i<r.length;i++){var f=r[i],h=f.uid;for(a=0;a<e.length;a++){var d=e[a];if(h===d.uid)continue e}c&&n._infolayer.select(\".cb\"+h).remove()}};xa.linkSubplots=function(e,t,r,n){var i,a,o=n._plots||{},s=t._plots={},l=t._subplots,u={_fullData:e,_fullLayout:t},c=l.cartesian||[];for(i=0;i<c.length;i++){var f=c[i],h=o[f],d=Mp.getFromId(u,f,\"x\"),v=Mp.getFromId(u,f,\"y\"),_;for(h?_=s[f]=h:(_=s[f]={},_.id=f),d._counterAxes.push(v._id),v._counterAxes.push(d._id),d._subplotsWith.push(f),v._subplotsWith.push(f),_.xaxis=d,_.yaxis=v,_._hasClipOnAxisFalse=!1,a=0;a<e.length;a++){var b=e[a];if(b.xaxis===_.xaxis._id&&b.yaxis===_.yaxis._id&&b.cliponaxis===!1){_._hasClipOnAxisFalse=!0;break}}}var p=Mp.list(u,null,!0),k;for(i=0;i<p.length;i++){k=p[i];var E=null;k.overlaying&&(E=Mp.getFromId(u,k.overlaying),E&&E.overlaying&&(k.overlaying=!1,E=null)),k._mainAxis=E||k,E&&(k.domain=E.domain.slice()),k._anchorAxis=k.anchor===\"free\"?null:Mp.getFromId(u,k.anchor)}for(i=0;i<p.length;i++)if(k=p[i],k._counterAxes.sort(Mp.idSort),k._subplotsWith.sort(Ga.subplotSort),k._mainSubplot=Sat(k,t),k._counterAxes.length&&(k.spikemode&&k.spikemode.indexOf(\"across\")!==-1||k.automargin&&k.mirror&&k.anchor!==\"free\"||Xl.getComponentMethod(\"rangeslider\",\"isVisible\")(k))){var T=1,L=0;for(a=0;a<k._counterAxes.length;a++){var x=Mp.getFromId(u,k._counterAxes[a]);T=Math.min(T,x.domain[0]),L=Math.max(L,x.domain[1])}T<L&&(k._counterDomainMin=T,k._counterDomainMax=L)}};function Sat(e,t){var r={_fullLayout:t},n=e._id.charAt(0)===\"x\",i=e._mainAxis._anchorAxis,a=\"\",o=\"\",s=\"\";if(i&&(s=i._mainAxis._id,a=n?e._id+s:s+e._id),!a||!t._plots[a]){a=\"\";for(var l=e._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?e._id+c:c+e._id;o||(o=f);var h=Mp.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}xa.clearExpandedTraceDefaultColors=function(e){var t,r,n;function i(o,s,l,u){r[u]=s,r.length=u+1,o.valType===\"color\"&&o.dflt===void 0&&t.push(r.join(\".\"))}for(r=[],t=e._module._colorAttrs,t||(e._module._colorAttrs=t=[],Zne.crawl(e._module.attributes,i)),n=0;n<t.length;n++){var a=Ga.nestedProperty(e,\"_input.\"+t[n]);a.get()||Ga.nestedProperty(e,t[n]).set(null)}};xa.supplyDataDefaults=function(e,t,r,n){var i=n._modules,a=n._visibleModules,o=n._basePlotModules,s=0,l=0,u,c,f;n._transformModules=[];function h(k){t.push(k);var E=k._module;E&&(Ga.pushUnique(i,E),k.visible===!0&&Ga.pushUnique(a,E),Ga.pushUnique(o,k._module.basePlotModule),s++,k._input.visible!==!1&&l++)}var d={},v=[],_=(r.template||{}).data||{},b=dat.traceTemplater(_);for(u=0;u<e.length;u++)f=e[u],c=b.newTrace(f),c.uid=n._traceUids[u],xa.supplyTraceDefaults(f,c,l,n,u),c.index=u,c._input=f,c._fullInput=c,h(c),Xl.traceIs(c,\"carpetAxis\")&&(d[c.carpet]=c),Xl.traceIs(c,\"carpetDependent\")&&v.push(u);for(u=0;u<v.length;u++)if(c=t[v[u]],!!c.visible){var p=d[c.carpet];if(c._carpet=p,!p||!p.visible){c.visible=!1;continue}c.xaxis=p.xaxis,c.yaxis=p.yaxis}};xa.supplyAnimationDefaults=function(e){e=e||{};var t,r={};function n(i,a){return Ga.coerce(e||{},r,yq,i,a)}if(n(\"mode\"),n(\"direction\"),n(\"fromcurrent\"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=xa.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=xa.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=xa.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=xa.supplyAnimationTransitionDefaults(e.transition||{});return r};xa.supplyAnimationFrameDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e||{},t,yq.frame,n,i)}return r(\"duration\"),r(\"redraw\"),t};xa.supplyAnimationTransitionDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e||{},t,yq.transition,n,i)}return r(\"duration\"),r(\"easing\"),t};xa.supplyFrameDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e,t,gat,n,i)}return r(\"group\"),r(\"name\"),r(\"traces\"),r(\"baseframe\"),r(\"data\"),r(\"layout\"),t};xa.supplyTraceDefaults=function(e,t,r,n,i){var a=n.colorway||Yne.defaults,o=a[r%a.length],s;function l(E,T){return Ga.coerce(e,t,xa.attributes,E,T)}var u=l(\"visible\");l(\"type\"),l(\"name\",n._traceWord+\" \"+i),l(\"uirevision\",n.uirevision);var c=xa.getModule(t);if(t._module=c,c){var f=c.basePlotModule,h=f.attr,d=f.attributes;if(h&&d){var v=n._subplots,_=\"\";if(Array.isArray(h))for(s=0;s<h.length;s++){var b=h[s],p=Ga.coerce(e,t,d,b);v[b]&&Ga.pushUnique(v[b],p),_+=p}else _=Ga.coerce(e,t,d,h);v[f.name]&&Ga.pushUnique(v[f.name],_)}}if(u&&(l(\"customdata\"),l(\"ids\"),l(\"meta\"),Xl.traceIs(t,\"showLegend\")?(Ga.coerce(e,t,c.attributes.showlegend?c.attributes:xa.attributes,\"showlegend\"),Ga.coerce(e,t,c.attributes.legend?c.attributes:xa.attributes,\"legend\"),l(\"legendwidth\"),l(\"legendgroup\"),l(\"legendgrouptitle.text\"),l(\"legendrank\"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,c&&c.supplyDefaults(e,t,o,n),Xl.traceIs(t,\"noOpacity\")||l(\"opacity\"),Xl.traceIs(t,\"notLegendIsolatable\")&&(t.visible=!!t.visible),Xl.traceIs(t,\"noHover\")||(t.hovertemplate||Ga.coerceHoverinfo(e,t,n),t.type!==\"parcats\"&&Xl.getComponentMethod(\"fx\",\"supplyDefaults\")(e,t,o,n)),c&&c.selectPoints)){var k=l(\"selectedpoints\");Ga.isTypedArray(k)&&(t.selectedpoints=Array.from(k))}return t};xa.supplyLayoutGlobalDefaults=function(e,t,r){function n(f,h){return Ga.coerce(e,t,xa.layoutAttributes,f,h)}var i=e.template;Ga.isPlainObject(i)&&(t.template=i,t._template=i.layout,t._dataTemplate=i.data),n(\"autotypenumbers\");var a=Ga.coerceFont(n,\"font\"),o=a.size;Ga.coerceFont(n,\"title.font\",a,{overrideDflt:{size:Math.round(o*1.4)}}),n(\"title.text\",t._dfltTitle.plot),n(\"title.xref\");var s=n(\"title.yref\");n(\"title.pad.t\"),n(\"title.pad.r\"),n(\"title.pad.b\"),n(\"title.pad.l\");var l=n(\"title.automargin\");n(\"title.x\"),n(\"title.xanchor\"),n(\"title.y\"),n(\"title.yanchor\"),n(\"title.subtitle.text\",t._dfltTitle.subtitle),Ga.coerceFont(n,\"title.subtitle.font\",a,{overrideDflt:{size:Math.round(t.title.font.size*.7)}}),l&&(s===\"paper\"&&(t.title.y!==0&&(t.title.y=1),t.title.yanchor===\"auto\"&&(t.title.yanchor=t.title.y===0?\"top\":\"bottom\")),s===\"container\"&&(t.title.y===\"auto\"&&(t.title.y=1),t.title.yanchor===\"auto\"&&(t.title.yanchor=t.title.y<.5?\"bottom\":\"top\")));var u=n(\"uniformtext.mode\");u&&n(\"uniformtext.minsize\"),n(\"autosize\",!(e.width&&e.height)),n(\"width\"),n(\"height\"),n(\"minreducedwidth\"),n(\"minreducedheight\"),n(\"margin.l\"),n(\"margin.r\"),n(\"margin.t\"),n(\"margin.b\"),n(\"margin.pad\"),n(\"margin.autoexpand\"),e.width&&e.height&&xa.sanitizeMargins(t),Xl.getComponentMethod(\"grid\",\"sizeDefaults\")(e,t),n(\"paper_bgcolor\"),n(\"separators\",r.decimal+r.thousands),n(\"hidesources\"),n(\"colorway\"),n(\"datarevision\");var c=n(\"uirevision\");n(\"editrevision\",c),n(\"selectionrevision\",c),Xl.getComponentMethod(\"modebar\",\"supplyLayoutDefaults\")(e,t),Xl.getComponentMethod(\"shapes\",\"supplyDrawNewShapeDefaults\")(e,t,n),Xl.getComponentMethod(\"selections\",\"supplyDrawNewSelectionDefaults\")(e,t,n),n(\"meta\"),Ga.isPlainObject(e.transition)&&(n(\"transition.duration\"),n(\"transition.easing\"),n(\"transition.ordering\")),Xl.getComponentMethod(\"calendars\",\"handleDefaults\")(e,t,\"calendar\"),Xl.getComponentMethod(\"fx\",\"supplyLayoutGlobalDefaults\")(e,t,n),Ga.coerce(e,t,pat,\"scattermode\")};function nL(e){return typeof e==\"string\"&&e.slice(-2)===\"px\"&&parseFloat(e)}xa.plotAutoSize=function(t,r,n){var i=t._context||{},a=i.frameMargins,o,s,l=Ga.isPlotDiv(t);if(l&&t.emit(\"plotly_autosize\"),i.fillFrame)o=window.innerWidth,s=window.innerHeight,document.body.style.overflow=\"hidden\";else{var u=l?window.getComputedStyle(t):{};if(o=nL(u.width)||nL(u.maxWidth)||n.width,s=nL(u.height)||nL(u.maxHeight)||n.height,tM(a)&&a>0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o<f&&(o=f),s<h&&(s=h);var d=!r.width&&Math.abs(n.width-o)>1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has(\"cartesian\")&&(Xl.getComponentMethod(\"grid\",\"contentDefaults\")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ga.subplotSort);for(s=0;s<a.length;s++)l=a[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var f=t._modules;for(s=0;s<f.length;s++)l=f[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var h=t._transformModules;for(s=0;s<h.length;s++)l=h[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r,n);for(o in i)l=i[o],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r)};xa.purge=function(e){var t=e._fullLayout||{};t._glcontainer!==void 0&&(t._glcontainer.selectAll(\".gl-canvas\").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),Ga.clearThrottle(),Ga.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()};xa.style=function(e){var t=e._fullLayout._visibleModules,r=[],n;for(n=0;n<t.length;n++){var i=t[n];i.style&&Ga.pushUnique(r,i.style)}for(n=0;n<r.length;n++)r[n](e)};xa.sanitizeMargins=function(e){if(!(!e||!e.margin)){var t=e.width,r=e.height,n=e.margin,i=t-(n.l+n.r),a=r-(n.t+n.b),o;i<0&&(o=(t-1)/(n.l+n.r),n.l=Math.floor(o*n.l),n.r=Math.floor(o*n.r)),a<0&&(o=(r-1)/(n.t+n.b),n.t=Math.floor(o*n.t),n.b=Math.floor(o*n.b))}};xa.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}};xa.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};function Kne(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={}),e._reservedMargin||(e._reservedMargin={})}var Jne=2,$ne=2;xa.autoMargin=function(e,t,r){var n=e._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=Ga.constrain(i-o.l-o.r,Jne,s),c=Ga.constrain(a-o.t-o.b,$ne,l),f=Math.max(0,i-u),h=Math.max(0,a-c),d=n._pushmargin,v=n._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete d[t],delete v[t];else{var _=r.pad;if(_===void 0&&(_=Math.min(12,o.l,o.r,o.t,o.b)),f){var b=(r.l+r.r)/f;b>1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,T=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+_},r:{val:E,size:r.r+_},b:{val:L,size:r.b+_},t:{val:T,size:r.t+_}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function Mat(e){if(\"_redrawFromAutoMarginCount\"in e._fullLayout)return!1;var t=Mp.list(e,\"\",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Kne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ga.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,_=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var E in p[k]){var T=p[k][E];o[E]=Math.max(o[E],T)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!==\"base\"&&tM(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var M=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-M)}for(var g in h){var P=h[g].l||{},A=h[g].b||{},z=P.val,O=P.size,U=A.val,G=A.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(tM(O)&&h[N].r){var H=h[N].r.val,re=h[N].r.size;if(H>z){var oe=(O*H+(re-Z)*z)/(H-z),_e=(re*(1-z)+(O-Z)*(1-H))/(H-z);oe+_e>l+u&&(l=oe,u=_e)}}if(tM(G)&&h[N].t){var Ce=h[N].t.val,Le=h[N].t.size;if(Ce>U){var ge=(G*Ce+(Le-j)*U)/(Ce-U),ie=(Le*(1-U)+(G-j)*(1-Ce))/(Ce-U);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Se=Ga.constrain(r-a.l-a.r,Jne,v),Ee=Ga.constrain(n-a.t-a.b,$ne,_),Ae=Math.max(0,r-Se),Be=Math.max(0,n-Ee);if(Ae){var Pe=(l+u)/Ae;Pe>1&&(l/=Pe,u/=Pe)}if(Be){var me=(f+c)/Be;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||Mat(e))){\"_redrawFromAutoMarginCount\"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var De=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount<De)return Xl.call(\"_doPlot\",e);t._size=s,Ga.warn(\"Too many auto-margin redraws.\")}Eat(e)};function Eat(e){var t=Mp.list(e,\"\",!0);[\"_adjustTickLabelsOverflow\",\"_hideCounterAxisInsideTickLabels\"].forEach(function(r){for(var n=0;n<t.length;n++){var i=t[n][r];i&&i()}})}var Hne=[\"l\",\"r\",\"t\",\"b\",\"p\",\"w\",\"h\"];xa.didMarginChange=function(e,t){for(var r=0;r<Hne.length;r++){var n=Hne[r],i=e[n],a=t[n];if(!tM(i)||Math.abs(a-i)>1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h==\"function\")return d?\"_function_\":null;if(Ga.isPlainObject(h)){var v={},_;return Object.keys(h).sort().forEach(function(E){if([\"_\",\"[\"].indexOf(E.charAt(0))===-1){if(typeof h[E]==\"function\"){d&&(v[E]=\"_function\");return}if(r===\"keepdata\"){if(E.slice(-3)===\"src\")return}else if(r===\"keepstream\"){if(_=h[E+\"src\"],typeof _==\"string\"&&_.indexOf(\":\")>0&&!Ga.isPlainObject(h.stream))return}else if(r!==\"keepall\"&&(_=h[E+\"src\"],typeof _==\"string\"&&_.indexOf(\":\")>0))return;v[E]=u(h[E],d)}}),v}var b=Array.isArray(h),p=Ga.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ga.isArrayBuffer(k)?hat.encode(k):k},d)}return b?h.map(function(E){return u(E,d)}):p?Ga.simpleMap(h,Ga.identity):Ga.isJSDate(h)?Ga.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n===\"object\"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch(n=t[r],n.type){case\"replace\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\"insert\":i=n.value,o[i.name]=i,a.splice(n.index,0,i);break;case\"delete\":i=a[n.index],delete o[i.name],a.splice(n.index,1);break}return Promise.resolve()};xa.computeFrame=function(e,t){var r=e._transitionData._frameHash,n,i,a,o;if(!t)throw new Error(\"computeFrame must be given a string frame name\");var s=r[t.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=r[s.baseframe.toString()])&&u.indexOf(s.name)===-1;)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=xa.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),i=s.traces,!i)for(i=[],n=0;n<s.data.length;n++)i[n]=n;for(c.traces||(c.traces=[]),n=0;n<s.data.length;n++)a=i[n],a!=null&&(o=c.traces.indexOf(a),o===-1&&(o=c.data.length,c.traces[o]=a),c.data[o]=xa.extendTrace(c.data[o],s.data[n]))}return c};xa.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(t[i.name]=i)}};xa.extendObjectWithContainers=function(e,t,r){var n,i,a,o,s,l,u,c,f=Ga.extendDeepNoArrays({},t||{}),h=Ga.expandObjectPaths(f),d={};if(r&&r.length)for(a=0;a<r.length;a++)n=Ga.nestedProperty(h,r[a]),i=n.get(),i===void 0?Ga.nestedProperty(d,r[a]).set(null):(n.set(null),Ga.nestedProperty(d,r[a]).set(i));if(e=Ga.extendDeepNoArrays(e||{},h),r&&r.length){for(a=0;a<r.length;a++)if(s=Ga.nestedProperty(d,r[a]),u=s.get(),!!u){for(l=Ga.nestedProperty(e,r[a]),c=l.get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<u.length;o++){var v=u[o];v===null?c[o]=null:c[o]=xa.extendObjectWithContainers(c[o],v)}l.set(c)}}return e};xa.dataArrayContainers=[\"transforms\",\"dimensions\"];xa.layoutArrayContainers=Xl.layoutArrayContainers;xa.extendTrace=function(e,t){return xa.extendObjectWithContainers(e,t,xa.dataArrayContainers)};xa.extendLayout=function(e,t){return xa.extendObjectWithContainers(e,t,xa.layoutArrayContainers)};xa.transition=function(e,t,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var u=Array.isArray(t)?t.length:0,c=n.slice(0,u),f=0;f<c.length;f++){var h=c[f],d=e._fullData[h],v=d._module;if(v){if(v.animatable){var _=v.basePlotModule.name;s[_]||(s[_]=[]),s[_].push(h)}e.data[c[f]]=xa.extendTrace(e.data[c[f]],t[f])}}var b=Ga.expandObjectPaths(Ga.extendDeepNoArrays({},r)),p=/^[xy]axis[0-9]*$/;for(var k in b)p.test(k)&&delete b[k].range;xa.extendLayout(e.layout,b),delete e.calcdata,xa.supplyDefaults(e),xa.doCalcdata(e);var E=Ga.expandObjectPaths(r);if(E){var T=e._fullLayout._plots;for(var L in T){var x=T[L],C=x.xaxis,M=x.yaxis,g=C.range.slice(),P=M.range.slice(),A=null,z=null,O=null,U=null;Array.isArray(E[C._name+\".range\"])?A=E[C._name+\".range\"].slice():Array.isArray((E[C._name]||{}).range)&&(A=E[C._name].range.slice()),Array.isArray(E[M._name+\".range\"])?z=E[M._name+\".range\"].slice():Array.isArray((E[M._name]||{}).range)&&(z=E[M._name].range.slice()),g&&A&&(C.r2l(g[0])!==C.r2l(A[0])||C.r2l(g[1])!==C.r2l(A[1]))&&(O={xr0:g,xr1:A}),P&&z&&(M.r2l(P[0])!==M.r2l(z[0])||M.r2l(P[1])!==M.r2l(z[1]))&&(U={yr0:P,yr1:z}),(O||U)&&l.push(Ga.extendFlat({plotinfo:x},O,U))}}return Promise.resolve()},o.runFn=function(u){var c,f=e._fullLayout._basePlotModules,h=l.length,d;if(r)for(d=0;d<f.length;d++)f[d].transitionAxes&&f[d].transitionAxes(e,l,a,u);h?(c=Ga.extendFlat({},a),c.duration=0,delete s.cartesian):c=a;for(var v in s){var _=s[v],b=e._fullData[_[0]]._module;b.basePlotModule.plot(e,_,c,u)}},Qne(e,a,o)};xa.transitionFromReact=function(e,t,r,n){var i=e._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var l=i._plots;o.redraw=!1,t.anim===\"some\"&&(o.redraw=!0),r.anim===\"some\"&&(o.redraw=!0);for(var u in l){var c=l[u],f=c.xaxis,h=c.yaxis,d=n[f._name].range.slice(),v=n[h._name].range.slice(),_=f.range.slice(),b=h.range.slice();f.setScale(),h.setScale();var p=null,k=null;(f.r2l(d[0])!==f.r2l(_[0])||f.r2l(d[1])!==f.r2l(_[1]))&&(p={xr0:d,xr1:_}),(h.r2l(v[0])!==h.r2l(b[0])||h.r2l(v[1])!==h.r2l(b[1]))&&(k={yr0:v,yr1:b}),(p||k)&&s.push(Ga.extendFlat({plotinfo:c},p,k))}return Promise.resolve()},o.runFn=function(l){for(var u=e._fullData,c=e._fullLayout,f=c._basePlotModules,h,d,v,_=[],b=0;b<u.length;b++)_.push(b);function p(){if(e._fullLayout)for(var E=0;E<f.length;E++)f[E].transitionAxes&&f[E].transitionAxes(e,s,h,l)}function k(){if(e._fullLayout)for(var E=0;E<f.length;E++)f[E].plot(e,v,d,l)}s.length&&t.anim?a.ordering===\"traces first\"?(h=Ga.extendFlat({},a,{duration:0}),v=_,d=a,setTimeout(p,a.duration),k()):(h=a,v=null,d=Ga.extendFlat({},a,{duration:0}),setTimeout(k,h.duration),p()):s.length?(h=a,p()):t.anim&&(v=_,d=a,k())},Qne(e,a,o)};function Qne(e,t,r){var n=!1;function i(f){var h=Promise.resolve();if(!f)return h;for(;f.length;)h=h.then(f.shift());return h}function a(f){if(f)for(;f.length;)f.shift()}function o(){return e.emit(\"plotly_transitioning\",[]),new Promise(function(f){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call(\"redraw\",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit(\"plotly_transitioninterrupted\",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call(\"redraw\",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit(\"plotly_transitioned\",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Ga.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Mp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s<n.length;s++)if(Array.isArray(t)&&t.indexOf(s)===-1){u[s]=c[s];continue}for(s=0;s<n.length;s++)a=n[s],a._arrayAttrs=Zne.findArrayAttributes(a),a._extremes={};var f=i._subplots.polar||[];for(s=0;s<f.length;s++)r.push(i[f[s]].radialaxis,i[f[s]].angularaxis);for(var h in i._colorAxes){var d=i[h];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var v=!1;function _(k){if(a=n[k],o=a._module,a.visible===!0&&a.transforms){if(o&&o.calc){var E=o.calc(e,a);E[0]&&E[0].t&&E[0].t._scene&&delete E[0].t._scene.dirty}for(l=0;l<a.transforms.length;l++){var T=a.transforms[l];o=transformsRegistry[T.type],o&&o.calcTransform&&(a._hasCalcTransform=!0,v=!0,o.calcTransform(e,a,T))}}}function b(k,E){if(a=n[k],o=a._module,!!o.isContainer===E){var T=[];if(a.visible===!0&&a._length!==0){delete a._indexToPoints;var L=a.transforms||[];for(l=L.length-1;l>=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(T=o.calc(e,a))}(!Array.isArray(T)||!T[0])&&(T=[{x:Une,y:Une}]),T[0].t||(T[0].t={}),T[0].trace=a,u[k]=T}}for(jne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)_(s);for(v&&jne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)b(s,!1);Wne(e);var p=Cat(r,e);if(p.length){for(i._numBoxes=0,i._numViolins=0,s=0;s<p.length;s++)b(p[s],!0);for(s=0;s<p.length;s++)b(p[s],!1);Wne(e)}Xl.getComponentMethod(\"fx\",\"calc\")(e),Xl.getComponentMethod(\"errorbars\",\"calc\")(e)};var kat=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function Cat(e,t){var r=[],n,i,a,o,s;function l(N,H,re){var oe=H._id.charAt(0);if(N===\"histogram2dcontour\"){var _e=H._counterAxes[0],Ce=Mp.getFromId(t,_e),Le=oe===\"x\"||_e===\"x\"&&Ce.type===\"category\",ge=oe===\"y\"||_e===\"y\"&&Ce.type===\"category\";return function(ie,Se){return ie===0||Se===0||Le&&ie===re[Se].length-1||ge&&Se===re.length-1?-1:(oe===\"y\"?Se:ie)-1}}else return function(ie,Se){return oe===\"y\"?Se:ie}}var u={min:function(N){return Ga.aggNums(Math.min,null,N)},max:function(N){return Ga.aggNums(Math.max,null,N)},sum:function(N){return Ga.aggNums(function(H,re){return H+re},null,N)},total:function(N){return Ga.aggNums(function(H,re){return H+re},null,N)},mean:function(N){return Ga.mean(N)},\"geometric mean\":function(N){return Ga.geometricMean(N)},median:function(N){return Ga.median(N)}};function c(N,H){return N[1]-H[1]}function f(N,H){return H[1]-N[1]}for(n=0;n<e.length;n++){var h=e[n];if(h.type===\"category\"){var d=h.categoryorder.match(kat);if(d){var v=d[1],_=d[2],b=h._id.charAt(0),p=b===\"x\",k=[];for(i=0;i<h._categories.length;i++)k.push([h._categories[i],[]]);for(i=0;i<h._traceIndices.length;i++){var E=h._traceIndices[i],T=t._fullData[E];if(T.visible===!0){var L=T.type;Xl.traceIs(T,\"histogram\")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var x=L===\"splom\",C=L===\"scattergl\",M=t.calcdata[E];for(a=0;a<M.length;a++){var g=M[a],P,A;if(x){var z=T._axesDim[h._id];if(!p){var O=T._diag[z][0];O&&(h=t._fullLayout[Mp.id2name(O)])}var U=g.trace.dimensions[z].values;for(o=0;o<U.length;o++)for(P=h._categoriesMap[U[o]],s=0;s<g.trace.dimensions.length;s++)if(s!==z){var G=g.trace.dimensions[s];k[P][1].push(G.values[o])}}else if(C){for(o=0;o<g.t.x.length;o++)p?(P=g.t.x[o],A=g.t.y[o]):(P=g.t.y[o],A=g.t.x[o]),k[P][1].push(A);g.t&&g.t._scene&&delete g.t._scene.dirty}else if(g.hasOwnProperty(\"z\")){A=g.z;var Z=l(T.type,h,A);for(o=0;o<A.length;o++)for(s=0;s<A[o].length;s++)P=Z(s,o),P+1&&k[P][1].push(A[o][s])}else for(P=g.p,P===void 0&&(P=g[b]),A=g.s,A===void 0&&(A=g.v),A===void 0&&(A=p?g.y:g.x),Array.isArray(A)||(A===void 0?A=[]:A=[A]),o=0;o<A.length;o++)k[P][1].push(A[o])}}}h._categoriesValue=k;var j=[];for(i=0;i<k.length;i++)j.push([k[i][0],u[v](k[i][1])]);j.sort(_===\"descending\"?f:c),h._categoriesAggregatedValue=j,h._initialCategories=j.map(function(N){return N[0]}),r=r.concat(h.sortByInitialCategories())}}}return r}function jne(e,t,r){var n={};function i(l){l.clearCalc(),l.type===\"multicategory\"&&l.setupMultiCategory(t),n[l._id]=1}Ga.simpleMap(e,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[Mp.id2name(s)])}function Wne(e){var t=e._fullLayout,r=t._visibleModules,n={},i,a,o;for(a=0;a<r.length;a++){var s=r[a],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;n[u]?Ga.pushUnique(n[u],l):n[u]=[l]}}for(o in n){var c=n[o],f=t._subplots[o];if(Array.isArray(f))for(i=0;i<f.length;i++){var h=f[i],d=o===\"cartesian\"?t._plots[h]:t[h];for(a=0;a<c.length;a++)c[a](e,d,h)}else for(a=0;a<c.length;a++)c[a](e)}}xa.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()};xa.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()};xa.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,n=t._previousSelections;t._previousSelections=r;var i=t._reselect||JSON.stringify(r)!==JSON.stringify(n);Xl.getComponentMethod(\"selections\",\"reselect\")(e,i)};xa.generalUpdatePerTraceModule=function(e,t,r,n){var i=t.traceHash,a={},o;for(o=0;o<r.length;o++){var s=r[o],l=s[0].trace;l.visible&&(a[l.type]=a[l.type]||[],a[l.type].push(s))}for(var u in i)if(!a[u]){var c=i[u][0],f=c[0].trace;f.visible=!1,a[u]=[c]}for(var h in a){var d=a[h],v=d[0][0].trace._module;v.plot(e,t,Ga.filterVisible(d),n)}t.traceHash=a};xa.plotBasePlot=function(e,t,r,n,i){var a=Xl.getModule(e),o=mat(t.calcdata,a)[0];a.plot(t,o,n,i)};xa.cleanBasePlot=function(e,t,r,n,i){var a=i._has&&i._has(e),o=r._has&&r._has(e);a&&!o&&i[\"_\"+e+\"layer\"].selectAll(\"g.trace\").remove()}});var Wp=ye(kb=>{\"use strict\";kb.xmlns=\"http://www.w3.org/2000/xmlns/\";kb.svg=\"http://www.w3.org/2000/svg\";kb.xlink=\"http://www.w3.org/1999/xlink\";kb.svgAttrs={xmlns:kb.svg,\"xmlns:xlink\":kb.xlink}});var Dh=ye((wnr,tae)=>{\"use strict\";tae.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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}});var Zl=ye(b0=>{\"use strict\";var Fh=Oa(),Ly=Dr(),Lat=Ly.strTranslate,_q=Wp(),Pat=Dh().LINE_SPACING,Iat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr(\"data-notex\")&&t&&t._context.typesetMath&&typeof MathJax!=\"undefined\"&&n.match(Iat),a=Fh.select(e.node().parentNode);if(a.empty())return;var o=e.attr(\"class\")?e.attr(\"class\").split(\" \")[0]:\"text\";o+=\"-math\",a.selectAll(\"svg.\"+o).remove(),a.selectAll(\"g.\"+o+\"-group\").remove(),e.style(\"display\",null).attr({\"data-unformatted\":n,\"data-math\":\"N\"});function s(){a.empty()||(o=e.attr(\"class\")+\"-math\",a.select(\"svg.\"+o).remove()),e.text(\"\").style(\"white-space\",\"pre\");var l=jat(e.node(),n);l&&e.style(\"pointer-events\",\"all\"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style(\"display\",\"none\");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};zat(i[2],c,function(f,h,d){a.selectAll(\"svg.\"+o).remove(),a.selectAll(\"g.\"+o+\"-group\").remove();var v=f&&f.select(\"svg\");if(!v||!v.node()){s(),l();return}var _=a.append(\"g\").classed(o+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":n,\"data-math\":\"Y\"});_.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var k=e.node().style.fill||\"black\",E=v.select(\"g\");E.attr({fill:k,stroke:k});var T=E.node().getBoundingClientRect(),L=T.width,x=T.height;(L>b||x>p)&&(v.style(\"overflow\",\"hidden\"),T=v.node().getBoundingClientRect(),L=T.width,x=T.height);var C=+e.attr(\"x\"),M=+e.attr(\"y\"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]===\"y\")_.attr({transform:\"rotate(\"+[-90,C,M]+\")\"+Lat(-L/2,P-x/2)});else if(o[0]===\"l\")M=P-x/2;else if(o[0]===\"a\"&&o.indexOf(\"atitle\")!==0)C=0,M=P;else{var A=e.attr(\"text-anchor\");C=C-L*(A===\"middle\"?.5:A===\"end\"?1:0),M=M+P-x/2}v.attr({x:C,y:M}),r&&r.call(e,_),l(_)})})):s(),e};var Rat=/(<|&lt;|&#60;)/g,Dat=/(>|&gt;|&#62;)/g;function Fat(e){return e.replace(Rat,\"\\\\lt \").replace(Dat,\"\\\\gt \")}var rae=[[\"$\",\"$\"],[\"\\\\(\",\"\\\\)\"]];function zat(e,t,r){var n=parseInt((MathJax.version||\"\").split(\".\")[0]);if(n!==2&&n!==3){Ly.warn(\"No MathJax version:\",MathJax.version);return}var i,a,o,s,l=function(){return a=Ly.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:\"none\",tex2jax:{inlineMath:rae},displayAlign:\"left\"})},u=function(){a=Ly.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rae},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!==\"SVG\")return MathJax.Hub.setRenderer(\"SVG\")},f=function(){i=MathJax.config.startup.output,i!==\"svg\"&&(MathJax.config.startup.output=\"svg\")},h=function(){var k=\"math-output-\"+Ly.randstr({},64);s=Fh.select(\"body\").append(\"div\").attr({id:k}).style({visibility:\"hidden\",position:\"absolute\",\"font-size\":t.fontSize+\"px\"}).text(Fat(e));var E=s.node();return n===2?MathJax.Hub.Typeset(E):MathJax.typeset([E])},d=function(){var k=s.select(n===2?\".MathJax_SVG\":\".MathJax\"),E=!k.empty()&&s.select(\"svg\").node();if(!E)Ly.log(\"There was an error in the tex syntax.\",e),r();else{var T=E.getBoundingClientRect(),L;n===2?L=Fh.select(\"body\").select(\"#MathJax_SVG_glyphs\"):L=k.select(\"defs\"),r(k,L,T)}s.remove()},v=function(){if(i!==\"SVG\")return MathJax.Hub.setRenderer(i)},_=function(){i!==\"svg\"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),_(),p()}))}var oae={sup:\"font-size:70%\",sub:\"font-size:70%\",s:\"text-decoration:line-through\",u:\"text-decoration:underline\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},Oat={sub:\"0.3em\",sup:\"-0.6em\"},qat={sub:\"-0.21em\",sup:\"0.42em\"},iae=\"\\u200B\",nae=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],sae=b0.NEWLINES=/(\\r\\n?|\\n)/g,bq=/(<[^<>]*>)/,wq=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,Bat=/<br(\\s+.*)?>/i;b0.BR_TAG_ALL=/<br(\\s+.*)?>/gi;var lae=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,uae=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,cae=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,Nat=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i;function Cb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&oL(n)}var Uat=/(^|;)\\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:[\"br\"],i=\"...\",a=i.length,o=e.split(bq),s=[],l=\"\",u=0,c=0;c<o.length;c++){var f=o[c],h=f.match(wq),d=h&&h[2].toLowerCase();if(d)n.indexOf(d)!==-1&&(s.push(f),l=d);else{var v=f.length;if(u+v<r)s.push(f),u+=v;else if(u<r){var _=r-u;l&&(l!==\"br\"||_<=a||v<=a)&&s.pop(),r>a?s.push(f.slice(0,Math.max(0,_-a))+i):s.push(f.slice(0,_));break}l=\"\"}}return s.join(\"\")};var Vat={mu:\"\\u03BC\",amp:\"&\",lt:\"<\",gt:\">\",nbsp:\"\\xA0\",times:\"\\xD7\",plusmn:\"\\xB1\",deg:\"\\xB0\"},Gat=/&(#\\d+|#x[\\da-fA-F]+|[a-z]+);/g;function oL(e){return e.replace(Gat,function(t,r){var n;return r.charAt(0)===\"#\"?n=Hat(r.charAt(1)===\"x\"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Vat[r],n||t})}b0.convertEntities=oL;function Hat(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function jat(e,t){t=t.replace(sae,\" \");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(_q.svg,\"tspan\");Fh.select(x).attr({class:\"line\",dy:a*Pat+\"em\"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var M=1;M<C.length;M++)s(C[M])}function s(x){var C=x.type,M={},g;if(C===\"a\"){g=\"a\";var P=x.target,A=x.href,z=x.popup;A&&(M={\"xlink:xlink:show\":P===\"_blank\"||P.charAt(0)!==\"_\"?\"new\":\"replace\",target:P,\"xlink:xlink:href\":A},z&&(M.onclick='window.open(this.href.baseVal,this.target.baseVal,\"'+z+'\");return false;'))}else g=\"tspan\";x.style&&(M.style=x.style);var O=document.createElementNS(_q.svg,g);if(C===\"sup\"||C===\"sub\"){l(i,iae),i.appendChild(O);var U=document.createElementNS(_q.svg,\"tspan\");l(U,iae),Fh.select(U).attr(\"dy\",qat[C]),M.dy=Oat[C],i.appendChild(O),i.appendChild(U)}else i.appendChild(O);Fh.select(O).attr(M),i=x.node=O,n.push(x)}function l(x,C){x.appendChild(document.createTextNode(C))}function u(x){if(n.length===1){Ly.log(\"Ignoring unexpected end tag </\"+x+\">.\",t);return}var C=n.pop();x!==C.type&&Ly.log(\"Start tag <\"+C.type+\"> doesnt match end tag <\"+x+\">. Pretending it did match.\",t),i=n[n.length-1].node}var c=Bat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(bq),h=0;h<f.length;h++){var d=f[h],v=d.match(wq),_=v&&v[2].toLowerCase(),b=oae[_];if(_===\"br\")o();else if(b===void 0)l(i,oL(d));else if(v[1])u(_);else{var p=v[4],k={type:_},E=Cb(p,lae);if(E?(E=E.replace(Uat,\"$1 fill:\"),b&&(E+=\";\"+b)):b&&(E=b),E&&(k.style=E),_===\"a\"){r=!0;var T=Cb(p,uae);if(T){var L=fae(T);L&&(k.href=L,k.target=Cb(p,cae)||\"_blank\",k.popup=Cb(p,Nat))}}s(k)}}return r}function fae(e){var t=encodeURI(decodeURI(e)),r=document.createElement(\"a\"),n=document.createElement(\"a\");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return nae.indexOf(i)!==-1&&nae.indexOf(a)!==-1?t:\"\"}b0.sanitizeHTML=function(t){t=t.replace(sae,\" \");for(var r=document.createElement(\"p\"),n=r,i=[],a=t.split(bq),o=0;o<a.length;o++){var s=a[o],l=s.match(wq),u=l&&l[2].toLowerCase();if(u in oae)if(l[1])i.length&&(n=i.pop());else{var c=l[4],f=Cb(c,lae),h=f?{style:f}:{};if(u===\"a\"){var d=Cb(c,uae);if(d){var v=fae(d);if(v){h.href=v;var _=Cb(c,cae);_&&(h.target=_)}}}var b=document.createElement(u);n.appendChild(b),Fh.select(b).attr(h),n=b,i.push(b)}else n.appendChild(document.createTextNode(oL(s)))}var p=\"innerHTML\";return r[p]};b0.lineCount=function(t){return t.selectAll(\"tspan.line\").size()||1};b0.positionText=function(t,r,n){return t.each(function(){var i=Fh.select(this);function a(l,u){return u===void 0?(u=i.attr(l),u===null&&(i.attr(l,0),u=0)):i.attr(l,u),u}var o=a(\"x\",r),s=a(\"y\",n);this.nodeName===\"text\"&&i.selectAll(\"tspan.line\").attr({x:o,y:s})})};function aae(e,t,r){var n=r.horizontalAlign,i=r.verticalAlign||\"top\",a=e.node().getBoundingClientRect(),o=t.node().getBoundingClientRect(),s,l,u;return i===\"bottom\"?l=function(){return a.bottom-s.height}:i===\"middle\"?l=function(){return a.top+(a.height-s.height)/2}:l=function(){return a.top},n===\"right\"?u=function(){return a.right-s.width}:n===\"center\"?u=function(){return a.left+(a.width-s.width)/2}:u=function(){return a.left},function(){s=this.node().getBoundingClientRect();var c=u()-o.left,f=l()-o.top,h=r.gd||{};if(r.gd){h._fullLayout._calcInverseTransform(h);var d=Ly.apply3DTransform(h._fullLayout._invTransform)(c,f);c=d[0],f=d[1]}return this.style({top:f+\"px\",left:c+\"px\",\"z-index\":1e3}),this}}var xq=\"1px \";b0.makeTextShadow=function(e){var t=xq,r=xq,n=xq;return t+r+n+e+\", -\"+t+\"-\"+r+n+e+\", \"+t+\"-\"+r+n+e+\", -\"+t+r+n+e};b0.makeEditable=function(e,t){var r=t.gd,n=t.delegate,i=Fh.dispatch(\"edit\",\"input\",\"cancel\"),a=n||e;if(e.style({\"pointer-events\":n?\"none\":\"all\"}),e.size()!==1)throw new Error(\"boo\");function o(){l(),e.style({opacity:0});var u=a.attr(\"class\"),c;u?c=\".\"+u.split(\" \")[0]+\"-math-group\":c=\"[class*=-math-group]\",c&&Fh.select(e.node().parentNode).select(c).style({opacity:0})}function s(u){var c=u.node(),f=document.createRange();f.selectNodeContents(c);var h=window.getSelection();h.removeAllRanges(),h.addRange(f),c.focus()}function l(){var u=Fh.select(r),c=u.select(\".svg-container\"),f=c.append(\"div\"),h=e.node().style,d=parseFloat(h.fontSize||12),v=t.text;v===void 0&&(v=e.attr(\"data-unformatted\")),f.classed(\"plugin-editable editable\",!0).style({position:\"absolute\",\"font-family\":h.fontFamily||\"Arial\",\"font-size\":d,color:t.fill||h.fill||\"black\",opacity:1,\"background-color\":t.background||\"transparent\",outline:\"#ffffff33 1px solid\",margin:[-d/8+1,0,0,-1].join(\"px \")+\"px\",padding:\"0\",\"box-sizing\":\"border-box\"}).attr({contenteditable:!0}).text(v).call(aae(e,c,t)).on(\"blur\",function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var _=Fh.select(this).attr(\"class\"),b;_?b=\".\"+_.split(\" \")[0]+\"-math-group\":b=\"[class*=-math-group]\",b&&Fh.select(e.node().parentNode).select(b).style({opacity:0});var p=this.textContent;Fh.select(this).transition().duration(0).remove(),Fh.select(document).on(\"mouseup\",null),i.edit.call(e,p)}).on(\"focus\",function(){var _=this;r._editing=!0,Fh.select(document).on(\"mouseup\",function(){if(Fh.event.target===_)return!1;document.activeElement===f.node()&&f.node().blur()})}).on(\"keyup\",function(){Fh.event.which===27?(r._editing=!1,e.style({opacity:1}),Fh.select(this).style({opacity:0}).on(\"blur\",function(){return!1}).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),Fh.select(this).call(aae(e,c,t)))}).on(\"keydown\",function(){Fh.event.which===13&&this.blur()}).call(s)}return t.immediate?o():a.on(\"click\",o),Fh.rebind(e,i,\"on\")}});var pv=ye((Anr,_ae)=>{\"use strict\";var Wat=Oa(),lL=fd(),iM=Eo(),sL=Dr(),hae=ka(),Xat=mb().isValid;function Zat(e,t,r){var n=t?sL.nestedProperty(e,t).get()||{}:e,i=n[r||\"color\"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(sL.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(iM(i[o])){a=!0;break}}return sL.isPlainObject(n)&&(a||n.showscale===!0||iM(n.cmin)&&iM(n.cmax)||Xat(n.colorscale)||sL.isPlainObject(n.colorbar))}var dae=[\"showscale\",\"autocolorscale\",\"colorscale\",\"reversescale\",\"colorbar\"],rM=[\"min\",\"max\",\"mid\",\"auto\"];function pae(e){var t=e._colorAx,r=t||e,n={},i,a,o;for(a=0;a<dae.length;a++)o=dae[a],n[o]=r[o];if(t)for(i=\"c\",a=0;a<rM.length;a++)o=rM[a],n[o]=r[\"c\"+o];else{var s;for(a=0;a<rM.length;a++){if(o=rM[a],s=\"c\"+o,s in r){n[o]=r[s];continue}s=\"z\"+o,s in r&&(n[o]=r[s])}i=s.charAt(0)}return n._sync=function(l,u){var c=rM.indexOf(l)!==-1?i+l:l;r[c]=r[\"_\"+c]=u},n}function gae(e){for(var t=pae(e),r=t.min,n=t.max,i=t.reversescale?mae(t.colorscale):t.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function mae(e){for(var t=e.length,r=new Array(t),n=t-1,i=0;n>=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function yae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o<i;o++){var s=lL(n[o]).toRgb();a[o]=[s.r,s.g,s.b,s.a]}var l=Wat.scale.linear().domain(r).range(a).clamp(!0),u=t.noNumericCheck,c=t.returnArray,f;return u&&c?f=l:u?f=function(h){return vae(l(h))}:c?f=function(h){return iM(h)?l(h):lL(h).isValid()?h:hae.defaultLine}:f=function(h){return iM(h)?vae(l(h)):lL(h).isValid()?h:hae.defaultLine},f.domain=l.domain,f.range=function(){return n},f}function Yat(e,t){return yae(gae(e),t)}function vae(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return lL(t).toRgbString()}_ae.exports={hasColorscale:Zat,extractOpts:pae,extractScale:gae,flipScale:mae,makeColorScaleFunc:yae,makeColorScaleFuncFromTrace:Yat}});var df=ye((Snr,wae)=>{\"use strict\";var xae=HO(),Kat=xae.FORMAT_LINK,Jat=xae.DATE_FORMAT_LINK;function $at(e,t){return{valType:\"string\",dflt:\"\",editType:\"none\",description:(t?Tq:bae)(\"hover text\",e)+[\"By default the values are formatted using \"+(t?\"generic number format\":\"`\"+e+\"axis.hoverformat`\")+\".\"].join(\" \")}}function Tq(e,t){return[\"Sets the \"+e+\" formatting rule\"+(t?\"for `\"+t+\"` \":\"\"),\"using d3 formatting mini-languages\",\"which are very similar to those in Python. For numbers, see: \"+Kat+\".\"].join(\" \")}function bae(e,t){return Tq(e,t)+[\" And for dates see: \"+Jat+\".\",\"We add two items to d3's date formatter:\",\"*%h* for half of the year as a decimal number as well as\",\"*%{n}f* for fractional seconds\",\"with n digits. For example, *2016-10-13 09:15:23.456* with tickformat\",\"*%H~%M~%S.%2f* would display *09~15~23.46*\"].join(\" \")}wae.exports={axisHoverFormat:$at,descriptionOnlyNumbers:Tq,descriptionWithDates:bae}});var Rd=ye((Enr,Bae)=>{\"use strict\";var Tae=ec(),D3=Ih(),qae=Pd().dash,Sq=Ao().extendFlat,Aae=vl().templatedArray,Mnr=Ll().templateFormatStringDescription,Sae=df().descriptionWithDates,Qat=fs().ONEDAY,mm=Rh(),eot=mm.HOUR_PATTERN,tot=mm.WEEKDAY_PATTERN,Aq={valType:\"enumerated\",values:[\"auto\",\"linear\",\"array\"],editType:\"ticks\",impliedEdits:{tick0:void 0,dtick:void 0}},rot=Sq({},Aq,{values:Aq.values.slice().concat([\"sync\"])});function Mae(e){return{valType:\"integer\",min:0,dflt:e?5:0,editType:\"ticks\"}}var Eae={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},kae={valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},Cae={valType:\"data_array\",editType:\"ticks\"},Lae={valType:\"enumerated\",values:[\"outside\",\"inside\",\"\"],editType:\"ticks\"};function Pae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=5),t}function Iae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=1),t}var Rae={valType:\"color\",dflt:D3.defaultLine,editType:\"ticks\"},Dae={valType:\"color\",dflt:D3.lightLine,editType:\"ticks\"};function Fae(e){var t={valType:\"number\",min:0,editType:\"ticks\"};return e||(t.dflt=1),t}var zae=Sq({},qae,{editType:\"ticks\"}),Oae={valType:\"boolean\",editType:\"ticks\"};Bae.exports={visible:{valType:\"boolean\",editType:\"plot\"},color:{valType:\"color\",dflt:D3.defaultLine,editType:\"ticks\"},title:{text:{valType:\"string\",editType:\"ticks\"},font:Tae({editType:\"ticks\"}),standoff:{valType:\"number\",min:0,editType:\"ticks\"},editType:\"ticks\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"log\",\"date\",\"category\",\"multicategory\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:{valType:\"enumerated\",values:[\"convert types\",\"strict\"],dflt:\"convert types\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\",\"min reversed\",\"max reversed\",\"min\",\"max\"],dflt:!0,editType:\"axrange\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},autorangeoptions:{minallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},maxallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},clipmin:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},clipmax:{valType:\"any\",editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},include:{valType:\"any\",arrayOk:!0,editType:\"plot\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},editType:\"plot\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0},{valType:\"any\",editType:\"axrange\",impliedEdits:{\"^autorange\":!1},anim:!0}],editType:\"axrange\",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},maxallowed:{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},modebardisable:{valType:\"flaglist\",flags:[\"autoscale\",\"zoominout\"],extras:[\"none\"],dflt:\"none\",editType:\"modebar\"},insiderange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},scaleanchor:{valType:\"enumerated\",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString(),!1],editType:\"plot\"},scaleratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},constrain:{valType:\"enumerated\",values:[\"range\",\"domain\"],editType:\"plot\"},constraintoward:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\",\"top\",\"middle\",\"bottom\"],editType:\"plot\"},matches:{valType:\"enumerated\",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:\"calc\"},rangebreaks:Aae(\"rangebreak\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},bounds:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},pattern:{valType:\"enumerated\",values:[tot,eot,\"\"],editType:\"calc\"},values:{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"any\",editType:\"calc\"}},dvalue:{valType:\"number\",editType:\"calc\",min:0,dflt:Qat},editType:\"calc\"}),tickmode:rot,nticks:Mae(),tick0:Eae,dtick:kae,ticklabelstep:{valType:\"integer\",min:1,dflt:1,editType:\"ticks\"},tickvals:Cae,ticktext:{valType:\"data_array\",editType:\"ticks\"},ticks:Lae,tickson:{valType:\"enumerated\",values:[\"labels\",\"boundaries\"],dflt:\"labels\",editType:\"ticks\"},ticklabelmode:{valType:\"enumerated\",values:[\"instant\",\"period\"],dflt:\"instant\",editType:\"ticks\"},ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\",editType:\"calc\"},ticklabeloverflow:{valType:\"enumerated\",values:[\"allow\",\"hide past div\",\"hide past domain\"],editType:\"calc\"},ticklabelshift:{valType:\"integer\",dflt:0,editType:\"ticks\"},ticklabelstandoff:{valType:\"integer\",dflt:0,editType:\"ticks\"},ticklabelindex:{valType:\"integer\",arrayOk:!0,editType:\"calc\"},mirror:{valType:\"enumerated\",values:[!0,\"ticks\",!1,\"all\",\"allticks\"],dflt:!1,editType:\"ticks+layoutstyle\"},ticklen:Pae(),tickwidth:Iae(),tickcolor:Rae,showticklabels:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},labelalias:{valType:\"any\",dflt:!1,editType:\"ticks\"},automargin:{valType:\"flaglist\",flags:[\"height\",\"width\",\"left\",\"right\",\"top\",\"bottom\"],extras:[!0,!1],dflt:!1,editType:\"ticks\"},showspikes:{valType:\"boolean\",dflt:!1,editType:\"modebar\"},spikecolor:{valType:\"color\",dflt:null,editType:\"none\"},spikethickness:{valType:\"number\",dflt:3,editType:\"none\"},spikedash:Sq({},qae,{dflt:\"dash\",editType:\"none\"}),spikemode:{valType:\"flaglist\",flags:[\"toaxis\",\"across\",\"marker\"],dflt:\"toaxis\",editType:\"none\"},spikesnap:{valType:\"enumerated\",values:[\"data\",\"cursor\",\"hovered data\"],dflt:\"hovered data\",editType:\"none\"},tickfont:Tae({editType:\"ticks\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"ticks\"},autotickangles:{valType:\"info_array\",freeLength:!0,items:{valType:\"angle\"},dflt:[0,30,90],editType:\"ticks\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\",\"SI extended\"],dflt:\"B\",editType:\"ticks\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"ticks\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"ticks\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"ticks\",description:Sae(\"tick label\")},tickformatstops:Aae(\"tickformatstop\",{enabled:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dtickrange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"ticks\"},{valType:\"any\",editType:\"ticks\"}],editType:\"ticks\"},value:{valType:\"string\",dflt:\"\",editType:\"ticks\"},editType:\"ticks\"}),hoverformat:{valType:\"string\",dflt:\"\",editType:\"none\",description:Sae(\"hover text\")},unifiedhovertitle:{text:{valType:\"string\",dflt:\"\",editType:\"none\"},editType:\"none\"},showline:{valType:\"boolean\",dflt:!1,editType:\"ticks+layoutstyle\"},linecolor:{valType:\"color\",dflt:D3.defaultLine,editType:\"layoutstyle\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks+layoutstyle\"},showgrid:Oae,gridcolor:Dae,gridwidth:Fae(),griddash:zae,zeroline:{valType:\"boolean\",editType:\"ticks\"},zerolinecolor:{valType:\"color\",dflt:D3.defaultLine,editType:\"ticks\"},zerolinelayer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"below traces\",editType:\"plot\"},zerolinewidth:{valType:\"number\",dflt:1,editType:\"ticks\"},showdividers:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},dividercolor:{valType:\"color\",dflt:D3.defaultLine,editType:\"ticks\"},dividerwidth:{valType:\"number\",dflt:1,editType:\"ticks\"},anchor:{valType:\"enumerated\",values:[\"free\",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],editType:\"plot\"},overlaying:{valType:\"enumerated\",values:[\"free\",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:\"plot\"},minor:{tickmode:Aq,nticks:Mae(\"minor\"),tick0:Eae,dtick:kae,tickvals:Cae,ticks:Lae,ticklen:Pae(\"minor\"),tickwidth:Iae(\"minor\"),tickcolor:Rae,gridcolor:Dae,gridwidth:Fae(\"minor\"),griddash:zae,showgrid:Oae,editType:\"ticks\"},minorloglabels:{valType:\"enumerated\",values:[\"small digits\",\"complete\",\"none\"],dflt:\"small digits\",editType:\"calc\"},layer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"above traces\",editType:\"plot\"},domain:{valType:\"info_array\",items:[{valType:\"number\",min:0,max:1,editType:\"plot\"},{valType:\"number\",min:0,max:1,editType:\"plot\"}],dflt:[0,1],editType:\"plot\"},position:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},autoshift:{valType:\"boolean\",dflt:!1,editType:\"plot\"},shift:{valType:\"number\",editType:\"plot\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\",\"total ascending\",\"total descending\",\"min ascending\",\"min descending\",\"max ascending\",\"max descending\",\"sum ascending\",\"sum descending\",\"mean ascending\",\"mean descending\",\"geometric mean ascending\",\"geometric mean descending\",\"median ascending\",\"median descending\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"}});var uL=ye((knr,Vae)=>{\"use strict\";var $c=Rd(),Nae=ec(),Uae=Ao().extendFlat,iot=mc().overrideAll;Vae.exports=iot({orientation:{valType:\"enumerated\",values:[\"h\",\"v\"],dflt:\"v\"},thicknessmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\"},thickness:{valType:\"number\",min:0,dflt:30},lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\"},xref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"]},xpad:{valType:\"number\",min:0,dflt:10},y:{valType:\"number\"},yref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"]},ypad:{valType:\"number\",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:\"number\",min:0,dflt:0},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Uae({},$c.ticks,{dflt:\"\"}),ticklabeloverflow:Uae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside left\",\"inside left\",\"outside right\",\"inside right\",\"outside bottom\",\"inside bottom\"],dflt:\"outside\"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Nae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:\"string\"},font:Nae({}),side:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"]}}},\"colorbars\",\"from-root\")});var Tu=ye((Lnr,Hae)=>{\"use strict\";var not=uL(),aot=p3().counter,oot=t_(),Gae=mb().scales,Cnr=oot(Gae);function cL(e){return\"`\"+e+\"`\"}Hae.exports=function(t,r){t=t||\"\",r=r||{};var n=r.cLetter||\"c\",i=\"onlyIfNumerical\"in r?r.onlyIfNumerical:!!t,a=\"noScale\"in r?r.noScale:t===\"marker.line\",o=\"showScaleDflt\"in r?r.showScaleDflt:n===\"z\",s=typeof r.colorscaleDflt==\"string\"?Gae[r.colorscaleDflt]:null,l=r.editTypeOverride||\"\",u=t?t+\".\":\"\",c,f;\"colorAttr\"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:\"z\",c:\"color\"}[n],f=\"in \"+cL(u+c));var h=i?\" Has an effect only if \"+f+\" is set to a numerical array.\":\"\",d=n+\"auto\",v=n+\"min\",_=n+\"max\",b=n+\"mid\",p=cL(u+d),k=cL(u+v),E=cL(u+_),T=k+\" and \"+E,L={};L[v]=L[_]=void 0;var x={};x[d]=!1;var C={};return c===\"color\"&&(C.color={valType:\"color\",arrayOk:!0,editType:l||\"style\"},r.anim&&(C.color.anim=!0)),C[d]={valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:L},C[v]={valType:\"number\",dflt:null,editType:l||\"plot\",impliedEdits:x},C[_]={valType:\"number\",dflt:null,editType:l||\"plot\",impliedEdits:x},C[b]={valType:\"number\",dflt:null,editType:\"calc\",impliedEdits:L},C.colorscale={valType:\"colorscale\",editType:\"calc\",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:\"boolean\",dflt:r.autoColorDflt!==!1,editType:\"calc\",impliedEdits:{colorscale:void 0}},C.reversescale={valType:\"boolean\",dflt:!1,editType:\"plot\"},a||(C.showscale={valType:\"boolean\",dflt:o,editType:\"calc\"},C.colorbar=not),r.noColorAxis||(C.coloraxis={valType:\"subplotid\",regex:aot(\"coloraxis\"),dflt:null,editType:\"calc\"}),C}});var Eq=ye((Pnr,jae)=>{\"use strict\";var sot=Ao().extendFlat,lot=Tu(),Mq=mb().scales;jae.exports={editType:\"calc\",colorscale:{editType:\"calc\",sequential:{valType:\"colorscale\",dflt:Mq.Reds,editType:\"calc\"},sequentialminus:{valType:\"colorscale\",dflt:Mq.Blues,editType:\"calc\"},diverging:{valType:\"colorscale\",dflt:Mq.RdBu,editType:\"calc\"}},coloraxis:sot({_isSubplotObj:!0,editType:\"calc\"},lot(\"\",{colorAttr:\"corresponding trace color array(s)\",noColorAxis:!0,showScaleDflt:!0}))}});var kq=ye((Inr,Wae)=>{\"use strict\";var uot=Dr();Wae.exports=function(t){return uot.isPlainObject(t.colorbar)}});var Pq=ye(Lq=>{\"use strict\";var Cq=Eo(),Xae=Dr(),Zae=fs(),cot=Zae.ONEDAY,fot=Zae.ONEWEEK;Lq.dtick=function(e,t){var r=t===\"log\",n=t===\"date\",i=t===\"category\",a=n?cot:1;if(!e)return a;if(Cq(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!=\"string\"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=Cq(s)?Number(s):0,s<=0||!(n&&o===\"M\"&&s===Math.round(s)||r&&o===\"L\"||r&&o===\"D\"&&(s===1||s===2))?a:e};Lq.tick0=function(e,t,r,n){if(t===\"date\")return Xae.cleanDate(e,Xae.dateTick0(r,n%fot===0?1:0));if(!(n===\"D1\"||n===\"D2\"))return Cq(e)?Number(e):0}});var Lb=ye((Dnr,Kae)=>{\"use strict\";var Yae=Pq(),hot=Dr().isArrayOrTypedArray,dot=vv().isTypedArraySpec,vot=vv().decodeTypedArraySpec;Kae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?\"minor.\":\"\";function c(k){var E=s[k];return dot(E)&&(E=vot(E)),E!==void 0?E:(l._template||{})[k]}var f=c(\"tick0\"),h=c(\"dtick\"),d=c(\"tickvals\"),v=hot(d)?\"array\":h?\"linear\":\"auto\",_=n(u+\"tickmode\",v);if(_===\"auto\"||_===\"sync\")n(u+\"nticks\");else if(_===\"linear\"){var b=l.dtick=Yae.dtick(h,i);l.tick0=Yae.tick0(f,i,r.calendar,b)}else if(i!==\"multicategory\"){var p=n(u+\"tickvals\");p===void 0?l.tickmode=\"auto\":o||n(\"ticktext\")}}});var F3=ye((Fnr,$ae)=>{\"use strict\";var Iq=Dr(),Jae=Rd();$ae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Jae.minor:Jae,u=a?\"minor.\":\"\",c=Iq.coerce2(o,s,l,\"ticklen\",a?(r.ticklen||5)*.6:void 0),f=Iq.coerce2(o,s,l,\"tickwidth\",a?r.tickwidth||1:void 0),h=Iq.coerce2(o,s,l,\"tickcolor\",(a?r.tickcolor:void 0)||s.color),d=n(u+\"ticks\",!a&&i.outerTicks||c||f||h?\"outside\":\"\");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var Rq=ye((znr,Qae)=>{\"use strict\";Qae.exports=function(t){var r=[\"showexponent\",\"showtickprefix\",\"showticksuffix\"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Onr,eoe)=>{\"use strict\";var fL=Dr(),pot=vl();eoe.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||\"visible\",o=r[i],s=fL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=pot.arrayTemplater(r,i,a),c,f;for(c=0;c<s.length;c++){var h=s[c];fL.isPlainObject(h)?f=u.newItem(h):(f=u.newItem({}),f[a]=!1),f._index=c,f[a]!==!1&&n.handleItemDefaults(h,f,r,n),l.push(f)}var d=u.defaultItems();for(c=0;c<d.length;c++)f=d[c],f._index=l.length,n.handleItemDefaults({},f,r,n,{}),l.push(f);if(fL.isArrayOrTypedArray(o)){var v=Math.min(o.length,l.length);for(c=0;c<v;c++)fL.relinkPrivateKeys(l[c],o[c])}return l}});var s_=ye((qnr,roe)=>{\"use strict\";var Dq=Dr(),got=ka().contrast,toe=Rd(),mot=Rq(),yot=Zd();roe.exports=function(t,r,n,i,a){a||(a={});var o=n(\"labelalias\");Dq.isPlainObject(o)||delete r.labelalias;var s=mot(t),l=n(\"showticklabels\");if(l){a.noTicklabelshift||n(\"ticklabelshift\"),a.noTicklabelstandoff||n(\"ticklabelstandoff\");var u=a.font||{},c=r.color,f=r.ticklabelposition||\"\",h=f.indexOf(\"inside\")!==-1?got(a.bgColor):c&&c!==toe.color.dflt?c:u.color;if(Dq.coerceFont(n,\"tickfont\",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!==\"multicategory\"&&i!==\"log\"&&n(\"ticklabelstep\"),!a.noAng){var d=n(\"tickangle\");!a.noAutotickangles&&d===\"auto\"&&n(\"autotickangles\")}if(i!==\"category\"){var v=n(\"tickformat\");yot(t,r,{name:\"tickformatstops\",inclusionAttr:\"enabled\",handleItemDefaults:_ot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!==\"date\"&&(n(\"showexponent\",s),n(\"exponentformat\"),n(\"minexponent\"),n(\"separatethousands\"))}!a.noMinorloglabels&&i===\"log\"&&n(\"minorloglabels\")}};function _ot(e,t){function r(i,a){return Dq.coerce(e,t,toe.tickformatstops,i,a)}var n=r(\"enabled\");n&&(r(\"dtickrange\"),r(\"value\"))}});var l_=ye((Bnr,ioe)=>{\"use strict\";var xot=Rq();ioe.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=xot(t),l=n(\"tickprefix\");l&&n(\"showtickprefix\",s);var u=n(\"ticksuffix\",o);u&&n(\"showticksuffix\",s)}});var Fq=ye((Nnr,noe)=>{\"use strict\";var u_=Dr(),bot=vl(),wot=Lb(),Tot=F3(),Aot=s_(),Sot=l_(),Mot=uL();noe.exports=function(t,r,n){var i=bot.newContainer(r,\"colorbar\"),a=t.colorbar||{};function o(A,z){return u_.coerce(a,i,Mot,A,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o(\"orientation\"),f=c===\"v\",h=o(\"thicknessmode\");o(\"thickness\",h===\"fraction\"?30/(f?l:u):30);var d=o(\"lenmode\");o(\"len\",d===\"fraction\"?1:f?u:l);var v=o(\"yref\"),_=o(\"xref\"),b=v===\"paper\",p=_===\"paper\",k,E,T,L=\"left\";f?(T=\"middle\",L=p?\"left\":\"right\",k=p?1.02:1,E=.5):(T=b?\"bottom\":\"top\",L=\"center\",k=.5,E=b?1.02:1),u_.coerce(a,i,{x:{valType:\"number\",min:p?-2:0,max:p?3:1,dflt:k}},\"x\"),u_.coerce(a,i,{y:{valType:\"number\",min:b?-2:0,max:b?3:1,dflt:E}},\"y\"),o(\"xanchor\",L),o(\"xpad\"),o(\"yanchor\",T),o(\"ypad\"),u_.noneOrAll(a,i,[\"x\",\"y\"]),o(\"outlinecolor\"),o(\"outlinewidth\"),o(\"bordercolor\"),o(\"borderwidth\"),o(\"bgcolor\");var x=u_.coerce(a,i,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:f?[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]:[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]}},\"ticklabelposition\");o(\"ticklabeloverflow\",x.indexOf(\"inside\")!==-1?\"hide past domain\":\"hide past div\"),wot(a,i,o,\"linear\");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf(\"inside\")!==-1&&(M.bgColor=\"black\"),Sot(a,i,o,\"linear\",M),Aot(a,i,o,\"linear\",M),Tot(a,i,o,\"linear\",M),o(\"title.text\",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=u_.extendFlat({},C,{family:g.family,size:u_.bigFont(g.size)});u_.coerceFont(o,\"title.font\",P),o(\"title.side\",f?\"top\":\"right\")}});var td=ye((Unr,soe)=>{\"use strict\";var aoe=Eo(),Oq=Dr(),Eot=kq(),kot=Fq(),ooe=mb().isValid,Cot=qa().traceIs;function zq(e,t){var r=t.slice(0,t.length-1);return t?Oq.nestedProperty(e,r).get()||{}:e}soe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l=\"_module\"in r,u=zq(t,o),c=zq(r,o),f=zq(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+\"coloraxis\");if(v){var _=Cot(r,\"contour\")&&Oq.nestedProperty(r,\"contours.coloring\").get()||\"heatmap\",b=d[v];b?(b[2].push(h),b[0]!==_&&(b[0]=!1,Oq.warn([\"Ignoring coloraxis:\",v,\"setting\",\"as it is linked to incompatible colorscales.\"].join(\" \")))):d[v]=[_,r,[h]];return}}var p=u[s+\"min\"],k=u[s+\"max\"],E=aoe(p)&&aoe(k)&&p<k,T=i(o+s+\"auto\",!E);T?i(o+s+\"mid\"):(i(o+s+\"min\"),i(o+s+\"max\"));var L=u.colorscale,x=f.colorscale,C;if(L!==void 0&&(C=!ooe(L)),x!==void 0&&(C=!ooe(x)),i(o+\"autocolorscale\",C),i(o+\"colorscale\"),i(o+\"reversescale\"),o!==\"marker.line.\"){var M;o&&l&&(M=Eot(u));var g=i(o+\"showscale\",M);g&&(o&&f&&(c._template=f),kot(u,c,n))}}});var foe=ye((Vnr,coe)=>{\"use strict\";var loe=Dr(),Lot=vl(),uoe=Eq(),Pot=td();coe.exports=function(t,r){function n(f,h){return loe.coerce(t,r,uoe,f,h)}n(\"colorscale.sequential\"),n(\"colorscale.sequentialminus\"),n(\"colorscale.diverging\");var i=r._colorAxes,a,o;function s(f,h){return loe.coerce(a,o,uoe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Lot.newContainer(r,l,\"coloraxis\"),o._name=l,Pot(a,o,r,s,{prefix:\"\",cLetter:\"c\"});else{for(var c=0;c<u[2].length;c++)u[2][c]();delete r._colorAxes[l]}}}});var doe=ye((Gnr,hoe)=>{\"use strict\";var Iot=Dr(),Rot=pv().hasColorscale,Dot=pv().extractOpts;hoe.exports=function(t,r){function n(c,f){var h=c[\"_\"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?Iot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Dot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,\"colorscale\")}}for(var a=0;a<t.length;a++){var o=t[a],s=o._module.colorbar;if(s)if(Array.isArray(s))for(var l=0;l<s.length;l++)i(o,s[l]);else i(o,s);Rot(o,\"marker.line\")&&i(o,{container:\"marker.line\",min:\"cmin\",max:\"cmax\"})}for(var u in r._colorAxes)i(r[u],{min:\"cmin\",max:\"cmax\"})}});var gv=ye((Hnr,poe)=>{\"use strict\";var voe=Eo(),qq=Dr(),Fot=pv().extractOpts;poe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?qq.nestedProperty(r,o).get():r,l=Fot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return qq.aggNums(Math.min,null,a)},v=function(){return qq.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&voe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&voe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h<h-c&&(f=h+(h-c))),c===f&&(c-=.5,f+=.5),l._sync(\"min\",c),l._sync(\"max\",f),l.autocolorscale){var _;c*f<0?_=i.colorscale.diverging:c>=0?_=i.colorscale.sequential:_=i.colorscale.sequentialminus,l._sync(\"colorscale\",_)}}});var tc=ye((jnr,goe)=>{\"use strict\";var hL=mb(),z3=pv();goe.exports={moduleType:\"component\",name:\"colorscale\",attributes:Tu(),layoutAttributes:Eq(),supplyLayoutDefaults:foe(),handleDefaults:td(),crossTraceDefaults:doe(),calc:gv(),scales:hL.scales,defaultScale:hL.defaultScale,getScale:hL.get,isValidScale:hL.isValid,hasColorscale:z3.hasColorscale,extractOpts:z3.extractOpts,extractScale:z3.extractScale,flipScale:z3.flipScale,makeColorScaleFunc:z3.makeColorScaleFunc,makeColorScaleFuncFromTrace:z3.makeColorScaleFuncFromTrace}});var Ru=ye((Wnr,yoe)=>{\"use strict\";var moe=Dr(),zot=vv().isTypedArraySpec;yoe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf(\"lines\")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf(\"markers\")!==-1||e.type===\"splom\")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf(\"text\")!==-1},isBubble:function(e){var t=e.marker;return moe.isPlainObject(t)&&(moe.isArrayOrTypedArray(t.size)||zot(t.size))}}});var O3=ye((Xnr,_oe)=>{\"use strict\";var Oot=Eo();_oe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode===\"area\"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Oot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{\"use strict\";var dL=Dr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type===\"splom\"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i<r.length;i++)for(var a=0;a<n.length;a++)if(t.indexOf(r[i]+n[a])!==-1)return!0;return!1}return t.indexOf(mv.getSubplot(e))!==-1};mv.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r};mv.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r};mv.getDistanceFunction=function(e,t,r,n){return e===\"closest\"?n||mv.quadrature(t,r):e.charAt(0)===\"x\"?t:r};mv.getClosest=function(e,t,r){if(r.index!==!1)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=1/0,i=e.length,a=0;a<i;a++)n=t(e[a]),n<=r.distance&&(r.index=a,r.distance=n);return r};mv.inbox=function(e,t,r){return e*t<0||e===0?r:1/0};mv.quadrature=function(e,t){return function(r){var n=e(r),i=t(r);return Math.sqrt(n*n+i*i)}};mv.makeEventData=function(e,t,r){var n=\"index\"in e?e.index:e.pointNumber,i={data:t._input,fullData:t,curveNumber:t.index,pointNumber:n};if(t._indexToPoints){var a=t._indexToPoints[n];a.length===1?i.pointIndex=a[0]:i.pointIndices=a}else i.pointIndex=n;return t._module.eventData?i=t._module.eventData(i,e,t,r,n):(\"xVal\"in e?i.x=e.xVal:\"x\"in e&&(i.x=e.x),\"yVal\"in e?i.y=e.yVal:\"y\"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),e.zLabelVal!==void 0&&(i.z=e.zLabelVal)),mv.appendArrayPointValue(i,t,n),i};mv.appendArrayPointValue=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=xoe(a);if(e[o]===void 0){var s=dL.nestedProperty(t,a).get(),l=boe(s,r);l!==void 0&&(e[o]=l)}}};mv.appendArrayMultiPointValues=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=xoe(a);if(e[o]===void 0){for(var s=dL.nestedProperty(t,a).get(),l=new Array(r.length),u=0;u<r.length;u++)l[u]=boe(s,r[u]);e[o]=l}}};var qot={ids:\"id\",locations:\"location\",labels:\"label\",values:\"value\",\"marker.colors\":\"color\",parents:\"parent\"};function xoe(e){return qot[e]||e}function boe(e,t){if(Array.isArray(t)){if(dL.isArrayOrTypedArray(e)&&dL.isArrayOrTypedArray(e[t[0]]))return e[t[0]][t[1]]}else return e[t]}var Bot={x:!0,y:!0},Not={\"x unified\":!0,\"y unified\":!0};mv.isUnifiedHover=function(e){return typeof e!=\"string\"?!1:!!Not[e]};mv.isXYhover=function(e){return typeof e!=\"string\"?!1:!!Bot[e]}});var nM=ye((Ynr,woe)=>{woe.exports=Vot;var Bq={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Uot=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Vot(e){var t=[];return e.replace(Uot,function(r,n,i){var a=n.toLowerCase();for(i=Hot(i),a==\"m\"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a=\"l\",n=n==\"m\"?\"l\":\"L\");;){if(i.length==Bq[a])return i.unshift(n),t.push(i);if(i.length<Bq[a])throw new Error(\"malformed path data\");t.push([n].concat(i.splice(0,Bq[a])))}}),t}var Got=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig;function Hot(e){var t=e.match(Got);return t?t.map(Number):[]}});var Coe=ye((Knr,koe)=>{\"use strict\";var jot=nM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs=\"M0,0Z\",Toe=Math.sqrt(2),c_=Math.sqrt(3),Nq=Math.PI,Uq=Math.cos,Vq=Math.sin;koe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"Z\")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,\"M\"+i+\",\"+n+\"H\"+n+\"V\"+i+\"H-\"+n+\"V\"+n+\"H-\"+i+\"V-\"+n+\"H-\"+n+\"V-\"+i+\"H\"+n+\"V-\"+n+\"H\"+i+\"Z\")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/Toe,2),i=\"l\"+n+\",\"+n,a=\"l\"+n+\",-\"+n,o=\"l-\"+n+\",-\"+n,s=\"l-\"+n+\",\"+n;return vs(t,r,\"M0,\"+n+i+a+o+a+o+s+o+s+i+s+i+\"Z\")}},\"triangle-up\":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,\"M-\"+n+\",\"+i+\"H\"+n+\"L0,-\"+a+\"Z\")}},\"triangle-down\":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,\"M-\"+n+\",-\"+i+\"H\"+n+\"L0,\"+a+\"Z\")}},\"triangle-left\":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,\"M\"+i+\",-\"+n+\"V\"+n+\"L-\"+a+\",0Z\")}},\"triangle-right\":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,\"M-\"+i+\",-\"+n+\"V\"+n+\"L\"+a+\",0Z\")}},\"triangle-ne\":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,\"M-\"+i+\",-\"+n+\"H\"+n+\"V\"+i+\"Z\")}},\"triangle-se\":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,\"M\"+n+\",-\"+i+\"V\"+n+\"H-\"+i+\"Z\")}},\"triangle-sw\":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,\"M\"+i+\",\"+n+\"H-\"+n+\"V-\"+i+\"Z\")}},\"triangle-nw\":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,\"M-\"+n+\",\"+i+\"V-\"+n+\"H\"+i+\"Z\")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,\"M\"+n+\",\"+o+\"L\"+i+\",\"+s+\"H-\"+i+\"L-\"+n+\",\"+o+\"L0,\"+a+\"Z\")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,\"M\"+a+\",-\"+i+\"V\"+i+\"L0,\"+n+\"L-\"+a+\",\"+i+\"V-\"+i+\"L0,-\"+n+\"Z\")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,\"M-\"+i+\",\"+a+\"H\"+i+\"L\"+n+\",0L\"+i+\",-\"+a+\"H-\"+i+\"L-\"+n+\",0Z\")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,\"M-\"+i+\",-\"+n+\"H\"+i+\"L\"+n+\",-\"+i+\"V\"+i+\"L\"+i+\",\"+n+\"H-\"+i+\"L-\"+n+\",\"+i+\"V-\"+i+\"Z\")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,\"M\"+i+\",\"+u+\"H\"+a+\"L\"+o+\",\"+c+\"L\"+s+\",\"+f+\"L0,\"+h+\"L-\"+s+\",\"+f+\"L-\"+o+\",\"+c+\"L-\"+a+\",\"+u+\"H-\"+i+\"L0,\"+l+\"Z\")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,\"M-\"+a+\",0l-\"+i+\",-\"+n+\"h\"+a+\"l\"+i+\",-\"+n+\"l\"+i+\",\"+n+\"h\"+a+\"l-\"+i+\",\"+n+\"l\"+i+\",\"+n+\"h-\"+a+\"l-\"+i+\",\"+n+\"l-\"+i+\",-\"+n+\"h-\"+a+\"Z\")}},\"star-triangle-up\":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return vs(t,r,\"M-\"+n+\",\"+i+s+n+\",\"+i+s+\"0,-\"+a+s+\"-\"+n+\",\"+i+\"Z\")}},\"star-triangle-down\":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s=\"A \"+o+\",\"+o+\" 0 0 1 \";return vs(t,r,\"M\"+n+\",-\"+i+s+\"-\"+n+\",-\"+i+s+\"0,\"+a+s+n+\",-\"+i+\"Z\")}},\"star-square\":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return vs(t,r,\"M-\"+n+\",-\"+n+a+\"-\"+n+\",\"+n+a+n+\",\"+n+a+n+\",-\"+n+a+\"-\"+n+\",-\"+n+\"Z\")}},\"star-diamond\":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a=\"A \"+i+\",\"+i+\" 0 0 1 \";return vs(t,r,\"M-\"+n+\",0\"+a+\"0,\"+n+a+n+\",0\"+a+\"0,-\"+n+a+\"-\"+n+\",0Z\")}},\"diamond-tall\":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},\"diamond-wide\":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,\"M0,\"+i+\"L\"+n+\",0L0,-\"+i+\"L-\"+n+\",0Z\")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"H-\"+n+\"L\"+n+\",-\"+n+\"H-\"+n+\"Z\")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"V-\"+n+\"L-\"+n+\",\"+n+\"V-\"+n+\"Z\")},noDot:!0},\"circle-cross\":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"circle-x\":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/Toe,2);return vs(t,r,\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i+\"M\"+n+\",0A\"+n+\",\"+n+\" 0 1,1 0,-\"+n+\"A\"+n+\",\"+n+\" 0 0,1 \"+n+\",0Z\")},needLine:!0,noDot:!0},\"square-cross\":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"square-x\":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n+\"M\"+n+\",\"+n+\"H-\"+n+\"V-\"+n+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"diamond-cross\":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM0,-\"+n+\"V\"+n+\"M-\"+n+\",0H\"+n)},needLine:!0,noDot:!0},\"diamond-x\":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,\"M\"+n+\",0L0,\"+n+\"L-\"+n+\",0L0,-\"+n+\"ZM-\"+i+\",-\"+i+\"L\"+i+\",\"+i+\"M-\"+i+\",\"+i+\"L\"+i+\",-\"+i)},needLine:!0,noDot:!0},\"cross-thin\":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"x-thin\":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n+\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,\"M0,\"+n+\"V-\"+n+\"M\"+n+\",0H-\"+n+\"M\"+i+\",\"+i+\"L-\"+i+\",-\"+i+\"M\"+i+\",-\"+i+\"L-\"+i+\",\"+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,\"M\"+n+\",\"+i+\"V-\"+i+\"M\"+(n-i)+\",-\"+i+\"V\"+i+\"M\"+i+\",\"+n+\"H-\"+i+\"M-\"+i+\",\"+(n-i)+\"H\"+i)},needLine:!0,noFill:!0},\"y-up\":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,\"M-\"+n+\",\"+a+\"L0,0M\"+n+\",\"+a+\"L0,0M0,-\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-down\":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,\"M-\"+n+\",-\"+a+\"L0,0M\"+n+\",-\"+a+\"L0,0M0,\"+i+\"L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-left\":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,\"M\"+a+\",\"+n+\"L0,0M\"+a+\",-\"+n+\"L0,0M-\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"y-right\":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,\"M-\"+a+\",\"+n+\"L0,0M-\"+a+\",-\"+n+\"L0,0M\"+i+\",0L0,0\")},needLine:!0,noDot:!0,noFill:!0},\"line-ew\":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,\"M\"+n+\",0H-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ns\":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,\"M0,\"+n+\"V-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-ne\":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",-\"+n+\"L-\"+n+\",\"+n)},needLine:!0,noDot:!0,noFill:!0},\"line-nw\":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,\"M\"+n+\",\"+n+\"L-\"+n+\",-\"+n)},needLine:!0,noDot:!0,noFill:!0},\"arrow-up\":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,\"M0,0L-\"+n+\",\"+i+\"H\"+n+\"Z\")},backoff:1,noDot:!0},\"arrow-down\":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,\"M0,0L-\"+n+\",-\"+i+\"H\"+n+\"Z\")},noDot:!0},\"arrow-left\":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-right\":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},noDot:!0},\"arrow-bar-up\":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",\"+i+\"H\"+n+\"Z\")},backoff:1,needLine:!0,noDot:!0},\"arrow-bar-down\":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,\"M-\"+n+\",0H\"+n+\"M0,0L-\"+n+\",-\"+i+\"H\"+n+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-left\":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,\"M0,-\"+i+\"V\"+i+\"M0,0L\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},\"arrow-bar-right\":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,\"M0,-\"+i+\"V\"+i+\"M0,0L-\"+n+\",-\"+i+\"V\"+i+\"Z\")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=Nq/2.5,i=2*e*Uq(n),a=2*e*Vq(n);return vs(t,r,\"M0,0L\"+-i+\",\"+a+\"L\"+i+\",\"+a+\"Z\")},backoff:.9,noDot:!0},\"arrow-wide\":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=Nq/4,i=2*e*Uq(n),a=2*e*Vq(n);return vs(t,r,\"M0,0L\"+-i+\",\"+a+\"A \"+2*e+\",\"+2*e+\" 0 0 1 \"+i+\",\"+a+\"Z\")},backoff:.4,noDot:!0}};function ds(e){return e===null}var Aoe,Soe,Moe,Eoe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(Moe===e&&Eoe===t&&Aoe===r)return Soe;Moe=e,Eoe=t,Aoe=r;function n(b,p){var k=Uq(b),E=Vq(b),T=p[0],L=p[1]+(t||0);return[T*k-L*E,T*E+L*k]}for(var i=e/180*Nq,a=0,o=0,s=jot(r),l=\"\",u=0;u<s.length;u++){var c=s[u],f=c[0],h=a,d=o;if(f===\"M\"||f===\"L\")a=+c[1],o=+c[2];else if(f===\"m\"||f===\"l\")a+=+c[1],o+=+c[2];else if(f===\"H\")a=+c[1];else if(f===\"h\")a+=+c[1];else if(f===\"V\")o=+c[1];else if(f===\"v\")o+=+c[1];else if(f===\"A\"){a=+c[1],o=+c[2];var v=n(i,[+c[6],+c[7]]);c[6]=v[0],c[7]=v[1],c[3]=+c[3]+e}(f===\"H\"||f===\"V\")&&(f=\"L\"),(f===\"h\"||f===\"v\")&&(f=\"l\"),(f===\"m\"||f===\"l\")&&(a-=h,o-=d);var _=n(i,[a,o]);(f===\"H\"||f===\"V\")&&(f=\"L\"),(f===\"M\"||f===\"L\"||f===\"m\"||f===\"l\")&&(c[1]=_[0],c[2]=_[1]),c[0]=f,l+=c[0]+c.slice(1).join(\",\")}return Soe=l,l}});var So=ye((Jnr,Yoe)=>{\"use strict\";var dd=Oa(),Du=Dr(),Wot=Du.numberFormat,Db=Eo(),Zq=fd(),pL=qa(),Yd=ka(),Xot=tc(),oM=Du.strTranslate,gL=Zl(),Zot=Wp(),Yot=Dh(),Kot=Yot.LINE_SPACING,Boe=X1().DESELECTDIM,Jot=Ru(),$ot=O3(),Qot=ip().appendArrayPointValue,Ta=Yoe.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style(\"font-family\",s),o+1&&e.style(\"font-size\",o+\"px\"),a&&e.call(Yd.fill,a),i&&e.style(\"font-weight\",i),n&&e.style(\"font-style\",n),r&&e.style(\"font-variant\",r),c&&e.style(\"text-transform\",Gq(tst(c))),l&&e.style(\"text-shadow\",l===\"auto\"?gL.makeTextShadow(Yd.contrast(a)):Gq(l)),u&&e.style(\"text-decoration-line\",Gq(rst(u)))};function Gq(e){return e===\"none\"?void 0:e}var est={normal:\"none\",lower:\"lowercase\",upper:\"uppercase\",\"word caps\":\"capitalize\"};function tst(e){return est[e]}function rst(e){return e.replace(\"under\",\"underline\").replace(\"over\",\"overline\").replace(\"through\",\"line-through\").split(\"+\").join(\" \")}Ta.setPosition=function(e,t,r){e.attr(\"x\",t).attr(\"y\",r)};Ta.setSize=function(e,t,r){e.attr(\"width\",t).attr(\"height\",r)};Ta.setRect=function(e,t,r,n,i){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,i)};Ta.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Db(i)&&Db(a)&&t.node())t.node().nodeName===\"text\"?t.attr(\"x\",i).attr(\"y\",a):t.attr(\"transform\",oM(i,a));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Ta.translatePoint(n,i,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr(\"display\",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:\"none\")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=pL.traceIs(a,\"bar-like\")?\".bartext\":\".point,.textpoint\";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Db(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,i){t.style(\"fill\",\"none\");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||\"\";Yd.stroke(t,n||a.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style(\"fill\",\"none\").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||\"\";dd.select(this).call(Yd.stroke,r||a.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({\"stroke-dasharray\":t,\"stroke-width\":r+\"px\"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e===\"solid\"?e=\"\":e===\"dot\"?e=r+\"px,\"+r+\"px\":e===\"dash\"?e=3*r+\"px,\"+3*r+\"px\":e===\"longdash\"?e=5*r+\"px,\"+5*r+\"px\":e===\"dashdot\"?e=3*r+\"px,\"+r+\"px,\"+r+\"px,\"+r+\"px\":e===\"longdashdot\"&&(e=5*r+\"px,\"+2*r+\"px,\"+r+\"px,\"+2*r+\"px\"),e};function Noe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Ta.getPatternAttr,s=i&&(o(i.shape,0,\"\")||o(i.path,0,\"\"));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Ta.pattern(e,\"point\",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!==\"none\"){var v=a.type,_=\"scatterfill-\"+t.uid;if(n&&(_=\"legendfill-\"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v===\"horizontal\"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v===\"vertical\"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(Goe,r,_,\"linear\",a.colorscale,\"fill\",b,p,!0,!1)}else v===\"horizontal\"&&(v=v+\"reversed\"),e.call(Ta.gradient,r,_,v,a.colorscale,\"fill\")}else t.fillcolor&&e.call(Yd.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Noe(e,i,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style(\"stroke-width\",0).each(function(n){var i=dd.select(this);n[0].trace&&Noe(i,n[0].trace,t,r)})};var Loe=Coe();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys(Loe).forEach(function(e){var t=Loe[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+\"-open\"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+\"-dot\",r+300,String(r+300),e+\"-open-dot\"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var ist=Ta.symbolNames.length,nst=\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\";Ta.symbolNumber=function(e){if(Db(e))e=+e;else if(typeof e==\"string\"){var t=0;e.indexOf(\"-open\")>0&&(t=100,e=e.replace(\"-open\",\"\")),e.indexOf(\"-dot\")>0&&(t+=200,e=e.replace(\"-dot\",\"\")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=ist||e>=400?0:Math.floor(Math.max(e,0))};function Uoe(e,t,r,n){var i=e%100;return Ta.symbolFuncs[i](t,r,n)+(e>=200?nst:\"\")}var Poe=Wot(\"~f\"),Voe={radial:{type:\"radial\"},radialreversed:{type:\"radial\",reversed:!0},horizontal:{type:\"linear\",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:\"linear\",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:\"linear\",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:\"linear\",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Ta.gradient=function(e,t,r,n,i,a){var o=Voe[n];return Goe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Goe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n===\"linear\"?f={node:\"linearGradient\",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?\"userSpaceOnUse\":\"objectBoundingBox\"},reversed:u}:n===\"radial\"&&(f={node:\"radialGradient\",reversed:u});for(var h=new Array(c),d=0;d<c;d++)f.reversed?h[c-1-d]=[Poe((1-i[d][0])*100),i[d][1]]:h[d]=[Poe(i[d][0]*100),i[d][1]];var v=t._fullLayout,_=\"g\"+v._uid+\"-\"+r,b=v._defs.select(\".gradients\").selectAll(\"#\"+_).data([n+h.join(\";\")],Du.identity);b.exit().remove(),b.enter().append(f.node).each(function(){var p=dd.select(this);f.attrs&&p.attr(f.attrs),p.attr(\"id\",_);var k=p.selectAll(\"stop\").data(h);k.exit().remove(),k.enter().append(\"stop\"),k.each(function(E){var T=Zq(E[1]);dd.select(this).attr({offset:E[0]+\"%\",\"stop-color\":Yd.tinyRGB(T),\"stop-opacity\":T.getAlpha()})})}),e.style(a,Yq(_,t)).style(a+\"-opacity\",null),e.classed(\"gradient_filled\",!0)}Ta.pattern=function(e,t,r,n,i,a,o,s,l,u,c,f){var h=t===\"legend\";s&&(l===\"overlay\"?(u=s,c=Yd.contrast(u)):(u=void 0,c=s));var d=r._fullLayout,v=\"p\"+d._uid+\"-\"+n,_,b,p=function(O,U,G,Z,j){return Z+(j-Z)*(O-U)/(G-U)},k,E,T,L,x={},C=Zq(c),M=Yd.tinyRGB(C),g=C.getAlpha(),P=f*g;switch(i){case\"/\":_=a*Math.sqrt(2),b=a*Math.sqrt(2),k=\"M-\"+_/4+\",\"+b/4+\"l\"+_/2+\",-\"+b/2+\"M0,\"+b+\"L\"+_+\",0M\"+_/4*3+\",\"+b/4*5+\"l\"+_/2+\",-\"+b/2,E=o*a,L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"\\\\\":_=a*Math.sqrt(2),b=a*Math.sqrt(2),k=\"M\"+_/4*3+\",-\"+b/4+\"l\"+_/2+\",\"+b/2+\"M0,0L\"+_+\",\"+b+\"M-\"+_/4+\",\"+b/4*3+\"l\"+_/2+\",\"+b/2,E=o*a,L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"x\":_=a*Math.sqrt(2),b=a*Math.sqrt(2),k=\"M-\"+_/4+\",\"+b/4+\"l\"+_/2+\",-\"+b/2+\"M0,\"+b+\"L\"+_+\",0M\"+_/4*3+\",\"+b/4*5+\"l\"+_/2+\",-\"+b/2+\"M\"+_/4*3+\",-\"+b/4+\"l\"+_/2+\",\"+b/2+\"M0,0L\"+_+\",\"+b+\"M-\"+_/4+\",\"+b/4*3+\"l\"+_/2+\",\"+b/2,E=a-a*Math.sqrt(1-o),L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"|\":_=a,b=a,L=\"path\",k=\"M\"+_/2+\",0L\"+_/2+\",\"+b,E=o*a,L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"-\":_=a,b=a,L=\"path\",k=\"M0,\"+b/2+\"L\"+_+\",\"+b/2,E=o*a,L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\"+\":_=a,b=a,L=\"path\",k=\"M\"+_/2+\",0L\"+_/2+\",\"+b+\"M0,\"+b/2+\"L\"+_+\",\"+b/2,E=a-a*Math.sqrt(1-o),L=\"path\",x={d:k,opacity:P,stroke:M,\"stroke-width\":E+\"px\"};break;case\".\":_=a,b=a,o<Math.PI/4?T=Math.sqrt(o*a*a/Math.PI):T=p(o,Math.PI/4,1,a/2,a/Math.sqrt(2)),L=\"circle\",x={cx:_/2,cy:b/2,r:T,opacity:P,fill:M};break;default:_=a,b=a,L=\"path\",x={d:i,opacity:P,fill:M};break}var A=[i||\"noSh\",u||\"noBg\",c||\"noFg\",a,o].join(\";\"),z=d._defs.select(\".patterns\").selectAll(\"#\"+v).data([A],Du.identity);z.exit().remove(),z.enter().append(\"pattern\").each(function(){var O=dd.select(this);if(O.attr({id:v,width:_+\"px\",height:b+\"px\",patternUnits:\"userSpaceOnUse\",patternTransform:h?\"scale(0.8)\":\"\"}),u){var U=Zq(u),G=Yd.tinyRGB(U),Z=U.getAlpha(),j=O.selectAll(\"rect\").data([0]);j.exit().remove(),j.enter().append(\"rect\").attr({width:_+\"px\",height:b+\"px\",fill:G,\"fill-opacity\":Z})}var N=O.selectAll(L).data([0]);N.exit().remove(),N.enter().append(L).attr(x)}),e.style(\"fill\",Yq(v,r)).style(\"fill-opacity\",null),e.classed(\"pattern_filled\",!0)};Ta.initGradients=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,\"g\",\"gradients\");r.selectAll(\"linearGradient,radialGradient\").remove(),dd.select(e).selectAll(\".gradient_filled\").classed(\"gradient_filled\",!1)};Ta.initPatterns=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,\"g\",\"patterns\");r.selectAll(\"pattern\").remove(),dd.select(e).selectAll(\".pattern_filled\").classed(\"pattern_filled\",!1)};Ta.getPatternAttr=function(e,t,r){return e&&Du.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e};Ta.pointStyle=function(e,t,r,n){if(e.size()){var i=Ta.makePointStyleFns(t);e.each(function(a){Ta.singlePointStyle(a,dd.select(this),t,i,r,n)})}};Ta.singlePointStyle=function(e,t,r,n,i,a){var o=r.marker,s=o.line;if(a&&a.i>=0&&e.i===void 0&&(e.i=a.i),t.style(\"opacity\",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms===\"various\"||o.size===\"various\"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=Jq(e,r),f=Kq(e,r);t.attr(\"d\",Uoe(u,l,c,f))}var h=!1,d,v,_;if(e.so)_=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;_=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,\"mlc\"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Yd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Yd.defaultLine,h=!0),\"mc\"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||\"rgba(0,0,0,0)\",n.selectedColorFn&&(d=n.selectedColorFn(e))}let p=e.mld||(s||{}).dash;if(p&&Ta.dashLine(t,p,_),e.om)t.call(Yd.stroke,d).style({\"stroke-width\":(_||1)+\"px\",fill:\"none\"});else{t.style(\"stroke-width\",(e.isBlank?0:_)+\"px\");var k=o.gradient,E=e.mgt;E?h=!0:E=k&&k.type,Du.isArrayOrTypedArray(E)&&(E=E[0],Voe[E]||(E=0));var T=o.pattern,L=Ta.getPatternAttr,x=T&&(L(T.shape,e.i,\"\")||L(T.path,e.i,\"\"));if(E&&E!==\"none\"){var C=e.mgc;C?h=!0:C=k.color;var M=r.uid;h&&(M+=\"-\"+e.i),Ta.gradient(t,i,M,E,[[0,C],[1,d]],\"fill\")}else if(x){var g=!1,P=T.fgcolor;!P&&a&&a.color&&(P=a.color,g=!0);var A=L(P,e.i,a&&a.color||null),z=L(T.bgcolor,e.i,null),O=T.fgopacity,U=L(T.size,e.i,8),G=L(T.solidity,e.i,.3);g=g||e.mcc||Du.isArrayOrTypedArray(T.shape)||Du.isArrayOrTypedArray(T.path)||Du.isArrayOrTypedArray(T.bgcolor)||Du.isArrayOrTypedArray(T.fgcolor)||Du.isArrayOrTypedArray(T.size)||Du.isArrayOrTypedArray(T.solidity);var Z=r.uid;g&&(Z+=\"-\"+e.i),Ta.pattern(t,\"point\",i,Z,x,U,G,e.mcc,T.fillmode,z,A,O)}else Du.isArrayOrTypedArray(d)?Yd.fill(t,d[e.i]):Yd.fill(t,d);_&&Yd.stroke(t,v)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,\"\"),t.lineScale=Ta.tryColorscale(r,\"line\"),pL.traceIs(e,\"symbols\")&&(t.ms2mrc=Jot.isBubble(e)?$ot(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(T){var L=T.mo===void 0?i.opacity:T.mo;return T.selected?c?l:L:f?u:Boe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(T){var L=T.mcc||h;return T.selected?d||L:v||L});var _=i.size,b=a.size,p=o.size,k=b!==void 0,E=p!==void 0;return pL.traceIs(e,\"symbols\")&&(k||E)&&(t.selectedSizeFn=function(T){var L=T.mrc||_/2;return T.selected?k?b/2:L:E?p/2:L}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Yd.addOpacity(f,Boe))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style(\"opacity\",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Yd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr(\"d\",Uoe(Ta.symbolNumber(s),l,Jq(o,t),Kq(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s<i.length;s++)i[s](o,a)})}};Ta.tryColorscale=function(e,t){var r=t?Du.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&Du.isArrayOrTypedArray(n))return Xot.makeColorScaleFuncFromTrace(r)}return Du.identity};var Hq={start:1,end:-1,middle:0,bottom:1,top:-1};function Hoe(e,t,r,n,i){var a=dd.select(e.node().parentNode),o=t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\",s=t.indexOf(\"left\")!==-1?\"end\":t.indexOf(\"right\")!==-1?\"start\":\"middle\",l=n?n/.8+1:0,u=(gL.lineCount(e)-1)*Kot+1,c=Hq[s]*l,f=r*.75+Hq[o]*l+(Hq[o]-1)*u*r/2;e.attr(\"text-anchor\",s),i||a.attr(\"transform\",oM(c,f))}function joe(e,t){var r=e.ts||t.textfont.size;return Db(r)&&r>0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Ta.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,\"txt\",\"texttemplate\"):Du.extractOption(s,t,\"tx\",\"text\");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};Qot(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=joe(s,t),_=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:_}).text(u).call(gL.convertToTspans,r).call(Hoe,d,v,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=joe(n,t);Yd.fill(i,a);var l=pL.traceIs(t,\"bar-like\");Hoe(i,o,s,n.mrc2||n.mrc,l)})}};var Ioe=.5;Ta.smoothopen=function(e,t){if(e.length<3)return\"M\"+e.join(\"L\");var r=\"M\"+e[0],n=[],i;for(i=1;i<e.length-1;i++)n.push(vL(e[i-1],e[i],e[i+1],t));for(r+=\"Q\"+n[0][0]+\" \"+e[1],i=2;i<e.length-1;i++)r+=\"C\"+n[i-2][1]+\" \"+n[i-1][0]+\" \"+e[i];return r+=\"Q\"+n[e.length-3][1]+\" \"+e[e.length-1],r};Ta.smoothclosed=function(e,t){if(e.length<3)return\"M\"+e.join(\"L\")+\"Z\";var r=\"M\"+e[0],n=e.length-1,i=[vL(e[n],e[0],e[1],t)],a;for(a=1;a<n;a++)i.push(vL(e[a-1],e[a],e[a+1],t));for(i.push(vL(e[n-1],e[n],e[0],t)),a=1;a<=n;a++)r+=\"C\"+i[a-1][1]+\" \"+i[a][0]+\" \"+e[a];return r+=\"C\"+i[n][1]+\" \"+i[0][0]+\" \"+e[0]+\"Z\",r};var Woe,Xoe;function q3(e,t,r){return r&&(e=Zoe(e)),t?Rb(e[1]):Ib(e[0])}function Ib(e){var t=dd.round(e,2);return Woe=t,t}function Rb(e){var t=dd.round(e,2);return Xoe=t,t}function vL(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,Ioe/2),u=Math.pow(o*o+s*s,Ioe/2),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),d=3*l*(l+u);return[[Ib(t[0]+(h&&c/h)),Rb(t[1]+(h&&f/h))],[Ib(t[0]-(d&&c/d)),Rb(t[1]-(d&&f/d))]]}var ast={hv:function(e,t,r){return\"H\"+Ib(t[0])+\"V\"+q3(t,1,r)},vh:function(e,t,r){return\"V\"+Rb(t[1])+\"H\"+q3(t,0,r)},hvh:function(e,t,r){return\"H\"+Ib((e[0]+t[0])/2)+\"V\"+Rb(t[1])+\"H\"+q3(t,0,r)},vhv:function(e,t,r){return\"V\"+Rb((e[1]+t[1])/2)+\"H\"+Ib(t[0])+\"V\"+q3(t,1,r)}},ost=function(e,t,r){return\"L\"+q3(t,0,r)+\",\"+q3(t,1,r)};Ta.steps=function(e){var t=ast[e]||ost;return function(r){for(var n=\"M\"+Ib(r[0][0])+\",\"+Rb(r[0][1]),i=r.length,a=1;a<i;a++)n+=t(r[a-1],r[a],a===i-1);return n}};function Zoe(e,t){var r=e.backoff,n=e.trace,i=e.d,a=e.i;if(r&&n&&n.marker&&n.marker.angle%360===0&&n.line&&n.line.shape!==\"spline\"){var o=Du.isArrayOrTypedArray(r),s=e,l=t?t[0]:Woe||0,u=t?t[1]:Xoe||0,c=s[0],f=s[1],h=c-l,d=f-u,v=Math.atan2(d,h),_=o?r[a]:r;if(_===\"auto\"){var b=s.i;n.type===\"scatter\"&&b--;var p=s.marker,k=p.symbol;Du.isArrayOrTypedArray(k)&&(k=k[b]);var E=p.size;Du.isArrayOrTypedArray(E)&&(E=E[b]),_=p?Ta.symbolBackOffs[Ta.symbolNumber(k)]*E:0,_+=Ta.getMarkerStandoff(i[b],n)||0}var T=c-_*Math.cos(v),L=f-_*Math.sin(v);(T<=c&&T>=l||T>=c&&T<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[T,L])}return e}Ta.applyBackoff=Zoe;Ta.makeTester=function(){var e=Du.ensureSingleById(dd.select(\"body\"),\"svg\",\"js-plotly-tester\",function(r){r.attr(Zot.svgAttrs).style({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",width:\"9000px\",height:\"9000px\",\"z-index\":\"1\"})}),t=Du.ensureSingle(e,\"path\",\"js-reference-point\",function(r){r.attr(\"d\",\"M0,0H1V1H0Z\").style({\"stroke-width\":0,fill:\"black\"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var jq=0,sst=1e4;Ta.bBox=function(e,t,r){r||(r=Roe(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Roe(i),r){var a=+i.getAttribute(\"x\")||0,o=+i.getAttribute(\"y\")||0,s=i.getAttribute(\"transform\");if(!s){var l=Ta.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+=\"~\"+a+\"~\"+o+\"~\"+s,n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr(\"transform\",null).call(gL.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return jq>=sst&&(Ta.savedBBoxes={},jq=0),r&&(Ta.savedBBoxes[r]=d),jq++,Du.extendFlat({},d)};function Roe(e){var t=e.getAttribute(\"data-unformatted\");if(t!==null)return t+e.getAttribute(\"data-math\")+e.getAttribute(\"text-anchor\")+e.getAttribute(\"style\")}Ta.setClipUrl=function(e,t,r){e.attr(\"clip-path\",Yq(t,r))};function Yq(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?\"\":r._baseUrl||\"\";return n?\"url('\"+n+\"#\"+e+\"')\":\"url(#\"+e+\")\"}Ta.getTranslate=function(e){var t=/.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/,r=e.attr?\"attr\":\"getAttribute\",n=e[r](\"transform\")||\"\",i=n.replace(t,function(a,o,s){return[o,s].join(\" \")}).split(\" \");return{x:+i[0]||0,y:+i[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\\btranslate\\(.*?\\);?)/,i=e.attr?\"attr\":\"getAttribute\",a=e.attr?\"attr\":\"setAttribute\",o=e[i](\"transform\")||\"\";return t=t||0,r=r||0,o=o.replace(n,\"\").trim(),o+=oM(t,r),o=o.trim(),e[a](\"transform\",o),o};Ta.getScale=function(e){var t=/.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/,r=e.attr?\"attr\":\"getAttribute\",n=e[r](\"transform\")||\"\",i=n.replace(t,function(a,o,s){return[o,s].join(\" \")}).split(\" \");return{x:+i[0]||1,y:+i[1]||1}};Ta.setScale=function(e,t,r){var n=/(\\bscale\\(.*?\\);?)/,i=e.attr?\"attr\":\"getAttribute\",a=e.attr?\"attr\":\"setAttribute\",o=e[i](\"transform\")||\"\";return t=t||1,r=r||1,o=o.replace(n,\"\").trim(),o+=\"scale(\"+t+\",\"+r+\")\",o=o.trim(),e[a](\"transform\",o),o};var lst=/\\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?\"\":\"scale(\"+t+\",\"+r+\")\";e.each(function(){var i=(this.getAttribute(\"transform\")||\"\").replace(lst,\"\");i+=n,i=i.trim(),this.setAttribute(\"transform\",i)})}};var ust=/translate\\([^)]*\\)\\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select(\"text\");if(a.node()){var o=parseFloat(a.attr(\"x\")||0),s=parseFloat(a.attr(\"y\")||0),l=(i.attr(\"transform\")||\"\").match(ust);t===1&&r===1?n=[]:n=[oM(o,s),\"scale(\"+t+\",\"+r+\")\",oM(-o,-s)],l&&n.push(l),i.attr(\"transform\",n.join(\"\"))}})};function Kq(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=Kq;var aM=Math.atan2,Pb=Math.cos,B3=Math.sin;function Doe(e,t){var r=t[0],n=t[1];return[r*Pb(e)-n*B3(e),r*B3(e)+n*Pb(e)]}var Foe,zoe,Ooe,qoe,Wq,Xq;function Jq(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a===\"previous\"||a===\"north\"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=aM(h[1]-i,h[0]-n),v=aM(f[1]-i,f[0]-n),_;if(a===\"north\")_=r/180*Math.PI;else if(a===\"previous\"){var b=u/180*Math.PI,p=c/180*Math.PI,k=Foe/180*Math.PI,E=zoe/180*Math.PI,T=k-b,L=Pb(E)*B3(T),x=B3(E)*Pb(p)-Pb(E)*B3(p)*Pb(T);_=-aM(L,x)-Math.PI,Foe=u,zoe=c}var C=Doe(d,[Pb(_),0]),M=Doe(v,[B3(_),0]);r=aM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a===\"previous\"&&!(Xq===t.uid&&e.i===Wq+1)&&(r=null)}if(a===\"previous\"&&!t._geo)if(Xq===t.uid&&e.i===Wq+1&&Db(n)&&Db(i)){var g=n-Ooe,P=i-qoe,A=t.line&&t.line.shape||\"\",z=A.slice(A.length-1);z===\"h\"&&(P=0),z===\"v\"&&(g=0),r+=aM(P,g)/Math.PI*180+90}else r=null}return Ooe=n,qoe=i,Wq=e.i,Xq=t.uid,r}Ta.getMarkerAngle=Jq});var zb=ye(($nr,Qoe)=>{\"use strict\";var N3=Oa(),cst=Eo(),fst=Mc(),$q=qa(),Fb=Dr(),Koe=Fb.strTranslate,mL=So(),yL=ka(),U3=Zl(),Joe=X1(),hst=Dh().OPPOSITE_SIDE,$oe=/ [XY][0-9]* /,Qq=1.6,eB=1.6;function dst(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:\"\").trim(),_=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,E=b.color,T=b.weight,L=b.style,x=b.variant,C=b.textcase,M=b.lineposition,g=b.shadow,P=r.subtitlePropName,A=!!P,z=r.subtitlePlaceholder,O=(i.title||{}).subtitle||{text:\"\",font:{}},U=(O.text||\"\").trim(),G=!1,Z=1,j=O.font,N=j.family,H=j.size,re=j.color,oe=j.weight,_e=j.style,Ce=j.variant,Le=j.textcase,ge=j.lineposition,ie=j.shadow,Se;a===\"title.text\"?Se=\"titleText\":a.indexOf(\"axis\")!==-1?Se=\"axisTitleText\":a.indexOf(\"colorbar\")!==-1&&(Se=\"colorbarTitleText\");var Ee=e._context.edits[Se];function Ae(Nt,$t){return Nt===void 0||$t===void 0?!1:Nt.replace($oe,\" % \")===$t.replace($oe,\" % \")}v===\"\"?h=0:Ae(v,o)&&(Ee||(v=\"\"),h=.2,_=!0),A&&(U===\"\"?Z=0:Ae(U,z)&&(Ee||(U=\"\"),Z=.2,G=!0)),r._meta?v=Fb.templateString(v,r._meta):n._meta&&(v=Fb.templateString(v,n._meta));var Be=v||U||Ee,Pe;f||(f=Fb.ensureSingle(n._infolayer,\"g\",\"g-\"+t),Pe=n._hColorbarMoveTitle);var me=f.selectAll(\"text.\"+t).data(Be?[0]:[]);me.enter().append(\"text\"),me.text(v).attr(\"class\",t),me.exit().remove();var De=null,ce=t+\"-subtitle\",je=U||Ee;if(A&&(De=f.selectAll(\"text.\"+ce).data(je?[0]:[]),De.enter().append(\"text\"),De.text(U).attr(\"class\",ce),De.exit().remove()),!Be)return f;function lt(Nt,$t){Fb.syncOrAsync([pt,Vt],{title:Nt,subtitle:$t})}function pt(Nt){var $t=Nt.title,sr=Nt.subtitle,Tr;!c&&Pe&&(c={}),c?(Tr=\"\",c.rotate&&(Tr+=\"rotate(\"+[c.rotate,u.x,u.y]+\")\"),(c.offset||Pe)&&(Tr+=Koe(0,(c.offset||0)-(Pe||0)))):Tr=null,$t.attr(\"transform\",Tr);function fr(It){if(It){var mt=N3.select(It.node().parentNode).select(\".\"+ce);if(!mt.empty()){var er=It.node().getBBox();if(er.height){var lr=er.y+er.height+Qq*H;mt.attr(\"y\",lr)}}}}if($t.style(\"opacity\",h*yL.opacity(E)).call(mL.font,{color:yL.rgb(E),size:N3.round(k,2),family:p,weight:T,style:L,variant:x,textcase:C,shadow:g,lineposition:M}).attr(u).call(U3.convertToTspans,e,fr),sr&&!sr.empty()){var $e=f.select(\".\"+t+\"-math-group\"),St=$t.node().getBBox(),Qt=$e.node()?$e.node().getBBox():void 0,Gt=Qt?Qt.y+Qt.height+Qq*H:St.y+St.height+eB*H,_t=Fb.extendFlat({},u,{y:Gt});sr.attr(\"transform\",Tr),sr.style(\"opacity\",Z*yL.opacity(re)).call(mL.font,{color:yL.rgb(re),size:N3.round(H,2),family:N,weight:oe,style:_e,variant:Ce,textcase:Le,shadow:ie,lineposition:ge}).attr(_t).call(U3.convertToTspans,e)}return fst.previousPromises(e)}function Vt(Nt){var $t=Nt.title,sr=N3.select($t.node().parentNode);if(l&&l.selection&&l.side&&v){sr.attr(\"transform\",null);var Tr=hst[l.side],fr=l.side===\"left\"||l.side===\"top\"?-1:1,$e=cst(l.pad)?l.pad:2,St=mL.bBox(sr.node()),Qt={t:0,b:0,l:0,r:0},Gt=e._fullLayout._reservedMargin;for(var _t in Gt)for(var It in Gt[_t]){var mt=Gt[_t][It];Qt[It]=Math.max(Qt[It],mt)}var er={left:Qt.l,top:Qt.t,right:n.width-Qt.r,bottom:n.height-Qt.b},lr=l.maxShift||fr*(er[l.side]-St[l.side]),wr=0;if(lr<0)wr=lr;else{var Lr=l.offsetLeft||0,ti=l.offsetTop||0;St.left-=Lr,St.right-=Lr,St.top-=ti,St.bottom-=ti,l.selection.each(function(){var Vr=mL.bBox(this);Fb.bBoxIntersect(St,Vr,$e)&&(wr=Math.max(wr,fr*(Vr[l.side]-St[Tr])+$e))}),wr=Math.min(lr,wr),i._titleScoot=Math.abs(wr)}if(wr>0||lr<0){var Br={left:[-wr,0],right:[wr,0],top:[0,-wr],bottom:[0,wr]}[l.side];sr.attr(\"transform\",Koe(Br[0],Br[1]))}}}me.call(lt,De);function ot(Nt,$t){Nt.text($t).on(\"mouseover.opacity\",function(){N3.select(this).transition().duration(Joe.SHOW_PLACEHOLDER).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){N3.select(this).transition().duration(Joe.HIDE_PLACEHOLDER).style(\"opacity\",0)})}if(Ee&&(v?me.on(\".opacity\",null):(ot(me,o),_=!0),me.call(U3.makeEditable,{gd:e}).on(\"edit\",function(Nt){s!==void 0?$q.call(\"_guiRestyle\",e,a,Nt,s):$q.call(\"_guiRelayout\",e,a,Nt)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(lt)}).on(\"input\",function(Nt){this.text(Nt||\" \").call(U3.positionText,u.x,u.y)}),A)){if(A&&!v){var ut=me.node().getBBox(),Wt=ut.y+ut.height+eB*H;De.attr(\"y\",Wt)}U?De.on(\".opacity\",null):(ot(De,z),G=!0),De.call(U3.makeEditable,{gd:e}).on(\"edit\",function(Nt){$q.call(\"_guiRelayout\",e,\"title.subtitle.text\",Nt)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(lt)}).on(\"input\",function(Nt){this.text(Nt||\" \").call(U3.positionText,De.attr(\"x\"),De.attr(\"y\"))})}return me.classed(\"js-placeholder\",_),De&&!De.empty()&&De.classed(\"js-placeholder\",G),f}Qoe.exports={draw:dst,SUBTITLE_PADDING_EM:eB,SUBTITLE_PADDING_MATHJAX_EM:Qq}});var xm=ye((Qnr,nse)=>{\"use strict\";var vst=Oa(),pst=f3().utcFormat,yc=Dr(),gst=yc.numberFormat,ym=Eo(),f_=yc.cleanNumber,mst=yc.ms2DateTime,ese=yc.dateTime2ms,_m=yc.ensureNumber,tse=yc.isArrayOrTypedArray,h_=fs(),_L=h_.FP_SAFE,Sg=h_.BADNUM,yst=h_.LOG_CLIP,_st=h_.ONEWEEK,xL=h_.ONEDAY,bL=h_.ONEHOUR,rse=h_.ONEMIN,ise=h_.ONESEC,wL=hf(),SL=Rh(),TL=SL.HOUR_PATTERN,AL=SL.WEEKDAY_PATTERN;function sM(e){return Math.pow(10,e)}function tB(e){return e!=null}nse.exports=function(t,r){r=r||{};var n=t._id||\"x\",i=n.charAt(0);function a(T,L){if(T>0)return Math.log(T)/Math.LN10;if(T<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*yst*Math.abs(x-C))}else return Sg}function o(T,L,x,C){if((C||{}).msUTC&&ym(T))return+T;var M=ese(T,x||t.calendar);if(M===Sg)if(ym(T)){T=+T;var g=Math.floor(yc.mod(T+.05,1)*10),P=Math.round(T-g/10);M=ese(new Date(P))+g/10}else return Sg;return M}function s(T,L,x){return mst(T,L,x||t.calendar)}function l(T){return t._categories[Math.round(T)]}function u(T){if(tB(T)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[T]!==void 0)return t._categoriesMap[T];t._categories.push(typeof T==\"number\"?String(T):T);var L=t._categories.length-1;return t._categoriesMap[T]=L,L}return Sg}function c(T,L){for(var x=new Array(L),C=0;C<L;C++){var M=(T[0]||[])[C],g=(T[1]||[])[C];x[C]=f([M,g])}return x}function f(T){if(t._categoriesMap)return t._categoriesMap[T]}function h(T){var L=f(T);if(L!==void 0)return L;if(ym(T))return+T}function d(T){return ym(T)?+T:f(T)}function v(T,L,x){return vst.round(x+L*T,2)}function _(T,L,x){return(T-x)/L}var b=function(L){return ym(L)?v(L,t._m,t._b):Sg},p=function(T){return _(T,t._m,t._b)};if(t.rangebreaks){var k=i===\"y\";b=function(T){if(!ym(T))return Sg;var L=t._rangebreaks.length;if(!L)return v(T,t._m,t._b);var x=k;t.range[0]>t.range[1]&&(x=!x);for(var C=x?-1:1,M=C*T,g=0,P=0;P<L;P++){var A=C*t._rangebreaks[P].min,z=C*t._rangebreaks[P].max;if(M<A)break;if(M>z)g=P+1;else{g=M<(A+z)/2?P:P+1;break}}var O=t._B[g]||0;return isFinite(O)?v(T,t._m2,O):0},p=function(T){var L=t._rangebreaks.length;if(!L)return _(T,t._m,t._b);for(var x=0,C=0;C<L&&!(T<t._rangebreaks[C].pmin);C++)T>t._rangebreaks[C].pmax&&(x=C+1);return _(T,t._m2,t._B[x])}}t.c2l=t.type===\"log\"?a:_m,t.l2c=t.type===\"log\"?sM:_m,t.l2p=b,t.p2l=p,t.c2p=t.type===\"log\"?function(T,L){return b(a(T,L))}:b,t.p2c=t.type===\"log\"?function(T){return sM(p(T))}:p,[\"linear\",\"-\"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=f_,t.c2d=t.c2r=t.l2d=t.l2r=_m,t.d2p=t.r2p=function(T){return t.l2p(f_(T))},t.p2d=t.p2r=p,t.cleanPos=_m):t.type===\"log\"?(t.d2r=t.d2l=function(T,L){return a(f_(T),L)},t.r2d=t.r2c=function(T){return sM(f_(T))},t.d2c=t.r2l=f_,t.c2d=t.l2r=_m,t.c2r=a,t.l2d=sM,t.d2p=function(T,L){return t.l2p(t.d2r(T,L))},t.p2d=function(T){return sM(p(T))},t.r2p=function(T){return t.l2p(f_(T))},t.p2r=p,t.cleanPos=_m):t.type===\"date\"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(T,L,x){return t.l2p(o(T,0,x))},t.p2d=t.p2r=function(T,L,x){return s(p(T),L,x)},t.cleanPos=function(T){return yc.cleanDate(T,Sg,t.calendar)}):t.type===\"category\"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=d(T);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=_m,t.r2l=d,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return typeof T==\"string\"&&T!==\"\"?T:_m(T)}):t.type===\"multicategory\"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=h(T);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=_m,t.r2l=h,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return Array.isArray(T)||typeof T==\"string\"&&T!==\"\"?T:_m(T)},t.setupMultiCategory=function(T){var L=t._traceIndices,x,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var g in M)if(g!==n){var P=r[wL.id2name(g)];L=L.concat(P._traceIndices)}}var A=[[0,{}],[0,{}]],z=[];for(x=0;x<L.length;x++){var O=T[L[x]];if(i in O){var U=O[i],G=O._length||yc.minRowLength(U);if(tse(U[0])&&tse(U[1]))for(C=0;C<G;C++){var Z=U[0][C],j=U[1][C];tB(Z)&&tB(j)&&(z.push([Z,j]),Z in A[0][1]||(A[0][1][Z]=A[0][0]++),j in A[1][1]||(A[1][1][j]=A[1][0]++))}}}for(z.sort(function(N,H){var re=A[0][1],oe=re[N[0]]-re[H[0]];if(oe)return oe;var _e=A[1][1];return _e[N[1]]-_e[H[1]]}),x=0;x<z.length;x++)u(z[x])}),t.fraction2r=function(T){var L=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return t.l2r(L+T*(x-L))},t.r2fraction=function(T){var L=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return(t.r2l(T)-L)/(x-L)},t.limitRange=function(T){var L=t.minallowed,x=t.maxallowed;if(!(L===void 0&&x===void 0)){T||(T=\"range\");var C=yc.nestedProperty(t,T).get(),M=yc.simpleMap(C,t.r2l),g=M[1]<M[0];g&&M.reverse();var P=yc.simpleMap([L,x],t.r2l);if(L!==void 0&&M[0]<P[0]&&(C[g?1:0]=L),x!==void 0&&M[1]>P[1]&&(C[g?0:1]=x),C[0]===C[1]){var A=t.l2r(L),z=t.l2r(x);if(L!==void 0){var O=A+1;x!==void 0&&(O=Math.min(O,z)),C[g?1:0]=O}if(x!==void 0){var U=z+1;L!==void 0&&(U=Math.max(U,A)),C[g?0:1]=U}}}},t.cleanRange=function(T,L){t._cleanRange(T,L),t.limitRange(T)},t._cleanRange=function(T,L){L||(L={}),T||(T=\"range\");var x=yc.nestedProperty(t,T).get(),C,M;if(t.type===\"date\"?M=yc.dfltRange(t.calendar):i===\"y\"?M=SL.DFLTRANGEY:t._name===\"realaxis\"?M=[0,1]:M=L.dfltRange||SL.DFLTRANGEX,M=M.slice(),(t.rangemode===\"tozero\"||t.rangemode===\"nonnegative\")&&(M[0]=0),!x||x.length!==2){yc.nestedProperty(t,T).set(M);return}var g=x[0]===null,P=x[1]===null;for(t.type===\"date\"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Sg,t.calendar),x[1]=yc.cleanDate(x[1],Sg,t.calendar)),C=0;C<2;C++)if(t.type===\"date\"){if(!yc.isDateTime(x[C],t.calendar)){t[T]=M;break}if(t.r2l(x[0])===t.r2l(x[1])){var A=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(A-1e3),x[1]=t.l2r(A+1e3);break}}else{if(!ym(x[C]))if(!(g||P)&&ym(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[T]=M;break}if(x[C]<-_L?x[C]=-_L:x[C]>_L&&(x[C]=_L),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(T){var L=r._size;if(t.overlaying){var x=wL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=T&&t._r?\"_r\":\"range\",M=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],M),P=t.r2l(t[C][1],M),A=i===\"y\";if(A?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,O;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],t._lBreaks+=Math.abs(O.max-O.min);var U=A;g>P&&(U=!U),U&&t._rangebreaks.reverse();var G=U?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(A?P:g)),z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],t._B.push(t._B[t._B.length-1]-G*t._m2*(O.max-O.min));for(z=0;z<t._rangebreaks.length;z++)O=t._rangebreaks[z],O.pmin=b(O.min),O.pmax=b(O.max)}}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw r._replotting=!1,new Error(\"Something went wrong with axis scaling\")},t.maskBreaks=function(T){var L=t.rangebreaks||[],x,C,M,g,P;L._cachedPatterns||(L._cachedPatterns=L.map(function(re){return re.enabled&&re.bounds?yc.simpleMap(re.bounds,re.pattern?f_:t.d2c):null})),L._cachedValues||(L._cachedValues=L.map(function(re){return re.enabled&&re.values?yc.simpleMap(re.values,t.d2c).sort(yc.sorterAsc):null}));for(var A=0;A<L.length;A++){var z=L[A];if(z.enabled){if(z.bounds){var O=z.pattern;switch(x=L._cachedPatterns[A],C=x[0],M=x[1],O){case AL:P=new Date(T),g=P.getUTCDay(),C>M&&(M+=7,g<C&&(g+=7));break;case TL:P=new Date(T);var U=P.getUTCHours(),G=P.getUTCMinutes(),Z=P.getUTCSeconds(),j=P.getUTCMilliseconds();g=U+(G/60+Z/3600+j/36e5),C>M&&(M+=24,g<C&&(g+=24));break;case\"\":g=T;break}if(g>=C&&g<M)return Sg}else for(var N=L._cachedValues[A],H=0;H<N.length;H++)if(C=N[H],M=C+z.dvalue,T>=C&&T<M)return Sg}}return T},t.locateBreaks=function(T,L){var x,C,M,g,P=[];if(!t.rangebreaks)return P;var A=t.rangebreaks.slice().sort(function(_e,Ce){return _e.pattern===AL&&Ce.pattern===TL?-1:Ce.pattern===AL&&_e.pattern===TL?1:0}),z=function(_e,Ce){if(_e=yc.constrain(_e,T,L),Ce=yc.constrain(Ce,T,L),_e!==Ce){for(var Le=!0,ge=0;ge<P.length;ge++){var ie=P[ge];_e<ie.max&&Ce>=ie.min&&(_e<ie.min&&(ie.min=_e),Ce>ie.max&&(ie.max=Ce),Le=!1)}Le&&P.push({min:_e,max:Ce})}};for(x=0;x<A.length;x++){var O=A[x];if(O.enabled)if(O.bounds){var U=T,G=L;O.pattern&&(U=Math.floor(U)),C=yc.simpleMap(O.bounds,O.pattern?f_:t.r2l),M=C[0],g=C[1];var Z=new Date(U),j,N;switch(O.pattern){case AL:N=_st,j=((g<M?7:0)+(g-M))*xL,U+=M*xL-(Z.getUTCDay()*xL+Z.getUTCHours()*bL+Z.getUTCMinutes()*rse+Z.getUTCSeconds()*ise+Z.getUTCMilliseconds());break;case TL:N=xL,j=((g<M?24:0)+(g-M))*bL,U+=M*bL-(Z.getUTCHours()*bL+Z.getUTCMinutes()*rse+Z.getUTCSeconds()*ise+Z.getUTCMilliseconds());break;default:U=Math.min(C[0],C[1]),G=Math.max(C[0],C[1]),N=G-U,j=N}for(var H=U;H<G;H+=N)z(H,H+j)}else for(var re=yc.simpleMap(O.values,t.d2c),oe=0;oe<re.length;oe++)M=re[oe],g=M+O.dvalue,z(M,g)}return P.sort(function(_e,Ce){return _e.min-Ce.min}),P},t.makeCalcdata=function(T,L,x){var C,M,g,P,A=t.type,z=A===\"date\"&&T[L+\"calendar\"];if(L in T){if(C=T[L],P=T._length||yc.minRowLength(C),yc.isTypedArray(C)&&(A===\"linear\"||A===\"log\")){if(P===C.length)return C;if(C.subarray)return C.subarray(0,P)}if(A===\"multicategory\")return c(C,P);for(M=new Array(P),g=0;g<P;g++)M[g]=t.d2c(C[g],0,z,x)}else{var O=L+\"0\"in T?t.d2c(T[L+\"0\"],0,z):0,U=T[\"d\"+L]?Number(T[\"d\"+L]):1;for(C=T[{x:\"y\",y:\"x\"}[L]],P=T._length||C.length,M=new Array(P),g=0;g<P;g++)M[g]=O+g*U}if(t.rangebreaks)for(g=0;g<P;g++)M[g]=t.maskBreaks(M[g]);return M},t.isValidRange=function(T,L){return Array.isArray(T)&&T.length===2&&(L&&T[0]===null||ym(t.r2l(T[0])))&&(L&&T[1]===null||ym(t.r2l(T[1])))},t.getAutorangeDflt=function(T,L){var x=!t.isValidRange(T,\"nullOk\");return x&&L&&L.reverseDflt?x=\"reversed\":T&&(T[0]===null&&T[1]===null?x=!0:T[0]===null&&T[1]!==null?x=\"min\":T[0]!==null&&T[1]===null&&(x=\"max\")),x},t.isReversed=function(){var T=t.autorange;return T===\"reversed\"||T===\"min reversed\"||T===\"max reversed\"},t.isPtWithinRange=function(T,L){var x=t.c2l(T[i],null,L),C=t.r2l(t.range[0]),M=t.r2l(t.range[1]);return C<M?C<=x&&x<=M:M<=x&&x<=C},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var T=t._matchGroup;if(T){var L=null,x=null;for(var C in T){var M=r[wL.id2name(C)];if(M._categories){L=M._categories,x=M._categoriesMap;break}}L&&x?(t._categories=L,t._categoriesMap=x):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var g=0;g<t._initialCategories.length;g++)u(t._initialCategories[g])},t.sortByInitialCategories=function(){var T=[];if(t._emptyCategories(),t._initialCategories)for(var L=0;L<t._initialCategories.length;L++)u(t._initialCategories[L]);T=T.concat(t._traceIndices);var x=t._matchGroup;for(var C in x)if(n!==C){var M=r[wL.id2name(C)];M._categories=t._categories,M._categoriesMap=t._categoriesMap,T=T.concat(M._traceIndices)}return T};var E=r._d3locale;t.type===\"date\"&&(t._dateFormat=E?E.timeFormat:pst,t._extraFormat=r._extraFormat),t._separators=r.separators,t._numFormat=E?E.numberFormat:gst,delete t._minDtick,delete t._forceTick0}});var V3=ye((ear,lse)=>{\"use strict\";var ase=Eo(),rB=Dr(),xst=fs().BADNUM,ML=rB.isArrayOrTypedArray,bst=rB.isDateTime,wst=rB.cleanNumber,ose=Math.round;lse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(ML(i)&&!i.length)return\"-\";if(!a&&Est(i))return\"multicategory\";if(a&&Array.isArray(i[0])){for(var o=[],s=0;s<i.length;s++)if(ML(i[s]))for(var l=0;l<i[s].length;l++)o.push(i[s][l]);i=o}if(Sst(i,r))return\"date\";var u=n.autotypenumbers!==\"strict\";return Mst(i,u)?\"category\":Ast(i,u)?\"linear\":\"-\"};function Tst(e,t){return t?ase(e):typeof e==\"number\"}function Ast(e,t){for(var r=e.length,n=0;n<r;n++)if(Tst(e[n],t))return!0;return!1}function Sst(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=ose(s),u=e[l],c=String(u);o[c]||(o[c]=1,bst(u,t)&&i++,ase(u)&&a++)}return i>a*2}function sse(e){return Math.max(1,(e-1)/1e3)}function Mst(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=ose(s),u=e[l],c=String(u);if(!o[c]){o[c]=1;var f=typeof u;f===\"boolean\"?a++:(t?wst(u)!==xst:f===\"number\")?i++:f===\"string\"&&a++}}return a>i*2}function Est(e){return ML(e[0])&&ML(e[1])}});var Mg=ye((tar,gse)=>{\"use strict\";var kst=Oa(),hse=Eo(),d_=Dr(),EL=fs().FP_SAFE,Cst=qa(),Lst=So(),dse=hf(),Pst=dse.getFromId,Ist=dse.isLinked;gse.exports={applyAutorangeOptions:pse,getAutoRange:iB,makePadFn:nB,doAutoRange:Dst,findExtremes:Fst,concatExtremes:sB};function iB(e,t){var r,n,i=[],a=e._fullLayout,o=nB(a,t,0),s=nB(a,t,1),l=sB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return d_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r<u.length&&f===h;r++)f=Math.min(f,u[r].val);for(r=1;r<c.length&&f===h;r++)h=Math.max(h,c[r].val);var d=t.autorange,v=d===\"reversed\"||d===\"min reversed\"||d===\"max reversed\";if(!v&&t.range){var _=d_.simpleMap(t.range,t.r2l);v=_[1]<_[0]}t.autorange===\"reversed\"&&(t.autorange=!0);var b=t.rangemode,p=b===\"tozero\",k=b===\"nonnegative\",E=t._length,T=E/10,L=0,x,C,M,g,P,A;for(r=0;r<u.length;r++)for(x=u[r],n=0;n<c.length;n++)C=c[n],A=C.val-x.val-use(t,x.val,C.val),A>0&&(P=E-o(x)-s(C),P>T?A/P>L&&(M=x,g=C,L=A/P):A/E>L&&(M={val:x.val,nopad:1},g={val:C.val,nopad:1},L=A/E));function z(j,N){return Math.max(j,s(N))}if(f===h){var O=f-1,U=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/E));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,O),Math.max(1,U)]:i=[O,U]}else p?(M.val>=0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-M.val-use(t,x.val,C.val))/(E-o(M)-s(g)),i=[M.val-L*o(M),g.val+L*s(g)];return i=pse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),d_.simpleMap(i,t.l2r||Number)}function use(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function nB(e,t,r){var n=.05*t._length,i=t._anchorAxis||{};if((t.ticklabelposition||\"\").indexOf(\"inside\")!==-1||(i.ticklabelposition||\"\").indexOf(\"inside\")!==-1){var a=t.isReversed();if(!a){var o=d_.simpleMap(t.range,t.r2l);a=o[1]<o[0]}a&&(r=!r)}var s=0;return Ist(e,t._id)||(s=Rst(e,t,r)),n=Math.max(s,n),t.constrain===\"domain\"&&t._inputDomain&&(n*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(u){return u.nopad?0:u.pad+(u.extrapad?n:s)}}var cse=3;function Rst(e,t,r){var n=0,i=t._id.charAt(0)===\"x\";for(var a in e._plots){var o=e._plots[a];if(!(t._id!==o.xaxis._id&&t._id!==o.yaxis._id)){var s=(i?o.yaxis:o.xaxis)||{};if((s.ticklabelposition||\"\").indexOf(\"inside\")!==-1&&(!r&&(s.side===\"left\"||s.side===\"bottom\")||r&&(s.side===\"top\"||s.side===\"right\"))){if(s._vals){var l=d_.deg2rad(s._tickAngles[s._id+\"tick\"]||0),u=Math.abs(Math.cos(l)),c=Math.abs(Math.sin(l));if(!s._vals[0].bb){var f=s._id+\"tick\",h=s._selections[f];h.each(function(k){var E=kst.select(this),T=E.select(\".text-math-group\");T.empty()&&(k.bb=Lst.bBox(E.node()))})}for(var d=0;d<s._vals.length;d++){var v=s._vals[d],_=v.bb;if(_){var b=2*cse+_.width,p=2*cse+_.height;n=Math.max(n,i?Math.max(b*u,p*c):Math.max(p*u,b*c))}}}s.ticks===\"inside\"&&s.ticklabelposition===\"inside\"&&(n+=s.ticklen||0)}}}return n}function sB(e,t,r){var n=t._id,i=e._fullData,a=e._fullLayout,o=[],s=[],l,u,c;function f(b,p){for(l=0;l<p.length;l++){var k=b[p[l]],E=(k._extremes||{})[n];if(k.visible===!0&&E){for(u=0;u<E.min.length;u++)c=E.min[u],aB(o,c.val,c.pad,{extrapad:c.extrapad});for(u=0;u<E.max.length;u++)c=E.max[u],oB(s,c.val,c.pad,{extrapad:c.extrapad})}}}if(f(i,t._traceIndices),f(a.annotations||[],t._annIndices||[]),f(a.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r){for(var h in t._matchGroup)if(h!==t._id){var d=Pst(e,h),v=sB(e,d,!0),_=t._length/d._length;for(u=0;u<v.min.length;u++)c=v.min[u],aB(o,c.val,c.pad*_,{extrapad:c.extrapad});for(u=0;u<v.max.length;u++)c=v.max[u],oB(s,c.val,c.pad*_,{extrapad:c.extrapad})}}return{min:o,max:s}}function Dst(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():iB(e,t),t._r=t.range.slice(),t._rl=d_.simpleMap(t._r,t.r2l);var n=t._input,i={};i[t._attr+\".range\"]=t.range,i[t._attr+\".autorange\"]=t.autorange,Cst.call(\"_storeDirectGUIEdit\",e.layout,e._fullLayout._preGUI,i),n.range=t.range.slice(),n.autorange=t.autorange}var a=t._anchorAxis;if(a&&a.rangeslider){var o=a.rangeslider[t._name];o&&o.rangemode===\"auto\"&&(o.range=iB(e,t)),a._input.rangeslider[t._name]=d_.extendFlat({},o)}}function Fst(e,t,r){r||(r={}),e._m||e.setScale();var n=[],i=[],a=t.length,o=r.padded||!1,s=r.tozero&&(e.type===\"linear\"||e.type===\"-\"),l=e.type===\"log\",u=!1,c=r.vpadLinearized||!1,f,h,d,v,_,b,p,k,E;function T(z){if(Array.isArray(z))return u=!0,function(U){return Math.max(Number(z[U]||0),0)};var O=Math.max(Number(z||0),0);return function(){return O}}var L=T((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),x=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),M=T(r.vpadminus||r.vpad);if(!u){if(k=1/0,E=-1/0,l)for(f=0;f<a;f++)h=t[f],h<k&&h>0&&(k=h),h>E&&h<EL&&(E=h);else for(f=0;f<a;f++)h=t[f],h<k&&h>-EL&&(k=h),h>E&&h<EL&&(E=h);t=[k,E],a=2}var g={tozero:s,extrapad:o};function P(z){d=t[z],hse(d)&&(b=L(z),p=x(z),c?(v=e.c2l(d)-M(z),_=e.c2l(d)+C(z)):(k=d-M(z),E=d+C(z),l&&k<E/10&&(k=E/10),v=e.c2l(k),_=e.c2l(E)),s&&(v=Math.min(0,v),_=Math.max(0,_)),fse(v)&&aB(n,v,p,g),fse(_)&&oB(i,_,b,g))}var A=Math.min(6,a);for(f=0;f<A;f++)P(f);for(f=a-1;f>=A;f--)P(f);return{min:n,max:i,opts:r}}function aB(e,t,r,n){vse(e,t,r,n,zst)}function oB(e,t,r,n){vse(e,t,r,n,Ost)}function vse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<e.length&&s;l++){var u=e[l];if(i(u.val,t)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function fse(e){return hse(e)&&Math.abs(e)<EL}function zst(e,t){return e<=t}function Ost(e,t){return e>=t}function qst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Bst(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t<r):!0}function pse(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(i!==void 0){var a=t.d2l(r),o=t.d2l(n);d_.isArrayOrTypedArray(i)||(i=[i]);for(var s=0;s<i.length;s++){var l=t.d2l(i[s]);a>=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=qst(r,t),n=Bst(n,t),[r,n]}});var ho=ye((iar,Bse)=>{\"use strict\";var w0=Oa(),zh=Eo(),G3=Mc(),uM=qa(),Wo=Dr(),H3=Wo.strTranslate,Ob=Zl(),Nst=zb(),cM=ka(),Xp=So(),Ust=Rd(),mse=Pq(),rar=Rh(),Kd=fs(),Vst=Kd.ONEMAXYEAR,PL=Kd.ONEAVGYEAR,IL=Kd.ONEMINYEAR,Gst=Kd.ONEMAXQUARTER,fB=Kd.ONEAVGQUARTER,RL=Kd.ONEMINQUARTER,Hst=Kd.ONEMAXMONTH,j3=Kd.ONEAVGMONTH,DL=Kd.ONEMINMONTH,Zp=Kd.ONEWEEK,Ov=Kd.ONEDAY,v_=Ov/2,wm=Kd.ONEHOUR,fM=Kd.ONEMIN,FL=Kd.ONESEC,jst=Kd.ONEMILLI,Wst=Kd.ONEMICROSEC,qb=Kd.MINUS_SIGN,OL=Kd.BADNUM,hB={K:\"zeroline\"},dB={K:\"gridline\",L:\"path\"},vB={K:\"minor-gridline\",L:\"path\"},kse={K:\"tick\",L:\"path\"},yse={K:\"tick\",L:\"text\"},_se={width:[\"x\",\"r\",\"l\",\"xl\",\"xr\"],height:[\"y\",\"t\",\"b\",\"yt\",\"yb\"],right:[\"r\",\"xr\"],left:[\"l\",\"xl\"],top:[\"t\",\"yt\"],bottom:[\"b\",\"yb\"]},qL=Dh(),lM=qL.MID_SHIFT,Bb=qL.CAP_SHIFT,hM=qL.LINE_SPACING,Xst=qL.OPPOSITE_SIDE,zL=3,Jn=Bse.exports={};Jn.setConvert=xm();var Zst=V3(),Tm=hf(),Yst=Tm.idSort,Kst=Tm.isLinked;Jn.id2name=Tm.id2name;Jn.name2id=Tm.name2id;Jn.cleanId=Tm.cleanId;Jn.list=Tm.list;Jn.listIds=Tm.listIds;Jn.getFromId=Tm.getFromId;Jn.getFromTrace=Tm.getFromTrace;var Cse=Mg();Jn.getAutoRange=Cse.getAutoRange;Jn.findExtremes=Cse.findExtremes;var Jst=1e-4;function yB(e){var t=(e[1]-e[0])*Jst;return[e[0]-t,e[1]+t]}Jn.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+\"axis\"],l=n+\"ref\",u={};return i||(i=s[0]||(typeof a==\"string\"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+\" domain\"})),u[l]={valType:\"enumerated\",values:s.concat(a?typeof a==\"string\"?[a]:a:[]),dflt:i},Wo.coerce(e,t,u,l)};Jn.coerceRefArray=function(e,t,r,n,i,a,o){let s=n.charAt(n.length-1);var l=r._fullLayout._subplots[s+\"axis\"];let u=n+\"ref\";var c=e[u];i||(i=l[0]||(typeof a==\"string\"?a:a[0])),l=l.concat(l.map(h=>h+\" domain\")),l=l.concat(a||[]),c.length>o?(Wo.warn(\"Array attribute \"+u+\" has more entries than expected, truncating to \"+o),c=c.slice(0,o)):c.length<o&&(Wo.warn(\"Array attribute \"+u+\" has fewer entries than expected, extending with default value\"),c=c.concat(Array(o-c.length).fill(i)));for(var f=0;f<c.length;f++)c[f]=Tm.cleanId(c[f],s,!0)||c[f],l.includes(c[f])||(c[f]=i);return t[u]=c,c};Jn.getRefType=function(e){return e===void 0?e:Array.isArray(e)?\"array\":e===\"paper\"?\"paper\":e===\"pixel\"?\"pixel\":/( domain)$/.test(e)?\"domain\":\"range\"};Jn.coercePosition=function(e,t,r,n,i,a){var o,s,l=Jn.getRefType(n);if(l!==\"range\")o=Wo.ensureNumber,s=r(i,a);else{var u=Jn.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};Jn.cleanPosition=function(e,t,r){var n=r===\"paper\"||r===\"pixel\"?Wo.ensureNumber:Jn.getFromId(t,r).cleanPos;return n(e)};Jn.redrawComponents=function(e,t){t=t||Jn.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=uM.getComponentMethod(i,a),u={},c=0;c<t.length;c++)for(var f=r[Jn.id2name(t[c])],h=f[o],d=0;d<h.length;d++){var v=h[d];if(!u[v]&&(l(e,v),u[v]=1,s))return}}n(\"annotations\",\"drawOne\",\"_annIndices\"),n(\"shapes\",\"drawOne\",\"_shapeIndices\"),n(\"images\",\"draw\",\"_imgIndices\",!0),n(\"selections\",\"drawOne\",\"_selectionIndices\")};var $st=Jn.getDataConversions=function(e,t,r,n){var i,a=r===\"x\"||r===\"y\"||r===\"z\"?r:n;if(Wo.isArrayOrTypedArray(a)){if(i={type:Zst(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},Jn.setConvert(i),i.type===\"category\")for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=Jn.getFromTrace(e,t,a);return i?{d2c:i.d2c,c2d:i.c2d}:a===\"ids\"?{d2c:bse,c2d:bse}:{d2c:xse,c2d:xse}};function xse(e){return+e}function bse(e){return String(e)}Jn.getDataToCoordFunc=function(e,t,r,n){return $st(e,t,r,n).d2c};Jn.counterLetter=function(e){var t=e.charAt(0);if(t===\"x\")return\"y\";if(t===\"y\")return\"x\"};Jn.minDtick=function(e,t,r,n){[\"log\",\"category\",\"multicategory\"].indexOf(e.type)!==-1||!n?e._minDtick=0:e._minDtick===void 0?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Jn.saveRangeInitial=function(e,t){for(var r=Jn.list(e,\"\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=a._rangeInitial0===void 0&&a._rangeInitial1===void 0,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&l!==!0||t&&s)&&(a._rangeInitial0=l===\"min\"||l===\"max reversed\"?void 0:a.range[0],a._rangeInitial1=l===\"max\"||l===\"min reversed\"?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n};Jn.saveShowSpikeInitial=function(e,t){for(var r=Jn.list(e,\"\",!0),n=!1,i=\"on\",a=0;a<r.length;a++){var o=r[a],s=o._showSpikeInitial===void 0,l=s||o.showspikes!==o._showspikes;(s||t&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),i===\"on\"&&!o.showspikes&&(i=\"off\")}return e._fullLayout._cartesianSpikesEnabled=i,n};Jn.autoBin=function(e,t,r,n,i,a){var o=Wo.aggNums(Math.min,null,e),s=Wo.aggNums(Math.max,null,e);if(t.type===\"category\"||t.type===\"multicategory\")return{start:o-.5,end:s+.5,size:Math.max(1,Math.round(a)||1),_dataSpan:s-o};i||(i=t.calendar);var l;if(t.type===\"log\"?l={type:\"linear\",range:[o,s]}:l={type:t.type,range:Wo.simpleMap([o,s],t.c2r,0,i),calendar:i},Jn.setConvert(l),a=a&&mse.dtick(a,l.type),a)l.dtick=a,l.tick0=mse.tick0(void 0,l.type,i);else{var u;if(r)u=(s-o)/r;else{var c=Wo.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),h=f*Wo.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(h,2*Wo.stdev(e)/Math.pow(e.length,n?.25:.4)),zh(u)||(u=1)}Jn.autoTicks(l,u)}var d=l.dtick,v=Jn.tickIncrement(Jn.tickFirst(l),d,\"reverse\",i),_,b;if(typeof d==\"number\")v=Qst(v,e,l,o,s),b=1+Math.floor((s-v)/d),_=v+b*d;else for(l.dtick.charAt(0)===\"M\"&&(v=elt(v,e,d,o,i)),_=v,b=0;_<=s;)_=Jn.tickIncrement(_,d,!1,i),b++;return{start:t.c2r(v,0,i),end:t.c2r(_,0,i),size:d,_dataSpan:s-o}};function Qst(e,t,r,n,i){var a=0,o=0,s=0,l=0;function u(d){return(1+(d-e)*100/r.dtick)%100<2}for(var c=0;c<t.length;c++)t[c]%1===0?s++:zh(t[c])||l++,u(t[c])&&a++,u(t[c]+r.dtick/2)&&o++;var f=t.length-l;if(s===f&&r.type!==\"date\")r.dtick<1?e=n-.5*r.dtick:(e-=.5,e+r.dtick<n&&(e+=r.dtick));else if(o<f*.1&&(a>f*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}function elt(e,t,r,n,i){var a=Wo.findExactDates(t,i),o=.8;if(a.exactDays>o){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Jn.tickIncrement(e,\"M6\",\"reverse\")+Ov*1.5:a.exactMonths>o?e=Jn.tickIncrement(e,\"M1\",\"reverse\")+Ov*15.5:e-=v_;var l=Jn.tickIncrement(e,r);if(l<=n)return l}return e}Jn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&zh(t._tmin),i;if(n){var a=Jn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Wo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Wo.simpleMap(i,t.l2r),e._isMinor=!0,Jn.prepTicks(e,r),n){var s=zh(t.dtick),l=zh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?lB(u,c)?u===2*Zp&&c===2*Ov&&(e.dtick=Zp):u===2*Zp&&c===3*Ov?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=Ov:wse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)===\"M\"?l?e.dtick=\"M1\":lB(u,c)?u>=12&&c===2&&(e.dtick=\"M3\"):e.dtick=t.dtick:String(e.dtick).charAt(0)===\"L\"?String(t.dtick).charAt(0)===\"L\"?lB(u,c)||(e.dtick=wse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick=\"D1\":e.dtick===\"D2\"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function lB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function wse(e,t){return Math.abs(e/t-1)<.001}Jn.prepTicks=function(e,t){var r=Wo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode===\"auto\"||!e.dtick){var n=e.nticks,i;n||(e.type===\"category\"||e.type===\"multicategory\"?(i=e.tickfont?Wo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)===\"y\"?40:80,n=Wo.constrain(e._length/i,4,9)+1),e._name===\"radialaxis\"&&(n*=2)),e.minor&&e.minor.tickmode!==\"array\"||e.tickmode===\"array\"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Jn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<e._minDtick*2&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.ticklabelmode===\"period\"&&tlt(e),e.tick0||(e.tick0=e.type===\"date\"?\"2000-01-01\":0),e.type===\"date\"&&e.dtick<.1&&(e.dtick=.1),Rse(e)};function uB(e){return+e.substring(1)}function tlt(e){var t;function r(){return!(zh(e.dtick)||e.dtick.charAt(0)!==\"M\")}var n=r(),i=Jn.getTickFormat(e);if(i){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=wm,a&&!n&&e.dtick<wm&&(e.dtick=wm)):/%p/.test(i)?(t=v_,a&&!n&&e.dtick<v_&&(e.dtick=v_)):/%[Aadejuwx]/.test(i)?(t=Ov,a&&!n&&e.dtick<Ov&&(e.dtick=Ov)):/%[UVW]/.test(i)?(t=Zp,a&&!n&&e.dtick<Zp&&(e.dtick=Zp)):/%[Bbm]/.test(i)?(t=j3,a&&(n?uB(e.dtick)<1:e.dtick<DL)&&(e.dtick=\"M1\")):/%[q]/.test(i)?(t=fB,a&&(n?uB(e.dtick)<3:e.dtick<RL)&&(e.dtick=\"M3\")):/%[Yy]/.test(i)&&(t=PL,a&&(n?uB(e.dtick)<12:e.dtick<IL)&&(e.dtick=\"M12\")))}n=r(),n&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}function rlt(e,t,r){for(var n=0;n<e.length;n++){var i=e[n].value,a=n,o=n+1;n<e.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=IL?u>=IL&&u<=Vst?f=u:f=PL:r===fB&&c>=RL?u>=RL&&u<=Gst?f=u:f=fB:c>=DL?u>=DL&&u<=Hst?f=u:f=j3:r===Zp&&c>=Zp?f=Zp:c>=Ov?f=Ov:r===v_&&c>=v_?f=v_:r===wm&&c>=wm&&(f=wm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,_=0,b=0;b<v;b++){var p=(b+.5)/v;t.maskBreaks(i*(1-p)+p*d)!==OL&&_++}f*=_/v,f||(e[n].drop=!0),h&&u>Zp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}Jn.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode===\"period\",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Wo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Wo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]<u[0],f=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d=Math.max(1e3,t._length||0),v=[],_=[],b=[],p=[],k=[],E=t.minor&&(t.minor.ticks||t.minor.showgrid),T=1;T>=(E?0:1);T--){var L=!T;T?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var x=T?t:Wo.extendFlat({},t,t.minor);if(L?Jn.prepMinorTicks(x,t,r):Jn.prepTicks(x,r),x.tickmode===\"array\"){T?(b=[],v=Tse(t,!L)):(p=[],_=Tse(t,!L));continue}if(x.tickmode===\"sync\"){b=[],v=ilt(t);continue}var C=yB(u),M=C[0],g=C[1],P=zh(x.dtick),A=n===\"log\"&&!(P||x.dtick.charAt(0)===\"L\"),z=Jn.tickFirst(x,r);if(T){if(t._tmin=z,z<M!==c)break;(n===\"category\"||n===\"multicategory\")&&(g=c?Math.max(-.5,g):Math.min(t._categories.length-.5,g))}var O=null,U=z,G;if(T){var Z;P?Z=t.dtick:n===\"date\"?typeof t.dtick==\"string\"&&t.dtick.charAt(0)===\"M\"&&(Z=j3*t.dtick.substring(1)):Z=t._roughDTick,G=Math.round((t.r2l(U)-t.r2l(t.tick0))/Z)-1}var j=x.dtick;for(x.rangebreaks&&x._tick0Init!==x.tick0&&(U=cB(U,t),c||(U=Jn.tickIncrement(U,j,!c,i))),T&&o&&(U=Jn.tickIncrement(U,j,!c,i),G--);c?U>=g:U<=g;U=Jn.tickIncrement(U,j,c,i)){if(T&&G++,x.rangebreaks&&!c){if(U<M)continue;if(x.maskBreaks(U)===OL&&cB(U,x)>=h)break}if(b.length>d||U===O)break;O=U;var N={value:U};T?(A&&U!==(U|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var H=(p[1].value-p[0].value)*(s?-1:1);klt(H,t.tickformat)||(l=!1)}if(!l)k=b;else{var re=b.concat(p);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Wt,Nt){return Wt.value-Nt.value}).filter(function(Wt,Nt,$t){return Nt===0||Wt.value!==$t[Nt-1].value});var oe=re.map(function(Wt,Nt){return Wt.minor===void 0&&!Wt.skipLabel?Nt:null}).filter(function(Wt){return Wt!==null});oe.forEach(function(Wt){l.map(function(Nt){var $t=Wt+Nt;$t>=0&&$t<re.length&&Wo.pushUnique(k,re[$t])})})}if(E){var _e=t.minor.ticks===\"inside\"&&t.ticks===\"outside\"||t.minor.ticks===\"outside\"&&t.ticks===\"inside\";if(!_e){for(var Ce=b.map(function(Wt){return Wt.value}),Le=[],ge=0;ge<p.length;ge++){var ie=p[ge],Se=ie.value;if(Ce.indexOf(Se)===-1){for(var Ee=!1,Ae=0;!Ee&&Ae<b.length;Ae++)1e7+b[Ae].value===1e7+Se&&(Ee=!0);Ee||Le.push(ie)}}p=Le}}o&&rlt(k,t,t._definedDelta);var Be;if(t.rangebreaks){var Pe=t._id.charAt(0)===\"y\",me=1;t.tickmode===\"auto\"&&(me=t.tickfont?t.tickfont.size:12);var De=NaN;for(Be=b.length-1;Be>-1;Be--){if(b[Be].drop){b.splice(Be,1);continue}b[Be].value=cB(b[Be].value,t);var ce=t.c2p(b[Be].value);(Pe?De>ce-me:De<ce+me)?b.splice(c?Be+1:Be,1):De=ce}}wB(t)&&Math.abs(u[1]-u[0])===360&&b.pop(),t._tmax=(b[b.length-1]||{}).value,t._prevDateHead=\"\",t._inCalcTicks=!0;var je,lt=function(Wt){Wt.text=\"\",t._prevDateHead=je};b=b.concat(p);function pt(Wt,Nt){var $t=Jn.tickText(Wt,Nt.value,!1,Nt.simpleLabel),sr=Nt.periodX;return sr!==void 0&&($t.periodX=sr,(sr>h||sr<f)&&(sr>h&&($t.periodX=h),sr<f&&($t.periodX=f),lt($t))),$t}var Vt;for(Be=0;Be<b.length;Be++){var ot=b[Be].minor,ut=b[Be].value;ot?(l&&k.indexOf(b[Be])!==-1?Vt=pt(t,b[Be]):Vt={x:ut},Vt.minor=!0,_.push(Vt)):(je=t._prevDateHead,Vt=pt(t,b[Be]),(b[Be].skipLabel||l&&k.indexOf(b[Be])===-1)&&lt(Vt),v.push(Vt))}return v=v.concat(_),t._inCalcTicks=!1,o&&v.length&&(v[0].noTick=!0),v};function Lse(e,t){return e.rangebreaks&&(t=t.filter(function(r){return e.maskBreaks(r.x)!==OL})),t}function ilt(e){var t=e._mainAxis,r=[];if(t._vals){for(var n=0;n<t._vals.length;n++)if(!t._vals[n].noTick){var i=t.l2p(t._vals[n].x),a=e.p2l(i),o=Jn.tickText(e,a);t._vals[n].minor&&(o.minor=!0,o.text=\"\"),r.push(o)}}return r=Lse(e,r),r}function Tse(e,t){var r=Wo.simpleMap(e.range,e.r2l),n=yB(r),i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=e.type===\"category\"?e.d2l_noadd:e.d2l;e.type===\"log\"&&String(e.dtick).charAt(0)!==\"L\"&&(e.dtick=\"L\"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(t!==void 0&&(t&&l||t===!1&&!l))&&!(l&&!e.minor)){var u=l?e.minor.tickvals:e.tickvals,c=l?[]:e.ticktext;if(u){Wo.isArrayOrTypedArray(c)||(c=[]);for(var f=0;f<u.length;f++){var h=o(u[f]);if(h>i&&h<a){var d=Jn.tickText(e,h,!1,String(c[f]));l&&(d.minor=!0,d.text=\"\"),s.push(d)}}}}return s=Lse(e,s),s}var CL=[2,5,10],Ase=[1,2,3,6,12],Sse=[1,2,5,10,15,30],nlt=[1,2,3,7,14],Pse=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ise=[-.301,0,.301,.699,1],alt=[15,30,45,90,180];function bm(e,t,r){return t*Wo.roundUp(e/t,r)}Jn.autoTicks=function(e,t,r){var n;function i(f){return Math.pow(f,Math.floor(Math.log(t)/Math.LN10))}if(e.type===\"date\"){e.tick0=Wo.dateTick0(e.calendar,0);var a=2*t;if(a>PL)t/=PL,n=i(10),e.dtick=\"M\"+12*bm(t,n,CL);else if(a>j3)t/=j3,e.dtick=\"M\"+bm(t,1,Ase);else if(a>Ov){if(e.dtick=bm(t,Ov,e._hasDayOfWeekBreaks?[1,2,7,14]:nlt),!r){var o=Jn.getTickFormat(e),s=e.ticklabelmode===\"period\";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Wo.dateTick0(e.calendar,2):e.tick0=Wo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>wm?e.dtick=bm(t,wm,Ase):a>fM?e.dtick=bm(t,fM,Sse):a>FL?e.dtick=bm(t,FL,Sse):(n=i(10),e.dtick=bm(t,n,CL))}else if(e.type===\"log\"){e.tick0=0;var l=Wo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick=\"L\"+bm(t,n,CL)}else e.dtick=t>.3?\"D2\":\"D1\"}else e.type===\"category\"||e.type===\"multicategory\"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):wB(e)?(e.tick0=0,n=1,e.dtick=bm(t,n,alt)):(e.tick0=0,n=i(10),e.dtick=bm(t,n,CL));if(e.dtick===0&&(e.dtick=1),!zh(e.dtick)&&typeof e.dtick!=\"string\"){var c=e.dtick;throw e.dtick=1,\"ax.dtick error: \"+String(c)}};function Rse(e){var t=e.dtick;if(e._tickexponent=0,!zh(t)&&typeof t!=\"string\"&&(t=1),(e.type===\"category\"||e.type===\"multicategory\")&&(e._tickround=null),e.type===\"date\"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,\"\"),i=n.length;if(String(t).charAt(0)===\"M\")i>10||n.slice(5)!==\"01-01\"?e._tickround=\"d\":e._tickround=+t.slice(1)%12===0?\"y\":\"m\";else if(t>=Ov&&i<=10||t>=Ov*15)e._tickround=\"d\";else if(t>=fM&&i<=16||t>=wm)e._tickround=\"M\";else if(t>=FL&&i<=19||t>=fM)e._tickround=\"S\";else{var a=e.l2r(r+t).replace(/^-/,\"\").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(zh(t)||t.charAt(0)===\"L\"){var o=e.range.map(e.r2d||Number);zh(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(W3(e.exponentformat)&&e.exponentformat!==\"SI extended\"&&!_B(l)||W3(e.exponentformat)&&e.exponentformat===\"SI extended\"&&!xB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Jn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(zh(t))return Wo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a===\"M\")return Wo.incrementMonth(e,o,n);if(a===\"L\")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a===\"D\"){var s=t===\"D2\"?Ise:Pse,l=e+i*.01,u=Wo.roundUp(Wo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw\"unrecognized dtick \"+String(t)};Jn.tickFirst=function(e,t){var r=e.r2l||Number,n=Wo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]<n[0],a=i?Math.floor:Math.ceil,o=yB(n)[0],s=e.dtick,l=r(e.tick0);if(zh(s)){var u=a((o-l)/s)*s+l;return(e.type===\"category\"||e.type===\"multicategory\")&&(u=Wo.constrain(u,0,e._categories.length-1)),u}var c=s.charAt(0),f=Number(s.slice(1));if(c===\"M\"){for(var h=0,d=l,v,_,b;h<10;){if(v=Jn.tickIncrement(d,s,i,e.calendar),(v-o)*(d-o)<=0)return i?Math.min(d,v):Math.max(d,v);_=(o-(d+v)/2)/(v-d),b=c+(Math.abs(Math.round(_))||1)*f,d=Jn.tickIncrement(d,b,_<0?!i:i,e.calendar),h++}return Wo.error(\"tickFirst did not converge\",e),d}else{if(c===\"L\")return Math.log(a((Math.pow(10,o)-l)/f)*f+l)/Math.LN10;if(c===\"D\"){var p=s===\"D2\"?Ise:Pse,k=Wo.roundUp(Wo.mod(o,1),p,i);return Math.floor(o)+Math.log(w0.round(Math.pow(10,k),1))/Math.LN10}else throw\"unrecognized dtick \"+String(s)}};Jn.tickText=function(e,t,r,n){var i=Dse(e,t),a=e.tickmode===\"array\",o=r||a,s=e.type,l=s===\"category\"?e.d2l_noadd:e.d2l,u,c=function(b){var p=e.l2p(b);return p>=0&&p<=e._length?b:null};if(a&&Wo.isArrayOrTypedArray(e.ticktext)){var f=Wo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u<e.ticktext.length&&!(Math.abs(t-l(e.tickvals[u]))<h);u++);if(u<e.ticktext.length)return i.text=String(e.ticktext[u]),i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)],i}function d(b){if(b===void 0)return!0;if(r)return b===\"none\";var p={first:e._tmin,last:e._tmax}[b];return b!==\"all\"&&t!==p}var v=r?\"never\":e.exponentformat!==\"none\"&&d(e.showexponent)?\"hide\":\"\";if(s===\"date\"?olt(e,i,r,o):s===\"log\"?slt(e,i,r,o,v):s===\"category\"?llt(e,i):s===\"multicategory\"?ult(e,i,r):wB(e)?flt(e,i,r,o,v):clt(e,i,r,o,v),n||(e.tickprefix&&!d(e.showtickprefix)&&(i.text=e.tickprefix+i.text),e.ticksuffix&&!d(e.showticksuffix)&&(i.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(i.text)){var _=e.labelalias[i.text];typeof _==\"string\"&&(i.text=_)}return(e.tickson===\"boundaries\"||e.showdividers)&&(i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)]),i};Jn.hoverLabelText=function(e,t,r){r&&(e=Wo.extendFlat({},e,{hoverformat:r}));var n=Wo.isArrayOrTypedArray(t)?t[0]:t,i=Wo.isArrayOrTypedArray(t)?t[1]:void 0;if(i!==void 0&&i!==n)return Jn.hoverLabelText(e,n,r)+\" - \"+Jn.hoverLabelText(e,i,r);var a=e.type===\"log\"&&n<=0,o=Jn.tickText(e,e.c2l(a?-n:n),\"hover\").text;return a?n===0?\"0\":qb+o:o};function Dse(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||\"\",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}function olt(e,t,r,n){var i=e._tickround,a=r&&e.hoverformat||Jn.getTickFormat(e);n=!a&&n,n&&(zh(i)?i=4:i={y:\"m\",m:\"d\",d:\"M\",M:\"S\",S:4}[i]);var o=Wo.formatDate(t.x,a,i,e._dateFormat,e.calendar,e._extraFormat),s,l=o.indexOf(`\n",
       "`);if(l!==-1&&(s=o.slice(l+1),o=o.slice(0,l)),n&&(s!==void 0&&(o===\"00:00:00\"||o===\"00:00\")?(o=s,s=\"\"):o.length===8&&(o=o.replace(/:00$/,\"\"))),s)if(r)i===\"d\"?o+=\", \"+s:o=s+(o?\", \"+o:\"\");else if(!e._inCalcTicks||e._prevDateHead!==s)e._prevDateHead=s,o+=\"<br>\"+s;else{var u=vM(e),c=e._trueSide||e.side;(!u&&c===\"top\"||u&&c===\"bottom\")&&(o+=\"<br> \")}t.text=o}function slt(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a==\"string\"&&a.charAt(0);if(i===\"never\"&&(i=\"\"),n&&l!==\"L\"&&(a=\"L3\",l=\"L\"),s||l===\"L\")t.text=dM(Math.pow(10,o),e,i,n);else if(zh(a)||l===\"D\"&&(e.minorloglabels===\"complete\"||Wo.mod(o+.01,1)<.1)){var u;e.minorloglabels===\"complete\"&&!(Wo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split(\"e\"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v===\"power\"||W3(v)&&v!==\"SI extended\"&&_B(h)||W3(v)&&v===\"SI extended\"&&xB(h)?(t.text=f[0],d>0&&(t.text+=\"x10\"),t.text===\"1x10\"&&(t.text=\"10\"),h!==0&&h!==1&&(t.text+=\"<sup>\"+(h>0?\"\":qb)+d+\"</sup>\"),t.fontSize*=1.25):(v===\"e\"||v===\"E\")&&d>2?t.text=f[0]+v+(h>0?\"+\":qb)+d:(t.text=dM(Math.pow(10,o),e,\"\",\"fakehover\"),a===\"D1\"&&e._id.charAt(0)===\"y\"&&(t.dy-=t.fontSize/6))}else if(l===\"D\")t.text=e.minorloglabels===\"none\"?\"\":String(Math.round(Math.pow(10,Wo.mod(o,1)))),t.fontSize*=.75;else throw\"unrecognized dtick \"+String(a);if(e.dtick===\"D1\"){var _=String(t.text).charAt(0);(_===\"0\"||_===\"1\")&&(e._id.charAt(0)===\"y\"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function llt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=\"\"),t.text=String(r)}function ult(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?\"\":String(i[1]),o=i[0]===void 0?\"\":String(i[0]);r?t.text=o+\" - \"+a:(t.text=a,t.text2=o)}function clt(e,t,r,n,i){i===\"never\"?i=\"\":e.showexponent===\"all\"&&Math.abs(t.x/e.dtick)<1e-6&&(i=\"hide\"),t.text=dM(t.x,e,i,n)}function flt(e,t,r,n,i){if(e.thetaunit===\"radians\"&&!r){var a=t.x/180;if(a===0)t.text=\"0\";else{var o=hlt(a);if(o[1]>=100)t.text=dM(Wo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text=\"\\u03C0\":t.text=o[0]+\"\\u03C0\":t.text=[\"<sup>\",o[0],\"</sup>\",\"\\u2044\",\"<sub>\",o[1],\"</sub>\",\"\\u03C0\"].join(\"\"),s&&(t.text=qb+t.text)}}}else t.text=dM(t.x,e,i,n)}function hlt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var Fse=[\"f\",\"p\",\"n\",\"\\u03BC\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"],dlt=[\"q\",\"r\",\"y\",\"z\",\"a\",...Fse,\"P\",\"E\",\"Z\",\"Y\",\"R\",\"Q\"],W3=e=>[\"SI\",\"SI extended\",\"B\"].includes(e);function _B(e){return e>14||e<-15}function xB(e){return e>32||e<-30}function vlt(e,t){return W3(t)?!!(t===\"SI extended\"&&xB(e)||t!==\"SI extended\"&&_B(e)):!1}function dM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||\"B\",s=t._tickexponent,l=Jn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent===\"none\"?t.dtick:zh(e)&&Math.abs(e)||1,range:t.showexponent===\"none\"?t.range.map(t.r2d):[0,e||1]};Rse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,qb);var f=Math.pow(10,-a)/2;if(o===\"none\"&&(s=0),e=Math.abs(e),e<f)e=\"0\",i=!1;else{if(e+=f,s&&(e*=Math.pow(10,-s),a+=s),a===0)e=String(Math.floor(e));else if(a<0){e=String(Math.round(e)),e=e.slice(0,Math.max(0,e.length+a));for(var h=a;h<0;h++)e+=\"0\"}else{e=String(e);var d=e.indexOf(\".\")+1;d&&(e=e.slice(0,d+a).replace(/\\.?0+$/,\"\"))}e=Wo.numSeparate(e,t._separators,u)}if(s&&o!==\"hide\"){vlt(s,o)&&(o=\"power\");var v;s<0?v=qb+-s:o!==\"power\"?v=\"+\"+s:v=String(s),o===\"e\"||o===\"E\"?e+=o+v:o===\"power\"?e+=\"\\xD710<sup>\"+v+\"</sup>\":o===\"B\"&&s===9?e+=\"B\":W3(o)&&(e+=o===\"SI extended\"?dlt[s/3+10]:Fse[s/3+5])}return i?qb+e:e}Jn.getTickFormat=function(e){var t;function r(l){return typeof l!=\"string\"?l:Number(l.replace(\"M\",\"\"))*j3}function n(l,u){var c=[\"L\",\"D\"];if(typeof l==typeof u){if(typeof l==\"number\")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,\"\"))-Number(u.replace(/(L|D)/g,\"\")):f-h}else return typeof l==\"number\"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!=\"number\"||f(h)<=f(l))&&(!d&&typeof d!=\"number\"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case\"date\":case\"linear\":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&i(e.dtick,s.dtickrange,r)){o=s;break}break}case\"log\":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&a(e.dtick,s.dtickrange)){o=s;break}break}default:}return o?o.value:e.tickformat};Jn.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=t?Jn.findSubplotsWithAxis(n,t):n;return i.sort(function(a,o){var s=a.slice(1).split(\"y\"),l=o.slice(1).split(\"y\");return s[0]===l[0]?+s[1]-+l[1]:+s[0]-+l[0]}),i};Jn.findSubplotsWithAxis=function(e,t){for(var r=new RegExp(t._id.charAt(0)===\"x\"?\"^\"+t._id+\"y\":t._id+\"$\"),n=[],i=0;i<e.length;i++){var a=e[i];r.test(a)&&n.push(a)}return n};Jn.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r={_offset:0,_length:t.width,_id:\"\"},n={_offset:0,_length:t.height,_id:\"\"},i=Jn.list(e,\"x\",!0),a=Jn.list(e,\"y\",!0),o=[],s,l;for(s=0;s<i.length;s++)for(o.push({x:i[s],y:n}),l=0;l<a.length;l++)s===0&&o.push({x:r,y:a[l]}),o.push({x:i[s],y:a[l]});var u=t._clips.selectAll(\".axesclip\").data(o,function(c){return c.x._id+c.y._id});u.enter().append(\"clipPath\").classed(\"axesclip\",!0).attr(\"id\",function(c){return\"clip\"+t._uid+c.x._id+c.y._id}).append(\"rect\"),u.exit().remove(),u.each(function(c){w0.select(this).select(\"rect\").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Jn.draw=function(e,t,r){var n=e._fullLayout;t===\"redraw\"&&n._paper.selectAll(\"g.subplot\").each(function(l){var u=l[0],c=n._plots[u];if(c){var f=c.xaxis,h=c.yaxis;c.xaxislayer.selectAll(\".\"+f._id+\"tick\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"tick\").remove(),c.xaxislayer.selectAll(\".\"+f._id+\"tick2\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"tick2\").remove(),c.xaxislayer.selectAll(\".\"+f._id+\"divider\").remove(),c.yaxislayer.selectAll(\".\"+h._id+\"divider\").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll(\"path\").remove(),c.gridlayer&&c.gridlayer.selectAll(\"path\").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll(\"path\").remove(),c.zerolinelayerAbove&&c.zerolinelayerAbove.selectAll(\"path\").remove(),n._infolayer.select(\".g-\"+f._id+\"title\").remove(),n._infolayer.select(\".g-\"+h._id+\"title\").remove()}});var i=!t||t===\"redraw\"?Jn.listIds(e):t,a=Jn.list(e),o=a.filter(function(l){return l.autoshift}).map(function(l){return l.overlaying});i.map(function(l){var u=Jn.getFromId(e,l);if(u.tickmode===\"sync\"&&u.overlaying){var c=i.findIndex(function(f){return f===u.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Wo.syncOrAsync(i.map(function(l){return function(){if(l){var u=Jn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Jn.drawOne(e,u,r);return u._shiftPusher&&mB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Wo.simpleMap(u._r,u.r2l),c}}}))};Jn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Jn.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer===\"above traces\";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor===\"free\"){var v=t.linewidth/2||0;t.ticks===\"inside\"&&(v+=t.ticklen),mB(t,v,n,!0),mB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Elt(t,n));var _=h[c+\"axislayer\"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,E=t._vals=Jn.calcTicks(t),T=[t.mirror,p,k].join(\"_\");for(a=0;a<E.length;a++)E[a].axInfo=T;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var L={};function x(ut){var Wt=u+(ut||\"tick\");return L[Wt]||(L[Wt]=ylt(t,Wt,p)),L[Wt]}if(t.visible){var C=Jn.makeTransTickFn(t),M=Jn.makeTransTickLabelFn(t),g,P,A=t.ticks===\"inside\",z=t.ticks===\"outside\";if(t.tickson===\"boundaries\"){var O=plt(t,E);P=Jn.clipEnds(t,O),g=A?P:O}else P=Jn.clipEnds(t,E),g=A&&t.ticklabelmode!==\"period\"?P:E;var U=t._gridVals=P,G=mlt(t,E);if(!l._hasOnlyLargeSploms){var Z=t._subplotsWith,j={};for(a=0;a<Z.length;a++){o=Z[a],s=l._plots[o];var N=s[f+\"axis\"],H=N._mainAxis._id;if(!j[H]){j[H]=1;var re=c===\"x\"?\"M0,\"+N._offset+\"v\"+N._length:\"M\"+N._offset+\",0h\"+N._length;Jn.drawGrid(e,t,{vals:U,counterAxis:N,layer:s.gridlayer.select(\".\"+u),minorLayer:s.minorGridlayer.select(\".\"+u),path:re,transFn:C}),Jn.drawZeroLine(e,t,{counterAxis:N,layer:d?s.zerolinelayerAbove:s.zerolinelayer,path:re,transFn:C})}}}var oe,_e=Jn.getTickSigns(t),Ce=Jn.getTickSigns(t,\"minor\");if(t.ticks||t.minor&&t.minor.ticks){var Le=Jn.makeTickPath(t,p,_e[2]),ge=Jn.makeTickPath(t,p,Ce[2],{minor:!0}),ie,Se,Ee,Ae;if(t._anchorAxis&&t.mirror&&t.mirror!==!0?(ie=Jn.makeTickPath(t,k,_e[3]),Se=Jn.makeTickPath(t,k,Ce[3],{minor:!0}),Ee=Le+ie,Ae=ge+Se):(ie=\"\",Se=\"\",Ee=Le,Ae=ge),t.showdividers&&z&&t.tickson===\"boundaries\"){var Be={};for(a=0;a<G.length;a++)Be[G[a].x]=1;oe=function(ut){return Be[ut.x]?ie:Ee}}else oe=function(ut){return ut.minor?Ae:Ee}}if(Jn.drawTicks(e,t,{vals:g,layer:_,path:oe,transFn:C}),t.mirror===\"allticks\"){var Pe=Object.keys(t._linepositions||{});for(a=0;a<Pe.length;a++){o=Pe[a],s=l._plots[o];var me=t._linepositions[o]||[],De=me[0],ce=me[1],je=me[2],lt=Jn.makeTickPath(t,De,je?_e[0]:Ce[0],{minor:je})+Jn.makeTickPath(t,ce,je?_e[1]:Ce[1],{minor:je});Jn.drawTicks(e,t,{vals:g,layer:s[c+\"axislayer\"],path:lt,transFn:C})}}var pt=[];if(pt.push(function(){return Jn.drawLabels(e,t,{vals:E,layer:_,plotinfo:s,transFn:M,labelFns:Jn.makeLabelFns(t,p)})}),t.type===\"multicategory\"){var Vt={x:2,y:10}[c];pt.push(function(){var ut={x:\"height\",y:\"width\"}[c],Wt=x()[ut]+Vt+(t._tickAngles[u+\"tick\"]?t.tickfont.size*hM:0);return Jn.drawLabels(e,t,{vals:glt(t,E),layer:_,cls:u+\"tick2\",repositionOnUpdate:!0,secondary:!0,transFn:C,labelFns:Jn.makeLabelFns(t,p+Wt*_e[4])})}),pt.push(function(){return t._depth=_e[4]*(x(\"tick2\")[t.side]-p),xlt(e,t,{vals:G,layer:_,path:Jn.makeTickPath(t,p,_e[4],{len:t._depth}),transFn:C})})}else t.title.hasOwnProperty(\"standoff\")&&pt.push(function(){t._depth=_e[4]*(x()[t.side]-p)});var ot=uM.getComponentMethod(\"rangeslider\",\"isVisible\")(t);return!r.skipTitle&&!(ot&&t.side===\"bottom\")&&pt.push(function(){return blt(e,t)}),pt.push(function(){var ut=t.side.charAt(0),Wt=Xst[t.side].charAt(0),Nt=Jn.getPxPosition(e,t),$t=z?t.ticklen:0,sr,Tr,fr,$e;(t.automargin||ot||t._shiftPusher)&&(t.type===\"multicategory\"?sr=x(\"tick2\"):(sr=x(),c===\"x\"&&ut===\"b\"&&(t._depth=Math.max(sr.width>0?sr.bottom-Nt:0,$t))));var St=0,Qt=0;if(t._shiftPusher&&(St=Math.max($t,sr.height>0?ut===\"l\"?Nt-sr.left:sr.right-Nt:0),t.title.text!==l._dfltTitle[c]&&(Qt=(t._titleStandoff||0)+(t._titleScoot||0),ut===\"l\"&&(Qt+=Ese(t))),t._fullDepth=Math.max(St,Qt)),t.automargin){Tr={x:0,y:0,r:0,l:0,t:0,b:0};var Gt=[0,1],_t=typeof t._shift==\"number\"?t._shift:0;if(c===\"x\"){if(ut===\"b\"?Tr[ut]=t._depth:(Tr[ut]=t._depth=Math.max(sr.width>0?Nt-sr.top:0,$t),Gt.reverse()),sr.width>0){var It=sr.right-(t._offset+t._length);It>0&&(Tr.xr=1,Tr.r=It);var mt=t._offset-sr.left;mt>0&&(Tr.xl=0,Tr.l=mt)}}else if(ut===\"l\"?(t._depth=Math.max(sr.height>0?Nt-sr.left:0,$t),Tr[ut]=t._depth-_t):(t._depth=Math.max(sr.height>0?sr.right-Nt:0,$t),Tr[ut]=t._depth+_t,Gt.reverse()),sr.height>0){var er=sr.bottom-(t._offset+t._length);er>0&&(Tr.yb=0,Tr.b=er);var lr=t._offset-sr.top;lr>0&&(Tr.yt=1,Tr.t=lr)}Tr[f]=t.anchor===\"free\"?t.position:t._anchorAxis.domain[Gt[0]],t.title.text!==l._dfltTitle[c]&&(Tr[ut]+=Ese(t)+(t.title.standoff||0)),t.mirror&&t.anchor!==\"free\"&&(fr={x:0,y:0,r:0,l:0,t:0,b:0},fr[Wt]=t.linewidth,t.mirror&&t.mirror!==!0&&(fr[Wt]+=$t),t.mirror===!0||t.mirror===\"ticks\"?fr[f]=t._anchorAxis.domain[Gt[1]]:(t.mirror===\"all\"||t.mirror===\"allticks\")&&(fr[f]=[t._counterDomainMin,t._counterDomainMax][Gt[1]]))}ot&&($e=uM.getComponentMethod(\"rangeslider\",\"autoMarginOpts\")(e,t)),typeof t.automargin==\"string\"&&(Mse(Tr,t.automargin),Mse(fr,t.automargin)),G3.autoMargin(e,bB(t),Tr),G3.autoMargin(e,Ose(t),fr),G3.autoMargin(e,qse(t),$e)}),Wo.syncOrAsync(pt)}};function Mse(e,t){if(e){var r=Object.keys(_se).reduce(function(n,i){return t.indexOf(i)!==-1&&_se[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function plt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Wo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;n<t.length;n++)i(t[n],0);i(t[n-1],1)}return r}function glt(e,t){for(var r=[],n={},i=0;i<t.length;i++){var a=t[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(Dse(e,Wo.interp(n[o],.5),o));return r}function mlt(e,t){var r=[],n,i,a=t.length&&t[t.length-1].x<t[0].x,o=function(l,u){var c=l.xbnd[u];c!==null&&r.push(Wo.extendFlat({},l,{x:c}))};if(e.showdividers&&t.length){for(n=0;n<t.length;n++){var s=t[n];s.text2!==i&&o(s,a?1:0),i=s.text2}o(t[n-1],a?0:1)}return r}function ylt(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var l=gB(this);if(l.node().style.display!==\"none\"){var u=Xp.bBox(l.node().parentNode);n=Math.min(n,u.top),i=Math.max(i,u.bottom),a=Math.min(a,u.left),o=Math.max(o,u.right)}});else{var s=Jn.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}Jn.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:\"top\",y:\"right\"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i],o=t?(e.minor||{}).ticks:e.ticks;return o!==\"inside\"==(r===\"x\")&&(a=a.map(function(s){return-s})),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a};Jn.makeTransTickFn=function(e){return e._id.charAt(0)===\"x\"?function(t){return H3(e._offset+e.l2p(t.x),0)}:function(t){return H3(0,e._offset+e.l2p(t.x))}};Jn.makeTransTickLabelFn=function(e){var t=_lt(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf(\"inside\")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c===\"top\"||c===\"left\")||l&&(c===\"bottom\"||c===\"right\")?1:-1;n=n*f}return e._id.charAt(0)===\"x\"?function(h){return H3(i+e._offset+e.l2p(pB(h))+r,a+n)}:function(h){return H3(a+n,i+e._offset+e.l2p(pB(h))+r)}};function pB(e){return e.periodX!==void 0?e.periodX:e.x}function _lt(e){var t=e.ticklabelposition||\"\",r=e.tickson||\"\",n=function(v){return t.indexOf(v)!==-1},i=n(\"top\"),a=n(\"left\"),o=n(\"right\"),s=n(\"bottom\"),l=n(\"inside\"),u=r!==\"boundaries\"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=zL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Bb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=zL),l&&c===\"top\"&&(h-=d*(1-Bb)),(a||i)&&(f=-f),(c===\"bottom\"||c===\"right\")&&(h=-h),[u?f:0,l?h:0]}Jn.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return\"\";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o===\"x\"?\"M0,\"+(t+s*r)+\"v\"+a*r:\"M\"+(t+s*r)+\",0h\"+a*r};Jn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||\"\",i=e.tickson||\"\",a=function(O){return n.indexOf(O)!==-1},o=a(\"top\"),s=a(\"left\"),l=a(\"right\"),u=a(\"bottom\"),c=i!==\"boundaries\"&&(u||s||o||l),f=a(\"inside\"),h=n===\"inside\"&&e.ticks===\"inside\"||!f&&e.ticks===\"outside\"&&i!==\"boundaries\",d=0,v=0,_=h?e.ticklen:0;if(f?_*=-1:c&&(_=0),h&&(d+=_,r)){var b=Wo.deg2rad(r);d=_*Math.cos(b)+1,v=_*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,E,T,L,x=0,C=e.side,M=e._id.charAt(0),g=e.tickangle,P;if(M===\"x\")P=!f&&C===\"bottom\"||f&&C===\"top\",L=P?1:-1,f&&(L*=-1),k=v*L,E=t+d*L,T=P?1:-.2,Math.abs(g)===90&&(f?T+=lM:g===-90&&C===\"bottom\"?T=Bb:g===90&&C===\"top\"?T=lM:T=.5,x=lM/2*(g/90)),p.xFn=function(O){return O.dx+k+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*T},p.anchorFn=function(O,U){if(c){if(s)return\"end\";if(l)return\"start\"}return!zh(U)||U===0||U===180?\"middle\":U*L<0!==f?\"end\":\"start\"},p.heightFn=function(O,U,G){return U<-60||U>60?-.5*G:e.side===\"top\"!==f?-G:0};else if(M===\"y\"){if(P=!f&&C===\"left\"||f&&C===\"right\",L=P?1:-1,f&&(L*=-1),k=d,E=v*L,T=0,!f&&Math.abs(g)===90&&(g===-90&&C===\"left\"||g===90&&C===\"right\"?T=Bb:T=.5),f){var A=zh(g)?+g:0;if(A!==0){var z=Wo.deg2rad(A);x=Math.abs(Math.sin(z))*Bb*L,T=0}}p.xFn=function(O){return O.dx+t-(k+O.fontSize*T)*L+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*lM},p.anchorFn=function(O,U){return zh(U)&&Math.abs(U)===90?\"middle\":P?\"end\":\"start\"},p.heightFn=function(O,U,G){return e.side===\"right\"&&(U*=-1),U<-30?-G:U<30?-.5*G:0}}return p};function BL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join(\"_\")}Jn.drawTicks=function(e,t,r){r=r||{};var n=t._id+\"tick\",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll(\"path.\"+n).data(i,BL);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"ticks\",1).classed(\"crisp\",r.crisp!==!1).each(function(o){return cM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style(\"stroke-width\",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+\"px\"}).attr(\"d\",r.path).style(\"display\",null),NL(t,[kse]),a.attr(\"transform\",r.transFn)};Jn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!==\"sync\"){var n=t._id+\"grid\",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&Jn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode===\"array\",u=0;u<o.length;u++){var c=o[u].x;if(l?!c:Math.abs(c)<t.dtick/100)if(o=o.slice(0,u).concat(o.slice(u+1)),l)u--;else break}t._gw=Xp.crispRound(e,t.gridwidth,1);for(var f=i?Xp.crispRound(e,t.minor.gridwidth,1):0,h=r.layer,d=r.minorLayer,v=1;v>=0;v--){var _=v?h:d;if(_){var b=_.selectAll(\"path.\"+n).data(v?o:a,BL);b.exit().remove(),b.enter().append(\"path\").classed(n,1).classed(\"crisp\",r.crisp!==!1),b.attr(\"transform\",r.transFn).attr(\"d\",r.path).each(function(p){return cM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||\"#ddd\")}).style(\"stroke-dasharray\",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style(\"stroke-width\",function(p){return(p.minor?f:t._gw)+\"px\"}).style(\"display\",null),typeof r.path==\"function\"&&b.attr(\"d\",r.path)}}NL(t,[dB,vB])}};Jn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+\"zl\",i=Jn.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll(\"path.\"+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append(\"path\").classed(n,1).classed(\"zl\",1).classed(\"crisp\",r.crisp!==!1).each(function(){r.layer.selectAll(\"path\").sort(function(o,s){return Yst(o.id,s.id)})}),a.attr(\"transform\",r.transFn).attr(\"d\",r.path).call(cM.stroke,t.zerolinecolor||cM.defaultLine).style(\"stroke-width\",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+\"px\").style(\"display\",null),NL(t,[hB])};Jn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer===\"above traces\",o=r.cls||i+\"tick\",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll(\"g.\"+o).data(t.showticklabels?s:[],BL),h=[];f.enter().append(\"g\").classed(o,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(H){var re=w0.select(this),oe=e._promises.length;re.call(Ob.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(Ob.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(re,u)})):d(re,u)}),NL(t,[yse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){w0.select(this).select(\"text\").call(Ob.positionText,l.xFn(H),l.yFn(H))});function d(H,re){H.each(function(oe){var _e=w0.select(this),Ce=_e.select(\".text-math-group\"),Le=l.anchorFn(oe,re),ge=r.transFn.call(_e.node(),oe)+(zh(re)&&+re!=0?\" rotate(\"+re+\",\"+l.xFn(oe)+\",\"+(l.yFn(oe)-oe.fontSize/2)+\")\":\"\"),ie=Ob.lineCount(_e),Se=hM*oe.fontSize,Ee=l.heightFn(oe,zh(re)?+re:0,(ie-1)*Se);if(Ee&&(ge+=H3(0,Ee)),Ce.empty()){var Ae=_e.select(\"text\");Ae.attr({transform:ge,\"text-anchor\":Le}),Ae.style(\"display\",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Be=Xp.bBox(Ce.node()).width,Pe=Be*{end:-.5,start:.5}[Le];Ce.attr(\"transform\",ge+H3(Pe,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H===\"allow\")){var re=H.indexOf(\"hide\")!==-1,oe=t._id.charAt(0)===\"x\",_e=0,Ce=oe?e._fullLayout.width:e._fullLayout.height;if(H.indexOf(\"domain\")!==-1){var Le=Wo.simpleMap(t.range,t.r2l);_e=t.l2p(Le[0])+t._offset,Ce=t.l2p(Le[1])+t._offset}var ge=Math.min(_e,Ce),ie=Math.max(_e,Ce),Se=t.side,Ee=1/0,Ae=-1/0;f.each(function(De){var ce=w0.select(this),je=ce.select(\".text-math-group\");if(je.empty()){var lt=Xp.bBox(ce.node()),pt=0;oe?(lt.right>ie||lt.left<ge)&&(pt=1):(lt.bottom>ie||lt.top+(t.tickangle?0:De.fontSize/4)<ge)&&(pt=1);var Vt=ce.select(\"text\");pt?re&&Vt.style(\"display\",\"none\"):Vt.node().style.display!==\"none\"&&(Vt.style(\"display\",null),Se===\"bottom\"||Se===\"right\"?Ee=Math.min(Ee,oe?lt.top:lt.left):Ee=-1/0,Se===\"top\"||Se===\"left\"?Ae=Math.max(Ae,oe?lt.bottom:lt.right):Ae=1/0)}});for(var Be in n._plots){var Pe=n._plots[Be];if(!(t._id!==Pe.xaxis._id&&t._id!==Pe.yaxis._id)){var me=oe?Pe.yaxis:Pe.xaxis;me&&(me[\"_visibleLabelMin_\"+t._id]=Ee,me[\"_visibleLabelMax_\"+t._id]=Ae)}}}},t._hideCounterAxisInsideTickLabels=function(H){var re=t._id.charAt(0)===\"x\",oe=[];for(var _e in n._plots){var Ce=n._plots[_e];t._id!==Ce.xaxis._id&&t._id!==Ce.yaxis._id||oe.push(re?Ce.yaxis:Ce.xaxis)}oe.forEach(function(Le,ge){Le&&vM(Le)&&(H||[hB,vB,dB,kse,yse]).forEach(function(ie){var Se=ie.K===\"tick\"&&ie.L===\"text\"&&t.ticklabelmode===\"period\",Ee=n._plots[t._mainSubplot],Ae;if(ie.K===hB.K){var Be=a?Ee.zerolinelayerAbove:Ee.zerolinelayer;Ae=Be.selectAll(\".\"+t._id+\"zl\")}else ie.K===vB.K?Ae=Ee.minorGridlayer.selectAll(\".\"+t._id):ie.K===dB.K?Ae=Ee.gridlayer.selectAll(\".\"+t._id):Ae=Ee[t._id.charAt(0)+\"axislayer\"];Ae.each(function(){var Pe=w0.select(this);ie.L&&(Pe=Pe.selectAll(ie.L)),Pe.each(function(me){var De=t.l2p(Se?pB(me):me.x)+t._offset,ce=w0.select(this);De<t[\"_visibleLabelMax_\"+Le._id]&&De>t[\"_visibleLabelMin_\"+Le._id]?ce.style(\"display\",\"none\"):ie.K===\"tick\"&&!ge&&ce.node().style.display!==\"none\"&&ce.style(\"display\",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var _=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!==\"log\"||String(t.dtick).charAt(0)!==\"D\")){_=t.autotickangles[0];var H=0,re=[],oe,_e=1;f.each(function(Tr){H=Math.max(H,Tr.fontSize);var fr=t.l2p(Tr.x),$e=gB(this),St=Xp.bBox($e.node());_e=Math.max(_e,Ob.lineCount($e)),re.push({top:0,bottom:10,height:10,left:fr-St.width/2,right:fr+St.width/2+2,width:St.width+2})});var Ce=(t.tickson===\"boundaries\"||t.showdividers)&&!r.secondary,Le=s.length,ge=Math.abs((s[Le-1].x-s[0].x)*t._m)/(Le-1),ie=Ce?ge/2:ge,Se=Ce?t.ticklen:H*1.25*_e,Ee=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),Ae=ie/Ee,Be=t.autotickangles.map(function(Tr){return Tr*Math.PI/180}),Pe=Be.find(function(Tr){return Math.abs(Math.cos(Tr))<=Ae});Pe===void 0&&(Pe=Be.reduce(function(Tr,fr){return Math.abs(Math.cos(Tr))<Math.abs(Math.cos(fr))?Tr:fr},Be[0]));var me=Pe*(180/Math.PI);if(Ce){var De=2;for(t.ticks&&(De+=t.tickwidth/2),oe=0;oe<re.length;oe++){var ce=s[oe].xbnd,je=re[oe];if(ce[0]!==null&&je.left-t.l2p(ce[0])<De||ce[1]!==null&&t.l2p(ce[1])-je.right<De){_=me;break}}}else{var lt=t.ticklabelposition||\"\",pt=t.tickson||\"\",Vt=function(Tr){return lt.indexOf(Tr)!==-1},ot=Vt(\"top\"),ut=Vt(\"left\"),Wt=Vt(\"right\"),Nt=Vt(\"bottom\"),$t=pt!==\"boundaries\"&&(Nt||ut||ot||Wt),sr=$t?(t.tickwidth||0)+2*zL:0;for(oe=0;oe<re.length-1;oe++)if(Wo.bBoxIntersect(re[oe],re[oe+1],sr)){_=me;break}}_&&d(f,_)}}t._selections&&(t._selections[o]=f);var p=[v];t.automargin&&n._redrawFromAutoMarginCount&&c===90?(_=c,p.push(function(){d(f,c)})):p.push(b),t._tickAngles&&p.push(function(){t._tickAngles[o]=_===null?zh(u)?u:0:_});var k=function(){var H=0,re=0;return f.each(function(oe,_e){var Ce=gB(this),Le=Ce.select(\".text-math-group\");if(Le.empty()){var ge;t._vals[_e]&&(ge=t._vals[_e].bb||Xp.bBox(Ce.node()),t._vals[_e].bb=ge),H=Math.max(H,ge.width),re=Math.max(re,ge.height)}}),{labelsMaxW:H,labelsMaxH:re}},E=t._anchorAxis;if(E&&(E.autorange||E.insiderange)&&vM(t)&&!Kst(n,t._id)&&(n._insideTickLabelsUpdaterange||(n._insideTickLabelsUpdaterange={}),E.autorange&&(n._insideTickLabelsUpdaterange[E._name+\".autorange\"]=E.autorange,p.push(k)),E.insiderange)){var T=k(),L=t._id.charAt(0)===\"y\"?T.labelsMaxW:T.labelsMaxH;L+=2*zL,t.ticklabelposition===\"inside\"&&(L+=t.ticklen||0);var x=t.side===\"right\"||t.side===\"top\"?1:-1,C=x===1?1:0,M=x===1?0:1,g=[];g[M]=E.range[M];var P=E.range,A=E.r2p(P[C]),z=E.r2p(P[M]),O=n._insideTickLabelsUpdaterange[E._name+\".range\"];if(O){var U=E.r2p(O[C]),G=E.r2p(O[M]),Z=x*(t._id.charAt(0)===\"y\"?1:-1);Z*A<Z*U&&(A=U,g[C]=P[C]=O[C]),Z*z>Z*G&&(z=G,g[M]=P[M]=O[M])}var j=Math.abs(z-A);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!==\"y\"&&(L=-L),g[C]=E.p2r(E.r2p(P[C])+x*L),E.autorange===\"min\"||E.autorange===\"max reversed\"?(g[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange===\"max\"||E.autorange===\"min reversed\")&&(g[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+\".range\"]=g}var N=Wo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function xlt(e,t,r){var n=t._id+\"divider\",i=r.vals,a=r.layer.selectAll(\"path.\"+n).data(i,BL);a.exit().remove(),a.enter().insert(\"path\",\":first-child\").classed(n,1).classed(\"crisp\",1).call(cM.stroke,t.dividercolor).style(\"stroke-width\",Xp.crispRound(e,t.dividerwidth,1)+\"px\"),a.attr(\"transform\",r.transFn).attr(\"d\",r.path)}Jn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!==\"free\"?a=t._anchorAxis:n===\"x\"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n===\"y\"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i===\"top\"||i===\"left\")return a._offset;if(i===\"bottom\"||i===\"right\")return a._offset+a._length};function Ese(e){var t=e.title.font.size,r=(e.title.text.match(Ob.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty(\"standoff\")?t*(Bb+r*hM):r?t*(r+1)*hM:t}function blt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Ob.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty(\"standoff\"))t.side===\"bottom\"||t.side===\"right\"?o=t._depth+t.title.standoff+a*Bb:(t.side===\"top\"||t.side===\"left\")&&(o=t._depth+t.title.standoff+a*(lM+s*hM));else{var l=vM(t);if(t.type===\"multicategory\")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks===\"outside\"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i===\"x\"?o+=t.side===\"top\"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side===\"right\"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Jn.getPxPosition(e,t),f,h,d;i===\"x\"?(h=t._offset+t._length/2,d=t.side===\"top\"?c-o:c+o):(d=t._offset+t._length/2,h=t.side===\"right\"?c+o:c-o,f={rotate:\"-90\",offset:0});var v;if(t.type!==\"multicategory\"){var _=t._selections[t._id+\"tick\"];if(v={selection:_,side:t.side},_&&_.node()&&_.node().parentNode){var b=Xp.getTranslate(_.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty(\"standoff\")&&(v.pad=0)}return t._titleStandoff=o,Nst.draw(e,n+\"title\",{propContainer:t,propName:t._name+\".title.text\",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,\"text-anchor\":\"middle\"}})}Jn.shouldShowZeroLine=function(e,t,r){var n=Wo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type===\"linear\"||t.type===\"-\")&&!(t.rangebreaks&&t.maskBreaks(0)===OL)&&(zse(t,0)||!wlt(e,t,r,n)||Tlt(e,t))};Jn.clipEnds=function(e,t){return t.filter(function(r){return zse(e,r.x)})};function zse(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function wlt(e,t,r,n){var i=r._mainAxis;if(!i)return;var a=e._fullLayout,o=t._id.charAt(0),s=Jn.counterLetter(t._id),l=t._offset+(Math.abs(n[0])<Math.abs(n[1])==(o===\"x\")?0:t._length);function u(v){if(!v.showline||!v.linewidth)return!1;var _=Math.max((v.linewidth+t.zerolinewidth)/2,1);function b(E){return typeof E==\"number\"&&Math.abs(E-l)<_}if(b(v._mainLinePosition)||b(v._mainMirrorPosition))return!0;var p=v._linepositions||{};for(var k in p)if(b(p[k][0])||b(p[k][1]))return!0}var c=a._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return u(r,l);for(var f=Jn.list(e,s),h=0;h<f.length;h++){var d=f[h];if(d._mainAxis===i&&u(d,l))return!0}}function Tlt(e,t){for(var r=e._fullData,n=t._mainSubplot,i=t._id.charAt(0),a=0;a<r.length;a++){var o=r[a];if(o.visible===!0&&o.xaxis+o.yaxis===n&&(uM.traceIs(o,\"bar-like\")&&o.orientation==={x:\"h\",y:\"v\"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function gB(e){var t=w0.select(e),r=t.select(\".text-math-group\");return r.empty()?t.select(\"text\"):r}Jn.allowAutoMargin=function(e){for(var t=Jn.list(e,\"\",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(G3.allowAutoMargin(e,bB(n)),n.mirror&&G3.allowAutoMargin(e,Ose(n))),uM.getComponentMethod(\"rangeslider\",\"isVisible\")(n)&&G3.allowAutoMargin(e,qse(n))}};function bB(e){return e._id+\".automargin\"}function Ose(e){return bB(e)+\".mirror\"}function qse(e){return e._id+\".rangeslider\"}Jn.swap=function(e,t){for(var r=Alt(e,t),n=0;n<r.length;n++)Slt(e,r[n].x,r[n].y)};function Alt(e,t){var r=[],n,i;for(n=0;n<t.length;n++){var a=[],o=e._fullData[t[n]].xaxis,s=e._fullData[t[n]].yaxis;if(!(!o||!s)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(s)!==-1)&&a.push(i);if(!a.length){r.push({x:[o],y:[s]});continue}var l=r[a[0]],u;if(a.length>1)for(i=1;i<a.length;i++)u=r[a[i]],LL(l.x,u.x),LL(l.y,u.y);LL(l.x,[o]),LL(l.y,[s])}}return r}function LL(e,t){for(var r=0;r<t.length;r++)e.indexOf(t[r])===-1&&e.push(t[r])}function Slt(e,t,r){var n=[],i=[],a=e.layout,o,s;for(o=0;o<t.length;o++)n.push(Jn.getFromId(e,t[o]));for(o=0;o<r.length;o++)i.push(Jn.getFromId(e,r[o]));var l=Object.keys(Ust),u=[\"anchor\",\"domain\",\"overlaying\",\"position\",\"side\",\"tickangle\",\"editType\"],c=[\"linear\",\"log\"];for(o=0;o<l.length;o++){var f=l[o],h=n[0][f],d=i[0][f],v=!0,_=!1,b=!1;if(!(f.charAt(0)===\"_\"||typeof h==\"function\"||u.indexOf(f)!==-1)){for(s=1;s<n.length&&v;s++){var p=n[s][f];f===\"type\"&&c.indexOf(h)!==-1&&c.indexOf(p)!==-1&&h!==p?_=!0:p!==h&&(v=!1)}for(s=1;s<i.length&&v;s++){var k=i[s][f];f===\"type\"&&c.indexOf(d)!==-1&&c.indexOf(k)!==-1&&d!==k?b=!0:i[s][f]!==d&&(v=!1)}v&&(_&&(a[n[0]._name].type=\"linear\"),b&&(a[i[0]._name].type=\"linear\"),Mlt(a,f,n,i,e._fullLayout._dfltTitle))}}for(o=0;o<e._fullLayout.annotations.length;o++){var E=e._fullLayout.annotations[o];t.indexOf(E.xref)!==-1&&r.indexOf(E.yref)!==-1&&Wo.swapAttrs(a.annotations[o],[\"?\"])}}function Mlt(e,t,r,n,i){var a=Wo.nestedProperty,o=a(e[r[0]._name],t).get(),s=a(e[n[0]._name],t).get(),l;for(t===\"title\"&&(o&&o.text===i.x&&(o.text=i.y),s&&s.text===i.y&&(s.text=i.x)),l=0;l<r.length;l++)a(e,r[l]._name+\".\"+t).set(s);for(l=0;l<n.length;l++)a(e,n[l]._name+\".\"+t).set(o)}function wB(e){return e._id===\"angularaxis\"}function cB(e,t){for(var r=t._rangebreaks.length,n=0;n<r;n++){var i=t._rangebreaks[n];if(e>=i.min&&e<i.max)return i.max}return e}function vM(e){return(e.ticklabelposition||\"\").indexOf(\"inside\")!==-1}function NL(e,t){vM(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function mB(e,t,r,n){var i=e.anchor!==\"free\"&&(e.overlaying===void 0||e.overlaying===!1)?e._id:e.overlaying,a;n?a=e.side===\"right\"?t:-t:a=t,i in r||(r[i]={}),e.side in r[i]||(r[i][e.side]=0),r[i][e.side]+=a}function Elt(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}function klt(e,t){return/%f/.test(t)?e>=Wst:/%L/.test(t)?e>=jst:/%[SX]/.test(t)?e>=FL:/%M/.test(t)?e>=fM:/%[HI]/.test(t)?e>=wm:/%p/.test(t)?e>=v_:/%[Aadejuwx]/.test(t)?e>=Ov:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=DL:/%[q]/.test(t)?e>=RL:/%[Yy]/.test(t)?e>=IL:!0}});var TB=ye((nar,Nse)=>{\"use strict\";Nse.exports=function(t,r,n){var i,a;if(n){var o=r===\"reversed\"||r===\"min reversed\"||r===\"max reversed\";i=n[o?1:0],a=n[o?0:1]}var s=t(\"autorangeoptions.minallowed\",a===null?i:void 0),l=t(\"autorangeoptions.maxallowed\",i===null?a:void 0);s===void 0&&t(\"autorangeoptions.clipmin\"),l===void 0&&t(\"autorangeoptions.clipmax\"),t(\"autorangeoptions.include\")}});var AB=ye((aar,Use)=>{\"use strict\";var Clt=TB();Use.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||\"-\";n(\"minallowed\"),n(\"maxallowed\");var s=n(\"range\");if(!s){var l;!i.noInsiderange&&o!==\"log\"&&(l=n(\"insiderange\"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n(\"range\",l)))}var u=r.getAutorangeDflt(s,i),c=n(\"autorange\",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c===\"reversed\"||c===!0)||s[0]!==null&&(c===\"min\"||c===\"max reversed\")||s[1]!==null&&(c===\"max\"||c===\"min reversed\"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n(\"autorange\",u)),c&&(Clt(n,c,s),(o===\"linear\"||o===\"-\")&&n(\"rangemode\")),r.cleanRange()}});var Gse=ye((oar,Vse)=>{var Llt={left:0,top:0};Vse.exports=Plt;function Plt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=Ilt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Ilt(e){return e===window||e===document||e===document.body?Llt:e.getBoundingClientRect()}});var UL=ye((sar,Hse)=>{\"use strict\";var Rlt=oq();function Dlt(){var e=!1;try{var t=Object.defineProperty({},\"passive\",{get:function(){e=!0}});window.addEventListener(\"test\",null,t),window.removeEventListener(\"test\",null,t)}catch(r){e=!1}return e}Hse.exports=Rlt&&Dlt()});var Wse=ye((lar,jse)=>{\"use strict\";jse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a===\"left\"||a===\"bottom\"?o:a===\"center\"||a===\"middle\"?l:a===\"right\"||a===\"top\"?s:o<2/3-l?o:s>4/3-l?s:l}});var Yse=ye((uar,Zse)=>{\"use strict\";var Xse=Dr(),Flt=[[\"sw-resize\",\"s-resize\",\"se-resize\"],[\"w-resize\",\"move\",\"e-resize\"],[\"nw-resize\",\"n-resize\",\"ne-resize\"]];Zse.exports=function(t,r,n,i){return n===\"left\"?t=0:n===\"center\"?t=1:n===\"right\"?t=2:t=Xse.constrain(Math.floor(t*3),0,2),i===\"bottom\"?r=0:i===\"middle\"?r=1:i===\"top\"?r=2:r=Xse.constrain(Math.floor(r*3),0,2),Flt[r][t]}});var Jse=ye((car,Kse)=>{\"use strict\";var zlt=k3(),Olt=H6(),qlt=HS().getGraphDiv,Blt=NS(),SB=Kse.exports={};SB.wrapped=function(e,t,r){e=qlt(e),e._fullLayout&&Olt.clear(e._fullLayout._uid+Blt.HOVERID),SB.raw(e,t,r)};SB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&zlt.triggerHandler(t,\"plotly_beforehover\",r)===!1)&&(n._hoverlayer.selectAll(\"g\").remove(),n._hoverlayer.selectAll(\"line\").remove(),n._hoverlayer.selectAll(\"circle\").remove(),t._hoverdata=void 0,r.target&&i&&t.emit(\"plotly_unhover\",{event:r,points:i}))}});var yv=ye((far,tle)=>{\"use strict\";var Nlt=Gse(),MB=lq(),Ult=UL(),Vlt=Dr().removeElement,Glt=Rh(),Nb=tle.exports={};Nb.align=Wse();Nb.getCursor=Yse();var Qse=Jse();Nb.unhover=Qse.wrapped;Nb.unhoverRaw=Qse.raw;Nb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents=\"all\",a.onmousedown=b,Ult?(a._ontouchstart&&a.removeEventListener(\"touchstart\",a._ontouchstart),a._ontouchstart=b,a.addEventListener(\"touchstart\",b,{passive:!1})):a.ontouchstart=b;function v(E,T,L){return Math.abs(E)<L&&(E=0),Math.abs(T)<L&&(T=0),[E,T]}var _=t.clampFn||v;function b(E){r._dragged=!1,r._dragging=!0;var T=$se(E);o=T[0],s=T[1],h=E.target,f=E,d=E.buttons===2||E.ctrlKey,typeof E.clientX==\"undefined\"&&typeof E.clientY==\"undefined\"&&(E.clientX=o,E.clientY=s),l=new Date().getTime(),l-r._mouseDownTime<i?n+=1:(n=1,r._mouseDownTime=l),t.prepFn&&t.prepFn(E,o,s),MB&&!d?(c=ele(),c.style.cursor=window.getComputedStyle(a).cursor):MB||(c=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(a).cursor),document.addEventListener(\"mouseup\",k),document.addEventListener(\"touchend\",k),t.dragmode!==!1&&(E.preventDefault(),document.addEventListener(\"mousemove\",p),document.addEventListener(\"touchmove\",p,{passive:!1}))}function p(E){E.preventDefault();var T=$se(E),L=t.minDrag||Glt.MINDRAG,x=_(T[0]-o,T[1]-s,L),C=x[0],M=x[1];(C||M)&&(r._dragged=!0,Nb.unhover(r,E)),r._dragged&&t.moveFn&&!d&&(r._dragdata={element:a,dx:C,dy:M},t.moveFn(C,M))}function k(E){if(delete r._dragdata,t.dragmode!==!1&&(E.preventDefault(),document.removeEventListener(\"mousemove\",p),document.removeEventListener(\"touchmove\",p)),document.removeEventListener(\"mouseup\",k),document.removeEventListener(\"touchend\",k),MB?Vlt(c):u&&(c.documentElement.style.cursor=u,u=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var T;f.target===h?T=f:(T={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!T[L]&&typeof x!=\"function\"&&(T[L]=x)})),t.clickFn&&t.clickFn(n,T),d||h.dispatchEvent(new MouseEvent(\"click\",E))}r._dragging=!1,r._dragged=!1}};function ele(){var e=document.createElement(\"div\");e.className=\"dragcover\";var t=e.style;return t.position=\"fixed\",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background=\"none\",document.body.appendChild(e),e}Nb.coverSlip=ele;function $se(e){return Nlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Eg=ye((har,rle)=>{\"use strict\";rle.exports=function(t,r){(t.attr(\"class\")||\"\").split(\" \").forEach(function(n){n.indexOf(\"cursor-\")===0&&t.classed(n,!1)}),r&&t.classed(\"cursor-\"+r,!0)}});var ale=ye((dar,nle)=>{\"use strict\";var EB=Eg(),pM=\"data-savedcursor\",ile=\"!!\";nle.exports=function(t,r){var n=t.attr(pM);if(r){if(!n){for(var i=(t.attr(\"class\")||\"\").split(\" \"),a=0;a<i.length;a++){var o=i[a];o.indexOf(\"cursor-\")===0&&t.attr(pM,o.slice(7)).classed(o,!1)}t.attr(pM)||t.attr(pM,ile)}EB(t,r)}else n&&(t.attr(pM,null),n===ile?EB(t):EB(t,n))}});var CB=ye((par,ole)=>{\"use strict\";var kB=ec(),Hlt=Ih();ole.exports={_isSubplotObj:!0,visible:{valType:\"boolean\",dflt:!0,editType:\"legend\"},bgcolor:{valType:\"color\",editType:\"legend\"},bordercolor:{valType:\"color\",dflt:Hlt.defaultLine,editType:\"legend\"},maxheight:{valType:\"number\",min:0,editType:\"legend\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"legend\"},font:kB({editType:\"legend\"}),grouptitlefont:kB({editType:\"legend\"}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"v\",editType:\"legend\"},traceorder:{valType:\"flaglist\",flags:[\"reversed\",\"grouped\"],extras:[\"normal\"],editType:\"legend\"},tracegroupgap:{valType:\"number\",min:0,dflt:10,editType:\"legend\"},entrywidth:{valType:\"number\",min:0,editType:\"legend\"},entrywidthmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\",editType:\"legend\"},indentation:{valType:\"number\",min:-15,dflt:0,editType:\"legend\"},itemsizing:{valType:\"enumerated\",values:[\"trace\",\"constant\"],dflt:\"trace\",editType:\"legend\"},itemwidth:{valType:\"number\",min:30,dflt:30,editType:\"legend\"},itemclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggle\",editType:\"legend\"},itemdoubleclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],dflt:\"toggleothers\",editType:\"legend\"},groupclick:{valType:\"enumerated\",values:[\"toggleitem\",\"togglegroup\"],dflt:\"togglegroup\",editType:\"legend\"},titleclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],editType:\"legend\"},titledoubleclick:{valType:\"enumerated\",values:[\"toggle\",\"toggleothers\",!1],editType:\"legend\"},x:{valType:\"number\",editType:\"legend\"},xref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"legend\"},y:{valType:\"number\",editType:\"legend\"},yref:{valType:\"enumerated\",dflt:\"paper\",values:[\"container\",\"paper\"],editType:\"layoutstyle\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],editType:\"legend\"},uirevision:{valType:\"any\",editType:\"none\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"legend\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"legend\"},font:kB({editType:\"legend\"}),side:{valType:\"enumerated\",values:[\"top\",\"left\",\"top left\",\"top center\",\"top right\"],editType:\"legend\"},editType:\"legend\"},editType:\"legend\"}});var mM=ye(gM=>{\"use strict\";gM.isGrouped=function(t){return(t.traceorder||\"\").indexOf(\"grouped\")!==-1};gM.isVertical=function(t){return t.orientation!==\"h\"};gM.isReversed=function(t){return(t.traceorder||\"\").indexOf(\"reversed\")!==-1};gM.getId=function(t){return t._id||\"legend\"}});var PB=ye((mar,sle)=>{\"use strict\";var VL=qa(),Yp=Dr(),jlt=vl(),Wlt=Gl(),Xlt=CB(),Zlt=_3(),LB=mM();function Ylt(e,t,r,n,i){var a=t[e]||{},o=jlt.newContainer(r,e);function s(H,re){return Yp.coerce(a,o,Xlt,H,re)}var l=Yp.coerceFont(s,\"font\",r.font);s(\"bgcolor\",r.paper_bgcolor),s(\"bordercolor\");var u=s(\"visible\");if(!u)return;var c,f=function(H,re){var oe=c._input,_e=c;return Yp.coerce(oe,_e,Wlt,H,re)},h=r.font||{},d=Yp.coerceFont(s,\"grouptitlefont\",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),v=0,_=!1,b=\"normal\",p=(r.shapes||[]).filter(function(H){return H.showlegend});function k(H){return VL.traceIs(H,\"pie-like\")&&H._length!=null&&(Array.isArray(H.legend)||Array.isArray(H.showlegend))}n.filter(k).forEach(function(H){H.visible&&v++;for(var re=0;re<H._length;re++){var oe=(Array.isArray(H.legend)?H.legend[re]:H.legend)||\"legend\";oe===e&&((Array.isArray(H.showlegend)?H.showlegend[re]:H.showlegend)||H._dfltShowLegend)&&(_=!0,v++)}if(e===\"legend\"&&H._length>H.legend.length)for(var _e=H.legend.length;_e<H._length;_e++)_=!0,v++});for(var E=n.concat(p).filter(function(H){return!k(c)&&e===(H.legend||\"legend\")}),T=0;T<E.length;T++)if(c=E[T],!!c.visible){var L=c._isShape;(c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(v++,c.showlegend&&(_=!0,(!L&&VL.traceIs(c,\"pie-like\")||c._input.showlegend===!0)&&v++),Yp.coerceFont(f,\"legendgrouptitle.font\",d)),(!L&&VL.traceIs(c,\"bar\")&&r.barmode===\"stack\"||[\"tonextx\",\"tonexty\"].indexOf(c.fill)!==-1)&&(b=LB.isGrouped({traceorder:b})?\"grouped+reversed\":\"reversed\"),c.legendgroup!==void 0&&c.legendgroup!==\"\"&&(b=LB.isReversed({traceorder:b})?\"reversed+grouped\":\"grouped\")}var x=Yp.coerce(t,r,Zlt,\"showlegend\",r.showlegend||_&&v>(e===\"legend\"?1:0));if(x===!1&&(r[e]=void 0),!(x===!1&&!a.uirevision)&&(s(\"uirevision\",r.uirevision),x!==!1)){s(\"borderwidth\");var C=s(\"orientation\"),M=s(\"yref\"),g=s(\"xref\"),P=C===\"h\",A=M===\"paper\",z=g===\"paper\",O,U,G,Z=\"left\";P?(O=0,VL.getComponentMethod(\"rangeslider\",\"isVisible\")(t.xaxis)?A?(U=1.1,G=\"bottom\"):(U=1,G=\"top\"):A?(U=-.1,G=\"top\"):(U=0,G=\"bottom\")):(U=1,G=\"auto\",z?O=1.02:(O=1,Z=\"right\")),Yp.coerce(a,o,{x:{valType:\"number\",editType:\"legend\",min:z?-2:0,max:z?3:1,dflt:O}},\"x\"),Yp.coerce(a,o,{y:{valType:\"number\",editType:\"legend\",min:A?-2:0,max:A?3:1,dflt:U}},\"y\"),s(\"traceorder\",b),LB.isGrouped(r[e])&&s(\"tracegroupgap\"),s(\"entrywidth\"),s(\"entrywidthmode\"),s(\"indentation\"),s(\"itemsizing\"),s(\"itemwidth\"),s(\"itemclick\"),s(\"itemdoubleclick\"),s(\"groupclick\"),s(\"xanchor\",Z),s(\"yanchor\",G),s(\"maxheight\"),s(\"valign\"),Yp.noneOrAll(a,o,[\"x\",\"y\"]);var j=s(\"title.text\");if(j){s(\"title.side\",P?\"left\":\"top\");var N=Yp.extendFlat({},l,{size:Yp.bigFont(l.size)});Yp.coerceFont(s,\"title.font\",N);let H=i>1;s(\"titleclick\",H?\"toggle\":!1),s(\"titledoubleclick\",H?\"toggleothers\":!1)}}}sle.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i<o.length;i++){var s=o[i];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=[\"legend\"];for(i=0;i<a.length;i++)Array.isArray(a[i].legend)?u=u.concat(a[i].legend):Yp.pushUnique(u,a[i].legend);for(r._legends=[],i=0;i<u.length;i++){var c=u[i];Ylt(c,t,r,a,u.length),r[c]&&(r[c]._id=c),r._legends.push(c)}}});var DB=ye(RB=>{\"use strict\";var p_=qa(),IB=Dr(),Klt=IB.pushUnique,Jlt=mM(),lle=!0;RB.handleItemClick=function(t,r,n,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;i===\"toggle\"&&n.itemdoubleclick===\"toggleothers\"&&lle&&r.data&&r._context.showTips&&(IB.notifier(IB._(r,\"Double-click on legend to isolate one trace\"),\"long\"),lle=!1);var l=s===\"togglegroup\",u=a.hiddenlabels?a.hiddenlabels.slice():[],c=r._fullData,f=(a.shapes||[]).filter(function(ot){return ot.showlegend}),h=c.concat(f),d=o.trace;d._isShape&&(d=d._fullInput);var v=d.legendgroup,_,b,p,k,E,T,L={},x=[],C=[],M=[];function g(ot,ut){var Wt=x.indexOf(ot),Nt=L.visible;return Nt||(Nt=L.visible=[]),x.indexOf(ot)===-1&&(x.push(ot),Wt=x.length-1),Nt[Wt]=ut,Wt}var P=(a.shapes||[]).map(function(ot){return ot._input}),A=!1;function z(ot,ut){P[ot].visible=ut,A=!0}function O(ot,ut){if(!(o.groupTitle&&!l)){var Wt=ot._fullInput||ot,Nt=Wt._isShape,$t=Wt.index;$t===void 0&&($t=Wt._index);var sr=Wt.visible===!1?!1:ut;Nt?z($t,sr):g($t,sr)}}var U=d.legend,G=d._fullInput,Z=G&&G._isShape;if(!Z&&p_.traceIs(d,\"pie-like\")){var j=o.label,N=u.indexOf(j);if(i===\"toggle\")N===-1?u.push(j):u.splice(N,1);else if(i===\"toggleothers\"){var H=N!==-1,re=[];for(_=0;_<r.calcdata.length;_++){var oe=r.calcdata[_];for(b=0;b<oe.length;b++){var _e=oe[b],Ce=_e.label;U===oe[0].trace.legend&&j!==Ce&&(u.indexOf(Ce)===-1&&(H=!0),Klt(u,Ce),re.push(Ce))}}if(!H)for(var Le=0;Le<re.length;Le++){var ge=u.indexOf(re[Le]);ge!==-1&&u.splice(ge,1)}}p_.call(\"_guiRelayout\",r,\"hiddenlabels\",u)}else{var ie=v&&v.length,Se=[],Ee;if(ie)for(_=0;_<h.length;_++)Ee=h[_],Ee.visible&&Ee.legendgroup===v&&Se.push(_);if(i===\"toggle\"){var Ae;switch(d.visible){case!0:Ae=\"legendonly\";break;case!1:Ae=!1;break;case\"legendonly\":Ae=!0;break}if(ie)if(l)for(_=0;_<h.length;_++){var Be=h[_];Be.visible!==!1&&Be.legendgroup===v&&O(Be,Ae)}else O(d,Ae);else O(d,Ae)}else if(i===\"toggleothers\"){var Pe,me,De,ce,je,lt=!0;for(_=0;_<h.length;_++)if(je=h[_],Pe=je===d,De=je.showlegend!==!0,!(Pe||De)&&(me=ie&&je.legendgroup===v,!me&&je.legend===U&&je.visible===!0&&!p_.traceIs(je,\"notLegendIsolatable\"))){lt=!1;break}for(_=0;_<h.length;_++)if(je=h[_],!(je.visible===!1||je.legend!==U)&&!p_.traceIs(je,\"notLegendIsolatable\"))switch(d.visible){case\"legendonly\":O(je,!0);break;case!0:ce=lt?!0:\"legendonly\",Pe=je===d,De=je.showlegend!==!0&&!je.legendgroup,me=Pe||ie&&je.legendgroup===v,O(je,me||De?!0:ce);break}}for(_=0;_<C.length;_++)if(p=C[_],!!p){var pt=p.constructUpdate(),Vt=Object.keys(pt);for(b=0;b<Vt.length;b++)k=Vt[b],T=L[k]=L[k]||[],T[M[_]]=pt[k]}for(E=Object.keys(L),_=0;_<E.length;_++)for(k=E[_],b=0;b<x.length;b++)L[k].hasOwnProperty(b)||(L[k][b]=void 0);A?p_.call(\"_guiUpdate\",r,L,{shapes:P},x):p_.call(\"_guiRestyle\",r,L,x)}};RB.handleTitleClick=function(t,r,n){let i=t._fullLayout,a=t._fullData,o=Jlt.getId(r),s=(i.shapes||[]).filter(function(p){return p.showlegend}),l=a.concat(s);function u(p){return(p.legend||\"legend\")===o}var c,f;if(n===\"toggle\")c=!l.some(function(k){return u(k)&&k.visible===!0}),f=!1;else{let p=l.some(function(k){return!u(k)&&k.visible===!0&&k.showlegend!==!1});c=!0,f=!p}let h={visible:[]},d=[],v=(i.shapes||[]).map(function(p){return p._input});for(var _=!1,b=0;b<l.length;b++){let p=l[b],k=u(p);if(!k){let L=p.showlegend!==!0&&!p.legendgroup;if(n===\"toggle\"||L)continue}let T=(k?c:f)?!0:\"legendonly\";p.visible!==!1&&p.visible!==T&&(p._isShape?(v[p._index].visible=T,_=!0):(d.push(p.index),h.visible.push(T)))}_?p_.call(\"_guiUpdate\",t,h,{shapes:v},d):d.length&&p_.call(\"_guiRestyle\",t,h,d)}});var FB=ye((_ar,ule)=>{\"use strict\";ule.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:\"#808BA4\",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var hle=ye((xar,fle)=>{\"use strict\";var cle=qa(),zB=mM();fle.exports=function(t,r,n){var i=r._inHover,a=zB.isGrouped(r),o=zB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function _(H,re,oe){if(r.visible!==!1&&!(n&&H!==r._id))if(re===\"\"||!zB.isGrouped(r)){var _e=\"~~i\"+f;l.push(_e),s[_e]=[oe],f++}else l.indexOf(re)===-1?(l.push(re),u=!0,s[re]=[oe]):s[re].push(oe)}for(d=0;d<t.length;d++){var b=t[d],p=b[0],k=p.trace,E=k.legend,T=k.legendgroup;if(!(!i&&(!k.visible||!k.showlegend)))if(cle.traceIs(k,\"pie-like\")){var L=Array.isArray(k.legend),x=Array.isArray(k.showlegend);for(c[T]||(c[T]={}),v=0;v<b.length;v++)if(!(x&&k.showlegend[b[v].i]===!1)){L&&(E=k.legend[b[v].i]||\"legend\");var C=b[v].label;c[T][C]||(_(E,T,{label:C,color:b[v].color,i:b[v].i,trace:k,pts:b[v].pts}),c[T][C]=!0,h=Math.max(h,(C||\"\").length))}}else _(E,T,p),h=Math.max(h,(k.name||\"\").length)}if(!l.length)return[];var M=!u||!a,g=[];for(d=0;d<l.length;d++){var P=s[l[d]];M?g.push(P[0]):g.push(P)}for(M&&(g=[g]),d=0;d<g.length;d++){var A=1/0;for(v=0;v<g[d].length;v++){var z=g[d][v].trace.legendrank;A>z&&(A=z)}g[d][0]._groupMinRank=A,g[d][0]._preGroupSort=d}var O=function(H,re){return H[0]._groupMinRank-re[0]._groupMinRank||H[0]._preGroupSort-re[0]._preGroupSort},U=function(H,re){return H.trace.legendrank-re.trace.legendrank||H._preSort-re._preSort};for(g.forEach(function(H,re){H[0]._preGroupSort=re}),g.sort(O),d=0;d<g.length;d++){g[d].forEach(function(H,re){H._preSort=re}),g[d].sort(U);var G=g[d][0].trace,Z=null;for(v=0;v<g[d].length;v++){var j=g[d][v].trace.legendgrouptitle;if(j&&j.text){Z=j,i&&(j.font=r._groupTitleFont);break}}if(o&&g[d].reverse(),Z){var N=!1;for(v=0;v<g[d].length;v++)if(cle.traceIs(g[d][v].trace,\"pie-like\")){N=!0;break}g[d].unshift({i:-1,groupTitle:Z,noClick:N,trace:{showlegend:G.showlegend,legendgroup:G.legendgroup,legend:G.legend,visible:r.groupclick===\"toggleitem\"?!0:G.visible}})}for(v=0;v<g[d].length;v++)g[d][v]=[g[d][v]]}return r._lgroupsLength=g.length,r._maxNameLength=h,g}});var g_=ye(Ub=>{\"use strict\";var GL=Dr();function dle(e){return e.indexOf(\"e\")!==-1?e.replace(/[.]?0+e/,\"e\"):e.indexOf(\".\")!==-1?e.replace(/[.]?0+$/,\"\"):e}Ub.formatPiePercent=function(t,r){var n=dle((t*100).toPrecision(3));return GL.numSeparate(n,r)+\"%\"};Ub.formatPieValue=function(t,r){var n=dle(t.toPrecision(10));return GL.numSeparate(n,r)};Ub.getFirstFilled=function(t,r){if(GL.isArrayOrTypedArray(t))for(var n=0;n<r.length;n++){var i=t[r[n]];if(i||i===0||i===\"\")return i}};Ub.castOption=function(t,r){if(GL.isArrayOrTypedArray(t))return Ub.getFirstFilled(t,r);if(t)return t};Ub.getRotationAngle=function(e){return(e===\"auto\"?0:e)*Math.PI/180}});var ple=ye((war,vle)=>{\"use strict\";var $lt=So(),Qlt=ka();vle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?$lt.pointStyle(t,n,i,r):Qlt.fill(t,r.color)}});var X3=ye((Tar,yle)=>{\"use strict\";var gle=ka(),mle=g_().castOption,eut=ple();yle.exports=function(t,r,n,i){var a=n.marker.line,o=mle(a.color,r.pts)||gle.defaultLine,s=mle(a.width,r.pts)||0;t.call(eut,r,n,i).style(\"stroke-width\",s).call(gle.stroke,o)}});var NB=ye((Aar,Ale)=>{\"use strict\";var qv=Oa(),OB=qa(),_v=Dr(),_le=_v.strTranslate,Kp=So(),T0=ka(),qB=pv().extractOpts,HL=Ru(),tut=X3(),rut=g_().castOption,iut=FB(),xle=12,ble=5,Vb=2,nut=10,Z3=5;Ale.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing===\"constant\",o=n.itemwidth,s=(o+iut.itemGap*2)/2,l=_le(s,0),u=function(C,M,g,P){var A;if(C+1)A=C;else if(M&&M.width>0)A=M.width;else return 0;return a?P:Math.min(A,g)};t.each(function(C){var M=qv.select(this),g=_v.ensureSingle(M,\"g\",\"layers\");g.style(\"opacity\",C[0].trace.opacity);var P=n.indentation,A=n.valign,z=C[0].lineHeight,O=C[0].height;if(A===\"middle\"&&P===0||!z||!O)g.attr(\"transform\",null);else{var U={top:1,bottom:-1}[A],G=U*(.5*(z-O+3))||0,Z=n.indentation;g.attr(\"transform\",_le(Z,G))}var j=g.selectAll(\"g.legendfill\").data([C]);j.enter().append(\"g\").classed(\"legendfill\",!0);var N=g.selectAll(\"g.legendlines\").data([C]);N.enter().append(\"g\").classed(\"legendlines\",!0);var H=g.selectAll(\"g.legendsymbols\").data([C]);H.enter().append(\"g\").classed(\"legendsymbols\",!0),H.selectAll(\"g.legendpoints\").data([C]).enter().append(\"g\").classed(\"legendpoints\",!0)}).each(x).each(h).each(v).each(d).each(b).each(T).each(E).each(c).each(f).each(p).each(k);function c(C){var M=wle(C),g=M.showFill,P=M.showLine,A=M.showGradientLine,z=M.showGradientFill,O=M.anyFill,U=M.anyLine,G=C[0],Z=G.trace,j,N,H=qB(Z),re=H.colorscale,oe=H.reversescale,_e=function(Ae){if(Ae.size())if(g)Kp.fillGroupStyle(Ae,r,!0);else{var Be=\"legendfill-\"+Z.uid;Kp.gradient(Ae,r,Be,BB(oe),re,\"fill\")}},Ce=function(Ae){if(Ae.size()){var Be=\"legendline-\"+Z.uid;Kp.lineGroupStyle(Ae),Kp.gradient(Ae,r,Be,BB(oe),re,\"stroke\")}},Le=HL.hasMarkers(Z)||!O?\"M5,0\":U?\"M5,-2\":\"M5,-3\",ge=qv.select(this),ie=ge.select(\".legendfill\").selectAll(\"path\").data(g||z?[C]:[]);if(ie.enter().append(\"path\").classed(\"js-fill\",!0),ie.exit().remove(),ie.attr(\"d\",Le+\"h\"+o+\"v6h-\"+o+\"z\").call(_e),P||A){var Se=u(void 0,Z.line,nut,ble);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var Ee=ge.select(\".legendlines\").selectAll(\"path\").data(P||A?[j]:[]);Ee.enter().append(\"path\").classed(\"js-line\",!0),Ee.exit().remove(),Ee.attr(\"d\",Le+(A?\"l\"+o+\",0.0001\":\"h\"+o)).call(P?Kp.lineGroupStyle:Ce)}function f(C){var M=wle(C),g=M.anyFill,P=M.anyLine,A=M.showLine,z=M.showMarker,O=C[0],U=O.trace,G=!z&&!P&&!g&&HL.hasText(U),Z,j;function N(ie,Se,Ee,Ae){var Be=_v.nestedProperty(U,ie).get(),Pe=_v.isArrayOrTypedArray(Be)&&Se?Se(Be):Be;if(a&&Pe&&Ae!==void 0&&(Pe=Ae),Ee){if(Pe<Ee[0])return Ee[0];if(Pe>Ee[1])return Ee[1]}return Pe}function H(ie){return O._distinct&&O.index&&ie[O.index]?ie[O.index]:ie[0]}if(z||G||A){var re={},oe={};if(z){re.mc=N(\"marker.color\",H),re.mx=N(\"marker.symbol\",H),re.mo=N(\"marker.opacity\",_v.mean,[.2,1]),re.mlc=N(\"marker.line.color\",H),re.mlw=N(\"marker.line.width\",_v.mean,[0,5],Vb),re.mld=U._isShape?\"solid\":N(\"marker.line.dash\",H),oe.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"};var _e=N(\"marker.size\",_v.mean,[2,16],xle);re.ms=_e,oe.marker.size=_e}A&&(oe.line={width:N(\"line.width\",H,[0,10],ble)}),G&&(re.tx=\"Aa\",re.tp=N(\"textposition\",H),re.ts=10,re.tc=N(\"textfont.color\",H),re.tf=N(\"textfont.family\",H),re.tw=N(\"textfont.weight\",H),re.ty=N(\"textfont.style\",H),re.tv=N(\"textfont.variant\",H),re.tC=N(\"textfont.textcase\",H),re.tE=N(\"textfont.lineposition\",H),re.tS=N(\"textfont.shadow\",H)),Z=[_v.minExtend(O,re)],j=_v.minExtend(U,oe),j.selectedpoints=null,j.texttemplate=null}var Ce=qv.select(this).select(\"g.legendpoints\"),Le=Ce.selectAll(\"path.scatterpts\").data(z?Z:[]);Le.enter().insert(\"path\",\":first-child\").classed(\"scatterpts\",!0).attr(\"transform\",l),Le.exit().remove(),Le.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var ge=Ce.selectAll(\"g.pointtext\").data(G?Z:[]);ge.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",l),ge.exit().remove(),ge.selectAll(\"text\").call(Kp.textPointStyle,j,r)}function h(C){var M=C[0].trace,g=M.type===\"waterfall\";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,_(C,this,\"waterfall\")}var A=[];M.visible&&g&&(A=C[0].hasTotals?[[\"increasing\",\"M-6,-6V6H0Z\"],[\"totals\",\"M6,6H0L-6,-6H-0Z\"],[\"decreasing\",\"M6,6V-6H0Z\"]]:[[\"increasing\",\"M-6,-6V6H6Z\"],[\"decreasing\",\"M6,6V-6H-6Z\"]]);var z=qv.select(this).select(\"g.legendpoints\").selectAll(\"path.legendwaterfall\").data(A);z.enter().append(\"path\").classed(\"legendwaterfall\",!0).attr(\"transform\",l).style(\"stroke-miterlimit\",1),z.exit().remove(),z.each(function(O){var U=qv.select(this),G=M[O[0]].marker,Z=u(void 0,G.line,Z3,Vb);U.attr(\"d\",O[1]).style(\"stroke-width\",Z+\"px\").call(T0.fill,G.color),Z&&U.call(T0.stroke,G.line.color)})}function d(C){_(C,this)}function v(C){_(C,this,\"funnel\")}function _(C,M,g){var P=C[0].trace,A=P.marker||{},z=A.line||{},O=A.cornerradius?\"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z\":\"M6,6H-6V-6H6Z\",U=g?P.visible&&P.type===g:OB.traceIs(P,\"bar\"),G=qv.select(M).select(\"g.legendpoints\").selectAll(\"path.legend\"+g).data(U?[C]:[]);G.enter().append(\"path\").classed(\"legend\"+g,!0).attr(\"d\",O).attr(\"transform\",l),G.exit().remove(),G.each(function(Z){var j=qv.select(this),N=Z[0],H=u(N.mlw,A.line,Z3,Vb);j.style(\"stroke-width\",H+\"px\");var re=N.mcc;if(!n._inHover&&\"mc\"in N){var oe=qB(A),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),re=Kp.tryColorscale(A,\"\")(_e)}var Ce=re||N.mc||A.color,Le=A.pattern,ge=Kp.getPatternAttr,ie=Le&&(ge(Le.shape,0,\"\")||ge(Le.path,0,\"\"));if(ie){var Se=ge(Le.bgcolor,0,null),Ee=ge(Le.fgcolor,0,null),Ae=Le.fgopacity,Be=Tle(Le.size,8,10),Pe=Tle(Le.solidity,.5,1),me=\"legend-\"+P.uid;j.call(Kp.pattern,\"legend\",r,me,ie,Be,Pe,re,Le.fillmode,Se,Ee,Ae)}else j.call(T0.fill,Ce);H&&T0.stroke(j,N.mlc||z.color)})}function b(C){var M=C[0].trace,g=qv.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(M.visible&&OB.traceIs(M,\"box-violin\")?[C]:[]);g.enter().append(\"path\").classed(\"legendbox\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",l),g.exit().remove(),g.each(function(){var P=qv.select(this);if((M.boxpoints===\"all\"||M.points===\"all\")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var A=_v.minExtend(M,{marker:{size:a?xle:_v.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:\"diameter\"}});g.call(Kp.pointStyle,A,r)}else{var z=u(void 0,M.line,Z3,Vb);P.style(\"stroke-width\",z+\"px\").call(T0.fill,M.fillcolor),z&&T0.stroke(P,M.line.color)}})}function p(C){var M=C[0].trace,g=qv.select(this).select(\"g.legendpoints\").selectAll(\"path.legendcandle\").data(M.visible&&M.type===\"candlestick\"?[C,C]:[]);g.enter().append(\"path\").classed(\"legendcandle\",!0).attr(\"d\",function(P,A){return A?\"M-15,0H-8M-8,6V-6H8Z\":\"M15,0H8M8,-6V6H-8Z\"}).attr(\"transform\",l).style(\"stroke-miterlimit\",1),g.exit().remove(),g.each(function(P,A){var z=qv.select(this),O=M[A?\"increasing\":\"decreasing\"],U=u(void 0,O.line,Z3,Vb);z.style(\"stroke-width\",U+\"px\").call(T0.fill,O.fillcolor),U&&T0.stroke(z,O.line.color)})}function k(C){var M=C[0].trace,g=qv.select(this).select(\"g.legendpoints\").selectAll(\"path.legendohlc\").data(M.visible&&M.type===\"ohlc\"?[C,C]:[]);g.enter().append(\"path\").classed(\"legendohlc\",!0).attr(\"d\",function(P,A){return A?\"M-15,0H0M-8,-6V0\":\"M15,0H0M8,6V0\"}).attr(\"transform\",l).style(\"stroke-miterlimit\",1),g.exit().remove(),g.each(function(P,A){var z=qv.select(this),O=M[A?\"increasing\":\"decreasing\"],U=u(void 0,O.line,Z3,Vb);z.style(\"fill\",\"none\").call(Kp.dashLine,O.line.dash,U),U&&T0.stroke(z,O.line.color)})}function E(C){L(C,this,\"pie\")}function T(C){L(C,this,\"funnelarea\")}function L(C,M,g){var P=C[0],A=P.trace,z=g?A.visible&&A.type===g:OB.traceIs(A,g),O=qv.select(M).select(\"g.legendpoints\").selectAll(\"path.legend\"+g).data(z?[C]:[]);if(O.enter().append(\"path\").classed(\"legend\"+g,!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",l),O.exit().remove(),O.size()){var U=A.marker||{},G=u(rut(U.line.width,P.pts),U.line,Z3,Vb),Z=\"pieLike\",j=_v.minExtend(A,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);tut(O,N,j,r)}}function x(C){var M=C[0].trace,g,P=[];if(M.visible)switch(M.type){case\"histogram2d\":case\"heatmap\":P=[[\"M-15,-2V4H15V-2Z\"]],g=!0;break;case\"choropleth\":case\"choroplethmapbox\":case\"choroplethmap\":P=[[\"M-6,-6V6H6V-6Z\"]],g=!0;break;case\"densitymapbox\":case\"densitymap\":P=[[\"M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0\"]],g=\"radial\";break;case\"cone\":P=[[\"M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 L6,0Z\"]],g=!1;break;case\"streamtube\":P=[[\"M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z\"],[\"M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z\"],[\"M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z\"]],g=!1;break;case\"surface\":P=[[\"M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z\"],[\"M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z\"]],g=!0;break;case\"mesh3d\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],g=!1;break;case\"volume\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6H6L0,6Z\"]],g=!0;break;case\"isosurface\":P=[[\"M-6,6H0L-6,-6Z\"],[\"M6,6H0L6,-6Z\"],[\"M-6,-6 A12,24 0 0,0 6,-6 L0,6Z\"]],g=!1;break}var A=qv.select(this).select(\"g.legendpoints\").selectAll(\"path.legend3dandfriends\").data(P);A.enter().append(\"path\").classed(\"legend3dandfriends\",!0).attr(\"transform\",l).style(\"stroke-miterlimit\",1),A.exit().remove(),A.each(function(z,O){var U=qv.select(this),G=qB(M),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var Ce=\"legendfill-\"+M.uid;Kp.gradient(_e,r,Ce,BB(j,g===\"radial\"),Z,\"fill\")}},H;if(Z){if(!g){var oe=Z.length;H=O===0?Z[j?oe-1:0][1]:O===1?Z[j?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;H=_v.isArrayOrTypedArray(re)?re[O]||re[0]:re}U.attr(\"d\",z[0]),H?U.call(T0.fill,H):U.call(N)})}};function BB(e,t){var r=t?\"radial\":\"horizontal\";return r+(e?\"\":\"reversed\")}function wle(e){var t=e[0].trace,r=t.contours,n=HL.hasLines(t),i=HL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!==\"none\",o=!1,s=!1;if(r){var l=r.coloring;l===\"lines\"?o=!0:n=l===\"none\"||l===\"heatmap\"||r.showlines,r.type===\"constraint\"?a=r._operation!==\"=\":(l===\"fill\"||l===\"heatmap\")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function Tle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var HB=ye((Sar,Rle)=>{\"use strict\";var np=Oa(),vh=Dr(),VB=Mc(),Gb=qa(),XL=k3(),UB=yv(),ph=So(),yM=ka(),Hb=Zl(),Sle=DB().handleItemClick,Mle=DB().handleTitleClick,Oh=FB(),GB=Dh(),Ple=GB.LINE_SPACING,K3=GB.FROM_TL,Ele=GB.FROM_BR,kle=hle(),aut=NB(),J3=mM(),Y3=1,out=/^legend[0-9]*$/;Rle.exports=function(t,r){if(r)Cle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^=\"legend\"]');a.each(function(){var u=np.select(this),c=u.attr(\"class\"),f=c.split(\" \")[0];f.match(out)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o<i.length;o++){var s=i[o],l=t._fullLayout[s];Cle(t,l)}}};function sut(e,t,r){if(!(t.title.side!==\"top center\"&&t.title.side!==\"top right\")){var n=t.title.font,i=n.size*Ple,a=0,o=e.node(),s=ph.bBox(o).width;t.title.side===\"top center\"?a=.5*(t._width-2*r-2*Oh.titlePad-s):t.title.side===\"top right\"&&(a=t._width-2*r-2*Oh.titlePad-s),Hb.positionText(e,r+Oh.titlePad+a,r+i)}}function Cle(e,t){var r=t||{},n=e._fullLayout,i=J3.getId(r),a,o,s=r._inHover;if(s?(o=r.layer,a=\"hover\"):(o=n._infolayer,a=i),!!o){a+=n._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0);var l;if(s){if(!r.entries)return;l=kle(r.entries,r)}else{for(var u=(e.calcdata||[]).slice(),c=n.shapes,f=0;f<c.length;f++){var h=c[f];if(h.showlegend){var d={_isShape:!0,_fullInput:h,index:h._index,name:h.name||h.label.text||\"shape \"+h._index,legend:h.legend,legendgroup:h.legendgroup,legendgrouptitle:h.legendgrouptitle,legendrank:h.legendrank,legendwidth:h.legendwidth,showlegend:h.showlegend,visible:h.visible,opacity:h.opacity,mode:h.type===\"line\"?\"lines\":\"markers\",line:h.line,marker:{line:h.line,color:h.fillcolor,size:12,symbol:h.type===\"rect\"?\"square\":h.type===\"circle\"?\"circle\":\"hexagon2\"}};u.push([{trace:d}])}}l=n.showlegend&&kle(u,r,n._legends.length>1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll(\".\"+i).remove(),n._topdefs.select(\"#\"+a).remove(),VB.autoMargin(e,i);var _=vh.ensureSingle(o,\"g\",i,function(M){s||M.attr(\"pointer-events\",\"all\")}),b=vh.ensureSingleById(n._topdefs,\"clipPath\",a,function(M){M.append(\"rect\")}),p=vh.ensureSingle(_,\"rect\",\"bg\",function(M){M.attr(\"shape-rendering\",\"crispEdges\")});p.call(yM.stroke,r.bordercolor).call(yM.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\");var k=vh.ensureSingle(_,\"g\",\"scrollbox\"),E=r.title;r._titleWidth=0,r._titleHeight=0;var T;E.text?(T=vh.ensureSingle(k,\"text\",i+\"titletext\"),T.attr(\"text-anchor\",\"start\").call(ph.font,E.font).text(E.text),WL(T,k,e,r,Y3),!s&&(r.titleclick||r.titledoubleclick)&&cut(k,e,r,i)):(k.selectAll(\".\"+i+\"titletext\").remove(),k.selectAll(\".\"+i+\"titletoggle\").remove());var L=vh.ensureSingle(_,\"rect\",\"scrollbar\",function(M){M.attr(Oh.scrollBarEnterAttrs).call(yM.fill,Oh.scrollBarColor)}),x=k.selectAll(\"g.groups\").data(l);x.enter().append(\"g\").attr(\"class\",\"groups\"),x.exit().remove();var C=x.selectAll(\"g.traces\").data(vh.identity);C.enter().append(\"g\").attr(\"class\",\"traces\"),C.exit().remove(),C.style(\"opacity\",function(M){let g=M[0],P=g.trace;if(g.groupTitle){let A=P.legendgroup,z=(n.shapes||[]).filter(function(U){return U.showlegend});return e._fullData.concat(z).some(function(U){return U.legendgroup===A&&(U.legend||\"legend\")===i&&U.visible===!0})?1:.5}return Gb.traceIs(P,\"pie-like\")?v.indexOf(M[0].label)!==-1?.5:1:P.visible===\"legendonly\"?.5:1}).each(function(){np.select(this).call(lut,e,r)}).call(aut,e,r).each(function(M){s||M[0].groupTitle&&r.groupclick===\"toggleitem\"||np.select(this).call(uut,e,i)}),vh.syncOrAsync([VB.previousPromises,function(){return dut(e,x,C,r,k)},function(){var M=n._size,g=r.borderwidth,P=r.xref===\"paper\",A=r.yref===\"paper\";if(E.text){let je=(n.shapes||[]).filter(function(pt){return pt.showlegend}),lt=e._fullData.concat(je).some(function(pt){let Vt=pt.legend||\"legend\";var ot=Array.isArray(Vt)?Vt.includes(i):Vt===i;return ot&&pt.visible===!0});T.style(\"opacity\",lt?1:.5)}if(!s){var z,O;P?z=M.l+M.w*r.x-K3[ZL(r)]*r._width:z=n.width*r.x-K3[ZL(r)]*r._width,A?O=M.t+M.h*(1-r.y)-K3[YL(r)]*r._effHeight:O=n.height*(1-r.y)-K3[YL(r)]*r._effHeight;var U=vut(e,i,z,O);if(U)return;if(n.margin.autoexpand){var G=z,Z=O;z=P?vh.constrain(z,0,n.width-r._width):G,O=A?vh.constrain(O,0,n.height-r._effHeight):Z,z!==G&&vh.log(\"Constrain \"+i+\".x to make legend fit inside graph\"),O!==Z&&vh.log(\"Constrain \"+i+\".y to make legend fit inside graph\")}ph.setTranslate(_,z,O)}if(L.on(\".drag\",null),_.on(\"wheel\",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),ph.setTranslate(k,0,0),b.select(\"rect\").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),ph.setClipUrl(k,a,e),ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(Oh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*Oh.scrollBarMargin,re=r._height-r._effHeight,oe=H/re,_e=Math.min(r._scrollY||0,re);p.attr({width:r._width-2*g+Oh.scrollBarWidth+Oh.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select(\"rect\").attr({width:r._width-2*g+Oh.scrollBarWidth+Oh.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),ph.setClipUrl(k,a,e),Be(_e,N,oe),_.on(\"wheel\",function(){_e=vh.constrain(r._scrollY+np.event.deltaY/re*H,0,re),Be(_e,N,oe),_e!==0&&_e!==re&&np.event.preventDefault()});var Ce,Le,ge,ie=function(je,lt,pt){var Vt=(pt-lt)/oe+je;return vh.constrain(Vt,0,re)},Se=function(je,lt,pt){var Vt=(lt-pt)/oe+je;return vh.constrain(Vt,0,re)},Ee=np.behavior.drag().on(\"dragstart\",function(){var je=np.event.sourceEvent;je.type===\"touchstart\"?Ce=je.changedTouches[0].clientY:Ce=je.clientY,ge=_e}).on(\"drag\",function(){var je=np.event.sourceEvent;je.buttons===2||je.ctrlKey||(je.type===\"touchmove\"?Le=je.changedTouches[0].clientY:Le=je.clientY,_e=ie(ge,Ce,Le),Be(_e,N,oe))});L.call(Ee);var Ae=np.behavior.drag().on(\"dragstart\",function(){var je=np.event.sourceEvent;je.type===\"touchstart\"&&(Ce=je.changedTouches[0].clientY,ge=_e)}).on(\"drag\",function(){var je=np.event.sourceEvent;je.type===\"touchmove\"&&(Le=je.changedTouches[0].clientY,_e=Se(ge,Ce,Le),Be(_e,N,oe))});k.call(Ae)}function Be(je,lt,pt){r._scrollY=e._fullLayout[i]._scrollY=je,ph.setTranslate(k,0,-je),ph.setRect(L,r._width,Oh.scrollBarMargin+je*pt,Oh.scrollBarWidth,lt),b.select(\"rect\").attr(\"y\",g+je)}if(e._context.edits.legendPosition){var Pe,me,De,ce;_.classed(\"cursor-move\",!0),UB.init({element:_.node(),gd:e,prepFn:function(je){if(je.target!==L.node()){var lt=ph.getTranslate(_);De=lt.x,ce=lt.y}},moveFn:function(je,lt){if(De!==void 0&&ce!==void 0){var pt=De+je,Vt=ce+lt;ph.setTranslate(_,pt,Vt),Pe=UB.align(pt,r._width,M.l,M.l+M.w,r.xanchor),me=UB.align(Vt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Pe!==void 0&&me!==void 0){var je={};je[i+\".x\"]=Pe,je[i+\".y\"]=me,Gb.call(\"_guiRelayout\",e,je)}},clickFn:function(je,lt){var pt=o.selectAll(\"g.traces\").filter(function(){var Vt=this.getBoundingClientRect();return lt.clientX>=Vt.left&&lt.clientX<=Vt.right&&lt.clientY>=Vt.top&&lt.clientY<=Vt.bottom});pt.size()>0&&Ile(e,r,pt,je,lt)}})}}],e)}}function jL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a===\"fraction\"?t._maxWidth*o:r+(o||i)}function Ile(e,t,r,n,i){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),Gb.traceIs(o,\"pie-like\")&&(u.label=r.datum()[0].label);var c=XL.triggerHandler(e,\"plotly_legendclick\",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Sle(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=XL.triggerHandler(e,\"plotly_legenddoubleclick\",u);f!==!1&&c!==!1&&l&&Sle(r,e,t,l)}}function lut(e,t,r){var n=J3.getId(r),i=e.data()[0][0],a=i.trace,o=Gb.traceIs(a,\"pie-like\"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=vh.templateString(u,a._meta))));var f=vh.ensureSingle(e,\"text\",n+\"text\");f.attr(\"text-anchor\",\"start\").call(ph.font,c).text(s?Lle(u,l):u);var h=r.indentation+r.itemwidth+Oh.itemGap*2;Hb.positionText(f,h,0),s?f.call(Hb.makeEditable,{gd:t,text:u}).call(WL,e,t,r).on(\"edit\",function(d){this.text(Lle(d,l)).call(WL,e,t,r);var v=i.trace._fullInput||{},_={};return _.name=d,v._isShape?Gb.call(\"_guiRelayout\",t,\"shapes[\"+a.index+\"].name\",_.name):Gb.call(\"_guiRestyle\",t,_,a.index)}):WL(f,e,t,r)}function Lle(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||\"\";for(var n=r-e.length;n>0;n--)e+=\" \";return e}function uut(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=vh.ensureSingle(e,\"rect\",r+\"toggle\",function(s){t._context.staticPlot||s.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),s.call(yM.fill,\"rgba(0,0,0,0)\")});t._context.staticPlot||(o.on(\"mousedown\",function(){i=new Date().getTime(),i-t._legendMouseDownTime<n?a+=1:(a=1,t._legendMouseDownTime=i)}),o.on(\"mouseup\",function(){if(!(t._dragged||t._editing)){var s=t._fullLayout[r];new Date().getTime()-t._legendMouseDownTime>n&&(a=Math.max(a-1,1)),Ile(t,s,e,a,np.event)}}))}function cut(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||\"legend\";return(Array.isArray(c)?c.includes(n):c===n)&&Gb.traceIs(u,\"pie-like\")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=vh.ensureSingle(e,\"rect\",n+\"titletoggle\",function(u){t._context.staticPlot||u.style(\"cursor\",\"pointer\").attr(\"pointer-events\",\"all\"),u.call(yM.fill,\"rgba(0,0,0,0)\")});t._context.staticPlot||(l.on(\"mousedown\",function(){o=new Date().getTime(),o-t._legendMouseDownTime<a?s+=1:(s=1,t._legendMouseDownTime=o)}),l.on(\"mouseup\",function(){if(t._dragged||t._editing)return;new Date().getTime()-t._legendMouseDownTime>a&&(s=Math.max(s-1,1));let u={event:np.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(XL.triggerHandler(t,\"plotly_legendtitleclick\",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Mle(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,XL.triggerHandler(t,\"plotly_legendtitledoubleclick\",u)!==!1&&r.titledoubleclick&&Mle(t,r,r.titledoubleclick))}))}function WL(e,t,r,n,i){n._inHover&&e.attr(\"data-notex\",!0),Hb.convertToTspans(e,r,function(){fut(t,r,n,i)})}function fut(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select(\"g[class*=math-group]\"),s=o.node(),l=J3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===Y3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Ple,h,d;if(s){var v=ph.bBox(s);h=v.height,d=v.width,n===Y3?ph.setTranslate(o,u,u+h*.75):ph.setTranslate(o,0,h*.25)}else{var _=\".\"+l+(n===Y3?\"title\":\"\")+\"text\",b=e.select(_),p=Hb.lineCount(b),k=b.node();if(h=f*p,d=k?ph.bBox(k).width:0,n===Y3)r.title.side===\"left\"&&(d+=Oh.itemGap*2),Hb.positionText(b,u+Oh.titlePad,u+f);else{var E=Oh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=Oh.itemGap,d-=r.indentation+r.itemwidth),Hb.positionText(b,E,-f*((p-1)/2-.3))}}n===Y3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function hut(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf(\"left\")!==-1&&(t=e._titleWidth),n.indexOf(\"top\")!==-1&&(r=e._titleHeight)),[t,r]}function dut(e,t,r,n,i){var a=e._fullLayout,o=J3.getId(n);n||(n=a[o]);var s=a._size,l=J3.isVertical(n),u=J3.isGrouped(n),c=n.entrywidthmode===\"fraction\",f=n.borderwidth,h=2*f,d=Oh.itemGap,v=n.indentation+n.itemwidth+d*2,_=2*(f+d),b=YL(n),p=n.y<0||n.y===0&&b===\"top\",k=n.y>1||n.y===1&&b===\"bottom\",E=n.tracegroupgap,T={};let{orientation:L,yref:x}=n,{maxheight:C}=n,M=p||k||L!==\"v\"||x!==\"paper\";C||(C=M?.5:1);let g=M?a.height:s.h;n._maxHeight=Math.max(C>1?C:C*g,30);var P=0;n._width=0,n._height=0;var A=hut(n);if(l)r.each(function(je){var lt=je[0].height;ph.setTranslate(this,f+A[0],f+A[1]+n._height+lt/2+d),n._height+=lt,n._width=Math.max(n._width,je[0].width)}),P=v+n._width,n._width+=d+v+h,n._height+=_,u&&(t.each(function(je,lt){ph.setTranslate(this,0,lt*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var z=ZL(n),O=n.x<0||n.x===0&&z===\"right\",U=n.x>1||n.x===1&&z===\"left\",G=k||p,Z=a.width/2;n._maxWidth=Math.max(O?G&&z===\"left\"?s.l+s.w:Z:U?G&&z===\"right\"?s.r+s.w:Z:s.w,2*v);var j=0,N=0;r.each(function(je){var lt=jL(je,n,v);j=Math.max(j,lt),N+=lt}),P=null;var H=0;if(u){var re=0,oe=0,_e=0;t.each(function(){var je=0,lt=0;np.select(this).selectAll(\"g.traces\").each(function(Vt){var ot=jL(Vt,n,v),ut=Vt[0].height;ph.setTranslate(this,A[0],A[1]+f+d+ut/2+lt),lt+=ut,je=Math.max(je,ot),T[Vt[0].trace.legendgroup]=je});var pt=je+d;oe>0&&pt+f+oe>n._maxWidth?(H=Math.max(H,oe),oe=0,_e+=re+E,re=lt):re=Math.max(re,lt),ph.setTranslate(this,oe,_e),oe+=pt}),n._width=Math.max(H,oe)+f,n._height=_e+re+_}else{var Ce=r.size(),Le=N+h+(Ce-1)*d<n._maxWidth,ge=0,ie=0,Se=0,Ee=0;r.each(function(je){var lt=je[0].height,pt=jL(je,n,v,u),Vt=Le?pt:j;c||(Vt+=d),Vt+f+ie-d>=n._maxWidth&&(H=Math.max(H,Ee),ie=0,Se+=ge,n._height+=ge,ge=0),ph.setTranslate(this,A[0]+f+ie,A[1]+f+Se+lt/2+d),Ee=ie+pt+d,ie+=Vt,ge=Math.max(ge,lt)}),Le?(n._width=ie+h,n._height=ge+_):(n._width=Math.max(H,Ee)+h,n._height+=ge+_)}}n._width=Math.ceil(Math.max(n._width+A[0],n._titleWidth+2*(f+Oh.titlePad))),n._height=Math.ceil(Math.max(n._height+A[1],n._titleHeight+2*(f+Oh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Ae=e._context.edits,Be=Ae.legendText||Ae.legendPosition;r.each(function(je){var lt=np.select(this).select(\".\"+o+\"toggle\"),pt=je[0].height,Vt=je[0].trace.legendgroup,ot=jL(je,n,v);u&&Vt!==\"\"&&(ot=T[Vt]);var ut=Be?v:P||ot;!l&&!c&&(ut+=d/2),ph.setRect(lt,0,-pt/2,ut,pt)});var Pe=i.select(\".\"+o+\"titletext\");Pe.node()&&sut(Pe,n,f);var me=i.select(\".\"+o+\"titletoggle\");if(me.size()&&Pe.node()){var De=Pe.attr(\"x\")||0,ce=Oh.titlePad;ph.setRect(me,De-ce,f,n._titleWidth+2*ce,n._titleHeight+2*ce)}}function vut(e,t,r,n){var i=e._fullLayout,a=i[t],o=ZL(a),s=YL(a),l=a.xref===\"paper\",u=a.yref===\"paper\";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?\"b\":\"t\",f=a.x<.5?\"l\":\"r\",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return VB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*K3[o],r:a._width*Ele[o],b:a._effHeight*Ele[s],t:a._effHeight*K3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation===\"v\"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function ZL(e){return vh.isRightAnchor(e)?\"right\":vh.isCenterAnchor(e)?\"center\":\"left\"}function YL(e){return vh.isBottomAnchor(e)?\"bottom\":vh.isMiddleAnchor(e)?\"middle\":\"top\"}});var ZB=ye(XB=>{\"use strict\";var jb=Oa(),Py=Eo(),Dle=fd(),zf=Dr(),put=zf.pushUnique,jB=zf.strTranslate,gut=zf.strRotate,mut=k3(),A0=Zl(),yut=ale(),Am=So(),vd=ka(),KL=yv(),Sm=ho(),_ut=Rh().zindexSeparator,Q3=qa(),kg=ip(),Wb=NS(),xut=PB(),but=HB(),Vle=Wb.YANGLE,WB=Math.PI*Vle/180,wut=1/Math.sin(WB),Tut=Math.cos(WB),Aut=Math.sin(WB),Qc=Wb.HOVERARROWSIZE,sl=Wb.HOVERTEXTPAD,Fle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Sut={scatter:!0,scattergl:!0,splom:!0};function zle(e,t){return e.distance-t.distance}XB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+Wb.HOVERID,Wb.HOVERMINTIME,function(){Mut(t,r,n,i,a)})};XB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Xle(i),o=Zle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,T=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),M=Math.min(E,T),g=Math.max(E,T),P=b.trace;if(Q3.traceIs(P,\"gl3d\")){var A=i._fullLayout[P.scene]._scene.container,z=A.offsetLeft,O=A.offsetTop;x+=z,C+=z,M+=O,g+=O}L.bbox={x0:x+o,x1:C+o,y0:M+a,y1:g+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Hle(s,{gd:i,hovermode:\"closest\",rotateLabels:l,bgColor:r.bgColor||vd.background,container:jb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-f<h?b.offset=h-k+f:b.offset=0,h=k+b.by+b.offset,p===r.anchorIndex&&(d=b.offset)}).each(function(b){b.offset-=d});var v=i._fullLayout._invScaleX,_=i._fullLayout._invScaleY;return Wle(c,l,v,_),n?c:c.node()};function Mut(e,t,r,n,i){r||(r=\"xy\"),typeof r==\"string\"&&(r=r.split(_ut)[0]);var a=Array.isArray(r)?r:[r],o,s=e._fullLayout,l=s.hoversubplots,u=s._plots||[],c=u[r],f=s._has(\"cartesian\"),h=t.hovermode||s.hovermode,d=(h||\"\").charAt(0)===\"x\",v=(h||\"\").charAt(0)===\"y\",_,b;if(f&&(d||v)&&l===\"axis\"){for(var p=a.length,k=0;k<p;k++)if(o=a[k],u[o]){_=Sm.getFromId(e,o,\"x\"),b=Sm.getFromId(e,o,\"y\");var E=(d?_:b)._subplotsWith;if(E&&E.length)for(var T=0;T<E.length;T++)put(a,E[T])}}if(c&&l!==\"single\"){var L=c.overlays.map(function(wi){return wi.id});a=a.concat(L)}for(var x=a.length,C=new Array(x),M=new Array(x),g=!1,P=0;P<x;P++)if(o=a[P],u[o])g=!0,C[P]=u[o].xaxis,M[P]=u[o].yaxis;else if(s[o]&&s[o]._subplot){var A=s[o]._subplot;C[P]=A.xaxis,M[P]=A.yaxis}else{zf.warn(\"Unrecognized subplot: \"+o);return}if(h&&!g&&(h=\"closest\"),[\"x\",\"y\",\"closest\",\"x unified\",\"y unified\"].indexOf(h)===-1||!e.calcdata||e.querySelector(\".zoombox\")||e._dragging)return KL.unhoverRaw(e,t);var z=s.hoverdistance;z===-1&&(z=1/0);var O=s.spikedistance;O===-1&&(O=1/0);var U=[],G=[],Z,j,N,H,re,oe,_e,Ce,Le,ge,ie,Se,Ee,Ae={hLinePoint:null,vLinePoint:null},Be=!1;if(Array.isArray(t))for(h=\"array\",N=0;N<t.length;N++)re=e.calcdata[t[N].curveNumber||0],re&&(oe=re[0].trace,re[0].trace.hoverinfo!==\"skip\"&&(G.push(re),oe.orientation===\"h\"&&(Be=!0)));else{var Pe=e.calcdata.slice();for(Pe.sort(function(wi,On){var qn=wi[0].trace.zorder||0,Fn=On[0].trace.zorder||0;return qn-Fn}),H=0;H<Pe.length;H++)re=Pe[H],oe=re[0].trace,oe.hoverinfo!==\"skip\"&&kg.isTraceInSubplots(oe,a)&&(G.push(re),oe.orientation===\"h\"&&(Be=!0));var me=!i,De,ce;if(me)\"xpx\"in t?De=t.xpx:De=C[0]._length/2,\"ypx\"in t?ce=t.ypx:ce=M[0]._length/2;else{if(mut.triggerHandler(e,\"plotly_beforehover\",t)===!1)return;var je=i.getBoundingClientRect();De=t.clientX-je.left,ce=t.clientY-je.top,s._calcInverseTransform(e);var lt=zf.apply3DTransform(s._invTransform)(De,ce);if(De=lt[0],ce=lt[1],De<0||De>C[0]._length||ce<0||ce>M[0]._length)return KL.unhoverRaw(e,t)}if(t.pointerX=De+C[0]._offset,t.pointerY=ce+M[0]._offset,\"xval\"in t?Z=kg.flat(a,t.xval):Z=kg.p2c(C,De),\"yval\"in t?j=kg.flat(a,t.yval):j=kg.p2c(M,ce),!Py(Z[0])||!Py(j[0]))return zf.warn(\"Fx.hover failed\",t,e),KL.unhoverRaw(e,t)}var pt=1/0;function Vt(wi,On){for(H=0;H<G.length;H++)if(re=G[H],!(!re||!re[0]||!re[0].trace)&&(oe=re[0].trace,!(oe.visible!==!0||oe._length===0)&&[\"carpet\",\"contourcarpet\"].indexOf(oe._module.name)===-1)){if(Le=h,kg.isUnifiedHover(Le)&&(Le=Le.charAt(0)),oe.type===\"splom\"?(Ce=0,_e=a[Ce]):(_e=kg.getSubplot(oe),Ce=a.indexOf(_e)),Se={cd:re,trace:oe,xa:C[Ce],ya:M[Ce],maxHoverDistance:z,maxSpikeDistance:O,index:!1,distance:Math.min(pt,z),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:vd.defaultLine,name:oe.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},s[_e]&&(Se.subplot=s[_e]._subplot),s._splomScenes&&s._splomScenes[oe.uid]&&(Se.scene=s._splomScenes[oe.uid]),Le===\"array\"){var qn=t[H];\"pointNumber\"in qn?(Se.index=qn.pointNumber,Le=\"closest\"):(Le=\"\",\"xval\"in qn&&(ge=qn.xval,Le=\"x\"),\"yval\"in qn&&(ie=qn.yval,Le=Le?\"closest\":\"y\"))}else wi!==void 0&&On!==void 0?(ge=wi,ie=On):(ge=Z[Ce],ie=j[Ce]);if(Ee=U.length,z!==0)if(oe._module&&oe._module.hoverPoints){var Fn=oe._module.hoverPoints(Se,ge,ie,Le,{finiteRange:!0,hoverLayer:s._hoverlayer,hoversubplots:l,gd:e});if(Fn)for(var ra,la=0;la<Fn.length;la++)ra=Fn[la],Py(ra.x0)&&Py(ra.y0)&&U.push(Lut(ra,h))}else zf.log(\"Unrecognized trace type in hover:\",oe);if(h===\"closest\"&&U.length>Ee&&(U.splice(0,Ee),pt=U[0].distance),f&&O!==0&&U.length===0){Se.distance=O,Se.index=!1;var Ut=oe._module.hoverPoints(Se,ge,ie,\"closest\",{hoverLayer:s._hoverlayer});if(Ut&&(Ut=Ut.filter(function(ri){return ri.spikeDistance<=O})),Ut&&Ut.length){var wt,rr=Ut.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!==\"hovered data\"});if(rr.length){var nr=rr[0];Py(nr.x0)&&Py(nr.y0)&&(wt=ut(nr),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.vLinePoint=wt))}var Er=Ut.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!==\"hovered data\"});if(Er.length){var Xr=Er[0];Py(Xr.x0)&&Py(Xr.y0)&&(wt=ut(Xr),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.hLinePoint=wt))}}}}}Vt();function ot(wi,On,qn){for(var Fn=null,ra=1/0,la,Ut=0;Ut<wi.length;Ut++)_&&_._id!==wi[Ut].xa._id||b&&b._id!==wi[Ut].ya._id||(la=wi[Ut].spikeDistance,qn&&Ut===0&&(la=-1/0),la<=ra&&la<=On&&(Fn=wi[Ut],ra=la));return Fn}function ut(wi){return wi?{xa:wi.xa,ya:wi.ya,x:wi.xSpike!==void 0?wi.xSpike:(wi.x0+wi.x1)/2,y:wi.ySpike!==void 0?wi.ySpike:(wi.y0+wi.y1)/2,distance:wi.distance,spikeDistance:wi.spikeDistance,curveNumber:wi.trace.index,color:wi.color,pointNumber:wi.index}:null}var Wt={fullLayout:s,container:s._hoverlayer,event:t},Nt=e._spikepoints,$t={vLinePoint:Ae.vLinePoint,hLinePoint:Ae.hLinePoint};e._spikepoints=$t;var sr=function(){var wi=U.filter(function(qn){return _&&_._id===qn.xa._id&&b&&b._id===qn.ya._id}),On=U.filter(function(qn){return!(_&&_._id===qn.xa._id&&b&&b._id===qn.ya._id)});wi.sort(zle),On.sort(zle),U=wi.concat(On),U=Iut(U,h)};sr();var Tr=h.charAt(0),fr=(Tr===\"x\"||Tr===\"y\")&&U[0]&&Sut[U[0].trace.type];if(f&&O!==0&&U.length!==0){var $e=U.filter(function(wi){return wi.ya.showspikes}),St=ot($e,O,fr);Ae.hLinePoint=ut(St);var Qt=U.filter(function(wi){return wi.xa.showspikes}),Gt=ot(Qt,O,fr);Ae.vLinePoint=ut(Gt)}if(U.length===0){var _t=KL.unhoverRaw(e,t);return f&&(Ae.hLinePoint!==null||Ae.vLinePoint!==null)&&Ble(Nt)&&qle(e,Ae,Wt),_t}if(f&&Ble(Nt)&&qle(e,Ae,Wt),kg.isXYhover(Le)&&U[0].length!==0&&U[0].trace.type!==\"splom\"){var It=U[0];Fle[It.trace.type]?U=U.filter(wi=>wi.trace.index===It.trace.index):U=[It];var mt=U.length,er=Ule(\"x\",It,s),lr=Ule(\"y\",It,s);Vt(er,lr);var wr=[],Lr={},ti=0,Br=function(wi){var On=Fle[wi.trace.type]?Gle(wi):wi.trace.index;if(!Lr[On])ti++,Lr[On]=ti,wr.push(wi);else{var qn=Lr[On]-1,Fn=wr[qn];qn>0&&Math.abs(wi.distance)<Math.abs(Fn.distance)&&(wr[qn]=wi)}},Vr;for(Vr=0;Vr<mt;Vr++)Br(U[Vr]);for(Vr=U.length-1;Vr>mt-1;Vr--)Br(U[Vr]);U=wr,sr()}var dt=e._hoverdata,Ge=[],Je=Xle(e),We=Zle(e);for(let wi of U){var tt=kg.makeEventData(wi,wi.trace,wi.cd);if(wi.hovertemplate!==!1){var xt=!1;wi.cd[wi.index]&&wi.cd[wi.index].ht&&(xt=wi.cd[wi.index].ht),wi.hovertemplate=xt||wi.trace.hovertemplate||!1}if(wi.xa&&wi.ya){var Ie=wi.x0+wi.xa._offset,xe=wi.x1+wi.xa._offset,ke=wi.y0+wi.ya._offset,vt=wi.y1+wi.ya._offset,ir=Math.min(Ie,xe),ar=Math.max(Ie,xe),vr=Math.min(ke,vt),ii=Math.max(ke,vt);tt.bbox={x0:ir+We,x1:ar+We,y0:vr+Je,y1:ii+Je}}wi.eventData=[tt],Ge.push(tt)}e._hoverdata=Ge;var pi=h===\"y\"&&(G.length>1||U.length>1)||h===\"closest\"&&Be&&U.length>1,$r=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),di=Hle(U,{gd:e,hovermode:h,rotateLabels:pi,bgColor:$r,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),ji=di.hoverLabels;if(kg.isUnifiedHover(h)||(kut(ji,pi,s,di.commonLabelBoundingBox),Wle(ji,pi,s._invScaleX,s._invScaleY)),i&&i.tagName){var In=Q3.getComponentMethod(\"annotations\",\"hasClickToShow\")(e,Ge);yut(jb.select(i),In?\"pointer\":\"\")}!i||n||!Put(e,t,dt)||(dt&&e.emit(\"plotly_unhover\",{event:t,points:dt}),e.emit(\"plotly_hover\",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:Z,yvals:j}))}function Gle(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:\"\",e.ya?e.ya._id:\"\"].join(\",\")}var Eut=/<extra>([\\s\\S]*)<\\/extra>/;function Hle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Wb.HOVERFONT,f=t.fontSize||Wb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,_=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],E=k.xa,T=k.ya,L=i.charAt(0),x=L+\"Label\",C=k[x];if(C===void 0&&E.type===\"multicategory\")for(var M=0;M<e.length&&(C=e[M][x],C===void 0);M++);var g=$3(r,l),P=g.top,A=g.width,z=g.height,O=C!==void 0&&k.distance<=t.hoverdistance&&(i===\"x\"||i===\"y\");if(O){var U=!0,G,Z;for(G=0;G<e.length;G++)if(U&&e[G].zLabel===void 0&&(U=!1),Z=e[G].hoverinfo||e[G].trace.hoverinfo,Z){var j=Array.isArray(Z)?Z:Z.split(\"+\");if(j.indexOf(\"all\")===-1&&j.indexOf(i)===-1){O=!1;break}}U&&(O=!1)}var N=s.selectAll(\"g.axistext\").data(O?[0]:[]);N.enter().append(\"g\").classed(\"axistext\",!0),N.exit().remove();var H={minX:0,maxX:0,minY:0,maxY:0};if(N.each(function(){var _t=jb.select(this),It=zf.ensureSingle(_t,\"path\",\"\",function(ii){ii.style({\"stroke-width\":\"1px\"})}),mt=zf.ensureSingle(_t,\"text\",\"\",function(ii){ii.attr(\"data-notex\",1)}),er=u.bgcolor||vd.defaultLine,lr=u.bordercolor||vd.contrast(er),wr=vd.contrast(er),Lr=u.font,ti={weight:Lr.weight||h,style:Lr.style||d,variant:Lr.variant||v,textcase:Lr.textcase||_,lineposition:Lr.lineposition||b,shadow:Lr.shadow||p,family:Lr.family||c,size:Lr.size||f,color:Lr.color||wr};It.style({fill:er,stroke:lr}),mt.text(C).call(Am.font,ti).call(A0.positionText,0,0).call(A0.convertToTspans,r),_t.attr(\"transform\",\"\");var Br=$3(r,mt.node()),Vr,dt;if(i===\"x\"){var Ge=E.side===\"top\"?\"-\":\"\";mt.attr(\"text-anchor\",\"middle\").call(A0.positionText,0,E.side===\"top\"?P-Br.bottom-Qc-sl:P-Br.top+Qc+sl),Vr=E._offset+(k.x0+k.x1)/2,dt=T._offset+(E.side===\"top\"?0:T._length);var Je=Br.width/2+sl,We=Vr;Vr<Je?We=Je:Vr>n.width-Je&&(We=n.width-Je),It.attr(\"d\",\"M\"+(Vr-We)+\",0L\"+(Vr-We+Qc)+\",\"+Ge+Qc+\"H\"+Je+\"v\"+Ge+(sl*2+Br.height)+\"H\"+-Je+\"V\"+Ge+Qc+\"H\"+(Vr-We-Qc)+\"Z\"),Vr=We,H.minX=Vr-Je,H.maxX=Vr+Je,E.side===\"top\"?(H.minY=dt-(sl*2+Br.height),H.maxY=dt-sl):(H.minY=dt+sl,H.maxY=dt+(sl*2+Br.height))}else{var tt,xt,Ie;T.side===\"right\"?(tt=\"start\",xt=1,Ie=\"\",Vr=E._offset+E._length):(tt=\"end\",xt=-1,Ie=\"-\",Vr=E._offset),dt=T._offset+(k.y0+k.y1)/2,mt.attr(\"text-anchor\",tt),It.attr(\"d\",\"M0,0L\"+Ie+Qc+\",\"+Qc+\"V\"+(sl+Br.height/2)+\"h\"+Ie+(sl*2+Br.width)+\"V-\"+(sl+Br.height/2)+\"H\"+Ie+Qc+\"V-\"+Qc+\"Z\"),H.minY=dt-(sl+Br.height/2),H.maxY=dt+(sl+Br.height/2),T.side===\"right\"?(H.minX=Vr+Qc,H.maxX=Vr+Qc+(sl*2+Br.width)):(H.minX=Vr-Qc-(sl*2+Br.width),H.maxX=Vr-Qc);var xe=Br.height/2,ke=P-Br.top-xe,vt=\"clip\"+n._uid+\"commonlabel\"+T._id,ir;if(Vr<Br.width+2*sl+Qc){ir=\"M-\"+(Qc+sl)+\"-\"+xe+\"h-\"+(Br.width-sl)+\"V\"+xe+\"h\"+(Br.width-sl)+\"Z\";var ar=Br.width-Vr+sl;A0.positionText(mt,ar,ke),tt===\"end\"&&mt.selectAll(\"tspan\").each(function(){var ii=jb.select(this),pi=Am.tester.append(\"text\").text(ii.text()).call(Am.font,ti),$r=$3(r,pi.node());Math.round($r.width)<Math.round(Br.width)&&ii.attr(\"x\",ar-$r.width),pi.remove()})}else A0.positionText(mt,xt*(sl+Qc),ke),ir=null;var vr=n._topclips.selectAll(\"#\"+vt).data(ir?[0]:[]);vr.enter().append(\"clipPath\").attr(\"id\",vt).append(\"path\"),vr.exit().remove(),vr.select(\"path\").attr(\"d\",ir),Am.setClipUrl(mt,ir?vt:null,r)}_t.attr(\"transform\",jB(Vr,dt))}),kg.isUnifiedHover(i)){s.selectAll(\"g.hovertext\").remove();let _t=e.filter(It=>It.hoverinfo!==\"none\");if(_t.length===0)return[];var re=n.hoverlabel,oe=re.font,_e=_t[0],Ce=((i===\"x unified\"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Le=Ce?zf.hovertemplateString({data:i===\"x unified\"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:Ce}):C,ge={showlegend:!0,legend:{title:{text:Le,font:oe},font:oe,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:\"v\"}},ie={font:oe};xut(ge,ie,r._fullData);var Se=ie.legend;Se.entries=[];for(var Ee=0;Ee<_t.length;Ee++){var Ae=_t[Ee];if(Ae.hoverinfo!==\"none\"){var Be=Ole(Ae,!0,i,n,C),Pe=Be[0],me=Be[1];Ae.name=me,me!==\"\"?Ae.text=me+\" : \"+Pe:Ae.text=Pe;var De=Ae.cd[Ae.index];De&&(De.mc&&(Ae.mc=De.mc),De.mcc&&(Ae.mc=De.mcc),De.mlc&&(Ae.mlc=De.mlc),De.mlcc&&(Ae.mlc=De.mlcc),De.mlw&&(Ae.mlw=De.mlw),De.mrc&&(Ae.mrc=De.mrc),De.dir&&(Ae.dir=De.dir)),Ae._distinct=!0,Se.entries.push([Ae])}}Se.entries.sort(function(It,mt){return It[0].trace.index-mt[0].trace.index}),Se.layer=s,Se._inHover=!0,Se._groupTitleFont=re.grouptitlefont,but(r,Se);var ce=s.select(\"g.legend\"),je=$3(r,ce.node()),lt=je.width+2*sl,pt=je.height+2*sl,Vt=_t[0],ot=(Vt.x0+Vt.x1)/2,ut=(Vt.y0+Vt.y1)/2,Wt=!(Q3.traceIs(Vt.trace,\"bar-like\")||Q3.traceIs(Vt.trace,\"box-violin\")),Nt,$t;L===\"y\"?Wt?($t=ut-sl,Nt=ut+sl):($t=Math.min.apply(null,_t.map(function(It){return Math.min(It.y0,It.y1)})),Nt=Math.max.apply(null,_t.map(function(It){return Math.max(It.y0,It.y1)}))):$t=Nt=zf.mean(_t.map(function(It){return(It.y0+It.y1)/2}))-pt/2;var sr,Tr;L===\"x\"?Wt?(sr=ot+sl,Tr=ot-sl):(sr=Math.max.apply(null,_t.map(function(It){return Math.max(It.x0,It.x1)})),Tr=Math.min.apply(null,_t.map(function(It){return Math.min(It.x0,It.x1)}))):sr=Tr=zf.mean(_t.map(function(It){return(It.x0+It.x1)/2}))-lt/2;var fr=E._offset,$e=T._offset;Nt+=$e,sr+=fr,Tr+=fr-lt,$t+=$e-pt;var St,Qt;return sr+lt<A&&sr>=0?St=sr:Tr+lt<A&&Tr>=0?St=Tr:fr+lt<A?St=fr:sr-ot<ot-Tr+lt?St=A-lt:St=0,St+=sl,Nt+pt<z&&Nt>=0?Qt=Nt:$t+pt<z&&$t>=0?Qt=$t:$e+pt<z?Qt=$e:Nt-ut<ut-$t+pt?Qt=z-pt:Qt=0,Qt+=sl,ce.attr(\"transform\",jB(St-1,Qt-1)),ce}var Gt=s.selectAll(\"g.hovertext\").data(e,function(_t){return Gle(_t)});return Gt.enter().append(\"g\").classed(\"hovertext\",!0).each(function(){var _t=jb.select(this);_t.append(\"rect\").call(vd.fill,vd.addOpacity(o,.8)),_t.append(\"text\").classed(\"name\",!0),_t.append(\"path\").style(\"stroke-width\",\"1px\"),_t.append(\"text\").classed(\"nums\",!0).call(Am.font,{weight:h,style:d,variant:v,textcase:_,lineposition:b,shadow:p,family:c,size:f})}),Gt.exit().remove(),Gt.each(function(_t){var It=jb.select(this).attr(\"transform\",\"\"),mt=_t.color;Array.isArray(mt)&&(mt=mt[_t.eventData[0].pointNumber]);var er=_t.bgcolor||mt,lr=vd.combine(vd.opacity(er)?er:vd.defaultLine,o),wr=vd.combine(vd.opacity(mt)?mt:vd.defaultLine,o),Lr=_t.borderColor||vd.contrast(lr),ti=Ole(_t,O,i,n,C,It),Br=ti[0],Vr=ti[1],dt=It.select(\"text.nums\").call(Am.font,{family:_t.fontFamily||c,size:_t.fontSize||f,color:_t.fontColor||Lr,weight:_t.fontWeight||h,style:_t.fontStyle||d,variant:_t.fontVariant||v,textcase:_t.fontTextcase||_,lineposition:_t.fontLineposition||b,shadow:_t.fontShadow||p}).text(Br).attr(\"data-notex\",1).call(A0.positionText,0,0).call(A0.convertToTspans,r),Ge=It.select(\"text.name\"),Je=0,We=0;if(Vr&&Vr!==Br){Ge.call(Am.font,{family:_t.fontFamily||c,size:_t.fontSize||f,color:wr,weight:_t.fontWeight||h,style:_t.fontStyle||d,variant:_t.fontVariant||v,textcase:_t.fontTextcase||_,lineposition:_t.fontLineposition||b,shadow:_t.fontShadow||p}).text(Vr).attr(\"data-notex\",1).call(A0.positionText,0,0).call(A0.convertToTspans,r);var tt=$3(r,Ge.node());Je=tt.width+2*sl,We=tt.height+2*sl}else Ge.remove(),It.select(\"rect\").remove();It.select(\"path\").style({fill:lr,stroke:Lr});var xt=_t.xa._offset+(_t.x0+_t.x1)/2,Ie=_t.ya._offset+(_t.y0+_t.y1)/2,xe=Math.abs(_t.x1-_t.x0),ke=Math.abs(_t.y1-_t.y0),vt=$3(r,dt.node()),ir=vt.width/n._invScaleX,ar=vt.height/n._invScaleY;_t.ty0=(P-vt.top)/n._invScaleY,_t.bx=ir+2*sl,_t.by=Math.max(ar+2*sl,We),_t.anchor=\"start\",_t.txwidth=ir,_t.tx2width=Je,_t.offset=0;var vr=(ir+Qc+sl+Je)*n._invScaleX,ii,pi;if(a)_t.pos=xt,ii=Ie+ke/2+vr<=z,pi=Ie-ke/2-vr>=0,(_t.idealAlign===\"top\"||!ii)&&pi?(Ie-=ke/2,_t.anchor=\"end\"):ii?(Ie+=ke/2,_t.anchor=\"start\"):_t.anchor=\"middle\",_t.crossPos=Ie;else{if(_t.pos=Ie,ii=xt+xe/2+vr<=A,pi=xt-xe/2-vr>=0,(_t.idealAlign===\"left\"||!ii)&&pi)xt-=xe/2,_t.anchor=\"end\";else if(ii)xt+=xe/2,_t.anchor=\"start\";else{_t.anchor=\"middle\";var $r=vr/2,di=xt+$r-A,ji=xt-$r;di>0&&(xt-=di),ji<0&&(xt+=-ji)}_t.crossPos=xt}dt.attr(\"text-anchor\",_t.anchor),Je&&Ge.attr(\"text-anchor\",_t.anchor),It.attr(\"transform\",jB(xt,Ie)+(a?gut(Vle):\"\"))}),{hoverLabels:Gt,commonLabelBoundingBox:H}}function Ole(e,t,r,n,i,a){var f,h;var o=\"\",s=\"\";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Nle(e.name,e.nameLength));var l=r.charAt(0),u=l===\"x\"?\"y\":\"x\";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+=\"x: \"+e.xLabel+\"<br>\"),e.yLabel!==void 0&&(s+=\"y: \"+e.yLabel+\"<br>\"),e.trace.type!==\"choropleth\"&&e.trace.type!==\"choroplethmapbox\"&&e.trace.type!==\"choroplethmap\"&&(s+=(s?\"z: \":\"\")+e.zLabel)):t&&e[l+\"Label\"]===i?s=e[u+\"Label\"]||\"\":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!==\"scattercarpet\"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s=\"(\"+e.xLabel+\", \"+e.yLabel+\")\",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?\"<br>\":\"\")+e.text),e.extraText!==void 0&&(s+=(s?\"<br>\":\"\")+e.extraText),a&&s===\"\"&&!e.hovertemplate&&(o===\"\"&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate=\"\");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+\"Label\"]!==i&&(d[l+\"other\"]=d[l+\"Val\"],d[l+\"otherLabel\"]=d[l+\"Label\"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(Eut,(v,_)=>(o=Nle(_,e.nameLength),\"\"))}return[s,o]}function kut(e,t,r,n){var i=t?\"xa\":\"ya\",a=t?\"ya\":\"xa\",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,_=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)===\"x\",re=j.range;c===0&&re&&re[0]>re[1]!==H&&(s=-1);var oe=0,_e=H?r.width:r.height;if(r.hovermode===\"x\"||r.hovermode===\"y\"){var Ce=jle(Z,t),Le=Z.anchor,ge=Le===\"end\"?-1:1,ie,Se;if(Le===\"middle\")ie=Z.crossPos+(H?b(Ce.y-Z.by/2):_(Z.bx/2+Z.tx2width/2)),Se=ie+(H?b(Z.by):_(Z.bx));else if(H)ie=Z.crossPos+b(Qc+Ce.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Ee=_(ge*Qc+Ce.x),Ae=Ee+_(ge*Z.bx);ie=Z.crossPos+Math.min(Ee,Ae),Se=Z.crossPos+Math.max(Ee,Ae)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side===\"left\"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side===\"top\"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?wut:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,E,T,L,x,C;function M(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,E=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(E<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=E;p=!1}if(p){var H=0;for(T=0;T<Z.length;T++)x=Z[T],x.pos+x.dp+x.size>j.pmax&&H++;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos>j.pmax-1&&(x.del=!0,H--);for(T=0;T<Z.length&&!(H<=0);T++)if(x=Z[T],x.pos<j.pmin+1)for(x.del=!0,H--,E=x.size*2,L=Z.length-1;L>=0;L--)Z[L].dp-=E;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,T=0;T<u.length-1;){var g=u[T],P=u[T+1],A=g[g.length-1],z=P[0];if(k=A.pos+A.dp+A.size-z.pos-z.dp+z.size,k>.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(T+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(E=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=E;p=!1}else T++}u.forEach(M)}for(T=u.length-1;T>=0;T--){var O=u[T];for(L=O.length-1;L>=0;L--){var U=O[L],G=U.datum;G.offset=U.dp,G.del=U.del}}}function jle(e,t){var r=0,n=e.offset;return t&&(n*=-Aut,r=e.offset*Tut),{x:r,y:n}}function Cut(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor===\"middle\";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Wle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=jb.select(this);if(o.del)return s.remove();var l=s.select(\"text.nums\"),u=o.anchor,c=u===\"end\"?-1:1,f=Cut(o),h=jle(o,t),d=h.x,v=h.y,_=u===\"middle\",b=\"hoverlabel\"in o.trace?o.trace.hoverlabel.showarrow:!0,p;_?p=\"M-\"+i(o.bx/2+o.tx2width/2)+\",\"+a(v-o.by/2)+\"h\"+i(o.bx)+\"v\"+a(o.by)+\"h-\"+i(o.bx)+\"Z\":b?p=\"M0,0L\"+i(c*Qc+d)+\",\"+a(Qc+v)+\"v\"+a(o.by/2-Qc)+\"h\"+i(c*o.bx)+\"v-\"+a(o.by)+\"H\"+i(c*Qc+d)+\"V\"+a(v-Qc)+\"Z\":p=\"M\"+i(c*Qc+d)+\",\"+a(v-o.by/2)+\"h\"+i(c*o.bx)+\"v\"+a(o.by)+\"h\"+i(-c*o.bx)+\"Z\",s.select(\"path\").attr(\"d\",p);var k=d+f.textShiftX,E=v+o.ty0-o.by/2+sl,T=o.textAlign||\"auto\";T!==\"auto\"&&(T===\"left\"&&u!==\"start\"?(l.attr(\"text-anchor\",\"start\"),k=_?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):T===\"right\"&&u!==\"end\"&&(l.attr(\"text-anchor\",\"end\"),k=_?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(A0.positionText,i(k),a(E)),o.tx2width&&(s.select(\"text.name\").call(A0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select(\"rect\").call(Am.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Lut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Py(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,\"\",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var _=s(d,v);o(_)&&(e[h]=_)}if(l(\"hoverinfo\",\"hi\",\"hoverinfo\"),l(\"bgcolor\",\"hbg\",\"hoverlabel.bgcolor\"),l(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),l(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),l(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),l(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),l(\"fontWeight\",\"htw\",\"hoverlabel.font.weight\"),l(\"fontStyle\",\"hty\",\"hoverlabel.font.style\"),l(\"fontVariant\",\"htv\",\"hoverlabel.font.variant\"),l(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),l(\"textAlign\",\"hta\",\"hoverlabel.align\"),e.posref=t===\"y\"||t===\"closest\"&&n.orientation===\"h\"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel=\"xLabel\"in e?e.xLabel:Sm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel=\"yLabel\"in e?e.yLabel:Sm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type===\"log\"&&e.xerr<=0)){var u=Sm.tickText(e.xa,e.xa.c2l(e.xerr),\"hover\").text;e.xerrneg!==void 0?e.xLabel+=\" +\"+u+\" / -\"+Sm.tickText(e.xa,e.xa.c2l(e.xerrneg),\"hover\").text:e.xLabel+=\" \\xB1 \"+u,t===\"x\"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type===\"log\"&&e.yerr<=0)){var c=Sm.tickText(e.ya,e.ya.c2l(e.yerr),\"hover\").text;e.yerrneg!==void 0?e.yLabel+=\" +\"+c+\" / -\"+Sm.tickText(e.ya,e.ya.c2l(e.yerrneg),\"hover\").text:e.yLabel+=\" \\xB1 \"+c,t===\"y\"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!==\"all\"&&(f=Array.isArray(f)?f:f.split(\"+\"),f.indexOf(\"x\")===-1&&(e.xLabel=void 0),f.indexOf(\"y\")===-1&&(e.yLabel=void 0),f.indexOf(\"z\")===-1&&(e.zLabel=void 0),f.indexOf(\"text\")===-1&&(e.text=void 0),f.indexOf(\"name\")===-1&&(e.name=void 0)),e}function qle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(\".spikeline\").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var _=c.spikesnap;_===\"cursor\"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Dle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,E=c.spikecolor||b,T=Sm.getPxPosition(e,c),L,x;if(p.indexOf(\"toaxis\")!==-1||p.indexOf(\"across\")!==-1){if(p.indexOf(\"toaxis\")!==-1&&(L=T,x=d),p.indexOf(\"across\")!==-1){var C=c._counterDomainMin,M=c._counterDomainMax;c.anchor===\"free\"&&(C=Math.min(C,c.position),M=Math.max(M,c.position)),L=a.l+C*a.w,x=a.l+M*a.w}n.insert(\"line\",\":first-child\").attr({x1:L,x2:x,y1:v,y2:v,\"stroke-width\":k,stroke:E,\"stroke-dasharray\":Am.dashStyle(c.spikedash,k)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),n.insert(\"line\",\":first-child\").attr({x1:L,x2:x,y1:v,y2:v,\"stroke-width\":k+2,stroke:f}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}p.indexOf(\"marker\")!==-1&&n.insert(\"circle\",\":first-child\").attr({cx:T+(c.side!==\"right\"?k:-k),cy:v,r:k,fill:E}).classed(\"spikeline\",!0)}if(l){var g=t.vLinePoint,P,A;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z===\"cursor\"?(P=o.pointerX,A=o.pointerY):(P=u._offset+g.x,A=c._offset+g.y);var O=Dle.readability(g.color,f)<1.5?vd.contrast(f):g.color,U=u.spikemode,G=u.spikethickness,Z=u.spikecolor||O,j=Sm.getPxPosition(e,u),N,H;if(U.indexOf(\"toaxis\")!==-1||U.indexOf(\"across\")!==-1){if(U.indexOf(\"toaxis\")!==-1&&(N=j,H=A),U.indexOf(\"across\")!==-1){var re=u._counterDomainMin,oe=u._counterDomainMax;u.anchor===\"free\"&&(re=Math.min(re,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,H=a.t+(1-re)*a.h}n.insert(\"line\",\":first-child\").attr({x1:P,x2:P,y1:N,y2:H,\"stroke-width\":G,stroke:Z,\"stroke-dasharray\":Am.dashStyle(u.spikedash,G)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),n.insert(\"line\",\":first-child\").attr({x1:P,x2:P,y1:N,y2:H,\"stroke-width\":G+2,stroke:f}).classed(\"spikeline\",!0).classed(\"crisp\",!0)}U.indexOf(\"marker\")!==-1&&n.insert(\"circle\",\":first-child\").attr({cx:P,cy:j-(u.side!==\"top\"?G:-G),r:G,fill:Z}).classed(\"spikeline\",!0)}}}function Put(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Ble(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Nle(e,t){return A0.plainText(e||\"\",{len:t,allowedTags:[\"br\",\"sub\",\"sup\",\"b\",\"i\",\"em\",\"s\",\"u\"]})}function Iut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o<e.length;o++){var s=e[o];Q3.traceIs(s.trace,\"bar-like\")||Q3.traceIs(s.trace,\"box-violin\")?a.push(s):s.trace[r+\"period\"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}function Ule(e,t,r){var n=t[e+\"a\"],i=t[e+\"Val\"],a=t.cd[0];if(n.type===\"category\"||n.type===\"multicategory\")i=n._categoriesMap[i];else if(n.type===\"date\"){var o=t.trace[e+\"periodalignment\"];if(o){var s=t.cd[t.index],l=s[e+\"Start\"];l===void 0&&(l=s[e]);var u=s[e+\"End\"];u===void 0&&(u=s[e]);var c=u-l;o===\"end\"?i+=c:o===\"middle\"&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(r.boxmode===\"group\"||r.violinmode===\"group\")&&(i+=a.t.dPos),i}var Xle=e=>e.offsetTop+e.clientTop,Zle=e=>e.offsetLeft+e.clientLeft;function $3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var _M=ye((Ear,Yle)=>{\"use strict\";var Rut=Dr(),Dut=ka(),Fut=ip().isUnifiedHover;Yle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&Fut(r.hovermode)&&(i.font||(i.font={}),o(\"size\"),o(\"family\"),o(\"color\"),o(\"weight\"),o(\"style\"),o(\"variant\"),a?(i.bgcolor||(i.bgcolor=Dut.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n(\"hoverlabel.bgcolor\",i.bgcolor),n(\"hoverlabel.bordercolor\",i.bordercolor),n(\"hoverlabel.namelength\",i.namelength),n(\"hoverlabel.showarrow\",i.showarrow),Rut.coerceFont(n,\"hoverlabel.font\",i.font),n(\"hoverlabel.align\",i.align)}});var Jle=ye((kar,Kle)=>{\"use strict\";var zut=Dr(),Out=_M(),qut=W1();Kle.exports=function(t,r){function n(i,a){return zut.coerce(t,r,qut,i,a)}Out(t,r,n)}});var eue=ye((Car,Qle)=>{\"use strict\";var $le=Dr(),But=v3(),Nut=_M();Qle.exports=function(t,r,n,i){function a(s,l){return $le.coerce(t,r,But,s,l)}var o=$le.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Nut(t,r,a,o)}});var YB=ye((Lar,tue)=>{\"use strict\";var Uut=Dr(),Vut=W1();tue.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Uut.coerce(t,r,Vut,i,a)}return n(\"clickmode\"),n(\"hoversubplots\"),n(\"hovermode\")}});var nue=ye((Par,iue)=>{\"use strict\";var rue=Dr(),Gut=W1(),Hut=YB(),jut=_M();iue.exports=function(t,r){function n(c,f){return rue.coerce(t,r,Gut,c,f)}var i=Hut(t,r);i&&(n(\"hoverdistance\"),n(\"spikedistance\"));var a=n(\"dragmode\");a===\"select\"&&n(\"selectdirection\");var o=r._has(\"mapbox\"),s=r._has(\"map\"),l=r._has(\"geo\"),u=r._basePlotModules.length;r.dragmode===\"zoom\"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode=\"pan\"),jut(t,r,n),rue.coerceFont(n,\"hoverlabel.grouptitlefont\",r.hoverlabel.font)}});var sue=ye((Iar,oue)=>{\"use strict\";var KB=Dr(),aue=qa();oue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return KB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a<r.length;a++){var o=r[a],s=o[0].trace;if(!aue.traceIs(s,\"pie-like\")){var l=aue.traceIs(s,\"2dMap\")?Wut:KB.fillArray;l(s.hoverinfo,o,\"hi\",i(s)),s.hovertemplate&&l(s.hovertemplate,o,\"ht\"),s.hoverlabel&&(l(s.hoverlabel.bgcolor,o,\"hbg\"),l(s.hoverlabel.bordercolor,o,\"hbc\"),l(s.hoverlabel.font.size,o,\"hts\"),l(s.hoverlabel.font.color,o,\"htc\"),l(s.hoverlabel.font.family,o,\"htf\"),l(s.hoverlabel.font.weight,o,\"htw\"),l(s.hoverlabel.font.style,o,\"hty\"),l(s.hoverlabel.font.variant,o,\"htv\"),l(s.hoverlabel.namelength,o,\"hnl\"),l(s.hoverlabel.align,o,\"hta\"),l(s.hoverlabel.showarrow,o,\"htsa\"))}}};function Wut(e,t,r,n){n=n||KB.identity,Array.isArray(e)&&(t[0][r]=n(e))}});var uue=ye((Rar,lue)=>{\"use strict\";var Xut=qa(),Zut=ZB().hover;lue.exports=function(t,r,n){var i=Xut.getComponentMethod(\"annotations\",\"onClick\")(t,t._hoverdata);n!==void 0&&Zut(t,r,n,!0);function a(){t.emit(\"plotly_click\",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(i&&i.then?i.then(a):a(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Dar,hue)=>{\"use strict\";var Yut=Oa(),JL=Dr(),Kut=yv(),xM=ip(),cue=W1(),fue=ZB();hue.exports={moduleType:\"component\",name:\"fx\",constants:NS(),schema:{layout:cue},attributes:v3(),layoutAttributes:cue,supplyLayoutGlobalDefaults:Jle(),supplyDefaults:eue(),supplyLayoutDefaults:nue(),calc:sue(),getDistanceFunction:xM.getDistanceFunction,getClosest:xM.getClosest,inbox:xM.inbox,quadrature:xM.quadrature,appendArrayPointValue:xM.appendArrayPointValue,castHoverOption:$ut,castHoverinfo:Qut,hover:fue.hover,unhover:Kut.unhover,loneHover:fue.loneHover,loneUnhover:Jut,click:uue()};function Jut(e){var t=JL.isD3Selection(e)?e:Yut.select(e);t.selectAll(\"g.hovertext\").remove(),t.selectAll(\".spikeline\").remove()}function $ut(e,t,r){return JL.castOption(e,t,\"hoverlabel.\"+r)}function Qut(e,t,r){function n(i){return JL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return JL.castOption(e,r,\"hoverinfo\",n)}});var Cg=ye(Iy=>{\"use strict\";Iy.selectMode=function(e){return e===\"lasso\"||e===\"select\"};Iy.drawMode=function(e){return e===\"drawclosedpath\"||e===\"drawopenpath\"||e===\"drawline\"||e===\"drawrect\"||e===\"drawcircle\"};Iy.openMode=function(e){return e===\"drawline\"||e===\"drawopenpath\"};Iy.rectMode=function(e){return e===\"select\"||e===\"drawline\"||e===\"drawrect\"||e===\"drawcircle\"};Iy.freeMode=function(e){return e===\"lasso\"||e===\"drawclosedpath\"||e===\"drawopenpath\"};Iy.selectingOrDrawing=function(e){return Iy.freeMode(e)||Iy.rectMode(e)}});var bM=ye((zar,due)=>{\"use strict\";due.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var $L=ye((Oar,vue)=>{\"use strict\";vue.exports={undo:{width:857.1,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},home:{width:928.6,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},\"camera-retro\":{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},zoombox:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},pan:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_plus:{width:875,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},zoom_minus:{width:875,height:1e3,path:\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\",transform:\"matrix(1 0 0 -1 0 850)\"},autoscale:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_basic:{width:1500,height:1e3,path:\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\",transform:\"matrix(1 0 0 -1 0 850)\"},tooltip_compare:{width:1125,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},plotlylogo:{width:1542,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},\"z-axis\":{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},\"3d_rotate\":{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},camera:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},movie:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},question:{width:857.1,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},disk:{width:857.1,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},drawopenpath:{width:70,height:70,path:\"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawclosedpath:{width:90,height:90,path:\"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z\",transform:\"matrix(1 0 0 1 -5 -5)\"},lasso:{width:1031,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},selectbox:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1 0 0 -1 0 850)\"},drawline:{width:70,height:70,path:\"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z\",transform:\"matrix(1 0 0 1 -15 -15)\"},drawrect:{width:80,height:80,path:\"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},drawcircle:{width:80,height:80,path:\"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},eraseshape:{width:80,height:80,path:\"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z\",transform:\"matrix(1 0 0 1 -10 -10)\"},spikeline:{width:1e3,height:1e3,path:\"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\",transform:\"matrix(1.5 0 0 -1.5 0 850)\"},pencil:{width:1792,height:1792,path:\"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z\",transform:\"matrix(1 0 0 1 0 1)\"},newplotlylogo:{name:\"newplotlylogo\",svg:[\"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>\",\" <title>plotly-logomark</title>\",\" <g id='symbol'>\",\"  <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>\",\"  <circle fill='#9EF' cx='102' cy='30' r='6'/>\",\"  <circle fill='#BAC' cx='78' cy='30' r='6'/>\",\"  <circle fill='#BAC' cx='78' cy='54' r='6'/>\",\"  <circle fill='#D69' cx='54' cy='30' r='6'/>\",\"  <circle fill='#F26' cx='30' cy='30' r='6'/>\",\"  <circle fill='#F26' cx='30' cy='54' r='6'/>\",\"  <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>\",\"  <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>\",\"  <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>\",\"  <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>\",\" </g>\",\"</svg>\"].join(\"\")}}});var eP=ye((qar,pue)=>{\"use strict\";var QL=32;pue.exports={CIRCLE_SIDES:QL,i000:0,i090:QL/4,i180:QL/2,i270:QL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var tP=ye((Bar,mue)=>{\"use strict\";var ect=Dr().strTranslate;function gue(e,t){switch(e.type){case\"log\":return e.p2d(t);case\"date\":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function tct(e,t){switch(e.type){case\"log\":return e.d2p(t);case\"date\":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function rct(e){var t=e._id.charAt(0)===\"y\"?1:0;return function(r){return gue(e,r[t])}}function ict(e){return ect(e.xaxis._offset,e.yaxis._offset)}mue.exports={p2r:gue,r2p:tct,axValue:rct,getTransform:ict}});var m_=ye(Ry=>{\"use strict\";var nct=nM(),xue=eP(),eT=xue.CIRCLE_SIDES,JB=xue.SQRT2,bue=tP(),yue=bue.p2r,_ue=bue.r2p,act=[0,3,4,5,6,1,2],oct=[0,3,4,1,2];Ry.writePaths=function(e){var t=e.length;if(!t)return\"M0,0Z\";for(var r=\"\",n=0;n<t;n++)for(var i=e[n].length,a=0;a<i;a++){var o=e[n][a][0];if(o===\"Z\")r+=\"Z\";else for(var s=e[n][a].length,l=0;l<s;l++){var u=l;o===\"Q\"||o===\"S\"?u=oct[l]:o===\"C\"&&(u=act[l]),r+=e[n][a][u],l>0&&l<s-1&&(r+=\",\")}}return r};Ry.readPaths=function(e,t,r,n){var i=nct(e),a=[],o=-1,s=function(){o++,a[o]=[]},l,u=0,c=0,f,h,d=function(){f=u,h=c};d();for(var v=0;v<i.length;v++){var _=[],b,p,k,E,T=i[v][0],L=T;switch(T){case\"M\":s(),u=+i[v][1],c=+i[v][2],_.push([L,u,c]),d();break;case\"Q\":case\"S\":b=+i[v][1],k=+i[v][2],u=+i[v][3],c=+i[v][4],_.push([L,u,c,b,k]);break;case\"C\":b=+i[v][1],k=+i[v][2],p=+i[v][3],E=+i[v][4],u=+i[v][5],c=+i[v][6],_.push([L,u,c,b,k,p,E]);break;case\"T\":case\"L\":u=+i[v][1],c=+i[v][2],_.push([L,u,c]);break;case\"H\":L=\"L\",u=+i[v][1],_.push([L,u,c]);break;case\"V\":L=\"L\",c=+i[v][1],_.push([L,u,c]);break;case\"A\":L=\"L\";var x=+i[v][1],C=+i[v][2];+i[v][4]||(x=-x,C=-C);var M=u-x,g=c;for(l=1;l<=eT/2;l++){var P=2*Math.PI*l/eT;_.push([L,M+x*Math.cos(P),g+C*Math.sin(P)])}break;case\"Z\":(u!==f||c!==h)&&(u=f,c=h,_.push([L,u,c]));break}for(var A=(r||{}).domain,z=t._fullLayout._size,O=r&&r.xsizemode===\"pixel\",U=r&&r.ysizemode===\"pixel\",G=n===!1,Z=0;Z<_.length;Z++){for(l=0;l+2<7;l+=2){var j=_[Z][l+1],N=_[Z][l+2];j===void 0||N===void 0||(u=j,c=N,r&&(r.xaxis&&r.xaxis.p2r?(G&&(j-=r.xaxis._offset),O?j=_ue(r.xaxis,r.xanchor)+j:j=yue(r.xaxis,j)):(G&&(j-=z.l),A?j=A.x[0]+j/z.w:j=j/z.w),r.yaxis&&r.yaxis.p2r?(G&&(N-=r.yaxis._offset),U?N=_ue(r.yaxis,r.yanchor)-N:N=yue(r.yaxis,N)):(G&&(N-=z.t),A?N=A.y[1]-N/z.h:N=1-N/z.h)),_[Z][l+1]=j,_[Z][l+2]=N)}a[o].push(_[Z].slice())}}return a};function wM(e,t){return Math.abs(e-t)<=1e-6}function rP(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}Ry.pointsOnRectangle=function(e){var t=e.length;if(t!==5)return!1;for(var r=1;r<3;r++){var n=e[0][r]-e[1][r],i=e[3][r]-e[2][r];if(!wM(n,i))return!1;var a=e[0][r]-e[3][r],o=e[1][r]-e[2][r];if(!wM(a,o))return!1}return!wM(e[0][1],e[1][1])&&!wM(e[0][1],e[3][1])?!1:!!(rP(e[0],e[1])*rP(e[0],e[3]))};Ry.pointsOnEllipse=function(e){var t=e.length;if(t!==eT+1)return!1;t=eT;for(var r=0;r<t;r++){var n=(t*2-r)%t,i=(t/2+n)%t,a=(t/2+r)%t;if(!wM(rP(e[r],e[a]),rP(e[n],e[i])))return!1}return!0};Ry.handleEllipse=function(e,t,r){if(!e)return[t,r];var n=Ry.ellipseOver({x0:t[0],y0:t[1],x1:r[0],y1:r[1]}),i=(n.x1+n.x0)/2,a=(n.y1+n.y0)/2,o=(n.x1-n.x0)/2,s=(n.y1-n.y0)/2;o||(o=s=s/JB),s||(s=o=o/JB);for(var l=[],u=0;u<eT;u++){var c=u*2*Math.PI/eT;l.push([i+o*Math.cos(c),a+s*Math.sin(c)])}return l};Ry.ellipseOver=function(e){var t=e.x0,r=e.y0,n=e.x1,i=e.y1,a=n-t,o=i-r;t-=a,r-=o;var s=(t+n)/2,l=(r+i)/2,u=JB;return a*=u,o*=u,{x0:s-a,y0:l-o,x1:s+a,y1:l+o}};Ry.fixDatesForPaths=function(e,t,r){var n=t.type===\"date\",i=r.type===\"date\";if(!n&&!i)return e;for(var a=0;a<e.length;a++)for(var o=0;o<e[a].length;o++)for(var s=0;s+2<e[a][o].length;s+=2)n&&(e[a][o][s+1]=e[a][o][s+1].replace(\" \",\"_\")),i&&(e[a][o][s+2]=e[a][o][s+2].replace(\" \",\"_\"));return e}});var aP=ye((Uar,Lue)=>{\"use strict\";var wue=hf(),Eue=Cg(),sct=Eue.drawMode,lct=Eue.openMode,tT=eP(),Tue=tT.i000,Aue=tT.i090,Sue=tT.i180,Mue=tT.i270,uct=tT.cos45,cct=tT.sin45,kue=tP(),iP=kue.p2r,y_=kue.r2p,fct=o_(),hct=fct.clearOutline,nP=m_(),dct=nP.readPaths,vct=nP.writePaths,pct=nP.ellipseOver,gct=nP.fixDatesForPaths;function mct(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!sct(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s<o.length)switch(n._fullLayout.shapes[s].type){case\"rect\":a=\"drawrect\";break;case\"circle\":a=\"drawcircle\";break;case\"line\":a=\"drawline\";break;case\"path\":var l=o[s].path||\"\";l[l.length-1]===\"Z\"?a=\"drawclosedpath\":a=\"drawopenpath\";break}}var u=Cue(e,t,a);hct(n);for(var c=t.editHelpers,f=(c||{}).modifyItem,h=[],d=0;d<o.length;d++){var v=n._fullLayout.shapes[d];if(h[d]=v._input,i!==void 0&&d===n._fullLayout._activeShapeIndex){var _=u;switch(v.type){case\"line\":case\"rect\":case\"circle\":var b=wue.getFromId(n,v.xref);v.xref.charAt(0)===\"x\"&&b.type.includes(\"category\")?(f(\"x0\",_.x0-(v.x0shift||0)),f(\"x1\",_.x1-(v.x1shift||0))):(f(\"x0\",_.x0),f(\"x1\",_.x1));var p=wue.getFromId(n,v.yref);v.yref.charAt(0)===\"y\"&&p.type.includes(\"category\")?(f(\"y0\",_.y0-(v.y0shift||0)),f(\"y1\",_.y1-(v.y1shift||0))):(f(\"y0\",_.y0),f(\"y1\",_.y1));break;case\"path\":f(\"path\",_.path);break}}}return i===void 0?(h.push(u),h):c?c.getUpdateObj():{}}}}function Cue(e,t,r){var n=e[0][0],i=t.gd,a=n.getAttribute(\"d\"),o=i._fullLayout.newshape,s=t.plotinfo,l=t.isActiveShape,u=s.xaxis,c=s.yaxis,f=!!s.domain||!s.xaxis,h=!!s.domain||!s.yaxis,d=lct(r),v=dct(a,i,s,l),_={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:f?\"paper\":u._id,yref:h?\"paper\":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};d||(_.fillcolor=o.fillcolor,_.fillrule=o.fillrule);var b;if(v.length===1&&(b=v[0]),b&&b.length===5&&r===\"drawrect\")_.type=\"rect\",_.x0=b[0][1],_.y0=b[0][2],_.x1=b[2][1],_.y1=b[2][2];else if(b&&r===\"drawline\")_.type=\"line\",_.x0=b[0][1],_.y0=b[0][2],_.x1=b[1][1],_.y1=b[1][2];else if(b&&r===\"drawcircle\"){_.type=\"circle\";var p=b[Tue][1],k=b[Aue][1],E=b[Sue][1],T=b[Mue][1],L=b[Tue][2],x=b[Aue][2],C=b[Sue][2],M=b[Mue][2],g=s.xaxis&&(s.xaxis.type===\"date\"||s.xaxis.type===\"log\"),P=s.yaxis&&(s.yaxis.type===\"date\"||s.yaxis.type===\"log\");g&&(p=y_(s.xaxis,p),k=y_(s.xaxis,k),E=y_(s.xaxis,E),T=y_(s.xaxis,T)),P&&(L=y_(s.yaxis,L),x=y_(s.yaxis,x),C=y_(s.yaxis,C),M=y_(s.yaxis,M));var A=(k+T)/2,z=(L+C)/2,O=(T-k+E-p)/2,U=(M-x+C-L)/2,G=pct({x0:A,y0:z,x1:A+O*uct,y1:z+U*cct});g&&(G.x0=iP(s.xaxis,G.x0),G.x1=iP(s.xaxis,G.x1)),P&&(G.y0=iP(s.yaxis,G.y0),G.y1=iP(s.yaxis,G.y1)),_.x0=G.x0,_.y0=G.y0,_.x1=G.x1,_.y1=G.y1}else _.type=\"path\",u&&c&&gct(v,u,c),_.path=vct(v),b=null;return _}Lue.exports={newShapes:mct,createShapeObj:Cue}});var QB=ye((Var,Pue)=>{\"use strict\";var yct=Cg(),_ct=yct.selectMode,xct=o_(),bct=xct.clearOutline,$B=m_(),wct=$B.readPaths,Tct=$B.writePaths,Act=$B.fixDatesForPaths;Pue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute(\"d\"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!_ct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d<h.length)switch(a._fullLayout.selections[d].type){case\"rect\":f=\"select\";break;case\"path\":f=\"lasso\";break}}var v=wct(i,a,s,c),_={xref:l._id,yref:u._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},b;v.length===1&&(b=v[0]),b&&b.length===5&&f===\"select\"?(_.type=\"rect\",_.x0=b[0][1],_.y0=b[0][2],_.x1=b[2][1],_.y1=b[2][2]):(_.type=\"path\",l&&u&&Act(v,l,u),_.path=Tct(v),b=null),bct(a);for(var p=r.editHelpers,k=(p||{}).modifyItem,E=[],T=0;T<h.length;T++){var L=a._fullLayout.selections[T];if(!L){E[T]=L;continue}if(E[T]=L._input,c!==void 0&&T===a._fullLayout._activeSelectionIndex){var x=_;switch(L.type){case\"rect\":k(\"x0\",x.x0),k(\"x1\",x.x1),k(\"y0\",x.y0),k(\"y1\",x.y1);break;case\"path\":k(\"path\",x.path);break}}}return c===void 0?(E.push(_),E):p?p.getUpdateObj():{}}}}});var TM=ye((Gar,Iue)=>{\"use strict\";Iue.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:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var x_=ye(Jd=>{\"use strict\";var Mm=TM(),Rue=Dr(),__=ho();Jd.rangeToShapePosition=function(e){return e.type===\"log\"?e.r2d:function(t){return t}};Jd.shapePositionToRange=function(e){return e.type===\"log\"?e.d2r:function(t){return t}};Jd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace(\"_\",\" \")),e(t)}};Jd.encodeDate=function(e){return function(t){return e(t).replace(\" \",\"_\")}};Jd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Mm.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Mm.paramRE);if(!(!s||s.length<o)){var l=s[o],u=r?l:Rue.cleanNumber(l);n.push(u)}}}),n};Jd.countDefiningCoords=function(e,t,r){if(e!==\"path\")return 2;if(!t)return 0;let n=t.match(Mm.segmentRE);if(!n)return 0;let i=r===\"x\"?Mm.paramIsX:Mm.paramIsY;return n.reduce((a,o)=>{let s=o.charAt(0),l=i[s].drawn!==void 0;return a+(l?1:0)},0)};Jd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i===\"domain\")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Jd.shapePositionToRange(t);o=function(l){var u=Dy(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type===\"date\"&&(o=Jd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Jd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n===\"domain\")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Jd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Jd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Jd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!==\"paper\"&&(n.xaxis=e._fullLayout[r.xref+\"axis\"]),r.yref&&r.yref!==\"paper\"&&(n.yaxis=e._fullLayout[r.yref+\"axis\"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Jd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+\"axis\"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+\"axis\"])),{options:r,plotinfo:n}};Jd.getPathString=function(e,t){let r=t.type,n=__.getRefType(t.xref),i=__.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,v,_,b,p;function k(P,A,z,O){var U;if(P)if(A===\"domain\")O?U=function(G){return P._offset+P._length*(1-G)}:U=function(G){return P._offset+P._length*G};else{let G=Jd.shapePositionToRange(P);U=function(Z){return P._offset+P.r2p(G(Z,!0))},z===\"path\"&&P.type===\"date\"&&(U=Jd.decodeDate(U))}else O?U=function(G){return a.t+a.h*(1-G)}:U=function(G){return a.l+a.w*G};return U}if(n===\"array\"?(h=[],o=t.xref.map(function(P){return __.getFromId(e,P)}),h=t.xref.map(function(P,A){return k(o[A],__.getRefType(P),r,!1)})):(o=__.getFromId(e,t.xref),h=k(o,n,r,!1)),i===\"array\"?(d=[],s=t.yref.map(function(P){return __.getFromId(e,P)}),d=t.yref.map(function(P,A){return k(s[A],__.getRefType(P),r,!0)})):(s=__.getFromId(e,t.yref),d=k(s,i,r,!0)),r===\"path\")return Sct(t,h,d);if(n===\"array\")l=Dy(o[0],t.x0shift),u=Dy(o[1],t.x1shift),v=h[0](t.x0)+l,_=h[1](t.x1)+u;else if(l=Dy(o,t.x0shift),u=Dy(o,t.x1shift),t.xsizemode===\"pixel\"){let P=h(t.xanchor);v=P+t.x0+l,_=P+t.x1+u}else v=h(t.x0)+l,_=h(t.x1)+u;if(i===\"array\")c=Dy(s[0],t.y0shift),f=Dy(s[1],t.y1shift),b=d[0](t.y0)+c,p=d[1](t.y1)+f;else if(c=Dy(s,t.y0shift),f=Dy(s,t.y1shift),t.ysizemode===\"pixel\"){let P=d(t.yanchor);b=P-t.y0+c,p=P-t.y1+f}else b=d(t.y0)+c,p=d(t.y1)+f;if(r===\"line\")return\"M\"+v+\",\"+b+\"L\"+_+\",\"+p;if(r===\"rect\")return\"M\"+v+\",\"+b+\"H\"+_+\"V\"+p+\"H\"+v+\"Z\";var E=(v+_)/2,T=(b+p)/2,L=Math.abs(E-v),x=Math.abs(T-b),C=\"A\"+L+\",\"+x,M=E+L+\",\"+T,g=E+\",\"+(T-x);return\"M\"+M+C+\" 0 1,1 \"+g+C+\" 0 0,1 \"+M+\"Z\"};function Sct(e,t,r){let n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Mm.segmentRE,function(h){var d=0,v=h.charAt(0),_=Mm.paramIsX[v],b=Mm.paramIsY[v],p=Mm.numParams[v];let k=_.drawn!==void 0,E=b.drawn!==void 0,T=l?t[c]:t,L=u?r[f]:r;var x=h.slice(1).replace(Mm.paramRE,function(C){return _[d]?i===\"pixel\"?C=T(o)+Number(C):C=T(C):b[d]&&(a===\"pixel\"?C=L(s)-Number(C):C=L(C)),d++,d>p&&(C=\"X\"),C});return d>p&&(x=x.replace(/[\\s,]*X.*/,\"\"),Rue.log(\"Ignoring extra params in segment \"+h)),k&&c++,E&&f++,v+x})}function Dy(e,t){t=t||0;var r=0;return t&&e&&(e.type===\"category\"||e.type===\"multicategory\")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var tN=ye((jar,zue)=>{\"use strict\";var Mct=Dr(),Em=ho(),Due=Zl(),Fue=So(),Ect=m_().readPaths,eN=x_(),kct=eN.getPathString,AM=D6(),Cct=Dh().FROM_TL;zue.exports=function(t,r,n,i){if(i.selectAll(\".shape-label\").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!==\"path\"){var s=Em.getFromId(t,n.xref),l=Em.getFromId(t,n.yref);let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref);for(var u in AM){var c=typeof AM[u]==\"function\",f=!oe||AM.simpleXVariables.includes(u),h=!_e||AM.simpleYVariables.includes(u);if(c&&f&&h){var d=AM[u](n,s,l);d!==void 0&&(o[u]=d)}}}a=Mct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var v={\"data-index\":r},_=n.label.font,b={\"data-notex\":1},p=i.append(\"g\").attr(v).classed(\"shape-label\",!0),k=p.append(\"text\").attr(b).classed(\"shape-label-text\",!0).text(a),E,T,L,x;if(n.path){var C=kct(t,n),M=Ect(C,t);E=1/0,L=1/0,T=-1/0,x=-1/0;for(var g=0;g<M.length;g++)for(var P=0;P<M[g].length;P++)for(var A=M[g][P],z=1;z<A.length;z+=2){var O=A[z],U=A[z+1];E=Math.min(E,O),T=Math.max(T,O),L=Math.min(L,U),x=Math.max(x,U)}}else{let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref),Ce=Em.getFromId(t,oe?n.xref[0]:n.xref),Le=Em.getFromId(t,oe?n.xref[1]:n.xref),ge=Em.getFromId(t,_e?n.yref[0]:n.yref),ie=Em.getFromId(t,_e?n.yref[1]:n.yref),Se=Em.getRefType(oe?n.xref[0]:n.xref),Ee=Em.getRefType(oe?n.xref[1]:n.xref),Ae=Em.getRefType(_e?n.yref[0]:n.yref),Be=Em.getRefType(_e?n.yref[1]:n.yref),Pe=function(De,ce,je,lt){return eN.getDataToPixel(t,je,ce,!1,lt)(De)},me=function(De,ce,je,lt){return eN.getDataToPixel(t,je,ce,!0,lt)(De)};E=Pe(n.x0,n.x0shift,Ce,Se),T=Pe(n.x1,n.x1shift,Le,Ee),L=me(n.y0,n.y0shift,ge,Ae),x=me(n.y1,n.y1shift,ie,Be)}var G=n.label.textangle;G===\"auto\"&&(n.type===\"line\"?G=Lct(E,L,T,x):G=0),k.call(function(oe){return oe.call(Fue.font,_).attr({}),Due.convertToTspans(oe,t),oe});var Z=Fue.bBox(k.node()),j=Pct(E,L,T,x,n,G,Z),N=j.textx,H=j.texty,re=j.xanchor;k.attr({\"text-anchor\":{left:\"start\",center:\"middle\",right:\"end\"}[re],y:H,x:N,transform:\"rotate(\"+G+\",\"+N+\",\"+H+\")\"}).call(Due.positionText,N,H)}};function Lct(e,t,r,n){var i,a;return a=Math.abs(r-e),r>=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Pct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,_=i.label.yanchor,b,p,k,E;if(c===\"line\"){s===\"start\"?(b=e,p=t):s===\"end\"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v===\"auto\"&&(s===\"start\"?l===\"auto\"?r>e?v=\"left\":r<e?v=\"right\":v=\"center\":r>e?v=\"right\":r<e?v=\"left\":v=\"center\":s===\"end\"?l===\"auto\"?r>e?v=\"right\":r<e?v=\"left\":v=\"center\":r>e?v=\"left\":r<e?v=\"right\":v=\"center\":v=\"center\");var T={left:1,center:0,right:-1},L={bottom:-1,middle:0,top:1};if(l===\"auto\"){var x=L[_];k=-u*h*x,E=u*d*x}else{var C=T[v],M=L[_];k=u*C,E=u*M}b=b+k,p=p+E}else k=u+3,s.indexOf(\"right\")!==-1?(b=Math.max(e,r)-k,v===\"auto\"&&(v=\"right\")):s.indexOf(\"left\")!==-1?(b=Math.min(e,r)+k,v===\"auto\"&&(v=\"left\")):(b=(e+r)/2,v===\"auto\"&&(v=\"center\")),s.indexOf(\"top\")!==-1?p=Math.min(t,n):s.indexOf(\"bottom\")!==-1?p=Math.max(t,n):p=(t+n)/2,E=u,_===\"bottom\"?p=p-E:_===\"top\"&&(p=p+E);var g=Cct[_],P=i.label.font.size,A=o.height,z=(A*g-P)*h,O=-(A*g-P)*d;return{textx:b+z,texty:p+O,xanchor:v}}});var lP=ye((War,Hue)=>{\"use strict\";var Ict=Dr(),Rct=Ict.strTranslate,Oue=yv(),Nue=Cg(),Dct=Nue.drawMode,Uue=Nue.selectMode,Vue=qa(),que=ka(),sP=eP(),Fct=sP.i000,zct=sP.i090,Oct=sP.i180,qct=sP.i270,Bct=o_(),Gue=Bct.clearOutlineControllers,iN=m_(),oP=iN.pointsOnRectangle,rN=iN.pointsOnEllipse,Nct=iN.writePaths,Uct=aP().newShapes,Vct=aP().createShapeObj,Gct=QB(),Hct=tN();Hue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(rN(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Uct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=Gct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Vue.call((j||{}).redrawing?\"relayout\":\"_guiRelayout\",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Dct(c),h=Uue(c);(f||h)&&(a._fullLayout._outlining=!0),Gue(a),r.attr(\"d\",Nct(t));var d,v,_,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=jct([],t);var k=u.append(\"g\").attr(\"class\",\"outline-controllers\");P(k),Z()}if(f&&n.hasText){var E=u.select(\".label-temp\"),T=Vct(r,n,n.dragmode);Hct(a,\"label-temp\",T,E)}function L(j){_=+j.srcElement.getAttribute(\"data-i\"),b=+j.srcElement.getAttribute(\"data-j\"),d[_][b].moveFn=x}function x(j,N){if(t.length){var H=p[_][b][1],re=p[_][b][2],oe=t[_],_e=oe.length;if(oP(oe)){var Ce=j,Le=N;if(n.isActiveSelection){var ge=Bue(oe,b);ge[1]===oe[b][1]?Le=0:Ce=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=H+Ce),Se[2]===oe[b][2]&&(Se[2]=re+Le)}if(oe[b][1]=H+Ce,oe[b][2]=re+Le,!oP(oe))for(var Ee=0;Ee<_e;Ee++)for(var Ae=0;Ae<oe[Ee].length;Ae++)oe[Ee][Ae]=p[_][Ee][Ae]}else oe[b][1]=H+j,oe[b][2]=re+N;o()}}function C(){s()}function M(){if(t.length&&t[_]&&t[_].length){for(var j=[],N=0;N<t[_].length;N++)N!==b&&j.push(t[_][N]);j.length>1&&!(j.length===2&&j[1][0]===\"Z\")&&(b===0&&(j[0][0]=\"M\"),t[_]=j,o(),s())}}function g(j,N){if(j===2){_=+N.srcElement.getAttribute(\"data-i\"),b=+N.srcElement.getAttribute(\"data-j\");var H=t[_];!oP(H)&&!rN(H)&&M()}}function P(j){d=[];for(var N=0;N<t.length;N++){var H=t[N],re=oP(H),oe=!re&&rN(H);d[N]=[];for(var _e=H.length,Ce=0;Ce<_e;Ce++)if(H[Ce][0]!==\"Z\"&&!(oe&&Ce!==Fct&&Ce!==zct&&Ce!==Oct&&Ce!==qct)){var Le=re&&n.isActiveSelection,ge;Le&&(ge=Bue(H,Ce));var ie=H[Ce][1],Se=H[Ce][2],Ee=j.append(Le?\"rect\":\"circle\").attr(\"data-i\",N).attr(\"data-j\",Ce).style({fill:que.background,stroke:que.defaultLine,\"stroke-width\":1,\"shape-rendering\":\"crispEdges\"});if(Le){var Ae=ge[1]-ie,Be=ge[2]-Se,Pe=Be?5:Math.max(Math.min(25,Math.abs(Ae)-5),5),me=Ae?5:Math.max(Math.min(25,Math.abs(Be)-5),5);Ee.classed(Be?\"cursor-ew-resize\":\"cursor-ns-resize\",!0).attr(\"width\",Pe).attr(\"height\",me).attr(\"x\",ie-Pe/2).attr(\"y\",Se-me/2).attr(\"transform\",Rct(Ae/2,Be/2))}else Ee.classed(\"cursor-grab\",!0).attr(\"r\",5).attr(\"cx\",ie).attr(\"cy\",Se);d[N][Ce]={element:Ee.node(),gd:a,prepFn:L,doneFn:C,clickFn:g},Oue.init(d[N][Ce])}}}function A(j,N){if(t.length)for(var H=0;H<t.length;H++)for(var re=0;re<t[H].length;re++)for(var oe=0;oe+2<t[H][re].length;oe+=2)t[H][re][oe+1]=p[H][re][oe+1]+j,t[H][re][oe+2]=p[H][re][oe+2]+N}function z(j,N){A(j,N),o()}function O(j){_=+j.srcElement.getAttribute(\"data-i\"),_||(_=0),v[_].moveFn=z}function U(){s()}function G(j){j===2&&Wct(a)}function Z(){if(v=[],!!t.length){var j=0;v[j]={element:r[0][0],gd:a,prepFn:O,doneFn:U,clickFn:G},Oue.init(v[j])}}};function jct(e,t){for(var r=0;r<t.length;r++){var n=t[r];e[r]=[];for(var i=0;i<n.length;i++){e[r][i]=[];for(var a=0;a<n[i].length;a++)e[r][i][a]=n[i][a]}}return e}function Bue(e,t){var r=e[t][1],n=e[t][2],i=e.length,a,o,s;return a=(t+1)%i,o=e[a][1],s=e[a][2],o===r&&s===n&&(a=(t+2)%i,o=e[a][1],s=e[a][2]),[a,o,s]}function Wct(e){if(Uue(e._fullLayout.dragmode)){Gue(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);delete e._fullLayout._activeSelectionIndex;var a=e._fullLayout.selections[t];e._fullLayout._deselect={xref:a.xref,yref:a.yref},Vue.call(\"_guiRelayout\",e,{selections:n})}}}});var dP=ye((Xar,Que)=>{\"use strict\";var Xct=Oa(),Yue=qa(),aN=Dr(),Xb=ho(),Zct=m_().readPaths,Yct=lP(),cP=tN(),Kue=o_().clearOutlineControllers,nN=ka(),fP=So(),Kct=vl().arrayEditor,jue=yv(),Wue=Eg(),Zb=TM(),Ep=x_(),oN=Ep.getPathString;Que.exports={draw:sN,drawOne:Jue,eraseActiveShape:eft,drawLabel:cP};function sN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll(\"path\").remove(),t._shapeLowerLayer.selectAll(\"path\").remove(),t._shapeUpperLayer.selectAll(\"text\").remove(),t._shapeLowerLayer.selectAll(\"text\").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll(\"path\").remove(),n.selectAll(\"text\").remove())}for(var i=0;i<t.shapes.length;i++)t.shapes[i].visible===!0&&Jue(e,i)}function uP(e){return!!e._fullLayout._outlining}function hP(e){return!e._context.edits.shapePosition}function Jue(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\"'+t+'\"]').remove();var r=Ep.makeShapesOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input||n.visible!==!0)return;let a=Array.isArray(n.xref)||Array.isArray(n.yref);if(n.layer===\"above\")s(e._fullLayout._shapeUpperLayer);else if(n.xref.includes(\"paper\")||n.yref.includes(\"paper\"))s(e._fullLayout._shapeLowerLayer);else if(n.layer===\"between\"&&!a)s(i.shapelayerBetween);else if(i._hadPlotinfo){var o=i.mainplotinfo||i;s(o.shapelayer)}else s(e._fullLayout._shapeLowerLayer);function s(l){var u=oN(e,n),c={\"data-index\":t,\"fill-rule\":n.fillrule,d:u},f=n.opacity,h=n.fillcolor,d=n.line.width?n.line.color:\"rgba(0,0,0,0)\",v=n.line.width,_=n.line.dash;!v&&n.editable===!0&&(v=5,_=\"solid\");var b=u[u.length-1]!==\"Z\",p=hP(e)&&n.editable&&e._fullLayout._activeShapeIndex===t;p&&(h=b?\"rgba(0,0,0,0)\":e._fullLayout.activeshape.fillcolor,f=e._fullLayout.activeshape.opacity);var k=l.append(\"g\").classed(\"shape-group\",!0).attr({\"data-index\":t}),E=k.append(\"path\").attr(c).style(\"opacity\",f).call(nN.stroke,d).call(nN.fill,h).call(fP.dashLine,_,v);$ue(k,e,n),cP(e,t,n,k);var T;if((p||e._context.edits.shapePosition)&&(T=Kct(e.layout,\"shapes\",n)),p){E.style({cursor:\"move\"});var L={element:E.node(),plotinfo:i,gd:e,editHelpers:T,hasText:n.label.text||n.label.texttemplate,isActiveShape:!0},x=Zct(u,e);Yct(x,E,L)}else e._context.edits.shapePosition?$ct(e,E,n,t,l,T):n.editable===!0&&E.style(\"pointer-events\",b||nN.opacity(h)*f<=.5?\"stroke\":\"all\");E.node().addEventListener(\"click\",function(){return Qct(e,E)})}}function $ue(e,t,r){let n=r.xref,i=r.yref;if(Array.isArray(n)||Array.isArray(i)){let a=\"clip\"+t._fullLayout._uid+\"shape\"+r._index,o=Jct(t,n,i);aN.ensureSingleById(t._fullLayout._clips,\"clipPath\",a,function(s){s.append(\"rect\")}).select(\"rect\").attr(o),fP.setClipUrl(e,a,t)}else{let a=(n+i).replace(/paper/g,\"\").replace(/[xyz][0-9]* *domain/g,\"\");fP.setClipUrl(e,a?\"clip\"+t._fullLayout._uid+a:null,t)}}function Jct(e,t,r){let n=e._fullLayout._size;function i(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>Xb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=i(t,!1),o=i(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function $ct(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode===\"pixel\",u=r.ysizemode===\"pixel\",c=r.type===\"line\",f=r.type===\"path\",h=a.modifyItem,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z=Xct.select(t.node().parentNode),O=Xb.getFromId(e,r.xref),U=Xb.getRefType(r.xref),G=Xb.getFromId(e,r.yref),Z=Xb.getRefType(r.yref),j=r.x0shift,N=r.x1shift,H=r.y0shift,re=r.y1shift,oe=function(ot,ut){var Wt=Ep.getDataToPixel(e,O,ut,!1,U);return Wt(ot)},_e=function(ot,ut){var Wt=Ep.getDataToPixel(e,G,ut,!0,Z);return Wt(ot)},Ce=Ep.getPixelToData(e,O,!1,U),Le=Ep.getPixelToData(e,G,!0,Z),ge=Ee(),ie={element:ge.node(),gd:e,prepFn:Pe,doneFn:me,clickFn:De},Se;jue.init(ie),ge.node().onmousemove=Be;function Ee(){return c?Ae():t}function Ae(){var ot=10,ut=Math.max(r.line.width,ot),Wt=i.append(\"g\").attr(\"data-index\",n).attr(\"drag-helper\",!0);Wt.append(\"path\").attr(\"d\",t.attr(\"d\")).style({cursor:\"move\",\"stroke-width\":ut,\"stroke-opacity\":\"0\"});var Nt={\"fill-opacity\":\"0\"},$t=Math.max(ut/2,ot);return Wt.append(\"circle\").attr({\"data-line-point\":\"start-point\",cx:l?oe(r.xanchor)+r.x0:oe(r.x0,j),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,H),r:$t}).style(Nt).classed(\"cursor-grab\",!0),Wt.append(\"circle\").attr({\"data-line-point\":\"end-point\",cx:l?oe(r.xanchor)+r.x1:oe(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,re),r:$t}).style(Nt).classed(\"cursor-grab\",!0),Wt}function Be(ot){if(uP(e)){Se=null;return}if(c)ot.target.tagName===\"path\"?Se=\"move\":Se=ot.target.attributes[\"data-line-point\"].value===\"start-point\"?\"resize-over-start-point\":\"resize-over-end-point\";else{var ut=ie.element.getBoundingClientRect(),Wt=ut.right-ut.left,Nt=ut.bottom-ut.top,$t=ot.clientX-ut.left,sr=ot.clientY-ut.top,Tr=!f&&Wt>o&&Nt>s&&!ot.shiftKey?jue.getCursor($t/Wt,1-sr/Nt):\"move\";Wue(t,Tr),Se=Tr.split(\"-\")[0]}}function Pe(ot){uP(e)||(l&&(p=oe(r.xanchor)),u&&(k=_e(r.yanchor)),r.type===\"path\"?A=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),_=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),d<_?(L=d,g=\"x0\",x=_,P=\"x1\"):(L=_,g=\"x1\",x=d,P=\"x0\"),!u&&v<b||u&&v>b?(E=v,C=\"y0\",T=b,M=\"y1\"):(E=b,C=\"y1\",T=v,M=\"y0\"),Be(ot),lt(i,r),Vt(t,r,e),ie.moveFn=Se===\"move\"?ce:je,ie.altKey=ot.altKey)}function me(){uP(e)||(Wue(t),pt(i),$ue(t,e,r),Yue.call(\"_guiRelayout\",e,a.getUpdateObj()))}function De(){uP(e)||pt(i)}function ce(ot,ut){if(r.type===\"path\"){var Wt=function(sr){return sr},Nt=Wt,$t=Wt;l?h(\"xanchor\",r.xanchor=Ce(p+ot)):(Nt=function(Tr){return Ce(oe(Tr)+ot)},O&&O.type===\"date\"&&(Nt=Ep.encodeDate(Nt))),u?h(\"yanchor\",r.yanchor=Le(k+ut)):($t=function(Tr){return Le(_e(Tr)+ut)},G&&G.type===\"date\"&&($t=Ep.encodeDate($t))),h(\"path\",r.path=Xue(A,Nt,$t))}else l?h(\"xanchor\",r.xanchor=Ce(p+ot)):(h(\"x0\",r.x0=Ce(d+ot)),h(\"x1\",r.x1=Ce(_+ot))),u?h(\"yanchor\",r.yanchor=Le(k+ut)):(h(\"y0\",r.y0=Le(v+ut)),h(\"y1\",r.y1=Le(b+ut)));t.attr(\"d\",oN(e,r)),lt(i,r),cP(e,n,r,z)}function je(ot,ut){if(f){var Wt=function(Lr){return Lr},Nt=Wt,$t=Wt;l?h(\"xanchor\",r.xanchor=Ce(p+ot)):(Nt=function(ti){return Ce(oe(ti)+ot)},O&&O.type===\"date\"&&(Nt=Ep.encodeDate(Nt))),u?h(\"yanchor\",r.yanchor=Le(k+ut)):($t=function(ti){return Le(_e(ti)+ut)},G&&G.type===\"date\"&&($t=Ep.encodeDate($t))),h(\"path\",r.path=Xue(A,Nt,$t))}else if(c){if(Se===\"resize-over-start-point\"){var sr=d+ot,Tr=u?v-ut:v+ut;h(\"x0\",r.x0=l?sr:Ce(sr)),h(\"y0\",r.y0=u?Tr:Le(Tr))}else if(Se===\"resize-over-end-point\"){var fr=_+ot,$e=u?b-ut:b+ut;h(\"x1\",r.x1=l?fr:Ce(fr)),h(\"y1\",r.y1=u?$e:Le($e))}}else{var St=function(Lr){return Se.indexOf(Lr)!==-1},Qt=St(\"n\"),Gt=St(\"s\"),_t=St(\"w\"),It=St(\"e\"),mt=Qt?E+ut:E,er=Gt?T+ut:T,lr=_t?L+ot:L,wr=It?x+ot:x;u&&(Qt&&(mt=E-ut),Gt&&(er=T-ut)),(!u&&er-mt>s||u&&mt-er>s)&&(h(C,r[C]=u?mt:Le(mt)),h(M,r[M]=u?er:Le(er))),wr-lr>o&&(h(g,r[g]=l?lr:Ce(lr)),h(P,r[P]=l?wr:Ce(wr)))}t.attr(\"d\",oN(e,r)),lt(i,r),cP(e,n,r,z)}function lt(ot,ut){(l||u)&&Wt();function Wt(){var Nt=ut.type!==\"path\",$t=ot.selectAll(\".visual-cue\").data([0]),sr=1;$t.enter().append(\"path\").attr({fill:\"#fff\",\"fill-rule\":\"evenodd\",stroke:\"#000\",\"stroke-width\":sr}).classed(\"visual-cue\",!0);var Tr=oe(l?ut.xanchor:aN.midRange(Nt?[ut.x0,ut.x1]:Ep.extractPathCoords(ut.path,Zb.paramIsX))),fr=_e(u?ut.yanchor:aN.midRange(Nt?[ut.y0,ut.y1]:Ep.extractPathCoords(ut.path,Zb.paramIsY)));if(Tr=Ep.roundPositionForSharpStrokeRendering(Tr,sr),fr=Ep.roundPositionForSharpStrokeRendering(fr,sr),l&&u){var $e=\"M\"+(Tr-1-sr)+\",\"+(fr-1-sr)+\"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z\";$t.attr(\"d\",$e)}else if(l){var St=\"M\"+(Tr-1-sr)+\",\"+(fr-9-sr)+\"v18 h2 v-18 Z\";$t.attr(\"d\",St)}else{var Qt=\"M\"+(Tr-9-sr)+\",\"+(fr-1-sr)+\"h18 v2 h-18 Z\";$t.attr(\"d\",Qt)}}}function pt(ot){ot.selectAll(\".visual-cue\").remove()}function Vt(ot,ut,Wt){var Nt=ut.xref,$t=ut.yref,sr=Xb.getFromId(Wt,Nt),Tr=Xb.getFromId(Wt,$t),fr=\"\";Nt!==\"paper\"&&!sr.autorange&&(fr+=Nt),$t!==\"paper\"&&!Tr.autorange&&(fr+=$t),fP.setClipUrl(ot,fr?\"clip\"+Wt._fullLayout._uid+fr:null,Wt)}}function Xue(e,t,r){return e.replace(Zb.segmentRE,function(n){var i=0,a=n.charAt(0),o=Zb.paramIsX[a],s=Zb.paramIsY[a],l=Zb.numParams[a],u=n.slice(1).replace(Zb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function Qct(e,t){if(hP(e)){var r=t.node(),n=+r.getAttribute(\"data-index\");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Zue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Zue,sN(e)}}}function Zue(e){if(hP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Kue(e),delete e._fullLayout._activeShapeIndex,sN(e))}}function eft(e){if(hP(e)){Kue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);return delete e._fullLayout._activeShapeIndex,Yue.call(\"_guiRelayout\",e,{shapes:n})}}}});var cN=ye((Zar,lce)=>{\"use strict\";var S0=qa(),ece=Mc(),tce=hf(),Pl=$L(),tft=dP().eraseActiveShape,vP=Dr(),tl=vP._,Il=lce.exports={};Il.toImage={name:\"toImage\",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||\"png\";return r===\"png\"?tl(e,\"Download plot as a PNG\"):tl(e,\"Download plot\")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||\"png\"};vP.notifier(tl(e,\"Taking snapshot - this may take a few seconds\"),\"long\"),[\"filename\",\"width\",\"height\",\"scale\"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call(\"downloadImage\",e,r).then(function(n){vP.notifier(tl(e,\"Snapshot succeeded\")+\" - \"+n,\"long\")}).catch(function(){vP.notifier(tl(e,\"Sorry, there was a problem downloading your snapshot!\"),\"long\")})}};Il.sendDataToCloud={name:\"sendDataToCloud\",title:function(e){return tl(e,\"Edit in Chart Studio\")},icon:Pl.disk,click:function(e){ece.sendDataToCloud(e)}};Il.editInChartStudio={name:\"editInChartStudio\",title:function(e){return tl(e,\"Edit in Chart Studio\")},icon:Pl.pencil,click:function(e){ece.sendDataToCloud(e)}};Il.zoom2d={name:\"zoom2d\",_cat:\"zoom\",title:function(e){return tl(e,\"Zoom\")},attr:\"dragmode\",val:\"zoom\",icon:Pl.zoombox,click:Bv};Il.pan2d={name:\"pan2d\",_cat:\"pan\",title:function(e){return tl(e,\"Pan\")},attr:\"dragmode\",val:\"pan\",icon:Pl.pan,click:Bv};Il.select2d={name:\"select2d\",_cat:\"select\",title:function(e){return tl(e,\"Box Select\")},attr:\"dragmode\",val:\"select\",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:\"lasso2d\",_cat:\"lasso\",title:function(e){return tl(e,\"Lasso Select\")},attr:\"dragmode\",val:\"lasso\",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:\"drawclosedpath\",title:function(e){return tl(e,\"Draw closed freeform\")},attr:\"dragmode\",val:\"drawclosedpath\",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:\"drawopenpath\",title:function(e){return tl(e,\"Draw open freeform\")},attr:\"dragmode\",val:\"drawopenpath\",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:\"drawline\",title:function(e){return tl(e,\"Draw line\")},attr:\"dragmode\",val:\"drawline\",icon:Pl.drawline,click:Bv};Il.drawrect={name:\"drawrect\",title:function(e){return tl(e,\"Draw rectangle\")},attr:\"dragmode\",val:\"drawrect\",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:\"drawcircle\",title:function(e){return tl(e,\"Draw circle\")},attr:\"dragmode\",val:\"drawcircle\",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:\"eraseshape\",title:function(e){return tl(e,\"Erase active shape\")},icon:Pl.eraseshape,click:tft};Il.zoomIn2d={name:\"zoomIn2d\",_cat:\"zoomin\",title:function(e){return tl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:\"zoomOut2d\",_cat:\"zoomout\",title:function(e){return tl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:\"autoScale2d\",_cat:\"autoscale\",title:function(e){return tl(e,\"Autoscale\")},attr:\"zoom\",val:\"auto\",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:\"resetScale2d\",_cat:\"resetscale\",title:function(e){return tl(e,\"Reset axes\")},attr:\"zoom\",val:\"reset\",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:\"hoverClosestCartesian\",_cat:\"hoverclosest\",title:function(e){return tl(e,\"Show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:Pl.tooltip_basic,gravity:\"ne\",click:Bv};Il.hoverCompareCartesian={name:\"hoverCompareCartesian\",_cat:\"hoverCompare\",title:function(e){return tl(e,\"Compare data on hover\")},attr:\"hovermode\",val:function(e){return e._fullLayout._isHoriz?\"y\":\"x\"},icon:Pl.tooltip_compare,gravity:\"ne\",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout,o={},s=tce.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n===\"zoom\"){var f=i===\"in\"?.5:2,h=(1+f)/2,d=(1-f)/2,v,_;for(c=0;c<s.length;c++)if(u=s[c],_=u.modebardisable===\"none\"||u.modebardisable.indexOf(i===\"auto\"||i===\"reset\"?\"autoscale\":\"zoominout\")===-1,_&&!u.fixedrange)if(v=u._name,i===\"auto\")o[v+\".autorange\"]=!0;else if(i===\"reset\")u._rangeInitial0===void 0&&u._rangeInitial1===void 0?o[v+\".autorange\"]=!0:u._rangeInitial0===void 0?(o[v+\".autorange\"]=u._autorangeInitial,o[v+\".range\"]=[null,u._rangeInitial1]):u._rangeInitial1===void 0?(o[v+\".range\"]=[u._rangeInitial0,null],o[v+\".autorange\"]=u._autorangeInitial):o[v+\".range\"]=[u._rangeInitial0,u._rangeInitial1],u._showSpikeInitial!==void 0&&(o[v+\".showspikes\"]=u._showSpikeInitial,l===\"on\"&&!u._showSpikeInitial&&(l=\"off\"));else{var b=[u.r2l(u.range[0]),u.r2l(u.range[1])],p=[h*b[0]+d*b[1],h*b[1]+d*b[0]];o[v+\".range[0]\"]=u.l2r(p[0]),o[v+\".range[1]\"]=u.l2r(p[1])}}else n===\"hovermode\"&&(i===\"x\"||i===\"y\")&&(i=a._isHoriz?\"y\":\"x\",r.setAttribute(\"data-val\",i)),o[n]=i;a._cartesianSpikesEnabled=l,S0.call(\"_guiRelayout\",e,o)}Il.zoom3d={name:\"zoom3d\",_cat:\"zoom\",title:function(e){return tl(e,\"Zoom\")},attr:\"scene.dragmode\",val:\"zoom\",icon:Pl.zoombox,click:pP};Il.pan3d={name:\"pan3d\",_cat:\"pan\",title:function(e){return tl(e,\"Pan\")},attr:\"scene.dragmode\",val:\"pan\",icon:Pl.pan,click:pP};Il.orbitRotation={name:\"orbitRotation\",title:function(e){return tl(e,\"Orbital rotation\")},attr:\"scene.dragmode\",val:\"orbit\",icon:Pl[\"3d_rotate\"],click:pP};Il.tableRotation={name:\"tableRotation\",title:function(e){return tl(e,\"Turntable rotation\")},attr:\"scene.dragmode\",val:\"turntable\",icon:Pl[\"z-axis\"],click:pP};function pP(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout._subplots.gl3d||[],o={},s=n.split(\".\"),l=0;l<a.length;l++)o[a[l]+\".\"+s[1]]=i;var u=i===\"pan\"?i:\"zoom\";o.dragmode=u,S0.call(\"_guiRelayout\",e,o)}Il.resetCameraDefault3d={name:\"resetCameraDefault3d\",_cat:\"resetCameraDefault\",title:function(e){return tl(e,\"Reset camera to default\")},attr:\"resetDefault\",icon:Pl.home,click:lN};Il.resetCameraLastSave3d={name:\"resetCameraLastSave3d\",_cat:\"resetCameraLastSave\",title:function(e){return tl(e,\"Reset camera to last save\")},attr:\"resetLastSave\",icon:Pl.movie,click:lN};function lN(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=n===\"resetLastSave\",a=n===\"resetDefault\",o=e._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c=s[u],f=c+\".camera\",h=c+\".aspectratio\",d=c+\".aspectmode\",v=o[c]._scene,_;i?(l[f+\".up\"]=v.viewInitial.up,l[f+\".eye\"]=v.viewInitial.eye,l[f+\".center\"]=v.viewInitial.center,_=!0):a&&(l[f+\".up\"]=null,l[f+\".eye\"]=null,l[f+\".center\"]=null,_=!0),_&&(l[h+\".x\"]=v.viewInitial.aspectratio.x,l[h+\".y\"]=v.viewInitial.aspectratio.y,l[h+\".z\"]=v.viewInitial.aspectratio.z,l[d]=v.viewInitial.aspectmode)}S0.call(\"_guiRelayout\",e,l)}Il.hoverClosest3d={name:\"hoverClosest3d\",_cat:\"hoverclosest\",title:function(e){return tl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:rft};function rce(e,t){var r=t.currentTarget,n=r._previousVal,i=e._fullLayout,a=i._subplots.gl3d||[],o=[\"xaxis\",\"yaxis\",\"zaxis\"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=i[c],h=c+\".hovermode\";s[h]=f.hovermode,l[h]=!1;for(var d=0;d<3;d++){var v=o[d],_=c+\".\"+v+\".showspikes\";l[_]=!1,s[_]=f[v].showspikes}}r._previousVal=s}return l}function rft(e,t){var r=rce(e,t);S0.call(\"_guiRelayout\",e,r)}Il.zoomInGeo={name:\"zoomInGeo\",_cat:\"zoomin\",title:function(e){return tl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:uN};Il.zoomOutGeo={name:\"zoomOutGeo\",_cat:\"zoomout\",title:function(e){return tl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:uN};Il.resetGeo={name:\"resetGeo\",_cat:\"reset\",title:function(e){return tl(e,\"Reset\")},attr:\"reset\",val:null,icon:Pl.autoscale,click:uN};Il.hoverClosestGeo={name:\"hoverClosestGeo\",_cat:\"hoverclosest\",title:function(e){return tl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:nce};function uN(e,t){for(var r=t.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=e._fullLayout,o=a._subplots.geo||[],s=0;s<o.length;s++){var l=o[s],u=a[l];if(n===\"zoom\"){var c=u.projection.scale,f=i===\"in\"?2*c:.5*c;S0.call(\"_guiRelayout\",e,l+\".projection.scale\",f)}}n===\"reset\"&&rT(e,\"geo\")}Il.hoverClosestPie={name:\"hoverClosestPie\",_cat:\"hoverclosest\",title:function(e){return tl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:Pl.tooltip_basic,gravity:\"ne\",click:nce};function ice(e){var t=e._fullLayout;return t.hovermode?!1:t._has(\"cartesian\")?t._isHoriz?\"y\":\"x\":\"closest\"}function nce(e){var t=ice(e);S0.call(\"_guiRelayout\",e,\"hovermode\",t)}Il.resetViewSankey={name:\"resetSankeyGroup\",title:function(e){return tl(e,\"Reset view\")},icon:Pl.home,click:function(e){for(var t={\"node.groups\":[],\"node.x\":[],\"node.y\":[]},r=0;r<e._fullData.length;r++){var n=e._fullData[r]._viewInitial;t[\"node.groups\"].push(n.node.groups.slice()),t[\"node.x\"].push(n.node.x.slice()),t[\"node.y\"].push(n.node.y.slice())}S0.call(\"restyle\",e,t)}};Il.toggleHover={name:\"toggleHover\",title:function(e){return tl(e,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:\"ne\",click:function(e,t){var r=rce(e,t);r.hovermode=ice(e),S0.call(\"_guiRelayout\",e,r)}};Il.resetViews={name:\"resetViews\",title:function(e){return tl(e,\"Reset views\")},icon:Pl.home,click:function(e,t){var r=t.currentTarget;r.setAttribute(\"data-attr\",\"zoom\"),r.setAttribute(\"data-val\",\"reset\"),Bv(e,t),r.setAttribute(\"data-attr\",\"resetLastSave\"),lN(e,t),rT(e,\"geo\"),rT(e,\"mapbox\"),rT(e,\"map\")}};Il.toggleSpikelines={name:\"toggleSpikelines\",title:function(e){return tl(e,\"Toggle Spike Lines\")},icon:Pl.spikeline,attr:\"_cartesianSpikesEnabled\",val:\"on\",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled=r===\"on\"?\"off\":\"on\",S0.call(\"_guiRelayout\",e,ift(e))}};function ift(e){for(var t=e._fullLayout,r=t._cartesianSpikesEnabled===\"on\",n=tce.list(e,null,!0),i={},a=0;a<n.length;a++){var o=n[a];i[o._name+\".showspikes\"]=r?!0:o._showSpikeInitial}return i}Il.resetViewMapbox={name:\"resetViewMapbox\",_cat:\"resetView\",title:function(e){return tl(e,\"Reset view\")},attr:\"reset\",icon:Pl.home,click:function(e){rT(e,\"mapbox\")}};Il.resetViewMap={name:\"resetViewMap\",_cat:\"resetView\",title:function(e){return tl(e,\"Reset view\")},attr:\"reset\",icon:Pl.home,click:function(e){rT(e,\"map\")}};Il.zoomInMapbox={name:\"zoomInMapbox\",_cat:\"zoomin\",title:function(e){return tl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:ace};Il.zoomInMap={name:\"zoomInMap\",_cat:\"zoomin\",title:function(e){return tl(e,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:Pl.zoom_plus,click:oce};Il.zoomOutMapbox={name:\"zoomOutMapbox\",_cat:\"zoomout\",title:function(e){return tl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:ace};Il.zoomOutMap={name:\"zoomOutMap\",_cat:\"zoomout\",title:function(e){return tl(e,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:Pl.zoom_minus,click:oce};function ace(e,t){sce(e,t,\"mapbox\")}function oce(e,t){sce(e,t,\"map\")}function sce(e,t,r){for(var n=t.currentTarget,i=n.getAttribute(\"data-val\"),a=e._fullLayout,o=a._subplots[r]||[],s=1.05,l={},u=0;u<o.length;u++){var c=o[u],f=a[c].zoom,h=i===\"in\"?s*f:f/s;l[c+\".zoom\"]=h}S0.call(\"_guiRelayout\",e,l)}function rT(e,t){for(var r=e._fullLayout,n=r._subplots[t]||[],i={},a=0;a<n.length;a++)for(var o=n[a],s=r[o]._subplot,l=s.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];i[o+\".\"+f]=l[f]}S0.call(\"_guiRelayout\",e,i)}});var fN=ye((Yar,hce)=>{\"use strict\";var uce=cN(),nft=Object.keys(uce),cce=[\"drawline\",\"drawopenpath\",\"drawclosedpath\",\"drawcircle\",\"drawrect\",\"eraseshape\"],fce=[\"v1hovermode\",\"hoverclosest\",\"hovercompare\",\"togglehover\",\"togglespikelines\"].concat(cce),iT=[],aft=function(e){if(fce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();iT.indexOf(t)===-1&&iT.push(t),iT.indexOf(r)===-1&&iT.push(r)}};nft.forEach(function(e){aft(uce[e])});iT.sort();hce.exports={DRAW_MODES:cce,backButtons:fce,foreButtons:iT}});var hN=ye((Jar,dce)=>{\"use strict\";var Kar=fN();dce.exports={editType:\"modebar\",orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"modebar\"},bgcolor:{valType:\"color\",editType:\"modebar\"},color:{valType:\"color\",editType:\"modebar\"},activecolor:{valType:\"color\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},add:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"},remove:{valType:\"string\",arrayOk:!0,dflt:\"\",editType:\"modebar\"}}});var pce=ye(($ar,vce)=>{\"use strict\";var oft=Dr(),SM=ka(),sft=vl(),lft=hN();vce.exports=function(t,r){var n=t.modebar||{},i=sft.newContainer(r,\"modebar\");function a(s,l){return oft.coerce(n,i,lft,s,l)}a(\"orientation\"),a(\"bgcolor\",SM.addOpacity(r.paper_bgcolor,.5));var o=SM.contrast(SM.rgb(r.modebar.bgcolor));a(\"color\",SM.addOpacity(o,.3)),a(\"activecolor\",SM.addOpacity(o,.7)),a(\"uirevision\",r.uirevision),a(\"add\"),a(\"remove\")}});var _ce=ye((Qar,yce)=>{\"use strict\";var dN=Oa(),uft=Eo(),gP=Dr(),gce=$L(),cft=g6().version,fft=new DOMParser;function mce(e){this.container=e.container,this.element=document.createElement(\"div\"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var km=mce.prototype;km.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i=\"modebar-\"+n._uid;this.element.setAttribute(\"id\",i),this.element.setAttribute(\"role\",\"toolbar\"),this._uid=i,this.element.className=\"modebar modebar--custom\",r.displayModeBar===\"hover\"&&(this.element.className+=\" modebar--hover ease-bg\"),n.modebar.orientation===\"v\"&&(this.element.className+=\" vertical\",t=t.reverse());var a=n.modebar,o=\"#\"+i+\" .modebar-group\";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+\" watermark\"),n.modebar.orientation===\"v\"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),gP.setStyleOnHover(\"#\"+i+\" .modebar-btn\",\".active\",\".icon path\",\"fill: \"+a.activecolor,\"fill: \"+a.color,this.element)};km.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error(\"must provide button 'name' in button config\");if(t.buttonsNames.indexOf(a)!==-1)throw new Error(\"button name '\"+a+\"' is taken\");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};km.createGroup=function(){var e=document.createElement(\"div\");e.className=\"modebar-group\";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};km.createButton=function(e){var t=this,r=document.createElement(\"button\");r.setAttribute(\"type\",\"button\"),r.setAttribute(\"rel\",\"tooltip\"),r.className=\"modebar-btn\";var n=e.title;n===void 0?n=e.name:typeof n==\"function\"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute(\"data-title\",n),r.setAttribute(\"aria-label\",n)),e.attr!==void 0&&r.setAttribute(\"data-attr\",e.attr);var i=e.val;i!==void 0&&(typeof i==\"function\"&&(i=i(this.graphInfo)),r.setAttribute(\"data-val\",i));var a=e.click;if(typeof a!=\"function\")throw new Error(\"must provide button 'click' function in button config\");r.addEventListener(\"click\",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute(\"data-toggle\",e.toggle||!1),e.toggle&&dN.select(r).classed(\"active\",!0);var o=e.icon;return typeof o==\"function\"?r.appendChild(o()):r.appendChild(this.createIcon(o||gce.question)),r.setAttribute(\"data-gravity\",e.gravity||\"n\"),r};km.createIcon=function(e){var t=uft(e.height)?Number(e.height):e.ascent-e.descent,r=\"http://www.w3.org/2000/svg\",n;if(e.path){n=document.createElementNS(r,\"svg\"),n.setAttribute(\"viewBox\",[0,0,e.width,t].join(\" \")),n.setAttribute(\"class\",\"icon\");var i=document.createElementNS(r,\"path\");i.setAttribute(\"d\",e.path),e.transform?i.setAttribute(\"transform\",e.transform):e.ascent!==void 0&&i.setAttribute(\"transform\",\"matrix(1 0 0 -1 0 \"+e.ascent+\")\"),n.appendChild(i)}if(e.svg){var a=fft.parseFromString(e.svg,\"application/xml\");n=a.childNodes[0]}return n.setAttribute(\"height\",\"1em\"),n.setAttribute(\"width\",\"1em\"),n};km.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute(\"data-attr\"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute(\"data-val\")||!0,a=n.getAttribute(\"data-attr\"),o=n.getAttribute(\"data-toggle\")===\"true\",s=dN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(\".icon path\");v&&(h||f.matches(\":hover\")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed(\"active\");s.classed(\"active\",u),l(n,u)}}else{var c=a===null?a:gP.nestedProperty(t,a).get();s.classed(\"active\",c===i),l(n,c===i)}})};km.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0};function hft(e){return e+\" (v\"+cft+\")\"}km.getLogo=function(){var e=this.createGroup(),t=document.createElement(\"a\");return t.href=\"https://plotly.com/\",t.target=\"_blank\",t.setAttribute(\"data-title\",hft(gP._(this.graphInfo,\"Produced with Plotly.js\"))),t.className=\"modebar-btn plotlyjsicon modebar-btn--logo\",t.appendChild(this.createIcon(gce.newplotlylogo)),e.appendChild(t),e};km.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};km.destroy=function(){gP.removeElement(this.container.querySelector(\".modebar\"))};function dft(e,t){var r=e._fullLayout,n=new mce({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&dN.select(n.element).append(\"span\").classed(\"badge-private float--left\",!0).text(\"PRIVATE\"),n}yce.exports=dft});var wce=ye((eor,bce)=>{\"use strict\";var vft=hf(),xce=Ru(),vN=qa(),pft=ip().isUnifiedHover,gft=_ce(),mP=cN(),mft=fN().DRAW_MODES,yft=Dr().extendDeep;bce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error([\"*modeBarButtonsToRemove* configuration options\",\"must be an array.\"].join(\" \"));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error([\"*modeBarButtonsToAdd* configuration options\",\"must be an array.\"].join(\" \"));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Aft(a):!n.displayModeBar&&n.watermark?o=[]:o=_ft(t),i?i.update(t,o):r._modeBar=gft(t,o)};function _ft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H==\"string\"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var re=H.name,oe=H._cat||H.name;if(re===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a==\"string\"&&(a=[a]);var o=t.modebar.remove;typeof o==\"string\"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H<n.modeBarButtonsToRemove.length;H++)if(i(N,n.modeBarButtonsToRemove[H]))return!1;return!0})),l=n.modeBarButtonsToRemove.concat(o.filter(function(N){for(var H=0;H<n.modeBarButtonsToAdd.length;H++)if(i(N,n.modeBarButtonsToAdd[H]))return!1;return!0})),u=t._has(\"cartesian\"),c=t._has(\"gl3d\"),f=t._has(\"geo\"),h=t._has(\"pie\"),d=t._has(\"funnelarea\"),v=t._has(\"ternary\"),_=t._has(\"mapbox\"),b=t._has(\"map\"),p=t._has(\"polar\"),k=t._has(\"smith\"),E=t._has(\"sankey\"),T=xft(t),L=pft(t.hovermode),x=[];function C(N){if(N.length){for(var H=[],re=0;re<N.length;re++){for(var oe=N[re],_e=mP[oe],Ce=_e.name.toLowerCase(),Le=(_e._cat||_e.name).toLowerCase(),ge=!1,ie=0;ie<l.length;ie++){var Se=l[ie].toLowerCase();if(Se===Ce||Se===Le){ge=!0;break}}ge||H.push(mP[oe])}x.push(H)}}var M=[\"toImage\"];n.showEditInChartStudio?M.push(\"editInChartStudio\"):n.showSendToCloud&&M.push(\"sendDataToCloud\"),C(M);var g=[],P=[],A=[],z=[];(u||h||d||v)+f+c+_+b+p+k>1?(P=[\"toggleHover\"],A=[\"resetViews\"]):f?(g=[\"zoomInGeo\",\"zoomOutGeo\"],P=[\"hoverClosestGeo\"],A=[\"resetGeo\"]):c?(P=[\"hoverClosest3d\"],A=[\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]):_?(g=[\"zoomInMapbox\",\"zoomOutMapbox\"],P=[\"toggleHover\"],A=[\"resetViewMapbox\"]):b?(g=[\"zoomInMap\",\"zoomOutMap\"],P=[\"toggleHover\"],A=[\"resetViewMap\"]):h?P=[\"hoverClosestPie\"]:E?(P=[\"hoverClosestCartesian\",\"hoverCompareCartesian\"],A=[\"resetViewSankey\"]):P=[\"toggleHover\"],u&&P.push(\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"),(wft(r)||L)&&(P=[]),u&&!T&&(g=[\"zoomIn2d\",\"zoomOut2d\",\"autoScale2d\"],A[0]!==\"resetViews\"&&(A=[\"resetScale2d\"])),c?z=[\"zoom3d\",\"pan3d\",\"orbitRotation\",\"tableRotation\"]:u&&!T||v?z=[\"zoom2d\",\"pan2d\"]:_||b||f?z=[\"pan2d\"]:p&&(z=[\"zoom2d\"]),bft(r)&&z.push(\"select2d\",\"lasso2d\");var O=[],U=function(N){O.indexOf(N)===-1&&P.indexOf(N)!==-1&&O.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z<s.length;Z++){var j=s[Z];typeof j==\"string\"?(j=j.toLowerCase(),mft.indexOf(j)!==-1?(t._has(\"mapbox\")||t._has(\"map\")||t._has(\"cartesian\"))&&z.push(j):j===\"togglespikelines\"?U(\"toggleSpikelines\"):j===\"togglehover\"?U(\"toggleHover\"):j===\"hovercompare\"?U(\"hoverCompareCartesian\"):j===\"hoverclosest\"?(U(\"hoverClosestCartesian\"),U(\"hoverClosestGeo\"),U(\"hoverClosest3d\"),U(\"hoverClosestPie\")):j===\"v1hovermode\"&&(U(\"hoverClosestCartesian\"),U(\"hoverCompareCartesian\"),U(\"hoverClosestGeo\"),U(\"hoverClosest3d\"),U(\"hoverClosestPie\"))):G.push(j)}s=G}return C(z),C(g.concat(A)),C(O),Tft(x,s)}function xft(e){for(var t=vft.list({_fullLayout:e},null,!0),r=0;r<t.length;r++){var n=t[r].modebardisable;if(!t[r].fixedrange&&n!==\"autoscale+zoominout\"&&n!==\"zoominout+autoscale\")return!1}return!0}function bft(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];!n._module||!n._module.selectPoints||(vN.traceIs(n,\"scatter-like\")?(xce.hasMarkers(n)||xce.hasText(n))&&(t=!0):vN.traceIs(n,\"box-violin\")?(n.boxpoints===\"all\"||n.points===\"all\")&&(t=!0):t=!0)}return t}function wft(e){for(var t=0;t<e.length;t++)if(!vN.traceIs(e[t],\"noHover\"))return!1;return!0}function Tft(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}function Aft(e){for(var t=yft([],e),r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;i++){var a=n[i];if(typeof a==\"string\")if(mP[a]!==void 0)t[r][i]=mP[a];else throw new Error([\"*modeBarButtons* configuration options\",\"invalid button name\"].join(\" \"))}return t}});var pN=ye((tor,Tce)=>{\"use strict\";Tce.exports={moduleType:\"component\",name:\"modebar\",layoutAttributes:hN(),supplyLayoutDefaults:pce(),manage:wce()}});var gN=ye((ror,Ace)=>{\"use strict\";var Sft=Dh().FROM_BL;Ace.exports=function(t,r,n){n===void 0&&(n=Sft[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Kb=ye(MM=>{\"use strict\";var Yb=Dr(),mN=Mg(),Lg=hf().id2name,Mft=Rd(),Sce=gN(),Eft=xm(),kft=fs().ALMOST_EQUAL,Cft=Dh().FROM_BL;MM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;s<n.length;s++)c=Lg(n[s]),f=e[c],h=t[c],Lft(f,h,{axIds:n,layoutOut:t,hasImage:i[c]});function _(M,g){for(s=0;s<M.length;s++){l=M[s];for(u in l)t[Lg(u)][g]=l}}for(_(o,\"_matchGroup\"),s=0;s<a.length;s++){l=a[s];for(u in l)if(h=t[Lg(u)],h.fixedrange){for(var b in l){var p=Lg(b);(e[p]||{}).fixedrange===!1&&Yb.warn(\"fixedrange was specified as false for axis \"+p+\" but was overridden because another axis in its constraint group has fixedrange true\"),t[p].fixedrange=!0}break}}for(s=0;s<a.length;){l=a[s];for(u in l){h=t[Lg(u)],h._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(l).length&&(a.splice(s,1),s--);break}s++}_(a,\"_constraintGroup\");var k=[\"constrain\",\"range\",\"autorange\",\"rangemode\",\"rangebreaks\",\"categoryorder\",\"categoryarray\"],E=!1,T=!1;function L(){v=h[d],d===\"rangebreaks\"&&(T=h._hasDayOfWeekBreaks)}for(s=0;s<o.length;s++){l=o[s];for(var x=0;x<k.length;x++){d=k[x],v=null;var C;for(u in l)if(c=Lg(u),f=e[c],h=t[c],d in h){if(!h.matches&&(C=h,d in f)){L();break}v===null&&d in f&&L()}if(d===\"range\"&&v&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(E=!0),d===\"autorange\"&&v===null&&E&&(v=!1),v===null&&d in C&&(v=C[d]),v!==null)for(u in l)h=t[Lg(u)],h[d]=d===\"range\"?v.slice():v,d===\"rangebreaks\"&&(h._hasDayOfWeekBreaks=T,Eft(h,t))}}};function Lft(e,t,r){var n=r.axIds,i=r.layoutOut,a=r.hasImage,o=i._axisConstraintGroups,s=i._axisMatchGroups,l=t._id,u=l.charAt(0),c=((i._splomAxes||{})[u]||{})[l]||{},f=t._id,h=f.charAt(0)===\"x\";t._matchGroup=null,t._constraintGroup=null;function d(z,O){return Yb.coerce(e,t,Mft,z,O)}d(\"constrain\",a?\"domain\":\"range\"),Yb.coerce(e,t,{constraintoward:{valType:\"enumerated\",values:h?[\"left\",\"center\",\"right\"]:[\"bottom\",\"middle\",\"top\"],dflt:h?\"center\":\"middle\"}},\"constraintoward\");var v=t.type,_,b,p=[];for(_=0;_<n.length;_++)if(b=n[_],b!==f){var k=i[Lg(b)];k.type===v&&p.push(b)}var E=kce(o,f);if(E){var T=[];for(_=0;_<p.length;_++)b=p[_],E[b]||T.push(b);p=T}var L=p.length,x,C;L&&(e.matches||c.matches)&&(x=Yb.coerce(e,t,{matches:{valType:\"enumerated\",values:p,dflt:p.indexOf(c.matches)!==-1?c.matches:void 0}},\"matches\"));var M=a&&!h?t.anchor:void 0;if(L&&!x&&(e.scaleanchor||M)&&(C=Yb.coerce(e,t,{scaleanchor:{valType:\"enumerated\",values:p.concat([!1])}},\"scaleanchor\",M)),x){t._matchGroup=yN(s,f,x,1);var g=i[Lg(x)],P=Mce(i,t)/Mce(i,g);h!==(x.charAt(0)===\"x\")&&(P=(h?\"x\":\"y\")+P),yN(o,f,x,P)}else e.matches&&n.indexOf(e.matches)!==-1&&Yb.warn(\"ignored \"+t._name+'.matches: \"'+e.matches+'\" to avoid an infinite loop');if(C){var A=d(\"scaleratio\");A||(A=t.scaleratio=1),yN(o,f,C,A)}else e.scaleanchor&&n.indexOf(e.scaleanchor)!==-1&&Yb.warn(\"ignored \"+t._name+'.scaleanchor: \"'+e.scaleanchor+'\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function Mce(e,t){var r=t.domain;return r||(r=e[Lg(t.overlaying)].domain),r[1]-r[0]}function kce(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function yN(e,t,r,n){var i,a,o,s,l,u=kce(e,t);u===null?(u={},u[t]=1,l=e.length,e.push(u)):l=e.indexOf(u);var c=Object.keys(u);for(i=0;i<e.length;i++)if(o=e[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)s=c[a],o[s]=_N(f,_N(n,u[s]));e.splice(l,1);return}if(n!==1)for(a=0;a<c.length;a++){var h=c[a];u[h]=_N(n,u[h])}u[r]=1}function _N(e,t){var r=\"\",n=\"\",i,a;typeof e==\"string\"&&(r=e.match(/^[xy]*/)[0],i=r.length,e=+e.slice(i)),typeof t==\"string\"&&(n=t.match(/^[xy]*/)[0],a=n.length,t=+t.slice(a));var o=e*t;return!i&&!a?o:!i||!a||r.charAt(0)===n.charAt(0)?r+n+e*t:i===a?o:(i>a?r.slice(a):n.slice(i))+o}function Pft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=e[s];if(typeof l==\"string\"){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.slice(c);for(var f=u.charAt(0)===\"y\"?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}MM.enforce=function(t){var r=t._fullLayout,n=r._axisConstraintGroups||[],i,a,o,s,l,u,c,f;for(i=0;i<n.length;i++){o=Pft(n[i],r);var h=Object.keys(o),d=1/0,v=0,_=1/0,b={},p={},k=!1;for(a=0;a<h.length;a++)s=h[a],p[s]=l=r[Lg(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),b[s]=u=Math.abs(l._m)/o[s],d=Math.min(d,u),(l.constrain===\"domain\"||!l._constraintShrinkable)&&(_=Math.min(_,u)),delete l._constraintShrinkable,v=Math.max(v,u),l.constrain===\"domain\"&&(k=!0);if(!(d>kft*v&&!k)){for(a=0;a<h.length;a++)if(s=h[a],u=b[s],l=p[s],c=l.constrain,u!==_||c===\"domain\")if(f=u/_,c===\"range\")Sce(l,f);else{var E=l._inputDomain,T=(l.domain[1]-l.domain[0])/(E[1]-E[0]),L=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if(f/=T,f*L<1){l.domain=l._input.domain=E.slice(),Sce(l,f);continue}if(L<1&&(l.range=l._input.range=l._inputRange.slice(),f*=L),l.autorange){var x=l.r2l(l.range[0]),C=l.r2l(l.range[1]),M=(x+C)/2,g=M,P=M,A=Math.abs(C-M),z=M-A*f*1.0001,O=M+A*f*1.0001,U=mN.makePadFn(r,l,0),G=mN.makePadFn(r,l,1);Ece(l,f);var Z=Math.abs(l._m),j=mN.concatExtremes(t,l),N=j.min,H=j.max,re,oe;for(oe=0;oe<N.length;oe++)re=N[oe].val-U(N[oe])/Z,re>z&&re<g&&(g=re);for(oe=0;oe<H.length;oe++)re=H[oe].val+G(H[oe])/Z,re<O&&re>P&&(P=re);var _e=(P-g)/(2*A);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x<C?[g,P]:[P,g]}Ece(l,f)}}}};MM.getAxisGroup=function(t,r){for(var n=t._axisMatchGroups,i=0;i<n.length;i++){var a=n[i];if(a[r])return\"g\"+i}return r};MM.clean=function(t,r){if(r._inputDomain){for(var n=!1,i=r._id,a=t._fullLayout._axisConstraintGroups,o=0;o<a.length;o++)if(a[o][i]){n=!0;break}(!n||r.constrain!==\"domain\")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function Ece(e,t){var r=e._inputDomain,n=Cft[e.constraintoward],i=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[i+(r[0]-i)/t,i+(r[1]-i)/t],e.setScale()}});var CM=ye(pd=>{\"use strict\";var _P=Oa(),Nv=qa(),Jp=Mc(),M0=Dr(),xN=Zl(),bN=bM(),EM=ka(),nT=So(),Cce=zb(),Dce=pN(),kM=ho(),Fy=Dh(),Fce=Kb(),Ift=Fce.enforce,Rft=Fce.clean,Lce=Mg().doAutoRange,zce=\"start\",Dft=\"middle\",Oce=\"end\",Fft=Rh().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,Oft],e)};function zft(e,t,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=e[1]||i[1]<=e[0])&&a[0]<t[1]&&a[1]>t[0])return!0}return!1}function Oft(e){var t=e._fullLayout,r=t._size,n=r.p,i=kM.list(e,\"\",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?\"100%\":t.width+\"px\",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?\"100%\":t.height+\"px\"}).selectAll(\".main-svg\").call(nT.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Dce.manage(e),!t._has(\"cartesian\"))return Jp.previousPromises(e);function f(Pe,me,De){var ce=Pe._lw/2;if(Pe._id.charAt(0)===\"x\"){if(me){if(De===\"top\")return me._offset-n-ce}else return r.t+r.h*(1-(Pe.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(De===\"right\")return me._offset+me._length+n+ce}else return r.l+r.w*(Pe.position||0)+ce%1;return me._offset-n-ce}for(a=0;a<i.length;a++){l=i[a];var h=l._anchorAxis;l._linepositions={},l._lw=nT.crispRound(e,l.linewidth,1),l._mainLinePosition=f(l,h,l.side),l._mainMirrorPosition=l.mirror&&h?f(l,h,Fy.OPPOSITE_SIDE[l.side]):null}var d=[],v=[],_=[],b=EM.opacity(t.paper_bgcolor)===1&&EM.opacity(t.plot_bgcolor)===1&&t.paper_bgcolor===t.plot_bgcolor;for(o in t._plots)if(s=t._plots[o],s.mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var p=s.xaxis.domain,k=s.yaxis.domain,E=s.plotgroup;if(zft(p,k,_)&&o.indexOf(Fft)===-1){var T=E.node(),L=s.bg=M0.ensureSingle(E,\"rect\",\"bg\");T.insertBefore(L.node(),T.childNodes[0]),v.push(o)}else E.select(\"rect.bg\").remove(),_.push([p,k]),b||(d.push(o),v.push(o))}var x=t._bgLayer.selectAll(\".bg\").data(d);for(x.enter().append(\"rect\").classed(\"bg\",!0),x.exit().remove(),x.each(function(Pe){t._plots[Pe].bg=_P.select(this)}),a=0;a<v.length;a++)s=t._plots[v[a]],u=s.xaxis,c=s.yaxis,s.bg&&u._offset!==void 0&&c._offset!==void 0&&s.bg.call(nT.setRect,u._offset-n,c._offset-n,u._length+2*n,c._length+2*n).call(EM.fill,t.plot_bgcolor).style(\"stroke-width\",0);if(!t._hasOnlyLargeSploms)for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var C=s.clipId=\"clip\"+t._uid+o+\"plot\",M=M0.ensureSingleById(t._clips,\"clipPath\",C,function(Pe){Pe.classed(\"plotclip\",!0).append(\"rect\")});s.clipRect=M.select(\"rect\").attr({width:u._length,height:c._length}),nT.setTranslate(s.plot,u._offset,c._offset);var g,P;s._hasClipOnAxisFalse?(g=null,P=C):(g=C,P=null),nT.setClipUrl(s.plot,g,e),s.layerClipId=P}var A,z,O,U,G,Z,j,N,H,re,oe,_e,Ce;function Le(Pe){return\"M\"+A+\",\"+Pe+\"H\"+z}function ge(Pe){return\"M\"+u._offset+\",\"+Pe+\"h\"+u._length}function ie(Pe){return\"M\"+Pe+\",\"+N+\"V\"+j}function Se(Pe){return c._shift!==void 0&&(Pe+=c._shift),\"M\"+Pe+\",\"+c._offset+\"v\"+c._length}function Ee(Pe,me,De){if(!Pe.showline||o!==Pe._mainSubplot)return\"\";if(!Pe._anchorAxis)return De(Pe._mainLinePosition);var ce=me(Pe._mainLinePosition);return Pe.mirror&&(ce+=me(Pe._mainMirrorPosition)),ce}for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var Ae=\"M0,0\";Pce(u,o)&&(G=yP(u,\"left\",c,i),A=u._offset-(G?n+G:0),Z=yP(u,\"right\",c,i),z=u._offset+u._length+(Z?n+Z:0),O=f(u,c,\"bottom\"),U=f(u,c,\"top\"),Ce=!u._anchorAxis||o!==u._mainSubplot,Ce&&(u.mirror===\"allticks\"||u.mirror===\"all\")&&(u._linepositions[o]=[O,U]),Ae=Ee(u,Le,ge),Ce&&u.showline&&(u.mirror===\"all\"||u.mirror===\"allticks\")&&(Ae+=Le(O)+Le(U)),s.xlines.style(\"stroke-width\",u._lw+\"px\").call(EM.stroke,u.showline?u.linecolor:\"rgba(0,0,0,0)\")),s.xlines.attr(\"d\",Ae);var Be=\"M0,0\";Pce(c,o)&&(oe=yP(c,\"bottom\",u,i),j=c._offset+c._length+(oe?n:0),_e=yP(c,\"top\",u,i),N=c._offset-(_e?n:0),H=f(c,u,\"left\"),re=f(c,u,\"right\"),Ce=!c._anchorAxis||o!==c._mainSubplot,Ce&&(c.mirror===\"allticks\"||c.mirror===\"all\")&&(c._linepositions[o]=[H,re]),Be=Ee(c,ie,Se),Ce&&c.showline&&(c.mirror===\"all\"||c.mirror===\"allticks\")&&(Be+=ie(H)+ie(re)),s.ylines.style(\"stroke-width\",c._lw+\"px\").call(EM.stroke,c.showline?c.linecolor:\"rgba(0,0,0,0)\")),s.ylines.attr(\"d\",Be)}return kM.makeClipPaths(e),Jp.previousPromises(e)}function Pce(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||e.mirror===\"all\"||e.mirror===\"allticks\")}function Ice(e,t,r){if(!r.showline||!r._lw)return!1;if(r.mirror===\"all\"||r.mirror===\"allticks\")return!0;var n=r._anchorAxis;if(!n)return!1;var i=Fy.FROM_BL[t];return r.side===t?n.domain[i]===e.domain[i]:r.mirror&&n.domain[1-i]===e.domain[1-i]}function yP(e,t,r,n){if(Ice(e,t,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&Ice(e,t,a))return a._lw}return 0}pd.drawMainTitle=function(e){var t=e._fullLayout.title,r=e._fullLayout,n=Hft(r),i=jft(r),a=Gft(r,i),o=Vft(r,n);if(Cce.draw(e,\"gtitle\",{propContainer:r,propName:\"title.text\",subtitlePropName:\"title.subtitle.text\",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:o,y:a,\"text-anchor\":n,dy:i}}),t.text&&t.automargin){var s=_P.select(e).selectAll(\".gtitle\"),l=nT.bBox(_P.select(e).selectAll(\".g-gtitle\").node()).height,u=Nft(e,t,l);if(u>0){Uft(e,a,u,l),s.attr({x:o,y:a,\"text-anchor\":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,a);var c=(t.text.match(xN.BR_TAG_ALL)||[]).length;if(c){var f=Fy.LINE_SPACING*c+Fy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(\".line\").each(function(){var b=+this.getAttribute(\"dy\").slice(0,-2)-f+\"em\";this.setAttribute(\"dy\",b)})}var h=_P.select(e).selectAll(\".gtitle-subtitle\");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,_=v+Cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:_,\"text-anchor\":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,_)}}}};function qft(e,t,r,n,i){var a=t.yref===\"paper\"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r===\"b\"?a-o:o;return M0.isTopAnchor(t)&&r===\"t\"||M0.isBottomAnchor(t)&&r===\"b\"?!1:s<i}function Bft(e,t,r,n,i){var a=0;return r===\"middle\"&&(a+=i/2),e===\"t\"?(r===\"top\"&&(a+=i),a+=n-t*n):(r===\"bottom\"&&(a+=i),a+=t*n),a}function Nft(e,t,r){var n=t.y,i=t.yanchor,a=n>.5?\"t\":\"b\",o=e._fullLayout.margin[a],s=0;return t.yref===\"paper\"?s=r+t.pad.t+t.pad.b:t.yref===\"container\"&&(s=Bft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Uft(e,t,r,n){var i=\"title.automargin\",a=e._fullLayout.title,o=a.y>.5?\"t\":\"b\",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref===\"paper\"&&qft(e,a,o,t,n)?s[o]=r:a.yref===\"container\"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Vft(e,t){var r=e.title,n=e._size,i=0;switch(t===zce?i=r.pad.l:t===Oce&&(i=-r.pad.r),r.xref){case\"paper\":return n.l+n.w*r.x+i;case\"container\":default:return e.width*r.x+i}}function Gft(e,t){var r=e.title,n=e._size,i=0;if(t===\"0em\"||!t?i=-r.pad.b:t===Fy.CAP_SHIFT+\"em\"&&(i=r.pad.t),r.y===\"auto\")return n.t/2;switch(r.yref){case\"paper\":return n.t+n.h-n.h*r.y+i;case\"container\":default:return e.height-e.height*r.y+i}}function Rce(e){return e===\"top\"?Fy.CAP_SHIFT+.3+\"em\":e===\"bottom\"?\"-0.3em\":Fy.MID_SHIFT+\"em\"}function Hft(e){var t=e.title,r=Dft;return M0.isRightAnchor(t)?r=Oce:M0.isLeftAnchor(t)&&(r=zce),r}function jft(e){var t=e.title,r=\"0em\";return M0.isTopAnchor(t)?r=Fy.CAP_SHIFT+\"em\":M0.isMiddleAnchor(t)&&(r=Fy.MID_SHIFT+\"em\"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n<t.length;n++){var i=t[n],a=i[0]||{},o=a.trace||{},s=o._module||{},l=s.arraysToCalcdata;l&&l(i,o);var u=s.editStyle;u&&r.push({fn:u,cd0:a})}if(r.length){for(n=0;n<r.length;n++){var c=r[n];c.fn(e,c.cd0)}bN(e),pd.redrawReglTraces(e)}return Jp.style(e),Nv.getComponentMethod(\"legend\",\"draw\")(e),Jp.previousPromises(e)};pd.doColorBars=function(e){return Nv.getComponentMethod(\"colorbar\",\"draw\")(e),Jp.previousPromises(e)};pd.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,Nv.call(\"_doPlot\",e,\"\",t)};pd.doLegend=function(e){return Nv.getComponentMethod(\"legend\",\"draw\")(e),Jp.previousPromises(e)};pd.doTicksRelayout=function(e){return kM.draw(e,\"redraw\"),e._fullLayout._hasOnlyLargeSploms&&(Nv.subplotsRegistry.splom.updateGrid(e),bN(e),pd.redrawReglTraces(e)),pd.drawMainTitle(e),Jp.previousPromises(e)};pd.doModeBar=function(e){var t=e._fullLayout;Dce.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return Jp.previousPromises(e)};pd.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var i=t[r[n]],a=i._scene;a.setViewport(i)}};pd.drawData=function(e){var t=e._fullLayout;bN(e);for(var r=t._basePlotModules,n=0;n<r.length;n++)r[n].plot(e);return pd.redrawReglTraces(e),Jp.style(e),Nv.getComponentMethod(\"selections\",\"draw\")(e),Nv.getComponentMethod(\"shapes\",\"draw\")(e),Nv.getComponentMethod(\"annotations\",\"draw\")(e),Nv.getComponentMethod(\"images\",\"draw\")(e),t._replotting=!1,Jp.previousPromises(e)};pd.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has(\"regl\")){var r=e._fullData,n=[],i=[],a,o;for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),a=0;a<r.length;a++){var s=r[a];s.visible===!0&&s._length!==0&&(s.type===\"splom\"?t._splomScenes[s.uid].draw():s.type===\"scattergl\"?M0.pushUnique(n,s.xaxis+s.yaxis):s.type===\"scatterpolargl\"&&M0.pushUnique(i,s.subplot))}for(a=0;a<n.length;a++)o=t._plots[n[a]],o._scene&&o._scene.draw();for(a=0;a<i.length;a++)o=t[i[a]]._subplot,o._scene&&o._scene.draw()}};pd.doAutoRangeAndConstraints=function(e){for(var t=kM.list(e,\"\",!0),r,n={},i=0;i<t.length;i++)if(r=t[i],!n[r._id]){n[r._id]=1,Rft(e,r),Lce(e,r);var a=r._matchGroup;if(a)for(var o in a){var s=kM.getFromId(e,o);Lce(e,s,r.range),n[o]=1}}Ift(e)};pd.finalDraw=function(e){Nv.getComponentMethod(\"rangeslider\",\"draw\")(e),Nv.getComponentMethod(\"rangeselector\",\"draw\")(e)};pd.drawMarginPushers=function(e){Nv.getComponentMethod(\"legend\",\"draw\")(e),Nv.getComponentMethod(\"rangeselector\",\"draw\")(e),Nv.getComponentMethod(\"sliders\",\"draw\")(e),Nv.getComponentMethod(\"updatemenus\",\"draw\")(e),Nv.getComponentMethod(\"colorbar\",\"draw\")(e)}});var AN=ye((aor,Vce)=>{\"use strict\";var Wft=m_().readPaths,Xft=lP(),qce=o_().clearOutlineControllers,wN=ka(),Bce=So(),Zft=vl().arrayEditor,Nce=x_(),Yft=Nce.getPathString;Vce.exports={draw:xP,drawOne:Uce,activateLastSelection:$ft};function xP(e){var t=e._fullLayout;qce(e),t._selectionLayer.selectAll(\"path\").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll(\"path\").remove()}for(var i=0;i<t.selections.length;i++)Uce(e,i)}function bP(e){return e._context.editSelection}function Uce(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index=\"'+t+'\"]').remove();var r=Nce.makeSelectionsOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input)return;a(e._fullLayout._selectionLayer);function a(o){var s=Yft(e,n),l={\"data-index\":t,\"fill-rule\":\"evenodd\",d:s},u=n.opacity,c=\"rgba(0,0,0,0)\",f=n.line.color||wN.contrast(e._fullLayout.plot_bgcolor),h=n.line.width,d=n.line.dash;h||(h=5,d=\"solid\");var v=bP(e)&&e._fullLayout._activeSelectionIndex===t;v&&(c=e._fullLayout.activeselection.fillcolor,u=e._fullLayout.activeselection.opacity);for(var _=[],b=1;b>=0;b--){var p=o.append(\"path\").attr(l).style(\"opacity\",b?.1:u).call(wN.stroke,f).call(wN.fill,c).call(Bce.dashLine,b?\"solid\":d,b?4+h:h);if(Kft(p,e,n),v){var k=Zft(e.layout,\"selections\",n);p.style({cursor:\"move\"});var E={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},T=Wft(s,e);Xft(T,p,E)}else p.style(\"pointer-events\",b?\"all\":\"none\");_[b]=p}var L=_[0],x=_[1];x.node().addEventListener(\"click\",function(){return Jft(e,L)})}}function Kft(e,t,r){var n=r.xref+r.yref;Bce.setClipUrl(e,\"clip\"+t._fullLayout._uid+n,t)}function Jft(e,t){if(bP(e)){var r=t.node(),n=+r.getAttribute(\"data-index\");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){TN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=TN,xP(e)}}}function $ft(e){if(bP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=TN,xP(e)}}function TN(e){if(bP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(qce(e),delete e._fullLayout._activeSelectionIndex,xP(e))}}});var Hce=ye((oor,Gce)=>{function Qft(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n(\"check\",{seg1:i,seg2:a})},segmentChop:function(i,a){return n(\"div_seg\",{seg:i,pt:a}),n(\"chop\",{seg:i,pt:a})},statusRemove:function(i){return n(\"pop_seg\",{seg:i})},segmentUpdate:function(i){return n(\"seg_update\",{seg:i})},segmentNew:function(i,a){return n(\"new_seg\",{seg:i,primary:a})},segmentRemove:function(i){return n(\"rem_seg\",{seg:i})},tempStatus:function(i,a,o){return n(\"temp_status\",{seg:i,above:a,below:o})},rewind:function(i){return n(\"rewind\",{seg:i})},status:function(i,a,o){return n(\"status\",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n(\"vert\",{x:i}))},log:function(i){return typeof i!=\"string\"&&(i=JSON.stringify(i,!1,\"  \")),n(\"log\",{txt:i})},reset:function(){return n(\"reset\")},selected:function(i){return n(\"selected\",{segs:i})},chainStart:function(i){return n(\"chain_start\",{seg:i})},chainRemoveHead:function(i,a){return n(\"chain_rem_head\",{index:i,pt:a})},chainRemoveTail:function(i,a){return n(\"chain_rem_tail\",{index:i,pt:a})},chainNew:function(i,a){return n(\"chain_new\",{pt1:i,pt2:a})},chainMatch:function(i){return n(\"chain_match\",{index:i})},chainClose:function(i){return n(\"chain_close\",{index:i})},chainAddHead:function(i,a){return n(\"chain_add_head\",{index:i,pt:a})},chainAddTail:function(i,a){return n(\"chain_add_tail\",{index:i,pt:a})},chainConnect:function(i,a){return n(\"chain_con\",{index1:i,index2:a})},chainReverse:function(i){return n(\"chain_rev\",{index:i})},chainJoin:function(i,a){return n(\"chain_join\",{index1:i,index2:a})},done:function(){return n(\"done\")}},e}Gce.exports=Qft});var Wce=ye((sor,jce)=>{function eht(e){typeof e!=\"number\"&&(e=1e-10);var t={epsilon:function(r){return typeof r==\"number\"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u<e)return!1;var c=o*o+l*l;return!(u-c>-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])<e},pointsSameY:function(r,n){return Math.abs(r[1]-n[1])<e},pointsSame:function(r,n){return t.pointsSameX(r,n)&&t.pointsSameY(r,n)},pointsCompare:function(r,n){return t.pointsSameX(r,n)?t.pointsSameY(r,n)?0:r[1]<n[1]?-1:1:r[0]<n[0]?-1:1},pointsCollinear:function(r,n,i){var a=r[0]-n[0],o=r[1]-n[1],s=n[0]-i[0],l=n[1]-i[1];return Math.abs(a*l-s*o)<e},linesIntersect:function(r,n,i,a){var o=n[0]-r[0],s=n[1]-r[1],l=a[0]-i[0],u=a[1]-i[1],c=o*u-s*l;if(Math.abs(c)<e)return!1;var f=r[0]-i[0],h=r[1]-i[1],d=(l*h-u*f)/c,v=(o*h-s*f)/c,_={alongA:0,alongB:0,pt:[r[0]+d*o,r[1]+d*s]};return d<=-e?_.alongA=-2:d<e?_.alongA=-1:d-1<=-e?_.alongA=0:d-1<e?_.alongA=1:_.alongA=2,v<=-e?_.alongB=-2:v<e?_.alongB=-1:v-1<=-e?_.alongB=0:v-1<e?_.alongB=1:_.alongB=2,_},pointInsideRegion:function(r,n){for(var i=r[0],a=r[1],o=n[n.length-1][0],s=n[n.length-1][1],l=!1,u=0;u<n.length;u++){var c=n[u][0],f=n[u][1];f-a>e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}jce.exports=eht});var Zce=ye((lor,Xce)=>{var tht={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Xce.exports=tht});var Kce=ye((uor,Yce)=>{var LM=Zce();function rht(e,t,r){function n(v,_){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:null,below:null},otherFill:null}}function i(v,_,b){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=LM.create();function o(v,_,b,p,k,E){var T=t.pointsCompare(_,k);return T!==0?T:t.pointsSame(b,E)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:E,p?E:k)?1:-1}function s(v,_){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,_,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,_){var b=LM.node({isStart:!0,pt:v.start,seg:v,primary:_,other:null,status:null});return s(b,v.end),b}function u(v,_,b){var p=LM.node({isStart:!1,pt:_.end,seg:_,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,_){var b=l(v,_);return u(b,v,_),b}function f(v,_){r&&r.segmentChop(v.seg,_),v.other.remove(),v.seg.end=_,v.other.pt=_,s(v.other,v.pt)}function h(v,_){var b=i(_,v.seg.end,v.seg);return f(v,_),c(b,v.primary)}function d(v,_){var b=LM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,re=Z.seg.end;return t.pointsCollinear(j,H,re)?t.pointsCollinear(N,H,re)||t.pointAboveOrOnLine(N,H,re)?1:-1:t.pointAboveOrOnLine(j,H,re)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function E(G,Z){var j=G.seg,N=Z.seg,H=j.start,re=j.end,oe=N.start,_e=N.end;r&&r.checkIntersection(j,N);var Ce=t.linesIntersect(H,re,oe,_e);if(Ce===!1){if(!t.pointsCollinear(H,re,oe)||t.pointsSame(H,_e)||t.pointsSame(re,oe))return!1;var Le=t.pointsSame(H,oe),ge=t.pointsSame(re,_e);if(Le&&ge)return Z;var ie=!Le&&t.pointBetween(H,oe,_e),Se=!ge&&t.pointBetween(re,oe,_e);if(Le)return Se?h(Z,re):h(G,_e),Z;ie&&(ge||(Se?h(Z,re):h(G,_e)),h(Z,H))}else Ce.alongA===0&&(Ce.alongB===-1?h(G,oe):Ce.alongB===0?h(G,Ce.pt):Ce.alongB===1&&h(G,_e)),Ce.alongB===0&&(Ce.alongA===-1?h(Z,H):Ce.alongA===0?h(Z,Ce.pt):Ce.alongA===1&&h(Z,re));return!1}for(var T=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=E(L,C);if(Z)return Z}return M?E(L,M):!1};var U=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,M=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var A;M?L.primary===M.primary?A=M.seg.otherFill.above:A=M.seg.myFill.above:A=L.primary?_:v,L.seg.otherFill={above:A,below:A}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=x.insert(LM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(b.exists(z.prev)&&b.exists(z.next)&&E(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var O=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=O}T.push(L.seg)}a.getHead().remove()}return r&&r.done(),T}return e?{addRegion:function(v){for(var _,b=v[v.length-1],p=0;p<v.length;p++){_=b,b=v[p];var k=t.pointsCompare(_,b);k!==0&&c(n(k<0?_:b,k<0?b:_),!0)}},calculate:function(v){return d(v,!1)}}:{calculate:function(v,_,b,p){return v.forEach(function(k){c(i(k.start,k.end,k),!0)}),b.forEach(function(k){c(i(k.start,k.end,k),!1)}),d(_,p)}}}Yce.exports=rht});var $ce=ye((cor,Jce)=>{function iht(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(U,G,Z){return c.index=U,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h<n.length;h++){var d=n[h],v=d[0],_=d[1],b=d[d.length-1],p=d[d.length-2];if(t.pointsSame(v,o)){if(f(h,!0,!0))break}else if(t.pointsSame(v,s)){if(f(h,!0,!1))break}else if(t.pointsSame(b,o)){if(f(h,!1,!0))break}else if(t.pointsSame(b,s)&&f(h,!1,!1))break}if(c===l){n.push([o,s]),r&&r.chainNew(o,s);return}if(c===u){r&&r.chainMatch(l.index);var k=l.index,E=l.matches_pt1?s:o,T=l.matches_head,d=n[k],L=T?d[0]:d[d.length-1],x=T?d[1]:d[d.length-2],C=T?d[d.length-1]:d[0],M=T?d[d.length-2]:d[1];if(t.pointsCollinear(x,L,E)&&(T?(r&&r.chainRemoveHead(l.index,E),d.shift()):(r&&r.chainRemoveTail(l.index,E),d.pop()),L=x),t.pointsSame(C,E)){n.splice(k,1),t.pointsCollinear(M,C,L)&&(T?(r&&r.chainRemoveTail(l.index,L),d.pop()):(r&&r.chainRemoveHead(l.index,L),d.shift())),r&&r.chainClose(l.index),i.push(d);return}T?(r&&r.chainAddHead(l.index,E),d.unshift(E)):(r&&r.chainAddTail(l.index,E),d.push(E));return}function g(U){r&&r.chainReverse(U),n[U].reverse()}function P(U,G){var Z=n[U],j=n[G],N=Z[Z.length-1],H=Z[Z.length-2],re=j[0],oe=j[1];t.pointsCollinear(H,N,re)&&(r&&r.chainRemoveTail(U,N),Z.pop(),N=H),t.pointsCollinear(N,re,oe)&&(r&&r.chainRemoveHead(G,re),j.shift()),r&&r.chainJoin(U,G),n[U]=Z.concat(j),n.splice(G,1)}var A=l.index,z=u.index;r&&r.chainConnect(A,z);var O=n[A].length<n[z].length;l.matches_head?u.matches_head?O?(g(A),P(A,z)):(g(z),P(z,A)):P(z,A):u.matches_head?P(A,z):O?(g(A),P(z,A)):(g(z),P(A,z))}),i}Jce.exports=iht});var efe=ye((hor,Qce)=>{function PM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var nht={union:function(e,t){return PM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return PM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return PM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return PM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return PM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Qce.exports=nht});var rfe=ye((dor,tfe)=>{var aht={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l<a.length;l++)s=e.selectDifference(e.combine(s,o(a[l])));return s}if(t.type===\"Polygon\")return e.polygon(r(t.coordinates));if(t.type===\"MultiPolygon\"){for(var n=e.segments({inverted:!1,regions:[]}),i=0;i<t.coordinates.length;i++)n=e.selectUnion(e.combine(n,r(t.coordinates[i])));return e.polygon(n)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(e,t,r){r=e.polygon(e.segments(r));function n(d,v){return t.pointInsideRegion([(d[0][0]+d[1][0])*.5,(d[0][1]+d[1][1])*.5],v)}function i(d){return{region:d,children:[]}}var a=i(null);function o(d,v){for(var _=0;_<d.children.length;_++){var b=d.children[_];if(n(v,b.region)){o(b,v);return}}for(var p=i(v),_=0;_<d.children.length;_++){var b=d.children[_];n(b.region,v)&&(p.children.push(b),d.children.splice(_,1),_--)}d.children.push(p)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(d,v){for(var _=0,b=d[d.length-1][0],p=d[d.length-1][1],k=[],E=0;E<d.length;E++){var T=d[E][0],L=d[E][1];k.push([T,L]),_+=L*b-T*p,b=T,p=L}var x=_<0;return x!==v&&k.reverse(),k.push([k[0][0],k[0][1]]),k}var c=[];function f(d){var v=[u(d.region,!1)];c.push(v);for(var _=0;_<d.children.length;_++)v.push(h(d.children[_]))}function h(d){for(var v=0;v<d.children.length;v++)f(d.children[v]);return u(d.region,!0)}for(var s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:\"Polygon\",coordinates:[]}:c.length==1?{type:\"Polygon\",coordinates:c[0]}:{type:\"MultiPolygon\",coordinates:c}}};tfe.exports=aht});var ofe=ye((vor,afe)=>{var oht=Hce(),sht=Wce(),ife=Kce(),lht=$ce(),IM=efe(),nfe=rfe(),E0=!1,RM=sht(),kp;kp={buildLog:function(e){return e===!0?E0=oht():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return RM.epsilon(e)},segments:function(e){var t=ife(!0,RM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=ife(!1,RM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:IM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:IM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:IM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:IM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:IM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:lht(e.segments,RM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return nfe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return nfe.fromPolygon(kp,RM,e)},union:function(e,t){return DM(e,t,kp.selectUnion)},intersect:function(e,t){return DM(e,t,kp.selectIntersect)},difference:function(e,t){return DM(e,t,kp.selectDifference)},differenceRev:function(e,t){return DM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return DM(e,t,kp.selectXor)}};function DM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window==\"object\"&&(window.PolyBool=kp);afe.exports=kp});var lfe=ye((por,sfe)=>{sfe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var f=r[u+n][0],h=r[u+n][1],d=r[c+n][0],v=r[c+n][1],_=h>o!=v>o&&a<(d-f)*(o-h)/(v-h)+f;_&&(s=!s)}return s}});var FM=ye((gor,ufe)=>{\"use strict\";var SN=P6().dot,wP=fs().BADNUM,TP=ufe.exports={};TP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;s<r.length;s++)n=Math.min(n,r[s][0]),i=Math.max(i,r[s][0]),a=Math.min(a,r[s][1]),o=Math.max(o,r[s][1]);var l=!1,u;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(l=!0,u=function(v){return v[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(l=!0,u=function(v){return v[1]===r[0][1]}));function c(v,_){var b=v[0],p=v[1];return!(b===wP||b<n||b>i||p===wP||p<a||p>o||_&&u(v))}function f(v,_){var b=v[0],p=v[1];if(b===wP||b<n||b>i||p===wP||p<a||p>o)return!1;var k=r.length,E=r[0][0],T=r[0][1],L=0,x,C,M,g,P;for(x=1;x<k;x++)if(C=E,M=T,E=r[x][0],T=r[x][1],g=Math.min(C,E),!(b<g||b>Math.max(C,E)||p>Math.max(M,T)))if(p<Math.min(M,T))b!==g&&L++;else{if(E===C?P=p:P=M+(b-C)*(T-M)/(E-C),p===P)return!(x===1&&_);p<=P&&b!==g&&L++}return L%2===1}var h=!0,d=r[0];for(s=1;s<r.length;s++)if(d[0]!==r[s][0]||d[1]!==r[s][1]){h=!1;break}return{xmin:n,xmax:i,ymin:a,ymax:o,pts:r,contains:l?c:f,isRect:l,degenerate:h}};TP.isSegmentBent=function(t,r,n,i){var a=t[r],o=[t[n][0]-a[0],t[n][1]-a[1]],s=SN(o,o),l=Math.sqrt(s),u=[-o[1]/l,o[0]/l],c,f,h;for(c=r+1;c<n;c++)if(f=[t[c][0]-a[0],t[c][1]-a[1]],h=SN(f,o),h<0||h>s||Math.abs(SN(f,u))>i)return!0;return!1};TP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f<t.length;f++)(f===t.length-1||TP.isSegmentBent(t,c,f+1,r))&&(n.push(t[f]),n.length<u-2&&(i=f,a=n.length-1),c=f)}if(t.length>1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var ffe=ye((mor,cfe)=>{\"use strict\";cfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:\"-select\"}});var Rfe=ye((yor,Ife)=>{\"use strict\";var hfe=ofe(),uht=lfe(),qM=qa(),cht=So().dashStyle,zM=ka(),fht=vf(),hht=ip().makeEventData,GM=Cg(),dht=GM.freeMode,vht=GM.rectMode,BM=GM.drawMode,CN=GM.openMode,LN=GM.selectMode,dfe=x_(),vfe=TM(),_fe=lP(),xfe=o_().clearOutline,bfe=m_(),MN=bfe.handleEllipse,pht=bfe.readPaths,ght=aP().newShapes,mht=QB(),yht=AN().activateLastSelection,SP=Dr(),_ht=SP.sorterAsc,wfe=FM(),OM=H6(),k0=hf().getFromId,xht=bM(),bht=CM().redrawReglTraces,MP=ffe(),Cm=MP.MINSELECT,wht=wfe.filter,PN=wfe.tester,IN=tP(),pfe=IN.p2r,Tht=IN.axValue,Aht=IN.getTransform;function RN(e){return e.subplot!==void 0}function Sht(e,t,r,n,i){var a=!RN(n),o=dht(i),s=vht(i),l=CN(i),u=BM(i),c=LN(i),f=i===\"drawline\",h=i===\"drawcircle\",d=f||h,v=n.gd,_=v._fullLayout,b=c&&_.newselection.mode===\"immediate\"&&a,p=_._zoomlayer,k=n.element.getBoundingClientRect(),E=n.plotinfo,T=Aht(E),L=t-k.left,x=r-k.top;_._calcInverseTransform(v);var C=SP.apply3DTransform(_._invTransform)(L,x);L=C[0],x=C[1];var M=_._invScaleX,g=_._invScaleY,P=L,A=x,z=\"M\"+L+\",\"+x,O=n.xaxes[0],U=n.yaxes[0],G=O._length,Z=U._length,j=e.altKey&&!(BM(i)&&l),N,H,re,oe,_e,Ce,Le;Afe(e,v,n),o&&(N=wht([[L,x]],MP.BENDPX));var ge=p.selectAll(\"path.select-outline-\"+E.id).data([1]),ie=u?_.newshape:_.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:\"rgba(0,0,0,0)\",Ee=ie.line.color||(a?zM.contrast(v._fullLayout.plot_bgcolor):\"#7f7f7f\");ge.enter().append(\"path\").attr(\"class\",\"select-outline select-outline-\"+E.id).style({opacity:u?ie.opacity/2:1,\"stroke-dasharray\":cht(ie.line.dash,ie.line.width),\"stroke-width\":ie.line.width+\"px\",\"shape-rendering\":\"crispEdges\"}).call(zM.stroke,Ee).call(zM.fill,Se).attr(\"fill-rule\",\"evenodd\").classed(\"cursor-move\",!!u).attr(\"transform\",T).attr(\"d\",z+\"Z\");var Ae=p.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:zM.background,stroke:zM.defaultLine,\"stroke-width\":1}).attr(\"transform\",T).attr(\"d\",\"M0,0Z\");if(u&&n.hasText){var Be=p.select(\".label-temp\");Be.empty()&&(Be=p.append(\"g\").classed(\"label-temp\",!0).classed(\"select-outline\",!0).style({opacity:.8}))}var Pe=_._uid+MP.SELECTID,me=[],De=EP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var je=O._id,lt=U._id;Cfe(v,je,lt,De);for(var pt=(v.layout||{}).selections||[],Vt=[],ot=!1,ut=0;ut<pt.length;ut++){var Wt=_.selections[ut];!Wt||Wt.xref!==je||Wt.yref!==lt?Vt.push(pt[ut]):ot=!0}ot&&(v._fullLayout._noEmitSelectedAtStart=!0,qM.call(\"_guiRelayout\",v,{selections:Vt}))}});var ce=Bht(n);n.moveFn=function(je,lt){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),P=Math.max(0,Math.min(G,M*je+L)),A=Math.max(0,Math.min(Z,g*lt+x));var pt=Math.abs(P-L),Vt=Math.abs(A-x);if(s){var ot,ut,Wt;if(c){var Nt=_.selectdirection;switch(Nt===\"any\"?Vt<Math.min(pt*.6,Cm)?ot=\"h\":pt<Math.min(Vt*.6,Cm)?ot=\"v\":ot=\"d\":ot=Nt,ot){case\"h\":ut=h?Z/2:0,Wt=Z;break;case\"v\":ut=h?G/2:0,Wt=G;break}}if(u)switch(_.newshape.drawdirection){case\"vertical\":ot=\"h\",ut=h?Z/2:0,Wt=Z;break;case\"horizontal\":ot=\"v\",ut=h?G/2:0,Wt=G;break;case\"ortho\":pt<Vt?(ot=\"h\",ut=x,Wt=A):(ot=\"v\",ut=L,Wt=P);break;default:ot=\"d\"}ot===\"h\"?(oe=d?MN(h,[P,ut],[P,Wt]):[[L,ut],[L,Wt],[P,Wt],[P,ut]],oe.xmin=d?P:Math.min(L,P),oe.xmax=d?P:Math.max(L,P),oe.ymin=Math.min(ut,Wt),oe.ymax=Math.max(ut,Wt),Ae.attr(\"d\",\"M\"+oe.xmin+\",\"+(x-Cm)+\"h-4v\"+2*Cm+\"h4ZM\"+(oe.xmax-1)+\",\"+(x-Cm)+\"h4v\"+2*Cm+\"h-4Z\")):ot===\"v\"?(oe=d?MN(h,[ut,A],[Wt,A]):[[ut,x],[ut,A],[Wt,A],[Wt,x]],oe.xmin=Math.min(ut,Wt),oe.xmax=Math.max(ut,Wt),oe.ymin=d?A:Math.min(x,A),oe.ymax=d?A:Math.max(x,A),Ae.attr(\"d\",\"M\"+(L-Cm)+\",\"+oe.ymin+\"v-4h\"+2*Cm+\"v4ZM\"+(L-Cm)+\",\"+(oe.ymax-1)+\"v4h\"+2*Cm+\"v-4Z\")):ot===\"d\"&&(oe=d?MN(h,[L,x],[P,A]):[[L,x],[L,A],[P,A],[P,x]],oe.xmin=Math.min(L,P),oe.xmax=Math.max(L,P),oe.ymin=Math.min(x,A),oe.ymax=Math.max(x,A),Ae.attr(\"d\",\"M0,0Z\"))}else o&&(N.addPt([P,A]),oe=N.filtered);if(n.selectionDefs&&n.selectionDefs.length?(re=Sfe(n.mergedPolygons,oe,j),oe.subtract=j,H=DN(n.selectionDefs.concat([oe]))):(re=[oe],H=PN(oe)),_fe(Efe(re,l),ge,n),c){var $t=kN(v,!1),sr=$t.eventData?$t.eventData.points.slice():[];$t=kN(v,!1,H,De,n),H=$t.selectionTesters,Le=$t.eventData;var Tr;N?Tr=N.filtered:Tr=Lfe(re),OM.throttle(Pe,MP.SELECTDELAY,function(){me=kfe(H,De);for(var fr=me.slice(),$e=0;$e<sr.length;$e++){for(var St=sr[$e],Qt=!1,Gt=0;Gt<fr.length;Gt++)if(fr[Gt].curveNumber===St.curveNumber&&fr[Gt].pointNumber===St.pointNumber){Qt=!0;break}Qt||fr.push(St)}fr.length&&(Le||(Le={}),Le.points=fr),ce(Le,Tr),Nht(v,Le)})}},n.clickFn=function(je,lt){if(Ae.remove(),v._fullLayout._activeShapeIndex>=0){v._fullLayout._deactivateShape(v);return}if(!u){var pt=_.clickmode;OM.done(Pe).then(function(){if(OM.clear(Pe),je===2){for(ge.remove(),_e=0;_e<De.length;_e++)Ce=De[_e],Ce._module.selectPoints(Ce,!1);if(UM(v,De),NM(n),zN(v),De.length){var Vt=De[0].xaxis,ot=De[0].yaxis;if(Vt&&ot){for(var ut=[],Wt=v._fullLayout.selections,Nt=0;Nt<Wt.length;Nt++){var $t=Wt[Nt];$t&&($t.xref!==Vt._id||$t.yref!==ot._id)&&ut.push($t)}ut.length<Wt.length&&(v._fullLayout._noEmitSelectedAtStart=!0,qM.call(\"_guiRelayout\",v,{selections:ut}))}}}else pt.indexOf(\"select\")>-1&&Tfe(lt,v,n.xaxes,n.yaxes,n.subplot,n,ge),pt===\"event\"&&VM(v,void 0);fht.click(v,lt,E.id)}).catch(SP.error)}},n.doneFn=function(){Ae.remove(),OM.done(Pe).then(function(){OM.clear(Pe),!b&&oe&&n.selectionDefs&&(oe.subtract=j,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&NM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&VM(v,Le)}).catch(SP.error)}}function Tfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf(\"event\")>-1,f=[],h,d,v,_,b,p,k,E,T,L;if(Lht(s)){Afe(e,t,a),h=EP(t,r,n,i);var x=Pht(s,h),C=x.pointNumbers.length>0;if(C?Iht(h,x):Rht(h)&&(k=mfe(x))){for(o&&o.remove(),L=0;L<h.length;L++)d=h[L],d._module.selectPoints(d,!1);UM(t,h),NM(a),c&&zN(t)}else{E=e.shiftKey&&(k!==void 0?k:mfe(x)),v=Mht(x.pointNumber,x.searchInfo,E);var M=a.selectionDefs.concat([v]);for(_=DN(M,_),L=0;L<h.length;L++)if(b=h[L]._module.selectPoints(h[L],_),p=Mfe(b,h[L]),f.length)for(var g=0;g<p.length;g++)f.push(p[g]);else f=p;if(T={points:f},UM(t,h,T),v&&a&&a.selectionDefs.push(v),o){var P=a.mergedPolygons,A=CN(a.dragmode);_fe(Efe(P,A),o,a)}c&&VM(t,T)}}}function Mht(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}function EN(e){return\"pointNumber\"in e&&\"searchInfo\"in e}function Eht(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,i){var a=e.searchInfo.cd[0].trace.index,o=i.cd[0].trace.index;return o===a&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:!!e.subtract}}function DN(e){if(!e.length)return;for(var t=[],r=EN(e[0])?0:e[0][0][0],n=r,i=EN(e[0])?0:e[0][0][1],a=i,o=0;o<e.length;o++)if(EN(e[o]))t.push(Eht(e[o]));else{var s=PN(e[o]);s.subtract=!!e[o].subtract,t.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}function l(u,c,f,h){for(var d=!1,v=0;v<t.length;v++)t[v].contains(u,c,f,h)&&(d=!t[v].subtract);return d}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:l,isRect:!1,degenerate:!1}}function Afe(e,t,r){var n=t._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(e.shiftKey||e.altKey)&&!(BM(a)&&CN(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!s||!i.selection)&&NM(r),o||(xfe(t),n._lastSelectedSubplot=i.id)}function kht(e){return e._fullLayout._activeShapeIndex>=0}function Cht(e){return e._fullLayout._activeSelectionIndex>=0}function NM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;kht(i)&&i._fullLayout._deactivateShape(i),Cht(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=BM(r),l=LN(r);if(s||l){var u=o.selectAll(\".select-outline-\"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=ght(u,e)),c&&qM.call(\"_guiRelayout\",i,{shapes:c});var f;l&&!RN(e)&&(f=mht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,qM.call(\"_guiRelayout\",i,{selections:f}).then(function(){t&&yht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function gfe(e){return e._id}function EP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(gfe),o=r.map(gfe),s,l,u;for(u=0;u<e.calcdata.length;u++)if(s=e.calcdata[u],l=s[0].trace,!(l.visible!==!0||!l._module||!l._module.selectPoints))if(RN({subplot:n})&&(l.subplot===n||l.geo===n))i.push(AP(l._module,s,t[0],r[0]));else if(l.type===\"splom\"){if(l._xaxes[a[0]]&&l._yaxes[o[0]]){var c=AP(l._module,s,t[0],r[0]);c.scene=e._fullLayout._splomScenes[l.uid],i.push(c)}}else if(l.type===\"sankey\"){var f=AP(l._module,s,t[0],r[0]);i.push(f)}else{if(a.indexOf(l.xaxis)===-1&&(!l._xA||!l._xA.overlaying)||o.indexOf(l.yaxis)===-1&&(!l._yA||!l._yA.overlaying))continue;i.push(AP(l._module,s,k0(e,l.xaxis),k0(e,l.yaxis)))}return i}function AP(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function Lht(e){return e&&Array.isArray(e)&&e[0].hoverOnBox!==!0}function Pht(e,t){var r=e[0],n=-1,i=[],a,o;for(o=0;o<t.length;o++)if(a=t[o],r.fullData.index===a.cd[0].trace.index){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?n=r.pointNumber:r.binNumber!==void 0&&(n=r.binNumber,i=r.pointNumbers);break}return{pointNumber:n,pointNumbers:i,searchInfo:a}}function mfe(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,i=n.length>0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Iht(e,t){var r=[],n,i,a,o;for(o=0;o<e.length;o++)n=e[o],n.cd[0].trace.selectedpoints&&n.cd[0].trace.selectedpoints.length>0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o<t.pointNumbers.length;o++)if(i.selectedpoints.indexOf(t.pointNumbers[o])<0)return!1;return!0}return!1}function Rht(e){var t=0,r,n,i;for(i=0;i<e.length;i++)if(r=e[i],n=r.cd[0].trace,n.selectedpoints&&(n.selectedpoints.length>1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function UM(e,t,r){var n;for(n=0;n<t.length;n++){var i=t[n].cd[0].trace._fullInput,a=e._fullLayout._tracePreGUI[i.uid]||{};a.selectedpoints===void 0&&(a.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var s=r.points||[];for(n=0;n<t.length;n++)o=t[n].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var l=0;l<s.length;l++){var u=s[l],c=u.data,f=u.fullData,h=u.pointIndex,d=u.pointIndices;d?([].push.apply(c.selectedpoints,d),o._fullInput!==o&&[].push.apply(f.selectedpoints,d)):(c.selectedpoints.push(h),o._fullInput!==o&&f.selectedpoints.push(h))}}else for(n=0;n<t.length;n++)o=t[n].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;Dht(e,t)}function Dht(e,t){for(var r=!1,n=0;n<t.length;n++){var i=t[n],a=i.cd;qM.traceIs(a[0].trace,\"regl\")&&(r=!0);var o=i._module,s=o.styleOnSelect||o.style;s&&(s(e,a,a[0].node3),a[0].nodeRangePlot3&&s(e,a,a[0].nodeRangePlot3))}r&&(xht(e),bht(e))}function Sfe(e,t,r){for(var n=r?hfe.difference:hfe.union,i=n({regions:e},{regions:[t]}),a=i.regions.reverse(),o=0;o<a.length;o++){var s=a[o];s.subtract=FN(s,a.slice(0,o))}return a}function Mfe(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,i=0;i<e.length;i++)e[i]=hht(e[i],n,r);return e}function Efe(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var i=0;i<e[n].length;i++){r[n][i]=[],r[n][i][0]=i?\"L\":\"M\";for(var a=0;a<e[n][i].length;a++)r[n][i].push(e[n][i][a])}t||r[n].push([\"Z\",r[n][0][1],r[n][0][2]])}return r}function kfe(e,t){for(var r=[],n,i=[],a,o=0;o<t.length;o++){var s=t[o];a=s._module.selectPoints(s,e),i.push(a),n=Mfe(a,s),r=r.concat(n)}return r}function kN(e,t,r,n,i){var a=!!n,o,s,l;i&&(o=i.plotinfo,s=i.xaxes[0]._id,l=i.yaxes[0]._id);var u=[],c=[],f=yfe(e),h=e._fullLayout;if(o){var d=h._zoomlayer,v=h.dragmode,_=BM(v),b=LN(v);if(_||b){var p=k0(e,s,\"x\"),k=k0(e,l,\"y\");if(p&&k){var E=d.selectAll(\".select-outline-\"+o.id);if(E&&e._fullLayout._outlining&&E.length){for(var T=E[0][0],L=T.getAttribute(\"d\"),x=pht(L,e,o),C=[],M=0;M<x.length;M++){for(var g=x[M],P=[],A=0;A<g.length;A++)P.push([b_(p,g[A][1]),b_(k,g[A][2])]);P.xref=s,P.yref=l,P.subtract=FN(P,C),C.push(P)}f=f.concat(C)}}}}var z=s&&l?[s+l]:h._subplots.cartesian;Fht(e);for(var O={},U=0;U<z.length;U++){var G=z[U],Z=G.indexOf(\"y\"),j=G.slice(0,Z),N=G.slice(Z),H=s&&l?r:void 0;if(H=Oht(f,j,N,H),H){var re=n;if(!a){var oe=k0(e,j,\"x\"),_e=k0(e,N,\"y\");re=EP(e,[oe],[_e],G);for(var Ce=0;Ce<re.length;Ce++){var Le=re[Ce],ge=Le.cd[0],ie=ge.trace;if(Le._module.name===\"scattergl\"&&!ge.t.xpx){var Se=ie.x,Ee=ie.y,Ae=ie._length;ge.t.xpx=[],ge.t.ypx=[];for(var Be=0;Be<Ae;Be++)ge.t.xpx[Be]=oe.c2p(Se[Be]),ge.t.ypx[Be]=_e.c2p(Ee[Be])}Le._module.name===\"splom\"&&(O[ie.uid]||(O[ie.uid]=!0))}}var Pe=kfe(H,re);u=u.concat(Pe),c=c.concat(re)}}var me={points:u};UM(e,c,me);var De=h.clickmode,ce=De.indexOf(\"event\")>-1&&t;if(!o&&t){var je=yfe(e,!0);if(je.length){var lt=je[0].xref,pt=je[0].yref;if(lt&&pt){var Vt=Lfe(je),ot=Pfe([k0(e,lt,\"x\"),k0(e,pt,\"y\")]);ot(me,Vt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&VM(e,me),h._reselect=!1}if(!o&&h._deselect){var ut=h._deselect;s=ut.xref,l=ut.yref,zht(s,l,c)||Cfe(e,s,l,n),ce&&(me.points.length?VM(e,me):zN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Fht(e){var t=e.calcdata;if(t)for(var r=0;r<t.length;r++){var n=t[r][0],i=n.trace,a=e._fullLayout._splomScenes;if(a){var o=a[i.uid];o&&(o.selectBatch=[])}}}function zht(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===e&&i.yaxis&&i.yaxis._id===t)return!0}return!1}function Cfe(e,t,r,n){n=EP(e,[k0(e,t,\"x\")],[k0(e,r,\"y\")],t+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}UM(e,n)}function Oht(e,t,r,n){for(var i,a=0;a<e.length;a++){var o=e[a];if(!(t!==o.xref||r!==o.yref))if(i){var s=!!o.subtract;i=Sfe(i,o,s),n=DN(i)}else i=[o],n=PN(o)}return n}function yfe(e,t){for(var r=[],n=e._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!(t&&o!==n._activeSelectionIndex)){var s=i[o];if(s){var l=s.xref,u=s.yref,c=k0(e,l,\"x\"),f=k0(e,u,\"y\"),h,d,v,_,b;if(s.type===\"rect\"){b=[];var p=b_(c,s.x0),k=b_(c,s.x1),E=b_(f,s.y0),T=b_(f,s.y1);b=[[p,E],[p,T],[k,T],[k,E]],h=Math.min(p,k),d=Math.max(p,k),v=Math.min(E,T),_=Math.max(E,T),b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=_,b.xref=l,b.yref=u,b.subtract=!1,b.isRect=!0,r.push(b)}else if(s.type===\"path\")for(var L=s.path.split(\"Z\"),x=[],C=0;C<L.length;C++){var M=L[C];if(M){M+=\"Z\";var g=dfe.extractPathCoords(M,vfe.paramIsX,\"raw\"),P=dfe.extractPathCoords(M,vfe.paramIsY,\"raw\");h=1/0,d=-1/0,v=1/0,_=-1/0,b=[];for(var A=0;A<g.length;A++){var z=b_(c,g[A]),O=b_(f,P[A]);b.push([z,O]),h=Math.min(z,h),d=Math.max(z,d),v=Math.min(O,v),_=Math.max(O,_)}b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=_,b.xref=l,b.yref=u,b.subtract=FN(b,x),x.push(b),r.push(b)}}}}return r}function FN(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],a=0;a<e.length;a++)if(uht(e[a],i)){r=!r;break}return r}function b_(e,t){return e.type===\"date\"&&(t=t.replace(\"_\",\" \")),e.type===\"log\"?e.c2p(t):e.r2p(t,null,e.calendar)}function Lfe(e){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];r=r.concat(i),r=r.concat([i[0]])}return qht(r)}function qht(e){return e.isRect=e.length===5&&e[0][0]===e[4][0]&&e[0][1]===e[4][1]&&e[0][0]===e[1][0]&&e[2][0]===e[3][0]&&e[0][1]===e[3][1]&&e[1][1]===e[2][1]||e[0][1]===e[1][1]&&e[2][1]===e[3][1]&&e[0][0]===e[3][0]&&e[1][0]===e[2][0],e.isRect&&(e.xmin=Math.min(e[0][0],e[2][0]),e.xmax=Math.max(e[0][0],e[2][0]),e.ymin=Math.min(e[0][1],e[2][1]),e.ymax=Math.max(e[0][1],e[2][1])),e}function Pfe(e){return function(t,r){for(var n,i,a=0;a<e.length;a++){var o=e[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+\"min\"],c=r[l+\"max\"];u!==void 0&&c!==void 0&&(n[s]=[pfe(o,u),pfe(o,c)].sort(_ht))}else i||(i={}),i[s]=r.map(Tht(o))}n&&(t.range=n),i&&(t.lassoPoints=i)}}function Bht(e){var t=e.plotinfo;return t.fillRangeItems||Pfe(e.xaxes.concat(e.yaxes))}function Nht(e,t){e.emit(\"plotly_selecting\",t)}function VM(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit(\"plotly_selected\",t)}function zN(e){e.emit(\"plotly_deselect\",null)}Ife.exports={reselect:kN,prepSelect:Sht,clearOutline:xfe,clearSelectionsCache:NM,selectOnClick:Tfe}});var ON=ye((_or,Dfe)=>{\"use strict\";Dfe.exports=[{path:\"\",backoff:0},{path:\"M-2.4,-3V3L0.6,0Z\",backoff:.6},{path:\"M-3.7,-2.5V2.5L1.3,0Z\",backoff:1.3},{path:\"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z\",backoff:1.55},{path:\"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z\",backoff:1.6},{path:\"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z\",backoff:2},{path:\"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z\",backoff:0,noRotate:!0},{path:\"M2,2V-2H-2V2Z\",backoff:0,noRotate:!0}]});var HM=ye((xor,Ffe)=>{\"use strict\";Ffe.exports={axisRefDescription:function(e,t,r){return[\"If set to a\",e,\"axis id (e.g. *\"+e+\"* or\",\"*\"+e+\"2*), the `\"+e+\"` position refers to a\",e,\"coordinate. If set to *paper*, the `\"+e+\"`\",\"position refers to the distance from the\",t,\"of the plotting\",\"area in normalized coordinates where *0* (*1*) corresponds to the\",t,\"(\"+r+\"). If set to a\",e,\"axis ID followed by\",\"*domain* (separated by a space), the position behaves like for\",\"*paper*, but refers to the distance in fractions of the domain\",\"length from the\",t,\"of the domain of that axis: e.g.,\",\"*\"+e+\"2 domain* refers to the domain of the second\",e,\" axis and a\",e,\"position of 0.5 refers to the\",\"point between the\",t,\"and the\",r,\"of the domain of the\",\"second\",e,\"axis.\"].join(\" \")}}});var Jb=ye((wor,qfe)=>{\"use strict\";var zfe=ON(),Ofe=ec(),kP=Rh(),Uht=vl().templatedArray,bor=HM();qfe.exports=Uht(\"annotation\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},text:{valType:\"string\",editType:\"calc+arraydraw\"},textangle:{valType:\"angle\",dflt:0,editType:\"calc+arraydraw\"},font:Ofe({editType:\"calc+arraydraw\",colorEditType:\"arraydraw\"}),width:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},height:{valType:\"number\",min:1,dflt:null,editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"center\",editType:\"arraydraw\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"arraydraw\"},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},borderpad:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc+arraydraw\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"calc+arraydraw\"},arrowcolor:{valType:\"color\",editType:\"arraydraw\"},arrowhead:{valType:\"integer\",min:0,max:zfe.length,dflt:1,editType:\"arraydraw\"},startarrowhead:{valType:\"integer\",min:0,max:zfe.length,dflt:1,editType:\"arraydraw\"},arrowside:{valType:\"flaglist\",flags:[\"end\",\"start\"],extras:[\"none\"],dflt:\"end\",editType:\"arraydraw\"},arrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},startarrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calc+arraydraw\"},arrowwidth:{valType:\"number\",min:.1,editType:\"calc+arraydraw\"},standoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},startstandoff:{valType:\"number\",min:0,dflt:0,editType:\"calc+arraydraw\"},ax:{valType:\"any\",editType:\"calc+arraydraw\"},ay:{valType:\"any\",editType:\"calc+arraydraw\"},axref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",kP.idRegex.x.toString()],editType:\"calc\"},ayref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",kP.idRegex.y.toString()],editType:\"calc\"},xref:{valType:\"enumerated\",values:[\"paper\",kP.idRegex.x.toString()],editType:\"calc\"},x:{valType:\"any\",editType:\"calc+arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calc+arraydraw\"},xshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",kP.idRegex.y.toString()],editType:\"calc\"},y:{valType:\"any\",editType:\"calc+arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"calc+arraydraw\"},yshift:{valType:\"number\",dflt:0,editType:\"calc+arraydraw\"},clicktoshow:{valType:\"enumerated\",values:[!1,\"onoff\",\"onout\"],dflt:!1,editType:\"arraydraw\"},xclick:{valType:\"any\",editType:\"arraydraw\"},yclick:{valType:\"any\",editType:\"arraydraw\"},hovertext:{valType:\"string\",editType:\"arraydraw\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",editType:\"arraydraw\"},font:Ofe({editType:\"arraydraw\"}),editType:\"arraydraw\"},captureevents:{valType:\"boolean\",editType:\"arraydraw\"},editType:\"calc\"})});var Lm=ye((Tor,Bfe)=>{\"use strict\";Bfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Pg=ye((Aor,Nfe)=>{\"use strict\";Nfe.exports=function(t){return{valType:\"color\",editType:\"style\",anim:!0}}});var pf=ye((Sor,Zfe)=>{\"use strict\";var Ufe=df().axisHoverFormat,{hovertemplateAttrs:Vht,texttemplateAttrs:Ght,templatefallbackAttrs:Vfe}=Ll(),Gfe=Tu(),Hht=ec(),Hfe=Pd().dash,jht=Pd().pattern,Wht=So(),Xht=Lm(),jM=Ao().extendFlat,Zht=Pg();function jfe(e){return{valType:\"any\",dflt:0,editType:\"calc\"}}function Wfe(e){return{valType:\"any\",editType:\"calc\"}}function Xfe(e){return{valType:\"enumerated\",values:[\"start\",\"middle\",\"end\"],dflt:\"middle\",editType:\"calc\"}}Zfe.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dx:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\",anim:!0},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\",anim:!0},dy:{valType:\"number\",dflt:1,editType:\"calc\",anim:!0},xperiod:jfe(\"x\"),yperiod:jfe(\"y\"),xperiod0:Wfe(\"x0\"),yperiod0:Wfe(\"y0\"),xperiodalignment:Xfe(\"x\"),yperiodalignment:Xfe(\"y\"),xhoverformat:Ufe(\"x\"),yhoverformat:Ufe(\"y\"),offsetgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},alignmentgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},stackgroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc\"},groupnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},stackgaps:{valType:\"enumerated\",values:[\"infer zero\",\"interpolate\"],dflt:\"infer zero\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},texttemplate:Ght(),texttemplatefallback:Vfe({editType:\"calc\"}),hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"],editType:\"calc\"},hoveron:{valType:\"flaglist\",flags:[\"points\",\"fills\"],editType:\"style\"},hovertemplate:Vht({},{keys:Xht.eventDataKeys}),hovertemplatefallback:Vfe(),line:{color:{valType:\"color\",editType:\"style\",anim:!0},width:{valType:\"number\",min:0,dflt:2,editType:\"style\",anim:!0},shape:{valType:\"enumerated\",values:[\"linear\",\"spline\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},smoothing:{valType:\"number\",min:0,max:1.3,dflt:1,editType:\"plot\"},dash:jM({},Hfe,{editType:\"style\"}),backoff:{valType:\"number\",min:0,dflt:\"auto\",arrayOk:!0,editType:\"plot\"},simplify:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cliponaxis:{valType:\"boolean\",dflt:!0,editType:\"plot\"},fill:{valType:\"enumerated\",values:[\"none\",\"tozeroy\",\"tozerox\",\"tonexty\",\"tonextx\",\"toself\",\"tonext\"],editType:\"calc\"},fillcolor:Zht(!0),fillgradient:jM({type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],dflt:\"none\",editType:\"calc\"},start:{valType:\"number\",editType:\"calc\"},stop:{valType:\"number\",editType:\"calc\"},colorscale:{valType:\"colorscale\",editType:\"style\"},editType:\"calc\"}),fillpattern:jht,marker:jM({symbol:{valType:\"enumerated\",values:Wht.symbolList,dflt:\"circle\",arrayOk:!0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,arrayOk:!0,editType:\"style\",anim:!0},angle:{valType:\"angle\",dflt:0,arrayOk:!0,editType:\"plot\",anim:!1},angleref:{valType:\"enumerated\",values:[\"previous\",\"up\"],dflt:\"up\",editType:\"plot\",anim:!1},standoff:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"plot\",anim:!0},size:{valType:\"number\",min:0,dflt:6,arrayOk:!0,editType:\"calc\",anim:!0},maxdisplayed:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},sizeref:{valType:\"number\",dflt:1,editType:\"calc\"},sizemin:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"diameter\",\"area\"],dflt:\"diameter\",editType:\"calc\"},line:jM({width:{valType:\"number\",min:0,arrayOk:!0,editType:\"style\",anim:!0},dash:jM({},Hfe,{arrayOk:!0}),editType:\"calc\"},Gfe(\"marker.line\",{anim:!0})),gradient:{type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],arrayOk:!0,dflt:\"none\",editType:\"calc\"},color:{valType:\"color\",arrayOk:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},Gfe(\"marker\",{anim:!0})),selected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},unselected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"middle center\",arrayOk:!0,editType:\"calc\"},textfont:Hht({editType:\"calc\",colorEditType:\"style\",arrayOk:!0}),zorder:{valType:\"integer\",dflt:0,editType:\"plot\"}}});var qN=ye((Eor,Jfe)=>{\"use strict\";var Yfe=Jb(),Kfe=pf().line,Yht=Pd().dash,CP=Ao().extendFlat,Kht=mc().overrideAll,Jht=vl().templatedArray,Mor=HM();Jfe.exports=Kht(Jht(\"selection\",{type:{valType:\"enumerated\",values:[\"rect\",\"path\"]},xref:CP({},Yfe.xref,{}),yref:CP({},Yfe.yref,{}),x0:{valType:\"any\"},x1:{valType:\"any\"},y0:{valType:\"any\"},y1:{valType:\"any\"},path:{valType:\"string\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:.7,editType:\"arraydraw\"},line:{color:Kfe.color,width:CP({},Kfe.width,{min:1,dflt:1}),dash:CP({},Yht,{dflt:\"dot\"})}}),\"arraydraw\",\"from-root\")});var the=ye((kor,ehe)=>{\"use strict\";var $fe=Dr(),LP=ho(),$ht=Zd(),Qht=qN(),Qfe=x_();ehe.exports=function(t,r){$ht(t,r,{name:\"selections\",handleItemDefaults:edt});for(var n=r.selections,i=0;i<n.length;i++){var a=n[i];a&&a.path===void 0&&(a.x0===void 0||a.x1===void 0||a.y0===void 0||a.y1===void 0)&&(r.selections[i]=null)}};function edt(e,t,r){function n(x,C){return $fe.coerce(e,t,Qht,x,C)}var i=n(\"path\"),a=i?\"path\":\"rect\",o=n(\"type\",a),s=o!==\"path\";s&&delete t.path,n(\"opacity\"),n(\"line.color\"),n(\"line.width\"),n(\"line.dash\");for(var l=[\"x\",\"y\"],u=0;u<2;u++){var c=l[u],f={_fullLayout:r},h,d,v,_=LP.coerceRef(e,t,f,c);if(h=LP.getFromId(f,_),h._selectionIndices.push(t._index),v=Qfe.rangeToShapePosition(h),d=Qfe.shapePositionToRange(h),s){var b=c+\"0\",p=c+\"1\",k=e[b],E=e[p];e[b]=d(e[b],!0),e[p]=d(e[p],!0),LP.coercePosition(t,f,n,_,b),LP.coercePosition(t,f,n,_,p);var T=t[b],L=t[p];T!==void 0&&L!==void 0&&(t[b]=v(T),t[p]=v(L),e[b]=k,e[p]=E)}}s&&$fe.noneOrAll(e,t,[\"x0\",\"x1\",\"y0\",\"y1\"])}});var ihe=ye((Cor,rhe)=>{\"use strict\";rhe.exports=function(t,r,n){n(\"newselection.mode\");var i=n(\"newselection.line.width\");i&&(n(\"newselection.line.color\"),n(\"newselection.line.dash\")),n(\"activeselection.fillcolor\"),n(\"activeselection.opacity\")}});var WM=ye((Lor,ohe)=>{\"use strict\";var tdt=qa(),nhe=Dr(),ahe=hf();ohe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=tdt.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has(\"cartesian\"),d=0;d<a.length;d++){var v=a[d];if(nhe.isPlainObject(v)){var _=ahe.cleanId(v.xref,\"x\",!1),b=ahe.cleanId(v.yref,\"y\",!1),p=s.x.test(_),k=s.y.test(b);if(p||k){h||nhe.pushUnique(i._basePlotModules,o);var E=!1;p&&u.indexOf(_)===-1&&(u.push(_),E=!0),k&&c.indexOf(b)===-1&&(c.push(b),E=!0),E&&p&&k&&f.push(_+b)}}}}}});var Of=ye((Por,lhe)=>{\"use strict\";var she=AN(),XM=Rfe();lhe.exports={moduleType:\"component\",name:\"selections\",layoutAttributes:qN(),supplyLayoutDefaults:the(),supplyDrawNewSelectionDefaults:ihe(),includeBasePlot:WM()(\"selections\"),draw:she.draw,drawOne:she.drawOne,reselect:XM.reselect,prepSelect:XM.prepSelect,clearOutline:XM.clearOutline,clearSelectionsCache:XM.clearSelectionsCache,selectOnClick:XM.selectOnClick}});var jN=ye((Ior,khe)=>{\"use strict\";var GN=Oa(),C0=Dr(),uhe=C0.numberFormat,rdt=fd(),idt=UL(),PP=qa(),yhe=C0.strTranslate,ndt=Zl(),che=ka(),w_=So(),adt=vf(),fhe=ho(),odt=Eg(),sdt=yv(),_he=Cg(),IP=_he.selectingOrDrawing,ldt=_he.freeMode,udt=Dh().FROM_TL,cdt=bM(),fdt=CM().redrawReglTraces,hdt=Mc(),NN=hf().getFromId,ddt=Of().prepSelect,vdt=Of().clearOutline,pdt=Of().selectOnClick,BN=gN(),HN=Rh(),hhe=HN.MINDRAG,ap=HN.MINZOOM,dhe=!0;function gdt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s===\"nsew\",c=(o+s).length===1,f,h,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z,O,U,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,E=f._length,T=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var It=t.overlays,mt=0;mt<It.length;mt++){var er=It[mt].xaxis;d[er._id]=er;var lr=It[mt].yaxis;v[lr._id]=lr}_=mhe(d),b=mhe(v),C=vhe(_,s),M=vhe(b,o),g=!M&&!C,x=ghe(e,e._fullLayout._axisMatchGroups,d,v),L=ghe(e,e._fullLayout._axisConstraintGroups,d,v,x);var wr=L.isSubplotConstrained||x.isSubplotConstrained;P=s||wr,A=o||wr;var Lr=e._fullLayout;z=Lr._has(\"scattergl\"),O=Lr._has(\"splom\"),U=Lr._has(\"svg\")}N();var H=_dt(M+C,e._fullLayout.dragmode,u),re=bhe(t,o+s+\"drag\",H,r,n,i,a);if(g&&!u)return re.onmousedown=null,re.style.pointerEvents=\"none\",re;var oe={element:re,gd:e,plotinfo:t};oe.prepFn=function(It,mt,er){var lr=oe.dragmode,wr=e._fullLayout.dragmode;wr!==lr&&(oe.dragmode=wr),N(),Z=e._fullLayout._invScaleX,j=e._fullLayout._invScaleY,g||(u?It.shiftKey?wr===\"pan\"?wr=\"zoom\":IP(wr)||(wr=\"pan\"):It.ctrlKey&&(wr=\"pan\"):wr=\"pan\"),ldt(wr)?oe.minDrag=1:oe.minDrag=void 0,IP(wr)?(oe.xaxes=_,oe.yaxes=b,ddt(It,mt,er,oe,wr)):(oe.clickFn=Ce,IP(lr)&&_e(),g||(wr===\"zoom\"?(oe.moveFn=je,oe.doneFn=pt,oe.minDrag=1,ce(It,mt,er)):wr===\"pan\"&&(oe.moveFn=$t,oe.doneFn=$e))),e._fullLayout._redrag=function(){var Lr=e._dragdata;if(Lr&&Lr.element===re){var ti=e._fullLayout.dragmode;IP(ti)||(N(),St([0,0,E,T]),oe.moveFn(Lr.dx,Lr.dy))}}};function _e(){oe.plotinfo.selection=!1,vdt(e)}function Ce(It,mt){var er=oe.gd;if(er._fullLayout._activeShapeIndex>=0){er._fullLayout._deactivateShape(er);return}var lr=er._fullLayout.clickmode;if(VN(er),It===2&&!c&&fr(),u)lr.indexOf(\"select\")>-1&&pdt(mt,er,_,b,t.id,oe),lr.indexOf(\"event\")>-1&&adt.click(er,mt,t.id);else if(It===1&&c){var wr=o?h:f,Lr=o===\"s\"||s===\"w\"?0:1,ti=wr._name+\".range[\"+Lr+\"]\",Br=mdt(wr,Lr),Vr=\"left\",dt=\"middle\";if(wr.fixedrange)return;o?(dt=o===\"n\"?\"top\":\"bottom\",wr.side===\"right\"&&(Vr=\"right\")):s===\"e\"&&(Vr=\"right\"),er._context.showAxisRangeEntryBoxes&&GN.select(re).call(ndt.makeEditable,{gd:er,immediate:!0,background:er._fullLayout.paper_bgcolor,text:String(Br),fill:wr.tickfont?wr.tickfont.color:\"#444\",horizontalAlign:Vr,verticalAlign:dt}).on(\"edit\",function(Ge){var Je=wr.d2r(Ge);Je!==void 0&&PP.call(\"_guiRelayout\",er,ti,Je)})}}sdt.init(oe);var Le,ge,ie,Se,Ee,Ae,Be,Pe,me,De;function ce(It,mt,er){var lr=re.getBoundingClientRect();Le=mt-lr.left,ge=er-lr.top,e._fullLayout._calcInverseTransform(e);var wr=C0.apply3DTransform(e._fullLayout._invTransform)(Le,ge);Le=wr[0],ge=wr[1],ie={l:Le,r:Le,w:0,t:ge,b:ge,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:rdt(e._fullLayout.plot_bgcolor).getLuminance(),Ee=\"M0,0H\"+E+\"V\"+T+\"H0V0\",Ae=!1,Be=\"xy\",De=!1,Pe=whe(l,Se,p,k,Ee),me=The(l,p,k)}function je(It,mt){if(e._transitioningWithDuration)return!1;var er=Math.max(0,Math.min(E,Z*It+Le)),lr=Math.max(0,Math.min(T,j*mt+ge)),wr=Math.abs(er-Le),Lr=Math.abs(lr-ge);ie.l=Math.min(Le,er),ie.r=Math.max(Le,er),ie.t=Math.min(ge,lr),ie.b=Math.max(ge,lr);function ti(){Be=\"\",ie.r=ie.l,ie.t=ie.b,me.attr(\"d\",\"M0,0Z\")}if(L.isSubplotConstrained)wr>ap||Lr>ap?(Be=\"xy\",wr/E>Lr/T?(Lr=wr*T/E,ge>lr?ie.t=ge-Lr:ie.b=ge+Lr):(wr=Lr*E/T,Le>er?ie.l=Le-wr:ie.r=Le+wr),me.attr(\"d\",RP(ie))):ti();else if(x.isSubplotConstrained)if(wr>ap||Lr>ap){Be=\"xy\";var Br=Math.min(ie.l/E,(T-ie.b)/T),Vr=Math.max(ie.r/E,(T-ie.t)/T);ie.l=Br*E,ie.r=Vr*E,ie.b=(1-Br)*T,ie.t=(1-Vr)*T,me.attr(\"d\",RP(ie))}else ti();else!M||Lr<Math.min(Math.max(wr*.6,hhe),ap)?wr<hhe||!C?ti():(ie.t=0,ie.b=T,Be=\"x\",me.attr(\"d\",xdt(ie,ge))):!C||wr<Math.min(Lr*.6,ap)?(ie.l=0,ie.r=E,Be=\"y\",me.attr(\"d\",bdt(ie,Le))):(Be=\"xy\",me.attr(\"d\",RP(ie)));ie.w=ie.r-ie.l,ie.h=ie.b-ie.t,Be&&(De=!0),e._dragged=De,Ahe(Pe,me,ie,Ee,Ae,Se),lt(),e.emit(\"plotly_relayouting\",G),Ae=!0}function lt(){G={},(Be===\"xy\"||Be===\"x\")&&(UN(_,ie.l/E,ie.r/E,G,L.xaxes),sr(\"x\",G)),(Be===\"xy\"||Be===\"y\")&&(UN(b,(T-ie.b)/T,(T-ie.t)/T,G,L.yaxes),sr(\"y\",G))}function pt(){lt(),VN(e),$e(),Mhe(e)}var Vt=[0,0,E,T],ot=null,ut=HN.REDRAWDELAY,Wt=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Nt(It){if(!e._context._scrollZoom.cartesian&&!e._fullLayout._enablescrollzoom)return;if(_e(),e._transitioningWithDuration){It.preventDefault(),It.stopPropagation();return}N(),clearTimeout(ot);var mt=-It.deltaY;if(isFinite(mt)||(mt=It.wheelDelta/10),!isFinite(mt)){C0.log(\"Did not find wheel motion attributes: \",It);return}var er=Math.exp(-Math.min(Math.max(mt,-20),20)/200),lr=Wt.draglayer.select(\".nsewdrag\").node().getBoundingClientRect(),wr=(It.clientX-lr.left)/lr.width,Lr=(lr.bottom-It.clientY)/lr.height,ti;function Br(Vr,dt,Ge){if(Vr.fixedrange)return;var Je=C0.simpleMap(Vr.range,Vr.r2l),We=Je[0]+(Je[1]-Je[0])*dt;function tt(xt){return Vr.l2r(We+(xt-We)*Ge)}Vr.range=Je.map(tt)}if(P){for(s||(wr=.5),ti=0;ti<_.length;ti++)Br(_[ti],wr,er);sr(\"x\"),Vt[2]*=er,Vt[0]+=Vt[2]*wr*(1/er-1)}if(A){for(o||(Lr=.5),ti=0;ti<b.length;ti++)Br(b[ti],Lr,er);sr(\"y\"),Vt[3]*=er,Vt[1]+=Vt[3]*(1-Lr)*(1/er-1)}St(Vt),Tr(),e.emit(\"plotly_relayouting\",G),ot=setTimeout(function(){e._fullLayout&&(Vt=[0,0,E,T],$e())},ut),It.preventDefault()}o.length*s.length!==1&&Ehe(re,Nt);function $t(It,mt){if(It=It*Z,mt=mt*j,e._transitioningWithDuration)return;if(e._fullLayout._replotting=!0,C===\"ew\"||M===\"ns\"){var er=C?-It:0,lr=M?-mt:0;if(x.isSubplotConstrained){if(C&&M){var wr=(It/E-mt/T)/2;It=wr*E,mt=-wr*T,er=-It,lr=-mt}M?er=-lr*E/T:lr=-er*T/E}C&&(phe(_,It),sr(\"x\")),M&&(phe(b,mt),sr(\"y\")),St([er,lr,E,T]),Tr(),e.emit(\"plotly_relayouting\",G);return}function Lr(tt,xt,Ie){for(var xe=1-xt,ke,vt,ir=0;ir<tt.length;ir++){var ar=tt[ir];if(!ar.fixedrange){ke=ar,vt=ar._rl[xe]+(ar._rl[xt]-ar._rl[xe])/ydt(Ie/ar._length);var vr=ar.l2r(vt);vr!==!1&&vr!==void 0&&(ar.range[xt]=vr)}}return ke._length*(ke._rl[xt]-vt)/(ke._rl[xt]-ke._rl[xe])}var ti=C===\"w\"==(M===\"n\")?1:-1;if(C&&M&&(L.isSubplotConstrained||x.isSubplotConstrained)){var Br=(It/E+ti*mt/T)/2;It=Br*E,mt=ti*Br*T}var Vr,dt;if(C===\"w\"?It=Lr(_,0,It):C===\"e\"?It=Lr(_,1,-It):C||(It=0),M===\"n\"?mt=Lr(b,1,mt):M===\"s\"?mt=Lr(b,0,-mt):M||(mt=0),Vr=C===\"w\"?It:0,dt=M===\"n\"?mt:0,L.isSubplotConstrained&&!x.isSubplotConstrained||x.isSubplotConstrained&&C&&M&&ti>0){var Ge;if(x.isSubplotConstrained||!C&&M.length===1){for(Ge=0;Ge<_.length;Ge++)_[Ge].range=_[Ge]._r.slice(),BN(_[Ge],1-mt/T);It=mt*E/T,Vr=It/2}if(x.isSubplotConstrained||!M&&C.length===1){for(Ge=0;Ge<b.length;Ge++)b[Ge].range=b[Ge]._r.slice(),BN(b[Ge],1-It/E);mt=It*T/E,dt=mt/2}}(!x.isSubplotConstrained||!M)&&sr(\"x\"),(!x.isSubplotConstrained||!C)&&sr(\"y\");var Je=E-It,We=T-mt;x.isSubplotConstrained&&!(C&&M)&&(C?(dt=Vr?0:It*T/E,We=Je*T/E):(Vr=dt?0:mt*E/T,Je=We*E/T)),St([Vr,dt,Je,We]),Tr(),e.emit(\"plotly_relayouting\",G)}function sr(It,mt){for(var er=x.isSubplotConstrained?{x:b,y:_}[It]:x[It+\"axes\"],lr=x.isSubplotConstrained?{x:_,y:b}[It]:[],wr=0;wr<er.length;wr++){var Lr=er[wr],ti=Lr._id,Br=x.xLinks[ti]||x.yLinks[ti],Vr=lr[0]||d[Br]||v[Br];Vr&&(mt?(mt[Lr._name+\".range[0]\"]=mt[Vr._name+\".range[0]\"],mt[Lr._name+\".range[1]\"]=mt[Vr._name+\".range[1]\"]):Lr.range=Vr.range.slice())}}function Tr(){var It=[],mt;function er(ti){for(mt=0;mt<ti.length;mt++)ti[mt].fixedrange||It.push(ti[mt]._id)}function lr(ti,Br){for(mt=0;mt<ti.length;mt++){var Vr=ti[mt],dt=Vr[Br];!Vr.fixedrange&&dt.tickmode===\"sync\"&&It.push(dt._id)}}for(P&&(er(_),er(L.xaxes),er(x.xaxes),lr(t.overlays,\"xaxis\")),A&&(er(b),er(L.yaxes),er(x.yaxes),lr(t.overlays,\"yaxis\")),G={},mt=0;mt<It.length;mt++){var wr=It[mt],Lr=NN(e,wr);fhe.drawOne(e,Lr,{skipTitle:!0}),G[Lr._name+\".range[0]\"]=Lr.range[0],G[Lr._name+\".range[1]\"]=Lr.range[1]}fhe.redrawComponents(e,It)}function fr(){if(!e._transitioningWithDuration){var It=e._context.doubleClick,mt=[];C&&(mt=mt.concat(_)),M&&(mt=mt.concat(b)),x.xaxes&&(mt=mt.concat(x.xaxes)),x.yaxes&&(mt=mt.concat(x.yaxes));var er={},lr,wr;if(It===\"reset+autosize\")for(It=\"autosize\",wr=0;wr<mt.length;wr++){lr=mt[wr];var Lr=lr._rangeInitial0,ti=lr._rangeInitial1,Br=Lr!==void 0||ti!==void 0;if(Br&&(Lr!==void 0&&Lr!==lr.range[0]||ti!==void 0&&ti!==lr.range[1])||!Br&&lr.autorange!==!0){It=\"reset\";break}}if(It===\"autosize\")for(wr=0;wr<mt.length;wr++)lr=mt[wr],lr.fixedrange||(er[lr._name+\".autorange\"]=!0);else if(It===\"reset\"){for((C||L.isSubplotConstrained)&&(mt=mt.concat(L.xaxes)),M&&!L.isSubplotConstrained&&(mt=mt.concat(L.yaxes)),L.isSubplotConstrained&&(C?M||(mt=mt.concat(b)):mt=mt.concat(_)),wr=0;wr<mt.length;wr++)if(lr=mt[wr],!lr.fixedrange){var Vr=lr._name,dt=lr._autorangeInitial;lr._rangeInitial0===void 0&&lr._rangeInitial1===void 0?er[Vr+\".autorange\"]=!0:lr._rangeInitial0===void 0?(er[Vr+\".autorange\"]=dt,er[Vr+\".range\"]=[null,lr._rangeInitial1]):lr._rangeInitial1===void 0?(er[Vr+\".range\"]=[lr._rangeInitial0,null],er[Vr+\".autorange\"]=dt):er[Vr+\".range\"]=[lr._rangeInitial0,lr._rangeInitial1]}}e.emit(\"plotly_doubleclick\",null),PP.call(\"_guiRelayout\",e,er)}}function $e(){St([0,0,E,T]),C0.syncOrAsync([hdt.previousPromises,function(){e._fullLayout._replotting=!1,PP.call(\"_guiRelayout\",e,G)}],e)}function St(It){var mt=e._fullLayout,er=mt._plots,lr=mt._subplots.cartesian,wr,Lr,ti,Br;if(O&&PP.subplotsRegistry.splom.drag(e),z){for(wr=0;wr<lr.length;wr++)if(Lr=er[lr[wr]],ti=Lr.xaxis,Br=Lr.yaxis,Lr._scene){ti.limitRange&&ti.limitRange(),Br.limitRange&&Br.limitRange();var Vr=C0.simpleMap(ti.range,ti.r2l),dt=C0.simpleMap(Br.range,Br.r2l);Lr._scene.update({range:[Vr[0],dt[0],Vr[1],dt[1]]})}}if((O||z)&&(cdt(e),fdt(e)),U){var Ge=It[2]/f._length,Je=It[3]/h._length;for(wr=0;wr<lr.length;wr++){Lr=er[lr[wr]],ti=Lr.xaxis,Br=Lr.yaxis;var We=(P||x.isSubplotConstrained)&&!ti.fixedrange&&d[ti._id],tt=(A||x.isSubplotConstrained)&&!Br.fixedrange&&v[Br._id],xt,Ie,xe,ke;if(We?(xt=Ge,xe=s||x.isSubplotConstrained?It[0]:_t(ti,xt)):x.xaHash[ti._id]?(xt=Ge,xe=It[0]*ti._length/f._length):x.yaHash[ti._id]?(xt=Je,xe=M===\"ns\"?-It[1]*ti._length/h._length:_t(ti,xt,{n:\"top\",s:\"bottom\"}[M])):(xt=Qt(ti,Ge,Je),xe=Gt(ti,xt)),xt>1&&(ti.maxallowed!==void 0&&P===(ti.range[0]<ti.range[1]?\"e\":\"w\")||ti.minallowed!==void 0&&P===(ti.range[0]<ti.range[1]?\"w\":\"e\"))&&(xt=1,xe=0),tt?(Ie=Je,ke=o||x.isSubplotConstrained?It[1]:_t(Br,Ie)):x.yaHash[Br._id]?(Ie=Je,ke=It[1]*Br._length/h._length):x.xaHash[Br._id]?(Ie=Ge,ke=C===\"ew\"?-It[0]*Br._length/f._length:_t(Br,Ie,{e:\"right\",w:\"left\"}[C])):(Ie=Qt(Br,Ge,Je),ke=Gt(Br,Ie)),Ie>1&&(Br.maxallowed!==void 0&&A===(Br.range[0]<Br.range[1]?\"n\":\"s\")||Br.minallowed!==void 0&&A===(Br.range[0]<Br.range[1]?\"s\":\"n\"))&&(Ie=1,ke=0),!(!xt&&!Ie)){xt||(xt=1),Ie||(Ie=1);var vt=ti._offset-xe/xt,ir=Br._offset-ke/Ie;Lr.clipRect.call(w_.setTranslate,xe,ke).call(w_.setScale,xt,Ie),Lr.plot.call(w_.setTranslate,vt,ir).call(w_.setScale,1/xt,1/Ie),(xt!==Lr.xScaleFactor||Ie!==Lr.yScaleFactor)&&(w_.setPointGroupScale(Lr.zoomScalePts,xt,Ie),w_.setTextPointsScale(Lr.zoomScaleTxt,xt,Ie)),w_.hideOutsideRangePoints(Lr.clipOnAxisFalseTraces,Lr),Lr.xScaleFactor=xt,Lr.yScaleFactor=Ie}}}}function Qt(It,mt,er){return It.fixedrange?0:P&&L.xaHash[It._id]?mt:A&&(L.isSubplotConstrained?L.xaHash:L.yaHash)[It._id]?er:0}function Gt(It,mt){return mt?(It.range=It._r.slice(),BN(It,mt),_t(It,mt)):0}function _t(It,mt,er){return It._length*(1-mt)*udt[er||It.constraintoward||\"middle\"]}return re}function xhe(e,t,r,n){var i=C0.ensureSingle(e.draglayer,t,r,function(a){a.classed(\"drag\",!0).style({fill:\"transparent\",\"stroke-width\":0}).attr(\"data-subplot\",e.id)});return i.call(odt,n),i.node()}function bhe(e,t,r,n,i,a,o){var s=xhe(e,\"rect\",t,r);return GN.select(s).call(w_.setRect,n,i,a,o),s}function vhe(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return\"\"}function mdt(e,t){var r=e.range[t],n=Math.abs(r-e.range[1-t]),i;return e.type===\"date\"?r:e.type===\"log\"?(i=Math.ceil(Math.max(0,-Math.log(n)/Math.LN10))+3,uhe(\".\"+i+\"g\")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(n)/Math.LN10)+4,uhe(\".\"+String(i)+\"g\")(r))}function UN(e,t,r,n,i){for(var a=0;a<e.length;a++){var o=e[a];if(!o.fixedrange)if(o.rangebreaks){var s=o._id.charAt(0)===\"y\",l=s?1-t:t,u=s?1-r:r;n[o._name+\".range[0]\"]=o.l2r(o.p2l(l*o._length)),n[o._name+\".range[1]\"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+\".range[0]\"]=o.l2r(c+f*t),n[o._name+\".range[1]\"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(t+(1-r))/2;UN(i,h,1-h,n,[])}}function phe(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n.fixedrange){if(n.rangebreaks){var i=0,a=n._length,o=n.p2l(i+t)-n.p2l(i),s=n.p2l(a+t)-n.p2l(a),l=(o+s)/2;n.range=[n.l2r(n._rl[0]-l),n.l2r(n._rl[1]-l)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)];n.limitRange&&n.limitRange()}}}function ydt(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function _dt(e,t,r){return e?e===\"nsew\"?r?\"\":t===\"pan\"?\"move\":\"crosshair\":e.toLowerCase()+\"-resize\":\"pointer\"}function whe(e,t,r,n,i){return e.append(\"path\").attr(\"class\",\"zoombox\").style({fill:t>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"transform\",yhe(r,n)).attr(\"d\",i+\"Z\")}function The(e,t,r){return e.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:che.background,stroke:che.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",yhe(t,r)).attr(\"d\",\"M0,0Z\")}function Ahe(e,t,r,n,i,a){e.attr(\"d\",n+\"M\"+r.l+\",\"+r.t+\"v\"+r.h+\"h\"+r.w+\"v-\"+r.h+\"h-\"+r.w+\"Z\"),She(e,t,i,a)}function She(e,t,r,n){r||(e.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),t.transition().style(\"opacity\",1).duration(200))}function VN(e){GN.select(e).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function Mhe(e){dhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,\"Double-click to zoom back out\"),\"long\"),dhe=!1)}function xdt(e,t){return\"M\"+(e.l-.5)+\",\"+(t-ap-.5)+\"h-3v\"+(2*ap+1)+\"h3ZM\"+(e.r+.5)+\",\"+(t-ap-.5)+\"h3v\"+(2*ap+1)+\"h-3Z\"}function bdt(e,t){return\"M\"+(t-ap-.5)+\",\"+(e.t-.5)+\"v-3h\"+(2*ap+1)+\"v3ZM\"+(t-ap-.5)+\",\"+(e.b+.5)+\"v3h\"+(2*ap+1)+\"v-3Z\"}function RP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ap)/2);return\"M\"+(e.l-3.5)+\",\"+(e.t-.5+t)+\"h3v\"+-t+\"h\"+t+\"v-3h-\"+(t+3)+\"ZM\"+(e.r+3.5)+\",\"+(e.t-.5+t)+\"h-3v\"+-t+\"h\"+-t+\"v-3h\"+(t+3)+\"ZM\"+(e.r+3.5)+\",\"+(e.b+.5-t)+\"h-3v\"+t+\"h\"+-t+\"v3h\"+(t+3)+\"ZM\"+(e.l-3.5)+\",\"+(e.b+.5-t)+\"h3v\"+t+\"h\"+t+\"v3h-\"+(t+3)+\"Z\"}function ghe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v<t.length;v++){var _=t[v];for(l in r)if(_[l]){for(c in _)!(i&&(h[c]||d[c]))&&!(c.charAt(0)===\"x\"?r:n)[c]&&(o[c]=l);for(u in n)!(i&&(h[u]||d[u]))&&_[u]&&(a=!0)}for(u in n)if(_[u])for(f in _)!(i&&(h[f]||d[f]))&&!(f.charAt(0)===\"x\"?r:n)[f]&&(s[f]=u)}a&&(C0.extendFlat(o,s),s={});var b={},p=[];for(c in o){var k=NN(e,c);p.push(k),b[k._id]=k}var E={},T=[];for(f in s){var L=NN(e,f);T.push(L),E[L._id]=L}return{xaHash:b,yaHash:E,xaxes:p,yaxes:T,xLinks:o,yLinks:s,isSubplotConstrained:a}}function Ehe(e,t){if(!idt)e.onwheel!==void 0?e.onwheel=t:e.onmousewheel!==void 0?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener(\"wheel\",t,{passive:!1}));else{var r=e.onwheel!==void 0?\"wheel\":\"mousewheel\";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}}function mhe(e){var t=[];for(var r in e)t.push(e[r]);return t}khe.exports={makeDragBox:gdt,makeDragger:xhe,makeRectDragger:bhe,makeZoombox:whe,makeCorners:The,updateZoombox:Ahe,xyCorners:RP,transitionZoombox:She,removeZoombox:VN,showDoubleClickNotifier:Mhe,attachWheelEventHandler:Ehe}});var WN=ye(FP=>{\"use strict\";var wdt=Oa(),DP=vf(),Tdt=yv(),Adt=Eg(),Ig=jN().makeDragBox,gd=Rh().DRAGGERSIZE;FP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){wdt.select(t).selectAll(\".drag\").remove();return}if(!(!r._has(\"cartesian\")&&!r._has(\"splom\"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split(\"y\"),l=o.split(\"y\");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Ig(t,o,s._offset,l._offset,s._length,l._length,\"ns\",\"ew\");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&DP.hover(t,h,a)},DP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Tdt.unhover(t,h))},t._context.showAxisDragHandles&&(Ig(t,o,s._offset-gd,l._offset-gd,gd,gd,\"n\",\"w\"),Ig(t,o,s._offset+s._length,l._offset-gd,gd,gd,\"n\",\"e\"),Ig(t,o,s._offset-gd,l._offset+l._length,gd,gd,\"s\",\"w\"),Ig(t,o,s._offset+s._length,l._offset+l._length,gd,gd,\"s\",\"e\"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side===\"top\"&&(c-=gd),Ig(t,o,s._offset+s._length*.1,c,s._length*.8,gd,\"\",\"ew\"),Ig(t,o,s._offset,c,s._length*.1,gd,\"\",\"w\"),Ig(t,o,s._offset+s._length*.9,c,s._length*.1,gd,\"\",\"e\")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!==\"right\"&&(f-=gd),Ig(t,o,f,l._offset+l._length*.1,gd,l._length*.8,\"ns\",\"\"),Ig(t,o,f,l._offset+l._length*.9,gd,l._length*.1,\"s\",\"\"),Ig(t,o,f,l._offset,gd,l._length*.1,\"n\",\"\")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,DP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,DP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},FP.updateFx(t)}};FP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode===\"pan\"?\"move\":\"crosshair\";Adt(t._draggers,r)}});var Phe=ye((Dor,Lhe)=>{\"use strict\";var Che=qa();Lhe.exports=function(t){for(var r=Che.layoutArrayContainers,n=Che.layoutArrayRegexes,i=t.split(\"[\")[0],a,o,s=0;s<n.length;s++)if(o=t.match(n[s]),o&&o.index===0){a=o[0];break}if(a||(a=r[r.indexOf(i)]),!a)return!1;var l=t.slice(a.length);return l?(o=l.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/),o?{array:a,index:Number(o[1]),property:o[3]||\"\"}:!1):{array:a,index:\"\",property:\"\"}}});var Rhe=ye(YM=>{\"use strict\";var Sdt=Ty(),XN=L6(),ZM=K1(),Mdt=U6().sorterAsc,ZN=qa();YM.containerArrayMatch=Phe();var Edt=YM.isAddVal=function(t){return t===\"add\"||Sdt(t)},Ihe=YM.isRemoveVal=function(t){return t===null||t===\"remove\"};YM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=ZN.getComponentMethod(o,\"supplyLayoutDefaults\"),l=ZN.getComponentMethod(o,\"draw\"),u=ZN.getComponentMethod(o,\"drawOne\"),c=i.replot||i.recalc||s===XN||l===XN,f=t.layout,h=t._fullLayout;if(n[\"\"]){Object.keys(n).length>1&&ZM.warn(\"Full array edits are incompatible with other edits\",o);var d=n[\"\"][\"\"];if(Ihe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return ZM.warn(\"Unrecognized full array edit value\",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(Mdt),_=r.get(),b=_||[],p=a(h,o).get(),k=[],E=-1,T=b.length,L,x,C,M,g,P,A,z;for(L=0;L<v.length;L++){if(C=v[L],M=n[C],g=Object.keys(M),P=M[\"\"],A=Edt(P),C<0||C>b.length-(A?0:1)){ZM.warn(\"index out of range\",o,C);continue}if(P!==void 0)g.length>1&&ZM.warn(\"Insertion & removal are incompatible with edits to the same index.\",o,C),Ihe(P)?k.push(C):A?(P===\"add\"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):ZM.warn(\"Unrecognized full object edit value\",o,C,P),E===-1&&(E=C);else for(x=0;x<g.length;x++)z=o+\"[\"+C+\"].\",a(b[C],g[x],z).set(M[g[x]])}for(L=k.length-1;L>=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?_||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==XN){var O;if(E===-1)O=v;else{for(T=Math.max(b.length,T),O=[],L=0;L<v.length&&(C=v[L],!(C>=E));L++)O.push(C);for(L=E;L<T;L++)O.push(L)}for(L=0;L<O.length;L++)u(t,O[L])}else l(t);return!0}});var Uhe=ye(L0=>{\"use strict\";var Ohe=Eo(),qhe=qa(),Uv=Dr(),KM=Mc(),Bhe=hf(),Nhe=ka(),JM=Bhe.cleanId,kdt=Bhe.getFromTrace,YN=qhe.traceIs,Cdt=[\"x\",\"y\",\"z\"];L0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log(\"Clearing previous rejected promises from queue.\"),e._promises=[]};L0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(KM.subplotsRegistry.cartesian||{}).attrRegex,i=(KM.subplotsRegistry.polar||{}).attrRegex,a=(KM.subplotsRegistry.ternary||{}).attrRegex,o=(KM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t<s.length;t++){var l=s[t];if(n&&n.test(l)){var u=e[l];u.anchor&&u.anchor!==\"free\"&&(u.anchor=JM(u.anchor)),u.overlaying&&(u.overlaying=JM(u.overlaying)),u.type||(u.isdate?u.type=\"date\":u.islog?u.type=\"log\":u.isdate===!1&&u.islog===!1&&(u.type=\"linear\")),(u.autorange===\"withzero\"||u.autorange===\"tozero\")&&(u.autorange=!0,u.rangemode=\"tozero\"),u.insiderange&&delete u.range,delete u.islog,delete u.isdate,delete u.categories,zP(u,\"domain\")&&delete u.domain}}var c=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<c;t++){var f=e.annotations[t];Uv.isPlainObject(f)&&(aT(f,\"xref\"),aT(f,\"yref\"))}var h=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<h;t++){var d=e.shapes[t];Uv.isPlainObject(d)&&(aT(d,\"xref\",!0),aT(d,\"yref\",!0))}var v=Array.isArray(e.images)?e.images.length:0;for(t=0;t<v;t++){var _=e.images[t];Uv.isPlainObject(_)&&(aT(_,\"xref\"),aT(_,\"yref\"))}var b=e.legend;return b&&(b.x>3?(b.x=1.02,b.xanchor=\"left\"):b.x<-2&&(b.x=-.02,b.xanchor=\"right\"),b.y>3?(b.y=1.02,b.yanchor=\"bottom\"):b.y<-2&&(b.y=-.02,b.yanchor=\"top\")),e.dragmode===\"rotate\"&&(e.dragmode=\"orbit\"),Nhe.clean(e),e.template&&e.template.layout&&L0.cleanLayout(e.template.layout),e};function aT(e,t,r=!1){var n=e[t],i=t.charAt(0);r&&Array.isArray(n)||n&&n!==\"paper\"&&(e[t]=JM(n,i,!0))}L0.cleanData=function(e){for(var t=0;t<e.length;t++){var r=e[t],n;if(r.type===\"histogramy\"&&\"xbins\"in r&&!(\"ybins\"in r)&&(r.ybins=r.xbins,delete r.xbins),r.type===\"histogramy\"&&L0.swapXYData(r),(r.type===\"histogramx\"||r.type===\"histogramy\")&&(r.type=\"histogram\"),\"scl\"in r&&!(\"colorscale\"in r)&&(r.colorscale=r.scl,delete r.scl),\"reversescl\"in r&&!(\"reversescale\"in r)&&(r.reversescale=r.reversescl,delete r.reversescl),r.xaxis&&(r.xaxis=JM(r.xaxis,\"x\")),r.yaxis&&(r.yaxis=JM(r.yaxis,\"y\")),YN(r,\"gl3d\")&&r.scene&&(r.scene=KM.subplotsRegistry.gl3d.cleanId(r.scene)),!YN(r,\"pie-like\")&&!YN(r,\"bar-like\"))if(Array.isArray(r.textposition))for(n=0;n<r.textposition.length;n++)r.textposition[n]=Fhe(r.textposition[n]);else r.textposition&&(r.textposition=Fhe(r.textposition));var i=qhe.getModule(r);if(i&&i.colorbar){var a=i.colorbar.container,o=a?r[a]:r;o&&o.colorscale&&(o.colorscale===\"YIGnBu\"&&(o.colorscale=\"YlGnBu\"),o.colorscale===\"YIOrRd\"&&(o.colorscale=\"YlOrRd\"))}if(r.type===\"surface\"&&Uv.isPlainObject(r.contours)){var s=[\"x\",\"y\",\"z\"];for(n=0;n<s.length;n++){var l=r.contours[s[n]];Uv.isPlainObject(l)&&(l.highlightColor&&(l.highlightcolor=l.highlightColor,delete l.highlightColor),l.highlightWidth&&(l.highlightwidth=l.highlightWidth,delete l.highlightWidth))}}if(r.type===\"candlestick\"||r.type===\"ohlc\"){var u=(r.increasing||{}).showlegend!==!1,c=(r.decreasing||{}).showlegend!==!1,f=Dhe(r.increasing),h=Dhe(r.decreasing);if(f!==!1&&h!==!1){var d=Ldt(f,h,u,c);d&&(r.name=d)}else(f||h)&&!r.name&&(r.name=f||h)}zP(r,\"line\")&&delete r.line,\"marker\"in r&&(zP(r.marker,\"line\")&&delete r.marker.line,zP(r,\"marker\")&&delete r.marker),Nhe.clean(r),r.autobinx&&(delete r.autobinx,delete r.xbins),r.autobiny&&(delete r.autobiny,delete r.ybins)}};function Dhe(e){if(!Uv.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,(typeof t==\"string\"||typeof t==\"number\")&&String(t)}function Ldt(e,t,r,n){if(r&&!n)return e;if(n&&!r||!e.trim())return t;if(!t.trim())return e;var i=Math.min(e.length,t.length),a;for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);var o=e.slice(0,a);return o.trim()}function Fhe(e){var t=\"middle\",r=\"center\";return typeof e==\"string\"&&(e.indexOf(\"top\")!==-1?t=\"top\":e.indexOf(\"bottom\")!==-1&&(t=\"bottom\"),e.indexOf(\"left\")!==-1?r=\"left\":e.indexOf(\"right\")!==-1&&(r=\"right\")),t+\" \"+r}function zP(e,t){return t in e&&typeof e[t]==\"object\"&&Object.keys(e[t]).length===0}L0.swapXYData=function(e){var t;if(Uv.swapAttrs(e,[\"?\",\"?0\",\"d?\",\"?bins\",\"nbins?\",\"autobin?\",\"?src\",\"error_?\"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,n=\"copy_ystyle\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);Uv.swapAttrs(e,[\"error_?.copy_ystyle\"]),n&&Uv.swapAttrs(e,[\"error_?.color\",\"error_?.thickness\",\"error_?.width\"])}if(typeof e.hoverinfo==\"string\"){var i=e.hoverinfo.split(\"+\");for(t=0;t<i.length;t++)i[t]===\"x\"?i[t]=\"y\":i[t]===\"y\"&&(i[t]=\"x\");e.hoverinfo=i.join(\"+\")}};L0.coerceTraceIndices=function(e,t){if(Ohe(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map(function(i,a){return a});if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++)Uv.isIndex(t[n],e.data.length)?r.push(t[n]):Uv.warn(\"trace index (\",t[n],\") is not a number or is out of bounds\");return r}return t};L0.manageArrayContainers=function(e,t,r){var n=e.obj,i=e.parts,a=i.length,o=i[a-1],s=Ohe(o);if(s&&t===null){var l=i.slice(0,a-1).join(\".\"),u=Uv.nestedProperty(n,l).get();u.splice(o,1)}else s&&e.get()===void 0&&e.get()===void 0&&(r[e.astr]=null),e.set(t)};var Pdt=/(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;function zhe(e){var t=e.search(Pdt);if(t>0)return e.slice(0,t)}L0.hasParent=function(e,t){for(var r=zhe(t);r;){if(r in e)return!0;r=zhe(r)}return!1};L0.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var i=e._fullData[n],a=0;a<3;a++){var o=kdt(e,i,Cdt[a]);if(o&&o.type!==\"log\"){var s=o._name,l=o._id.slice(1);if(l.slice(0,5)===\"scene\"){if(r[l]!==void 0)continue;s=l+\".\"+s}var u=s+\".type\";r[s]===void 0&&r[u]===void 0&&Uv.nestedProperty(e.layout,u).set(null)}}};var KN=(e,t)=>{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}else if([e,t].every(n=>Uv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith(\"_\"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}return!1};L0.collectionsAreEqual=KN});var ZP=ye(_l=>{\"use strict\";var BP=Oa(),Idt=Eo(),Rdt=lq(),Sa=Dr(),Ec=Sa.nestedProperty,QN=k3(),op=Sne(),P0=qa(),WP=P3(),Qo=Mc(),Vv=ho(),Ddt=AB(),Fdt=Rd(),JN=So(),zdt=ka(),Odt=WN().initInteractions,qdt=Wp(),Bdt=Of().clearOutline,Whe=_b().dfltConfig,OP=Rhe(),gh=Uhe(),Au=CM(),T_=mc(),Ndt=Rh().AX_NAME_PATTERN,$N=0,Vhe=5;function Udt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),QN.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=QN.triggerHandler(e,\"plotly_beforeplot\",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn(\"Calling _doPlot as if redrawing but this container doesn't yet have a plot.\",e);function s(){if(i)return _l.addFrames(e,i)}Zhe(e,n),r||(r={}),BP.select(e).classed(\"js-plotly-plot\",!0),JN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(gh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=gh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has(\"cartesian\");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(cvt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),JN.initGradients(e),JN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h<e.calcdata.length;h++)e.calcdata[h][0].trace=e._fullData[h];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){Sa.isHidden(e)||Qo.resize(e)},window.addEventListener(\"resize\",e._responsiveChartHandler)):Sa.clearResponsive(e);var d=Sa.extendFlat({},u._size),v=0;function _(){for(var C=u._basePlotModules,M=0;M<C.length;M++)C[M].drawFramework&&C[M].drawFramework(e);!u._glcanvas&&u._has(\"gl\")&&(u._glcanvas=u._glcontainer.selectAll(\".gl-canvas\").data([{key:\"contextLayer\",context:!0,pick:!1},{key:\"focusLayer\",context:!1,pick:!1},{key:\"pickLayer\",context:!1,pick:!0}],function(z){return z.key}),u._glcanvas.enter().append(\"canvas\").attr(\"class\",function(z){return\"gl-canvas gl-canvas-\"+z.key.replace(\"Layer\",\"\")}).style({position:\"absolute\",top:0,left:0,overflow:\"visible\",\"pointer-events\":\"none\"}));var g=e._context.plotGlPixelRatio;if(u._glcanvas){u._glcanvas.attr(\"width\",u.width*g).attr(\"height\",u.height*g).style(\"width\",u.width+\"px\").style(\"height\",u.height+\"px\");var P=u._glcanvas.data()[0].regl;if(P&&(Math.floor(u.width*g)!==P._gl.drawingBufferWidth||Math.floor(u.height*g)!==P._gl.drawingBufferHeight)){var A=\"WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.\";if(v)Sa.error(A);else return Sa.log(A+\" Clearing graph and plotting again.\"),Qo.cleanPlot([],{},e._fullData,u),Qo.supplyDefaults(e),u=e._fullLayout,Qo.doCalcdata(e),v++,_()}}return u.modebar.orientation===\"h\"?u._modebardiv.style(\"height\",null).style(\"width\",\"100%\"):u._modebardiv.style(\"width\",null).style(\"height\",u.height+\"px\"),Qo.previousPromises(e)}function b(){if(Qo.clearAutoMarginIds(e),Au.drawMarginPushers(e),Vv.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&Qo.allowAutoMargin(e,\"title.automargin\"),u._has(\"pie\"))for(var C=e._fullData,M=0;M<C.length;M++){var g=C[M];g.type===\"pie\"&&g.automargin&&Qo.allowAutoMargin(e,\"pie.\"+g.uid+\".automargin\")}return Qo.doAutoMargin(e),Qo.previousPromises(e)}function p(){if(Qo.didMarginChange(d,u._size))return Sa.syncOrAsync([b,Au.layoutStyles],e)}function k(){if(!f){E();return}return Sa.syncOrAsync([P0.getComponentMethod(\"shapes\",\"calcAutorange\"),P0.getComponentMethod(\"annotations\",\"calcAutorange\"),E],e)}function E(){e._transitioning||(Au.doAutoRangeAndConstraints(e),l&&Vv.saveRangeInitial(e),P0.getComponentMethod(\"rangeslider\",\"calcAutorange\")(e))}function T(){return Vv.draw(e,l?\"\":\"redraw\")}var L=[Qo.previousPromises,s,_,b,p];c&&L.push(k),L.push(Au.layoutStyles),c&&L.push(T,function(M){var g=M._fullLayout._insideTickLabelsUpdaterange;if(g)return M._fullLayout._insideTickLabelsUpdaterange=void 0,$M(M,g).then(function(){Vv.saveRangeInitial(M,!0)})}),L.push(Au.drawData,Au.finalDraw,Odt,Qo.addLinks,Qo.rehover,Qo.redrag,Qo.reselect,Qo.doAutoMargin,Qo.previousPromises);var x=Sa.syncOrAsync(L,e);return(!x||!x.then)&&(x=Promise.resolve()),x.then(function(){return QM(e),e})}function QM(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit(\"plotly_afterplot\")}function Vdt(e){return Sa.extendFlat(Whe,e)}function Xhe(e,t){try{e._fullLayout._paper.style(\"background\",t)}catch(r){Sa.error(r)}}function Gdt(e,t){var r=zdt.combine(t,\"white\");Xhe(e,r)}function Zhe(e,t){if(!e._context){e._context=Sa.extendDeep({},Whe);var r=BP.select(\"base\");e._context._baseUrl=r.size()&&r.attr(\"href\")?window.location.href.split(\"#\")[0]:\"\"}var n=e._context,i,a,o;if(t){for(a=Object.keys(t),i=0;i<a.length;i++)o=a[i],!(o===\"editable\"||o===\"edits\")&&o in n&&(o===\"setBackground\"&&t[o]===\"opaque\"?n[o]=Gdt:n[o]=t[o]);var s=t.editable;if(s!==void 0)for(n.editable=s,a=Object.keys(n.edits),i=0;i<a.length;i++)n.edits[a[i]]=s;if(t.edits)for(a=Object.keys(t.edits),i=0;i<a.length;i++)o=a[i],o in n.edits&&(n.edits[o]=t.edits[o]);n._exportedPlot=t._exportedPlot}n.staticPlot&&(n.editable=!1,n.edits={},n.autosizable=!1,n.scrollZoom=!1,n.doubleClick=!1,n.showTips=!1,n.showLink=!1,n.displayModeBar=!1),n.displayModeBar===\"hover\"&&!Rdt&&(n.displayModeBar=!0),(n.setBackground===\"transparent\"||typeof n.setBackground!=\"function\")&&(n.setBackground=Xhe),n._hasZeroHeight=n._hasZeroHeight||e.clientHeight===0,n._hasZeroWidth=n._hasZeroWidth||e.clientWidth===0;var l=n.scrollZoom,u=n._scrollZoom={};if(l===!0)u.cartesian=1,u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1;else if(typeof l==\"string\"){var c=l.split(\"+\");for(i=0;i<c.length;i++)u[c[i]]=1}else l!==!1&&(u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1)}function Hdt(e){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e);return gh.cleanData(e.data),gh.cleanLayout(e.layout),e.calcdata=void 0,_l._doPlot(e).then(function(){return e.emit(\"plotly_redraw\"),e})}function jdt(e,t,r,n){return e=Sa.getGraphDiv(e),Qo.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),Qo.purge(e),_l._doPlot(e,t,r,n)}function NP(e,t){var r=t+1,n=[],i,a;for(i=0;i<e.length;i++)a=e[i],a<0?n.push(r+a):n.push(a);return n}function UP(e,t,r){var n,i;for(n=0;n<t.length;n++){if(i=t[n],i!==parseInt(i,10))throw new Error(\"all values in \"+r+\" must be integers\");if(i>=e.data.length||i<-e.data.length)throw new Error(r+\" must be valid indices for gd.data.\");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error(\"each index in \"+r+\" must be unique.\")}}function Yhe(e,t,r){if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array.\");if(typeof t==\"undefined\")throw new Error(\"currentIndices is a required argument.\");if(Array.isArray(t)||(t=[t]),UP(e,t,\"currentIndices\"),typeof r!=\"undefined\"&&!Array.isArray(r)&&(r=[r]),typeof r!=\"undefined\"&&UP(e,r,\"newIndices\"),typeof r!=\"undefined\"&&t.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function Wdt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array.\");if(typeof t==\"undefined\")throw new Error(\"traces must be defined.\");for(Array.isArray(t)||(t=[t]),n=0;n<t.length;n++)if(i=t[n],typeof i!=\"object\"||Array.isArray(i)||i===null)throw new Error(\"all values in traces array must be non-array objects\");if(typeof r!=\"undefined\"&&!Array.isArray(r)&&(r=[r]),typeof r!=\"undefined\"&&r.length!==t.length)throw new Error(\"if indices is specified, traces.length must equal indices.length\")}function Xdt(e,t,r,n){var i=Sa.isPlainObject(n);if(!Array.isArray(e.data))throw new Error(\"gd.data must be an array\");if(!Sa.isPlainObject(t))throw new Error(\"update must be a key:value object\");if(typeof r==\"undefined\")throw new Error(\"indices must be an integer or array of integers\");UP(e,r,\"indices\");for(var a in t){if(!Array.isArray(t[a])||t[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==t[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object\")}}function Zdt(e,t,r,n){var i=Sa.isPlainObject(n),a=[],o,s,l,u,c;Array.isArray(r)||(r=[r]),r=NP(r,e.data.length-1);for(var f in t)for(var h=0;h<r.length;h++){if(o=e.data[r[h]],l=Ec(o,f),s=l.get(),u=t[f][h],!Sa.isArrayOrTypedArray(u))throw new Error(\"attribute: \"+f+\" index: \"+h+\" must be an array\");if(!Sa.isArrayOrTypedArray(s))throw new Error(\"cannot extend missing or non-array attribute: \"+f);if(s.constructor!==u.constructor)throw new Error(\"cannot extend array with an array of a different type: \"+f);c=i?n[f][h]:n,Idt(c)||(c=-1),a.push({prop:l,target:s,insert:u,maxp:Math.floor(c)})}return a}function Khe(e,t,r,n,i){Xdt(e,t,r,n);for(var a=Zdt(e,t,r,n),o={},s={},l=0;l<a.length;l++){var u=a[l].prop,c=a[l].maxp,f=i(a[l].target,a[l].insert,c);u.set(f[0]),Array.isArray(o[u.astr])||(o[u.astr]=[]),o[u.astr].push(f[1]),Array.isArray(s[u.astr])||(s[u.astr]=[]),s[u.astr].push(a[l].target.length)}return{update:o,maxPoints:s}}function Jhe(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function $he(e,t,r,n){e=Sa.getGraphDiv(e);function i(l,u,c){var f,h;if(Sa.isTypedArray(l))if(c<0){var d=new l.constructor(0),v=Jhe(l,u);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var _=u.length-c;f.set(u.subarray(_)),h.set(l),h.set(u.subarray(0,_),l.length)}else{var b=c-u.length,p=l.length-b;f.set(l.subarray(p)),f.set(u,b),h.set(l.subarray(0,p))}else f=l.concat(u),h=c>=0&&c<f.length?f.splice(0,f.length-c):[];return[f,h]}var a=Khe(e,t,r,n,i),o=_l.redraw(e),s=[e,a.update,r,a.maxPoints];return op.add(e,_l.prependTraces,s,$he,arguments),o}function Qhe(e,t,r,n){e=Sa.getGraphDiv(e);function i(l,u,c){var f,h;if(Sa.isTypedArray(l))if(c<=0){var d=new l.constructor(0),v=Jhe(u,l);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var _=u.length-c;f.set(u.subarray(0,_)),h.set(u.subarray(_)),h.set(l,_)}else{var b=c-u.length;f.set(u),f.set(l.subarray(0,b),u.length),h.set(l.subarray(b))}else f=u.concat(l),h=c>=0&&c<f.length?f.splice(c,f.length):[];return[f,h]}var a=Khe(e,t,r,n,i),o=_l.redraw(e),s=[e,a.update,r,a.maxPoints];return op.add(e,_l.extendTraces,s,Qhe,arguments),o}function ede(e,t,r){e=Sa.getGraphDiv(e);var n=[],i=_l.deleteTraces,a=ede,o=[e,n],s=[e,t],l,u;for(Wdt(e,t,r),Array.isArray(t)||(t=[t]),t=t.map(function(c){return Sa.extendFlat({},c)}),gh.cleanData(t),l=0;l<t.length;l++)e.data.push(t[l]);for(l=0;l<t.length;l++)n.push(-t.length+l);if(typeof r==\"undefined\")return u=_l.redraw(e),op.add(e,i,o,a,s),u;Array.isArray(r)||(r=[r]);try{Yhe(e,n,r)}catch(c){throw e.data.splice(e.data.length-t.length,t.length),c}return op.startSequence(e),op.add(e,i,o,a,s),u=_l.moveTraces(e,n,r),op.stopSequence(e),u}function tde(e,t){e=Sa.getGraphDiv(e);var r=[],n=_l.addTraces,i=tde,a=[e,r,t],o=[e,t],s,l;if(typeof t==\"undefined\")throw new Error(\"indices must be an integer or array of integers.\");for(Array.isArray(t)||(t=[t]),UP(e,t,\"indices\"),t=NP(t,e.data.length-1),t.sort(Sa.sorterDes),s=0;s<t.length;s+=1)l=e.data.splice(t[s],1)[0],r.push(l);var u=_l.redraw(e);return op.add(e,n,a,i,o),u}function eU(e,t,r){e=Sa.getGraphDiv(e);var n=[],i=[],a=eU,o=eU,s=[e,r,t],l=[e,t,r],u;if(Yhe(e,t,r),t=Array.isArray(t)?t:[t],typeof r==\"undefined\")for(r=[],u=0;u<t.length;u++)r.push(-t.length+u);for(r=Array.isArray(r)?r:[r],t=NP(t,e.data.length-1),r=NP(r,e.data.length-1),u=0;u<e.data.length;u++)t.indexOf(u)===-1&&n.push(e.data[u]);for(u=0;u<t.length;u++)i.push({newIndex:r[u],trace:e.data[t[u]]});for(i.sort(function(f,h){return f.newIndex-h.newIndex}),u=0;u<i.length;u+=1)n.splice(i[u].newIndex,0,i[u].trace);e.data=n;var c=_l.redraw(e);return op.add(e,a,s,o,l),c}function VP(e,t,r,n){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var i={};if(typeof t==\"string\")i[t]=r;else if(Sa.isPlainObject(t))i=Sa.extendFlat({},t),n===void 0&&(n=r);else return Sa.warn(\"Restyle fail.\",t,r,n),Promise.reject();Object.keys(i).length&&(e.changed=!0);var a=gh.coerceTraceIndices(e,n),o=rde(e,i,a),s=o.flags;s.calc&&(e.calcdata=void 0),s.clearAxisTypes&&gh.clearAxisTypes(e,a,{});var l=[];s.fullReplot?l.push(_l._doPlot):(l.push(Qo.previousPromises),Qo.supplyDefaults(e),s.markerSize&&(Qo.doCalcdata(e),XP(l)),s.style&&l.push(Au.doTraceStyle),s.colorbars&&l.push(Au.doColorBars),l.push(QM)),l.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,VP,[e,o.undoit,o.traces],VP,[e,o.redoit,o.traces]);var u=Sa.syncOrAsync(l,e);return(!u||!u.then)&&(u=Promise.resolve()),u.then(function(){return e.emit(\"plotly_restyle\",o.eventData),e})}function zy(e){return e===void 0?null:e}function qP(e,t){return t?function(r,n,i){var a=Ec(r,n),o=a.set;return a.set=function(s){var l=(i||\"\")+n;GP(l,a.get(),s,e),o(s)},a}:Ec}function GP(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var i=Array.isArray(t)?t:[],a=Array.isArray(r)?r:[],o=Math.max(i.length,a.length),s=0;s<o;s++)GP(e+\"[\"+s+\"]\",i[s],a[s],n);else if(Sa.isPlainObject(t)||Sa.isPlainObject(r)){var l=Sa.isPlainObject(t)?t:{},u=Sa.isPlainObject(r)?r:{},c=Sa.extendFlat({},l,u);for(var f in c)GP(e+\".\"+f,l[f],u[f],n)}else n[e]===void 0&&(n[e]=zy(t))}function Ydt(e,t,r){for(var n in r){var i=Ec(e,n);GP(n,i.get(),r[n],t)}}function rde(e,t,r){var n=e._fullLayout,i=e._fullData,a=e.data,o=n._guiEditing,s=qP(n._preGUI,o),l=Sa.extendDeepAll({},t),u,c=T_.traceFlags(),f={},h={},d;function v(){return r.map(function(){})}function _(me){var De=Vv.id2name(me);d.indexOf(De)===-1&&d.push(De)}function b(me){return\"LAYOUT\"+me+\".autorange\"}function p(me){return\"LAYOUT\"+me+\".range\"}function k(me){for(var De=me;De<i.length;De++)if(i[De]._input===a[me])return i[De]}function E(me,De,ce){if(Array.isArray(me)){me.forEach(function(Vt){E(Vt,De,ce)});return}if(!(me in t||gh.hasParent(t,me))){var je;if(me.slice(0,6)===\"LAYOUT\")je=s(e.layout,me.replace(\"LAYOUT\",\"\"));else{var lt=r[ce],pt=n._tracePreGUI[k(lt)._fullInput.uid];je=qP(pt,o)(a[lt],me)}me in h||(h[me]=v()),h[me][ce]===void 0&&(h[me][ce]=zy(je.get())),De!==void 0&&je.set(De)}}function T(me){return function(De){return i[De][me]}}function L(me){return function(De,ce){return De===!1?i[r[ce]][me]:null}}for(var x in t){if(gh.hasParent(t,x))throw new Error(\"cannot set \"+x+\" and a parent attribute simultaneously\");var C=t[x],M,g,P,A,z,O;if((x===\"autobinx\"||x===\"autobiny\")&&(x=x.charAt(x.length-1)+\"bins\",Array.isArray(C)?C=C.map(L(x)):C===!1?C=r.map(T(x)):C=null),f[x]=C,x.slice(0,6)===\"LAYOUT\"){P=s(e.layout,x.replace(\"LAYOUT\",\"\")),h[x]=[zy(P.get())],P.set(Array.isArray(C)?C[0]:C),c.calc=!0;continue}for(h[x]=v(),u=0;u<r.length;u++){M=a[r[u]],g=k(r[u]);var U=n._tracePreGUI[g._fullInput.uid];if(P=qP(U,o)(M,x),A=P.get(),z=Array.isArray(C)?C[u%C.length]:C,z!==void 0){var G=P.parts[P.parts.length-1],Z=x.slice(0,x.length-G.length-1),j=Z?Z+\".\":\"\",N=Z?Ec(g,Z).get():g;if(O=WP.getTraceValObject(g,P.parts),O&&O.impliedEdits&&z!==null)for(var H in O.impliedEdits)E(Sa.relativeAttr(x,H),O.impliedEdits[H],u);else if((G===\"thicknessmode\"||G===\"lenmode\")&&A!==z&&(z===\"fraction\"||z===\"pixels\")&&N){var re=n._size,oe=N.orient,_e=oe===\"top\"||oe===\"bottom\";if(G===\"thicknessmode\"){var Ce=_e?re.h:re.w;E(j+\"thickness\",N.thickness*(z===\"fraction\"?1/Ce:Ce),u)}else{var Le=_e?re.w:re.h;E(j+\"len\",N.len*(z===\"fraction\"?1/Le:Le),u)}}else if(x===\"type\"&&(z===\"pie\"!=(A===\"pie\")||z===\"funnelarea\"!=(A===\"funnelarea\"))){var ge=\"x\",ie=\"y\";(z===\"bar\"||A===\"bar\")&&M.orientation===\"h\"&&(ge=\"y\",ie=\"x\"),Sa.swapAttrs(M,[\"?\",\"?src\"],\"labels\",ge),Sa.swapAttrs(M,[\"d?\",\"?0\"],\"label\",ge),Sa.swapAttrs(M,[\"?\",\"?src\"],\"values\",ie),A===\"pie\"||A===\"funnelarea\"?(Ec(M,\"marker.color\").set(Ec(M,\"marker.colors\").get()),n._pielayer.selectAll(\"g.trace\").remove()):P0.traceIs(M,\"cartesian\")&&Ec(M,\"marker.colors\").set(Ec(M,\"marker.color\").get())}h[x][u]=zy(A);var Se=[\"swapxy\",\"swapxyaxes\",\"orientation\",\"orientationaxes\"];if(Se.indexOf(x)!==-1){if(x===\"orientation\"){P.set(z);var Ee=M.x&&!M.y?\"h\":\"v\";if((P.get()||Ee)===g.orientation)continue}else x===\"orientationaxes\"&&(M.orientation={v:\"h\",h:\"v\"}[g.orientation]);gh.swapXYData(M),c.calc=c.clearAxisTypes=!0}else Qo.dataArrayContainers.indexOf(P.parts[0])!==-1?(gh.manageArrayContainers(P,z,h),c.calc=!0):(O?O.arrayOk&&!P0.traceIs(g,\"regl\")&&(Sa.isArrayOrTypedArray(z)||Sa.isArrayOrTypedArray(A))?c.calc=!0:T_.update(c,O):c.calc=!0,P.set(z))}}if([\"swapxyaxes\",\"orientationaxes\"].indexOf(x)!==-1&&Vv.swap(e,r),x===\"orientationaxes\"){var Ae=Ec(e.layout,\"hovermode\"),Be=Ae.get();Be===\"x\"?Ae.set(\"y\"):Be===\"y\"?Ae.set(\"x\"):Be===\"x unified\"?Ae.set(\"y unified\"):Be===\"y unified\"&&Ae.set(\"x unified\")}if([\"orientation\",\"type\"].indexOf(x)!==-1){for(d=[],u=0;u<r.length;u++){var Pe=a[r[u]];P0.traceIs(Pe,\"cartesian\")&&(_(Pe.xaxis||\"x\"),_(Pe.yaxis||\"y\"))}E(d.map(b),!0,0),E(d.map(p),[0,1],0)}}return(c.calc||c.plot)&&(c.fullReplot=!0),{flags:c,undoit:h,redoit:f,traces:r,eventData:Sa.extendDeepNoArrays([],[l,r])}}function $M(e,t,r){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var n={};if(typeof t==\"string\")n[t]=r;else if(Sa.isPlainObject(t))n=Sa.extendFlat({},t);else return Sa.warn(\"Relayout fail.\",t,r),Promise.reject();Object.keys(n).length&&(e.changed=!0);var i=ode(e,n),a=i.flags;a.calc&&(e.calcdata=void 0);var o=[Qo.previousPromises];a.layoutReplot?o.push(Au.layoutReplot):Object.keys(n).length&&(ide(e,a,i)||Qo.supplyDefaults(e),a.legend&&o.push(Au.doLegend),a.layoutstyle&&o.push(Au.layoutStyles),a.axrange&&XP(o,i.rangesAltered),a.ticks&&o.push(Au.doTicksRelayout),a.modebar&&o.push(Au.doModeBar),a.camera&&o.push(Au.doCamera),a.colorbars&&o.push(Au.doColorBars),o.push(QM)),o.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,$M,[e,i.undoit],$M,[e,i.redoit]);var s=Sa.syncOrAsync(o,e);return(!s||!s.then)&&(s=Promise.resolve(e)),s.then(function(){return e.emit(\"plotly_relayout\",i.eventData),e})}function ide(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var i in t)if(i!==\"axrange\"&&t[i])return!1;var a,o,s=function(d,v){return Sa.coerce(a,o,Fdt,d,v)},l={};for(var u in r.rangesAltered){var c=Vv.id2name(u);if(a=e.layout[c],o=n[c],Ddt(a,o,s,l),o._matchGroup){for(var f in o._matchGroup)if(f!==u){var h=n[Vv.id2name(f)];h.autorange=o.autorange,h.range=o.range.slice(),h._input.range=o.range.slice()}}}return!0}function XP(e,t){var r=t?function(n){var i=[],a=!0;for(var o in t){var s=Vv.getFromId(n,o);if(i.push(o),(s.ticklabelposition||\"\").indexOf(\"inside\")!==-1&&s._anchorAxis&&i.push(s._anchorAxis._id),s._matchGroup)for(var l in s._matchGroup)t[l]||i.push(l)}return Vv.draw(n,i,{skipTitle:a})}:function(n){return Vv.draw(n,\"redraw\")};e.push(Bdt,Au.doAutoRangeAndConstraints,r,Au.drawData,Au.finalDraw)}var nde=/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/,ade=/^[xyz]axis[0-9]*\\.autorange$/,Kdt=/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/;function ode(e,t){var r=e.layout,n=e._fullLayout,i=n._guiEditing,a=qP(n._preGUI,i),o=Object.keys(t),s=Vv.list(e),l=Sa.extendDeepAll({},t),u={},c,f,h;for(o=Object.keys(t),f=0;f<o.length;f++)if(o[f].indexOf(\"allaxes\")===0){for(h=0;h<s.length;h++){var d=s[h]._id.slice(1),v=d.indexOf(\"scene\")!==-1?d+\".\":\"\",_=o[f].replace(\"allaxes\",v+s[h]._name);t[_]||(t[_]=t[o[f]])}delete t[o[f]]}var b=T_.layoutFlags(),p={},k={};function E(pt,Vt){if(Array.isArray(pt)){pt.forEach(function(ut){E(ut,Vt)});return}if(!(pt in t||gh.hasParent(t,pt))){var ot=a(r,pt);pt in k||(k[pt]=zy(ot.get())),Vt!==void 0&&ot.set(Vt)}}var T={},L;function x(pt){var Vt=Vv.name2id(pt.split(\".\")[0]);return T[Vt]=1,Vt}for(var C in t){if(gh.hasParent(t,C))throw new Error(\"cannot set \"+C+\" and a parent attribute simultaneously\");for(var M=a(r,C),g=t[C],P=M.parts.length,A=P-1;A>0&&typeof M.parts[A]!=\"string\";)A--;var z=M.parts[A],O=M.parts[A-1]+\".\"+z,U=M.parts.slice(0,A).join(\".\"),G=Ec(e.layout,U).get(),Z=Ec(n,U).get(),j=M.get();if(g!==void 0){p[C]=g,k[C]=z===\"reverse\"?g:zy(j);var N=WP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)E(Sa.relativeAttr(C,H),N.impliedEdits[H]);if([\"width\",\"height\"].indexOf(C)!==-1)if(g){E(\"autosize\",null);var re=C===\"height\"?\"width\":\"height\";E(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C===\"autosize\")E(\"width\",g?null:n.width),E(\"height\",g?null:n.height);else if(O.match(nde))x(O),Ec(n,U+\"._inputRange\").set(null);else if(O.match(ade)){x(O),Ec(n,U+\"._inputRange\").set(null);var oe=Ec(n,U).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else O.match(Kdt)&&Ec(n,U+\"._inputDomain\").set(null);if(z===\"type\"){L=G;var _e=Z.type===\"linear\"&&g===\"log\",Ce=Z.type===\"log\"&&g===\"linear\";if(_e||Ce){if(!L||!L.range)E(U+\".autorange\",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Le=L.range[0],ge=L.range[1];_e?(Le<=0&&ge<=0&&E(U+\".autorange\",!0),Le<=0?Le=ge/1e6:ge<=0&&(ge=Le/1e6),E(U+\".range[0]\",Math.log(Le)/Math.LN10),E(U+\".range[1]\",Math.log(ge)/Math.LN10)):(E(U+\".range[0]\",Math.pow(10,Le)),E(U+\".range[1]\",Math.pow(10,ge)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[M.parts[0]]&&M.parts[1]===\"radialaxis\"&&delete n[M.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],P0.getComponentMethod(\"annotations\",\"convertCoords\")(e,Z,g,E),P0.getComponentMethod(\"images\",\"convertCoords\")(e,Z,g,E)}else E(U+\".autorange\",!0),E(U+\".range\",null);Ec(n,U+\"._inputRange\").set(null)}else if(z.match(Ndt)){var ie=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se===\"-\")&&(Se=\"linear\"),P0.getComponentMethod(\"annotations\",\"convertCoords\")(e,ie,Se,E),P0.getComponentMethod(\"images\",\"convertCoords\")(e,ie,Se,E)}var Ee=OP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var Ae=Ee.property,Be=N||{editType:\"calc\"};f!==\"\"&&Ae===\"\"&&(OP.isAddVal(g)?k[C]=null:OP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn(\"unrecognized full object value\",t)),T_.update(b,Be),u[c]||(u[c]={});var Pe=u[c][f];Pe||(Pe=u[c][f]={}),Pe[Ae]=g,delete t[C]}else z===\"reverse\"?(G.range?G.range.reverse():(E(U+\".autorange\",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C===\"dragmode\"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has(\"scatter-like\")&&n._has(\"regl\")&&C===\"dragmode\"&&(g===\"lasso\"||g===\"select\")&&!(j===\"lasso\"||j===\"select\")?b.plot=!0:N?T_.update(b,N):b.calc=!0,M.set(g))}}for(c in u){var me=OP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var De in T){L=Vv.getFromId(e,De);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var je in ce)T[je]||(Vv.getFromId(e,je)._constraintShrinkable=!0)}}(sde(e)||t.height||t.width)&&(b.plot=!0);var lt=n.shapes;for(f=0;f<lt.length;f++)if(lt[f].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:T,undoit:k,redoit:p,eventData:l}}function sde(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&Qo.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function HP(e,t,r,n){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e),Sa.isPlainObject(t)||(t={}),Sa.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var i=gh.coerceTraceIndices(e,n),a=rde(e,Sa.extendFlat({},t),i),o=a.flags,s=ode(e,Sa.extendFlat({},r)),l=s.flags;(o.calc||l.calc)&&(e.calcdata=void 0),o.clearAxisTypes&&gh.clearAxisTypes(e,i,r);var u=[];l.layoutReplot?u.push(Au.layoutReplot):o.fullReplot?u.push(_l._doPlot):(u.push(Qo.previousPromises),ide(e,l,s)||Qo.supplyDefaults(e),o.style&&u.push(Au.doTraceStyle),(o.colorbars||l.colorbars)&&u.push(Au.doColorBars),l.legend&&u.push(Au.doLegend),l.layoutstyle&&u.push(Au.layoutStyles),l.axrange&&XP(u,s.rangesAltered),l.ticks&&u.push(Au.doTicksRelayout),l.modebar&&u.push(Au.doModeBar),l.camera&&u.push(Au.doCamera),u.push(QM)),u.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,HP,[e,a.undoit,s.undoit,a.traces],HP,[e,a.redoit,s.redoit,a.traces]);var c=Sa.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve(e)),c.then(function(){return e.emit(\"plotly_update\",{data:a.eventData,layout:s.eventData}),e})}function tU(e){return function(r){r._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return r._fullLayout._guiEditing=!1,n}}var Jdt=[{pattern:/^hiddenlabels/,attr:\"legend.uirevision\"},{pattern:/^((x|y)axis\\d*)\\.((auto)?range|title\\.text)/},{pattern:/axis\\d*\\.showspikes$/,attr:\"modebar.uirevision\"},{pattern:/(hover|drag)mode$/,attr:\"modebar.uirevision\"},{pattern:/^(scene\\d*)\\.camera/},{pattern:/^(geo\\d*)\\.(projection|center|fitbounds)/},{pattern:/^(ternary\\d*\\.[abc]axis)\\.(min|title\\.text)$/},{pattern:/^(polar\\d*\\.radialaxis)\\.((auto)?range|angle|title\\.text)/},{pattern:/^(polar\\d*\\.angularaxis)\\.rotation/},{pattern:/^(mapbox\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^(map\\d*)\\.(center|zoom|bearing|pitch)/},{pattern:/^legend\\.(x|y)$/,attr:\"editrevision\"},{pattern:/^(shapes|annotations)/,attr:\"editrevision\"},{pattern:/^title\\.text$/,attr:\"editrevision\"}],$dt=[{pattern:/^selectedpoints$/,attr:\"selectionrevision\"},{pattern:/(^|value\\.)visible$/,attr:\"legend.uirevision\"},{pattern:/^dimensions\\[\\d+\\]\\.constraintrange/},{pattern:/^node\\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\\.)name$/},{pattern:/colorbar\\.title\\.text$/},{pattern:/colorbar\\.(x|y)$/,attr:\"editrevision\"}];function Ghe(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=e.match(n.pattern);if(i){var a=i[1]||\"\";return{head:a,tail:e.slice(a.length+1),attr:n.attr}}}}function Hhe(e,t){var r=Ec(t,e).get();if(r!==void 0)return r;var n=e.split(\".\");for(n.pop();n.length>1;)if(n.pop(),r=Ec(t,n.join(\".\")+\".uirevision\").get(),r!==void 0)return r;return t.uirevision}function Qdt(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function evt(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function jhe(e,t){var r=Sa.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&Sa.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function tvt(e,t,r,n){var i=n._preGUI,a,o,s,l,u,c,f,h,d,v,_=[],b={},p={};for(a in i){if(u=Ghe(a,Jdt),u){if(d=u.head,v=u.tail,o=u.attr||d+\".uirevision\",s=Ec(n,o).get(),l=s&&Hhe(o,t),l&&l===s){if(c=i[a],c===null&&(c=void 0),f=Ec(t,a),h=f.get(),jhe(h,c)){h===void 0&&v===\"autorange\"&&_.push(d),f.set(zy(Ec(n,a).get()));continue}else if(v===\"autorange\"||v.slice(0,6)===\"range[\"){var k=i[d+\".range[0]\"],E=i[d+\".range[1]\"],T=i[d+\".autorange\"];if(T||T===null&&k===null&&E===null){if(!(d in b)){var L=Ec(t,d).get();b[d]=L&&(L.autorange||L.autorange!==!1&&(!L.range||L.range.length!==2))}if(b[d]){f.set(zy(Ec(n,a).get()));continue}}}}}else Sa.warn(\"unrecognized GUI edit: \"+a);delete i[a],u&&u.tail.slice(0,6)===\"range[\"&&(p[u.head]=1)}for(var x=0;x<_.length;x++){var C=_[x];if(p[C]){var M=Ec(t,C).get();M&&delete M.autorange}}var g=n._tracePreGUI;for(var P in g){var A=g[P],z=null,O;for(a in A){if(!z){var U=Qdt(P,r);if(U<0){delete g[P];break}var G=r[U];O=G._fullInput;var Z=evt(P,e,O.index);if(Z<0){delete g[P];break}z=e[Z]}if(u=Ghe(a,$dt),u){if(u.attr?(s=Ec(n,u.attr).get(),l=s&&Hhe(u.attr,t)):(s=O.uirevision,l=z.uirevision,l===void 0&&(l=t.uirevision)),l&&l===s&&(c=A[a],c===null&&(c=void 0),f=Ec(z,a),h=f.get(),jhe(h,c))){f.set(zy(Ec(O,a).get()));continue}}else Sa.warn(\"unrecognized GUI edit: \"+a+\" in trace uid \"+P);delete A[a]}}}function rvt(e,t,r,n){var i,a;function o(){return _l.addFrames(e,i)}e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var s=e._fullData,l=e._fullLayout;if(!Sa.isPlotDiv(e)||!s||!l)a=_l.newPlot(e,t,r,n);else{if(Sa.isPlainObject(t)){var u=t;t=u.data,r=u.layout,n=u.config,i=u.frames}var c=!1;if(n){let O=Sa.extendDeepAll({},e._context);e._context=void 0,Zhe(e,n),c=!gh.collectionsAreEqual(O,e._context)}if(c){let O=e._ev.eventNames().map(U=>[U,e._ev.listeners(U)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[U,G]of O)G.forEach(Z=>e.on(U,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],gh.cleanData(e.data),e.layout=r||{},gh.cleanLayout(e.layout),tvt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,_=nvt(e,l,h,d,v),b=_.newDataRevision,p=ivt(e,s,f,d,v,b);if(sde(e)&&(_.layoutReplot=!0),p.calc||_.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),E=0;E<k.length;E++){var T=k[E],L=T.substring(0,5);if(L===\"xaxis\"||L===\"yaxis\"){var x=h[T]._emptyCategories;x&&x()}}}else Qo.supplyDefaultsUpdateCalc(e.calcdata,f);var C=[];if(i&&(e._transitionData={},Qo.createTransitionData(e),C.push(o)),h.transition&&(p.anim||_.anim))_.ticks&&C.push(Au.doTicksRelayout),Qo.doCalcdata(e),Au.doAutoRangeAndConstraints(e),C.push(function(){return Qo.transitionFromReact(e,p,_,l)});else if(p.fullReplot||_.layoutReplot)e._fullLayout._skipDefaults=!0,C.push(_l._doPlot);else{for(var M in _.arrays){var g=_.arrays[M];if(g.length){var P=P0.getComponentMethod(M,\"drawOne\");if(P!==Sa.noop)for(var A=0;A<g.length;A++)P(e,g[A]);else{var z=P0.getComponentMethod(M,\"draw\");if(z===Sa.noop)throw new Error(\"cannot draw components: \"+M);z(e)}}}C.push(Qo.previousPromises),p.style&&C.push(Au.doTraceStyle),(p.colorbars||_.colorbars)&&C.push(Au.doColorBars),_.legend&&C.push(Au.doLegend),_.layoutstyle&&C.push(Au.layoutStyles),_.axrange&&XP(C),_.ticks&&C.push(Au.doTicksRelayout),_.modebar&&C.push(Au.doModeBar),_.camera&&C.push(Au.doCamera),C.push(QM)}C.push(Qo.rehover,Qo.redrag,Qo.reselect),a=Sa.syncOrAsync(C,e),(!a||!a.then)&&(a=Promise.resolve(e))}}return a.then(()=>(c||e.emit(\"plotly_react\",{config:n,data:t,layout:r}),e))}function ivt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=WP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l<t.length;l++)if(r[l]){if(u=r[l]._fullInput,h[u.uid])continue;h[u.uid]=1,jP(t[l]._fullInput,u,[],f)}return(s.calc||s.plot)&&(s.fullReplot=!0),i&&s.nChanges&&s.nChangesAnim&&(s.anim=s.nChanges===s.nChangesAnim&&o?\"all\":\"some\"),s}function nvt(e,t,r,n,i){var a=T_.layoutFlags();a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0;function o(h){return WP.getLayoutValObject(r,h)}for(var s in r)if(!(!s.startsWith(\"xaxis\")&&!s.startsWith(\"yaxis\"))&&t[s]){var l=r[s].domain,u=t[s].domain,c=t[s]._inputDomain;t[s]._inputDomain&&(l[0]===c[0]&&l[1]===c[1]?r[s].domain=t[s].domain:(l[0]!==u[0]||l[1]!==u[1])&&(r[s]._inputDomain=null))}var f={getValObject:o,flags:a,immutable:n,transition:i,gd:e};return jP(t,r,[],f),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?\"all\":\"some\"),a}function jP(e,t,r,n){var i,a,o,s=n.getValObject,l=n.flags,u=n.immutable,c=n.inArray,f=n.arrayIndex;function h(){var U=i.editType;if(c&&U.indexOf(\"arraydraw\")!==-1){Sa.pushUnique(l.arrays[c],f);return}T_.update(l,i),U!==\"none\"&&l.nChanges++,n.transition&&i.anim&&l.nChangesAnim++,(nde.test(o)||ade.test(o))&&(l.rangesAltered[r[0]]=1),a===\"datarevision\"&&(l.newDataRevision=1)}function d(U){return U.valType===\"data_array\"||U.arrayOk}for(a in e){if(l.calc&&!n.transition)return;var v=e[a],_=t[a],b=r.concat(a);if(o=b.join(\".\"),!(a.charAt(0)===\"_\"||typeof v==\"function\"||v===_)){if((a===\"tick0\"||a===\"dtick\")&&r[0]!==\"geo\"){var p=t.tickmode;if(p===\"auto\"||p===\"array\"||!p)continue}if(!(a===\"range\"&&t.autorange)&&!((a===\"zmin\"||a===\"zmax\")&&t.type===\"contourcarpet\")&&(i=s(b),!!i&&!(i._compareAsJSON&&JSON.stringify(v)===JSON.stringify(_)))){var k=i.valType,E,T=d(i),L=Array.isArray(v),x=Array.isArray(_);if(L&&x){var C=\"_input_\"+a,M=e[C],g=t[C];if(Array.isArray(M)&&M===g)continue}if(_===void 0)T&&L?l.calc=!0:h();else if(i._isLinkedToArray){var P=[],A=!1;c||(l.arrays[a]=P);var z=Math.min(v.length,_.length),O=Math.max(v.length,_.length);if(z!==O)if(i.editType===\"arraydraw\")A=!0;else{h();continue}for(E=0;E<z;E++)jP(v[E],_[E],b.concat(E),Sa.extendFlat({inArray:a,arrayIndex:E},n));if(A)for(E=z;E<O;E++)P.push(E)}else!k&&Sa.isPlainObject(v)?jP(v,_,b,n):T?L&&x?(u&&(l.calc=!0),(u||n.newDataRevision)&&h()):L!==x?l.calc=!0:h():L&&x?(v.length!==_.length||String(v)!==String(_))&&h():h()}}}for(a in t)if(!(a in e||a.charAt(0)===\"_\"||typeof t[a]==\"function\"))if(i=s(r.concat(a)),d(i)&&Array.isArray(t[a])){l.calc=!0;return}else h()}function avt(e,t,r){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e+\". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/\");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]),r=Qo.supplyAnimationDefaults(r);var i=r.transition,a=r.frame;n._frameWaitingCnt===void 0&&(n._frameWaitingCnt=0);function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit(\"plotly_animationinterrupted\",[])}}function h(z){if(z.length!==0){for(var O=0;O<z.length;O++){var U;z[O].type===\"byname\"?U=Qo.computeFrame(e,z[O].name):U=z[O].data;var G=s(O),Z=o(O);Z.duration=Math.min(Z.duration,G.duration);var j={frame:U,name:z[O].name,frameOpts:G,transitionOpts:Z};O===z.length-1&&(j.onComplete=l(u,2),j.onInterrupt=c),n._frameQueue.push(j)}r.mode===\"immediate\"&&(n._lastFrameAt=-1/0),n._animationRaf||_()}}function d(){e.emit(\"plotly_animated\"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function v(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var z=n._currentFrame=n._frameQueue.shift();if(z){var O=z.name?z.name.toString():null;e._fullLayout._currentFrame=O,n._lastFrameAt=Date.now(),n._timeToNext=z.frameOpts.duration,Qo.transition(e,z.frame.data,z.frame.layout,gh.coerceTraceIndices(e,z.frame.traces),z.frameOpts,z.transitionOpts).then(function(){z.onComplete&&z.onComplete()}),e.emit(\"plotly_animatingframe\",{name:O,frame:z.frame,animation:{frame:z.frameOpts,transition:z.transitionOpts}})}else d()}function _(){e.emit(\"plotly_animating\"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var z=function(){n._animationRaf=window.requestAnimationFrame(z),Date.now()-n._lastFrameAt>n._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,E,T=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)T.push({type:\"object\",data:p(Sa.extendFlat({},t))});else if(L||[\"string\",\"number\"].indexOf(typeof t)!==-1)for(k=0;k<n._frames.length;k++)E=n._frames[k],E&&(L||String(E.group)===String(t))&&T.push({type:\"byname\",name:String(E.name),data:p({name:E.name})});else if(x)for(k=0;k<t.length;k++){var M=t[k];[\"number\",\"string\"].indexOf(typeof M)!==-1?(M=String(M),T.push({type:\"byname\",name:M,data:p({name:M})})):Sa.isPlainObject(M)&&T.push({type:\"object\",data:p(Sa.extendFlat({},M))})}for(k=0;k<T.length;k++)if(E=T[k],E.type===\"byname\"&&!n._frameHash[E.data.name]){Sa.warn('animate failure: frame not found: \"'+E.data.name+'\"'),c();return}[\"next\",\"immediate\"].indexOf(r.mode)!==-1&&f(),r.direction===\"reverse\"&&T.reverse();var g=e._fullLayout._currentFrame;if(g&&r.fromcurrent){var P=-1;for(k=0;k<T.length;k++)if(E=T[k],E.type===\"byname\"&&E.name===g){P=k;break}if(P>0&&P<T.length-1){var A=[];for(k=0;k<T.length;k++)E=T[k],(T[k].type!==\"byname\"||k>P)&&A.push(E);T=A}}T.length>0?h(T):(e.emit(\"plotly_animated\"),u())})}function ovt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e+\". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/\");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error(\"addFrames failure: frameList must be an Array of frame definitions\"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,_=l[d]||f[d];d&&v&&typeof v==\"number\"&&_&&$N<Vhe&&($N++,Sa.warn('addFrames: overwriting frame \"'+(l[d]||f[d]).name+'\" with a frame whose name of type \"number\" also equates to \"'+d+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),$N===Vhe&&Sa.warn(\"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.\")),f[h]={name:h},c.push({frame:Qo.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(C,M){return C.index>M.index?-1:C.index<M.index?1:0});var b=[],p=[],k=s.length;for(n=c.length-1;n>=0;n--){if(i=c[n].frame,typeof i.name==\"number\"&&Sa.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!i.name)for(;l[i.name=\"frame \"+e._transitionData._counter++];);if(l[i.name]){for(a=0;a<s.length&&(s[a]||{}).name!==i.name;a++);b.push({type:\"replace\",index:a,value:i}),p.unshift({type:\"replace\",index:a,value:s[a]})}else o=Math.max(0,Math.min(c[n].index,k)),b.push({type:\"insert\",index:o,value:i}),p.unshift({type:\"delete\",index:o}),k++}var E=Qo.modifyFrames,T=Qo.modifyFrames,L=[e,p],x=[e,b];return op&&op.add(e,E,L,T,x),Qo.modifyFrames(e,b)}function svt(e,t){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error(\"This element is not a Plotly plot: \"+e);var r,n,i=e._transitionData._frames,a=[],o=[];if(!t)for(t=[],r=0;r<i.length;r++)t.push(r);for(t=t.slice(),t.sort(),r=t.length-1;r>=0;r--)n=t[r],a.push({type:\"delete\",index:n}),o.unshift({type:\"insert\",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return op&&op.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function lvt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),QN.purge(e),t._container&&t._container.remove(),delete e._context,e}function uvt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function cvt(e){var t=BP.select(e),r=e._fullLayout;if(r._calcInverseTransform=uvt,r._calcInverseTransform(e),r._container=t.selectAll(\".plot-container\").data([0]),r._container.enter().insert(\"div\",\":first-child\").classed(\"plot-container\",!0).classed(\"plotly\",!0).style({width:\"100%\",height:\"100%\"}),r._paperdiv=r._container.selectAll(\".svg-container\").data([0]),r._paperdiv.enter().append(\"div\").classed(\"user-select-none\",!0).classed(\"svg-container\",!0).style(\"position\",\"relative\"),r._glcontainer=r._paperdiv.selectAll(\".gl-container\").data([{}]),r._glcontainer.enter().append(\"div\").classed(\"gl-container\",!0),r._paperdiv.selectAll(\".main-svg\").remove(),r._paperdiv.select(\".modebar-container\").remove(),r._paper=r._paperdiv.insert(\"svg\",\":first-child\").classed(\"main-svg\",!0),r._toppaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),r._modebardiv=r._paperdiv.append(\"div\"),delete r._modeBar,r._hoverpaper=r._paperdiv.append(\"svg\").classed(\"main-svg\",!0),!r._uid){var n={};BP.selectAll(\"defs\").each(function(){this.id&&(n[this.id.split(\"-\")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(\".main-svg\").attr(qdt.svgAttrs),r._defs=r._paper.append(\"defs\").attr(\"id\",\"defs-\"+r._uid),r._clips=r._defs.append(\"g\").classed(\"clips\",!0),r._topdefs=r._toppaper.append(\"defs\").attr(\"id\",\"topdefs-\"+r._uid),r._topclips=r._topdefs.append(\"g\").classed(\"clips\",!0),r._bgLayer=r._paper.append(\"g\").classed(\"bglayer\",!0),r._draggers=r._paper.append(\"g\").classed(\"draglayer\",!0);var i=r._paper.append(\"g\").classed(\"layer-below\",!0);r._imageLowerLayer=i.append(\"g\").classed(\"imagelayer\",!0),r._shapeLowerLayer=i.append(\"g\").classed(\"shapelayer\",!0),r._cartesianlayer=r._paper.append(\"g\").classed(\"cartesianlayer\",!0),r._polarlayer=r._paper.append(\"g\").classed(\"polarlayer\",!0),r._smithlayer=r._paper.append(\"g\").classed(\"smithlayer\",!0),r._ternarylayer=r._paper.append(\"g\").classed(\"ternarylayer\",!0),r._geolayer=r._paper.append(\"g\").classed(\"geolayer\",!0),r._funnelarealayer=r._paper.append(\"g\").classed(\"funnelarealayer\",!0),r._pielayer=r._paper.append(\"g\").classed(\"pielayer\",!0),r._iciclelayer=r._paper.append(\"g\").classed(\"iciclelayer\",!0),r._treemaplayer=r._paper.append(\"g\").classed(\"treemaplayer\",!0),r._sunburstlayer=r._paper.append(\"g\").classed(\"sunburstlayer\",!0),r._indicatorlayer=r._toppaper.append(\"g\").classed(\"indicatorlayer\",!0),r._glimages=r._paper.append(\"g\").classed(\"glimages\",!0);var a=r._toppaper.append(\"g\").classed(\"layer-above\",!0);r._imageUpperLayer=a.append(\"g\").classed(\"imagelayer\",!0),r._shapeUpperLayer=a.append(\"g\").classed(\"shapelayer\",!0),r._selectionLayer=r._toppaper.append(\"g\").classed(\"selectionlayer\",!0),r._infolayer=r._toppaper.append(\"g\").classed(\"infolayer\",!0),r._menulayer=r._toppaper.append(\"g\").classed(\"menulayer\",!0),r._zoomlayer=r._toppaper.append(\"g\").classed(\"zoomlayer\",!0),r._hoverlayer=r._hoverpaper.append(\"g\").classed(\"hoverlayer\",!0),r._modebardiv.classed(\"modebar-container\",!0).style(\"position\",\"absolute\").style(\"top\",\"0px\").style(\"right\",\"0px\"),e.emit(\"plotly_framework\")}_l.animate=avt;_l.addFrames=ovt;_l.deleteFrames=svt;_l.addTraces=ede;_l.deleteTraces=tde;_l.extendTraces=$he;_l.moveTraces=eU;_l.prependTraces=Qhe;_l.newPlot=jdt;_l._doPlot=Udt;_l.purge=lvt;_l.react=rvt;_l.redraw=Hdt;_l.relayout=$M;_l.restyle=VP;_l.setPlotConfig=Vdt;_l.update=HP;_l._guiRelayout=tU($M);_l._guiRestyle=tU(VP);_l._guiUpdate=tU(HP);_l._storeDirectGUIEdit=Ydt});var Oy=ye(Pm=>{\"use strict\";var fvt=qa();Pm.getDelay=function(e){return e._has&&(e._has(\"gl3d\")||e._has(\"mapbox\")||e._has(\"map\"))?500:0};Pm.getRedrawFunc=function(e){return function(){fvt.getComponentMethod(\"colorbar\",\"draw\")(e)}};Pm.encodeSVG=function(e){return\"data:image/svg+xml,\"+encodeURIComponent(e)};Pm.encodeJSON=function(e){return\"data:application/json,\"+encodeURIComponent(e)};var lde=window.URL||window.webkitURL;Pm.createObjectURL=function(e){return lde.createObjectURL(e)};Pm.revokeObjectURL=function(e){return lde.revokeObjectURL(e)};Pm.createBlob=function(e,t){if(t===\"svg\")return new window.Blob([e],{type:\"image/svg+xml;charset=utf-8\"});if(t===\"full-json\")return new window.Blob([e],{type:\"application/json;charset=utf-8\"});var r=hvt(window.atob(e));return new window.Blob([r],{type:\"image/\"+t})};Pm.octetStream=function(e){document.location.href=\"data:application/octet-stream\"+e};function hvt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}Pm.IMAGE_URL_PREFIX=/^data:image\\/\\w+;base64,/});var YP=ye((Uor,ude)=>{\"use strict\";var iU=Oa(),Bor=Dr(),dvt=So(),vvt=ka(),Nor=Wp(),rU=/\"/g,e4=\"TOBESTRIPPED\",pvt=new RegExp('(\"'+e4+\")|(\"+e4+'\")',\"g\");function gvt(e){var t=iU.select(\"body\").append(\"div\").style({display:\"none\"}).html(\"\"),r=e.replace(/(&[^;]*;)/gi,function(n){return n===\"&lt;\"?\"&#60;\":n===\"&rt;\"?\"&#62;\":n.indexOf(\"<\")!==-1||n.indexOf(\">\")!==-1?\"\":t.html(n).text()});return t.remove(),r}function mvt(e){return e.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&amp;\")}ude.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert(\"rect\",\":first-child\").call(dvt.setRect,0,0,s,l).call(vvt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u<c.length;u++){var f=c[u];f.toSVG&&f.toSVG(t)}if(o){var h=o.node().childNodes,d=Array.prototype.slice.call(h);for(u=0;u<d.length;u++){var v=d[u];v.childNodes.length&&a.node().appendChild(v)}}i._draggers&&i._draggers.remove(),a.node().style.background=\"\",a.selectAll(\"text\").attr({\"data-unformatted\":null,\"data-math\":null}).each(function(){var b=iU.select(this);if(this.style.visibility===\"hidden\"||this.style.display===\"none\"){b.remove();return}else b.style({visibility:null,display:null});var p=this.style.fontFamily;p&&p.indexOf('\"')!==-1&&b.style(\"font-family\",p.replace(rU,e4));var k=this.style.fontWeight;k&&(k===\"normal\"||k===\"400\")&&b.style(\"font-weight\",void 0);var E=this.style.fontStyle;E&&E===\"normal\"&&b.style(\"font-style\",void 0);var T=this.style.fontVariant;T&&T===\"normal\"&&b.style(\"font-variant\",void 0)}),a.selectAll(\".gradient_filled,.pattern_filled\").each(function(){var b=iU.select(this),p=this.style.fill;p&&p.indexOf(\"url(\")!==-1&&b.style(\"fill\",p.replace(rU,e4));var k=this.style.stroke;k&&k.indexOf(\"url(\")!==-1&&b.style(\"stroke\",k.replace(rU,e4))}),(r===\"pdf\"||r===\"eps\")&&a.selectAll(\"#MathJax_SVG_glyphs path\").attr(\"stroke-width\",0),r===\"svg\"&&n&&(a.attr(\"width\",n*s),a.attr(\"height\",n*l),a.attr(\"viewBox\",\"0 0 \"+s+\" \"+l));var _=new window.XMLSerializer().serializeToString(a.node());return _=gvt(_),_=mvt(_),_=_.replace(pvt,\"'\"),_}});var KP=ye((Vor,cde)=>{\"use strict\";var yvt=Dr(),_vt=Ab().EventEmitter,t4=Oy();function xvt(e){var t=e.emitter||new _vt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||\"png\",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext(\"2d\",{willReadFrequently:!0}),_=new a,b,p;s===\"svg\"||yvt.isSafari()?p=t4.encodeSVG(o):(b=t4.createBlob(o,\"svg\"),p=t4.createObjectURL(b)),l.width=h,l.height=d,_.onload=function(){var k;switch(b=null,t4.revokeObjectURL(p),s!==\"svg\"&&v.drawImage(_,0,0,h,d),s){case\"jpeg\":k=l.toDataURL(\"image/jpeg\");break;case\"png\":k=l.toDataURL(\"image/png\");break;case\"webp\":k=l.toDataURL(\"image/webp\");break;case\"svg\":k=p;break;default:var E=\"Image format is not jpeg, png, svg or webp.\";if(i(new Error(E)),!e.promise)return t.emit(\"error\",E)}n(k),e.promise||t.emit(\"success\",k)},_.onerror=function(k){if(b=null,t4.revokeObjectURL(p),i(k),!e.promise)return t.emit(\"error\",k)},_.src=p});return e.promise?r:t}cde.exports=xvt});var aU=ye((Gor,dde)=>{\"use strict\";var fde=Eo(),hde=ZP(),bvt=Mc(),Im=Dr(),r4=Oy(),wvt=YP(),Tvt=KP(),Avt=g6().version,nU={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\",\"full-json\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}};function Svt(e,t){t=t||{};var r,n,i,a;Im.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Im.getGraphDiv(e),r=Im.extendDeep([],e.data),n=Im.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Im.validate(t[x],nU[x])}if(!o(\"width\")&&t.width!==null||!o(\"height\")&&t.height!==null)throw new Error(\"Height and width should be pixel values.\");if(!o(\"format\"))throw new Error(\"Export format is not \"+Im.join2(nU.format.values,\", \",\" or \")+\".\");var s={};function l(x,C){return Im.coerce(t,s,nU,x,C)}var u=l(\"format\"),c=l(\"width\"),f=l(\"height\"),h=l(\"scale\"),d=l(\"setBackground\"),v=l(\"imageDataOnly\"),_=document.createElement(\"div\");_.style.position=\"absolute\",_.style.left=\"-5000px\",document.body.appendChild(_);var b=Im.extendFlat({},n);c?b.width=c:t.width===null&&fde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&fde(a.height)&&(b.height=a.height);var p=Im.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=r4.getRedrawFunc(_);function E(){return new Promise(function(x){setTimeout(x,r4.getDelay(_._fullLayout))})}function T(){return new Promise(function(x,C){var M=wvt(_,u,h),g=_._fullLayout.width,P=_._fullLayout.height;function A(){hde.purge(_),document.body.removeChild(_)}if(u===\"full-json\"){var z=bvt.graphJson(_,!1,\"keepdata\",\"object\",!0,!0);return z.version=Avt,z=JSON.stringify(z),A(),x(v?z:r4.encodeJSON(z))}if(A(),u===\"svg\")return x(v?M:r4.encodeSVG(M));var O=document.createElement(\"canvas\");O.id=Im.randstr(),Tvt({format:u,width:g,height:P,scale:h,canvas:O,svg:M,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(r4.IMAGE_URL_PREFIX,\"\"):x}return new Promise(function(x,C){hde.newPlot(_,r,b,p).then(k).then(E).then(T).then(function(M){x(L(M))}).catch(function(M){C(M)})})}dde.exports=Svt});var gde=ye((Hor,pde)=>{\"use strict\";var I0=Dr(),Mvt=Mc(),Evt=P3(),kvt=_b().dfltConfig,Rg=I0.isPlainObject,Qb=Array.isArray,oU=I0.isArrayOrTypedArray;pde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Evt.get(),i=[],a={_context:I0.extendFlat({},kvt)},o,s;Qb(t)?(a.data=I0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md(\"array\",\"data\"))),Rg(r)?(a.layout=I0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md(\"object\",\"layout\"))),Mvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;c<u;c++){var f=o[c],h=[\"data\",c];if(!Rg(f)){i.push(md(\"object\",h));continue}var d=l[c],v=d.type,_=n.traces[v].attributes;_.type={valType:\"enumerated\",values:[v]},d.visible===!1&&f.visible!==!1&&i.push(md(\"invisible\",h)),JP(f,d,_,i,h)}var b=a._fullLayout,p=Cvt(n,l);return JP(s,b,p,i,\"layout\"),i.length===0?void 0:i};function JP(e,t,r,n,i,a){a=a||[];for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s],u=a.slice();u.push(l);var c=e[l],f=t[l],h=Ivt(r,l),d=(h||{}).valType,v=d===\"info_array\",_=d===\"colorscale\",b=(h||{}).items;if(!Pvt(r,l))n.push(md(\"schema\",i,u));else if(Rg(c)&&Rg(f)&&d!==\"any\")JP(c,f,h,n,i,u);else if(v&&Qb(c)){c.length>f.length&&n.push(md(\"unused\",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var E,T,L,x,C;if(h.dimensions===2)for(T=0;T<p;T++)if(Qb(c[T])){c[T].length>f[T].length&&n.push(md(\"unused\",i,u.concat(T,f[T].length)));var M=f[T].length;for(E=0;E<(k?Math.min(M,b[T].length):M);E++)L=k?b[T][E]:b,x=c[T][E],C=f[T][E],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md(\"dynamic\",i,u.concat(T,E),x,C)):n.push(md(\"value\",i,u.concat(T,E),x))}else n.push(md(\"array\",i,u.concat(T),c[T]));else for(T=0;T<p;T++)L=k?b[T]:b,x=c[T],C=f[T],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md(\"dynamic\",i,u.concat(T),x,C)):n.push(md(\"value\",i,u.concat(T),x))}else if(h.items&&!v&&Qb(c)){var g=b[Object.keys(b)[0]],P=[],A,z;for(A=0;A<f.length;A++){var O=f[A]._index||A;if(z=u.slice(),z.push(O),Rg(c[O])&&Rg(f[A])){P.push(O);var U=c[O],G=f[A];Rg(U)&&U.visible!==!1&&G.visible===!1?n.push(md(\"invisible\",i,z)):JP(U,G,g,n,i,z)}}for(A=0;A<c.length;A++)z=u.slice(),z.push(A),Rg(c[A])?P.indexOf(A)===-1&&n.push(md(\"unused\",i,z)):n.push(md(\"object\",i,z,c[A]))}else!Rg(c)&&Rg(f)?n.push(md(\"object\",i,u,c)):!oU(c)&&oU(f)&&!v&&!_?n.push(md(\"array\",i,u,c)):l in t?I0.validate(c,h)?h.valType===\"enumerated\"&&(h.coerceNumber&&c!==+f||!oU(c)&&c!==f||String(c)!==String(f))&&n.push(md(\"dynamic\",i,u,c,f)):n.push(md(\"value\",i,u,c)):n.push(md(\"unused\",i,u,c))}return n}function Cvt(e,t){for(var r=e.layout.layoutAttributes,n=0;n<t.length;n++){var i=t[n],a=e.traces[i.type],o=a.layoutAttributes;o&&(i.subplot?I0.extendFlat(r[a.attributes.subplot.dflt],o):I0.extendFlat(r,o))}return r}var Lvt={object:function(e,t){var r;return e===\"layout\"&&t===\"\"?r=\"The layout argument\":e[0]===\"data\"&&t===\"\"?r=\"Trace \"+e[1]+\" in the data argument\":r=$b(e)+\"key \"+t,r+\" must be linked to an object container\"},array:function(e,t){var r;return e===\"data\"?r=\"The data argument\":r=$b(e)+\"key \"+t,r+\" must be linked to an array container\"},schema:function(e,t){return $b(e)+\"key \"+t+\" is not part of the schema\"},unused:function(e,t,r){var n=Rg(r)?\"container\":\"key\";return $b(e)+n+\" \"+t+\" did not get coerced\"},dynamic:function(e,t,r,n){return[$b(e)+\"key\",t,\"(set to '\"+r+\"')\",\"got reset to\",\"'\"+n+\"'\",\"during defaults.\"].join(\" \")},invisible:function(e,t){return(t?$b(e)+\"item \"+t:\"Trace \"+e[1])+\" got defaulted to be not visible\"},value:function(e,t,r){return[$b(e)+\"key \"+t,\"is set to an invalid value (\"+r+\")\"].join(\" \")}};function $b(e){return Qb(e)?\"In data trace \"+e[1]+\", \":\"In \"+e+\", \"}function md(e,t,r,n,i){r=r||\"\";var a,o;Qb(t)?(a=t[0],o=t[1]):(a=t,o=null);var s=Dvt(r),l=Lvt[e](t,s,n,i);return I0.log(l),{code:e,container:a,trace:o,path:r,astr:s,msg:l}}function Pvt(e,t){var r=vde(t),n=r.keyMinusId,i=r.id;return n in e&&e[n]._isSubplotObj&&i?!0:t in e}function Ivt(e,t){if(t in e)return e[t];var r=vde(t);return e[r.keyMinusId]}var Rvt=I0.counterRegex(\"([a-z]+)\");function vde(e){var t=e.match(Rvt);return{keyMinusId:t&&t[1],id:t&&t[2]}}function Dvt(e){if(!Qb(e))return String(e);for(var t=\"\",r=0;r<e.length;r++){var n=e[r];typeof n==\"number\"?t=t.slice(0,-1)+\"[\"+n+\"]\":t+=n,r<e.length-1&&(t+=\".\")}return t}});var yde=ye((jor,mde)=>{\"use strict\";var Fvt=Dr(),$P=Oy();function zvt(e,t,r){var n=document.createElement(\"a\"),i=\"download\"in n,a=new Promise(function(o,s){var l,u;if(i)return l=$P.createBlob(e,r),u=$P.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),$P.revokeObjectURL(u),l=null,o(t);if(Fvt.isSafari()){var c=r===\"svg\"?\",\":\";base64,\";return $P.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error(\"download error\"))});return a}mde.exports=zvt});var sU=ye((Xor,xde)=>{\"use strict\";var _de=Dr(),Ovt=aU(),qvt=yde(),Wor=Oy();function Bvt(e,t){var r;return _de.isPlainObject(e)||(r=_de.getGraphDiv(e)),t=t||{},t.format=t.format||\"png\",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error(\"Snapshotting already in progress.\")),r&&(r._snapshotInProgress=!0);var a=Ovt(e,t),o=t.filename||e.fn||\"newplot\";o+=\".\"+t.format.replace(\"-\",\".\"),a.then(function(s){return r&&(r._snapshotInProgress=!1),qvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}xde.exports=Bvt});var Sde=ye(lU=>{\"use strict\";var Cp=Dr(),Lp=Cp.isPlainObject,bde=P3(),wde=Mc(),Nvt=Gl(),Tde=vl(),Ade=_b().dfltConfig;lU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:Ade},{data:e.data,layout:e.layout}),wde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};i4(d,v,Vvt.bind(null,d));var _=Cp.coerce(d,{},Nvt,\"type\"),b=n.data[_];b||(b=n.data[_]=[]),b.push(v)}),i4(r,n.layout,Uvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&QP(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;o<f;o++)QP(l[o%u],c[o]);for(o=f;o<u;o++)c.push(Cp.extendDeep({},l[o]))}for(s in h)s in n.data||(n.data[s]=Cp.extendDeep([],h[s]))}}return n};function QP(e,t){e=Cp.extendDeep({},e);var r=Object.keys(e).sort(),n,i;function a(c,f,h){if(Lp(f)&&Lp(c))QP(c,f);else if(Array.isArray(f)&&Array.isArray(c)){var d=Tde.arrayTemplater({_template:e},h);for(i=0;i<f.length;i++){var v=f[i],_=d.newItem(v)._template;_&&QP(_,v)}var b=d.defaultItems();for(i=0;i<b.length;i++)f.push(b[i]._template);for(i=0;i<f.length;i++)delete f[i].templateitemname}}for(n=0;n<r.length;n++){var o=r[n],s=e[o];if(o in t?a(s,t[o],o):t[o]=s,eI(o)===o)for(var l in t){var u=eI(l);l!==u&&u===o&&!(l in e)&&a(s,t[l],o)}}}function eI(e){return e.replace(/[0-9]+$/,\"\")}function i4(e,t,r,n,i){var a=i&&r(i);for(var o in e){var s=e[o],l=R0(e,o,n),u=R0(e,o,i),c=r(u);if(!c){var f=eI(o);f!==o&&(u=R0(e,f,i),c=r(u))}if(!(a&&a===c)&&!(!c||c._noTemplating||c.valType===\"data_array\"||c.arrayOk&&Array.isArray(s)))if(!c.valType&&Lp(s))i4(s,t,r,l,u);else if(c._isLinkedToArray&&Array.isArray(s))for(var h=!1,d=0,v={},_=0;_<s.length;_++){var b=s[_];if(Lp(b)){var p=b.name;if(p)v[p]||(i4(b,t,r,R0(s,d,l),R0(s,d,u)),d++,v[p]=1);else if(!h){var k=Tde.arrayDefaultKey(o),E=R0(e,k,n),T=R0(s,d,l);i4(b,t,r,T,R0(s,d,u));var L=Cp.nestedProperty(t,T),x=Cp.nestedProperty(t,E);x.set(L.get()),L.set(null),h=!0}}}else{var C=Cp.nestedProperty(t,l);C.set(s)}}}function Uvt(e,t){return bde.getLayoutValObject(e,Cp.nestedProperty({},t).parts)}function Vvt(e,t){return bde.getTraceValObject(e,Cp.nestedProperty({},t).parts)}function R0(e,t,r){var n;return r?Array.isArray(e)?n=r+\"[\"+t+\"]\":n=r+\".\"+t:n=t,n}lU.validateTemplate=function(e,t){var r=Cp.extendDeep({},{_context:Ade,data:e.data,layout:e.layout}),n=r.layout||{};Lp(t)||(t=n.template||{});var i=t.layout,a=t.data,o=[];r.layout=n,r.layout.template=t,wde.supplyDefaults(r);var s=r._fullLayout,l=r._fullData,u={};function c(E,T){for(var L in E)if(L.charAt(0)!==\"_\"&&Lp(E[L])){var x=eI(L),C=[],M;for(M=0;M<T.length;M++)C.push(R0(E,L,T[M])),x!==L&&C.push(R0(E,x,T[M]));for(M=0;M<C.length;M++)u[C[M]]=1;c(E[L],C)}}function f(E,T){for(var L in E)if(L.indexOf(\"defaults\")===-1&&Lp(E[L])){var x=R0(E,L,T);u[x]?f(E[L],x):o.push({code:\"unused\",path:x})}}if(Lp(i)?(c(s,[\"layout\"]),f(i,\"layout\")):o.push({code:\"layout\"}),!Lp(a))o.push({code:\"data\"});else{for(var h={},d,v=0;v<l.length;v++){var _=l[v];d=_.type,h[d]=(h[d]||0)+1,_._fullInput._template||o.push({code:\"missing\",index:_.index,traceType:d})}for(d in a){var b=a[d].length,p=h[d]||0;b>p?o.push({code:\"unused\",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:\"reused\",traceType:d,templateCount:b,dataCount:p})}}function k(E,T){for(var L in E)if(L.charAt(0)!==\"_\"){var x=E[L],C=R0(E,L,T);Lp(x)?(Array.isArray(E)&&x._template===!1&&x.templateitemname&&o.push({code:\"missing\",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&Gvt(x)&&k(x,C)}}if(k({data:l,layout:s},\"\"),o.length)return o.map(Hvt)};function Gvt(e){for(var t=0;t<e.length;t++)if(Lp(e[t]))return!0}function Hvt(e){var t;switch(e.code){case\"data\":t=\"The template has no key data.\";break;case\"layout\":t=\"The template has no key layout.\";break;case\"missing\":e.path?t=\"There are no templates for item \"+e.path+\" with name \"+e.templateitemname:t=\"There are no templates for trace \"+e.index+\", of type \"+e.traceType+\".\";break;case\"unused\":e.path?t=\"The template item at \"+e.path+\" was not used in constructing the plot.\":e.dataCount?t=\"Some of the templates of type \"+e.traceType+\" were not used. The template has \"+e.templateCount+\" traces, the data only has \"+e.dataCount+\" of this type.\":t=\"The template has \"+e.templateCount+\" traces of type \"+e.traceType+\" but there are none in the data.\";break;case\"reused\":t=\"Some of the templates of type \"+e.traceType+\" were used more than once. The template has \"+e.templateCount+\" traces, the data has \"+e.dataCount+\" of this type.\";break}return e.msg=t,e}});var Ede=ye(ef=>{\"use strict\";var rd=ZP();ef._doPlot=rd._doPlot;ef.newPlot=rd.newPlot;ef.restyle=rd.restyle;ef.relayout=rd.relayout;ef.redraw=rd.redraw;ef.update=rd.update;ef._guiRestyle=rd._guiRestyle;ef._guiRelayout=rd._guiRelayout;ef._guiUpdate=rd._guiUpdate;ef._storeDirectGUIEdit=rd._storeDirectGUIEdit;ef.react=rd.react;ef.extendTraces=rd.extendTraces;ef.prependTraces=rd.prependTraces;ef.addTraces=rd.addTraces;ef.deleteTraces=rd.deleteTraces;ef.moveTraces=rd.moveTraces;ef.purge=rd.purge;ef.addFrames=rd.addFrames;ef.deleteFrames=rd.deleteFrames;ef.animate=rd.animate;ef.setPlotConfig=rd.setPlotConfig;var jvt=HS().getGraphDiv,Wvt=dP().eraseActiveShape;ef.deleteActiveShape=function(e){return Wvt(jvt(e))};ef.toImage=aU();ef.validate=gde();ef.downloadImage=sU();var Mde=Sde();ef.makeTemplate=Mde.makeTemplate;ef.validateTemplate=Mde.validateTemplate});var oT=ye((Kor,kde)=>{\"use strict\";var uU=Dr(),Xvt=qa();kde.exports=function(t,r,n,i){var a=i(\"x\"),o=i(\"y\"),s,l=Xvt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");if(l(t,r,[\"x\",\"y\"],n),a){var u=uU.minRowLength(a);o?s=Math.min(u,uU.minRowLength(o)):(s=u,i(\"y0\"),i(\"dy\"))}else{if(!o)return 0;s=uU.minRowLength(o),i(\"x0\"),i(\"dx\")}return r._length=s,s}});var Dg=ye((Jor,Pde)=>{\"use strict\";var Cde=Dr().dateTick0,Zvt=fs(),Yvt=Zvt.ONEWEEK;function Lde(e,t){return e%Yvt===0?Cde(t,1):Cde(t,0)}Pde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i(\"xperiod\");o&&(i(\"xperiod0\",Lde(o,r.xcalendar)),i(\"xperiodalignment\"))}if(a.y){var s=i(\"yperiod\");s&&(i(\"yperiod0\",Lde(s,r.ycalendar)),i(\"yperiodalignment\"))}}});var Dde=ye(($or,Rde)=>{\"use strict\";var Ide=[\"orientation\",\"groupnorm\",\"stackgaps\"];Rde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i(\"stackgroup\");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?\"h\":\"v\"},h=0;h<Ide.length;h++){var d=Ide[h],v=d+\"Found\";if(!u[v]){var _=t[d]!==void 0,b=d===\"orientation\";if((_||c)&&(u[d]=i(d,f[d]),b&&(u.fillDflt=u[d]===\"h\"?\"tonextx\":\"tonexty\"),_&&(u[v]=!0,!c&&(delete u.traces[0][d],b))))for(var p=0;p<u.traces.length-1;p++){var k=u.traces[p];k._input.fill!==k.fill&&(k.fill=u.fillDflt)}}}return u}}});var $p=ye((Qor,qde)=>{\"use strict\";var Fde=ka(),zde=pv().hasColorscale,Ode=td(),Kvt=Ru();qde.exports=function(t,r,n,i,a,o={}){var s=Kvt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),a(\"marker.symbol\"),a(\"marker.opacity\",s?.7:1),a(\"marker.size\"),o.noAngle||(a(\"marker.angle\"),o.noAngleRef||a(\"marker.angleref\"),o.noStandOff||a(\"marker.standoff\")),a(\"marker.color\",n),zde(t,\"marker\")&&Ode(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),o.noSelect||(a(\"selected.marker.color\"),a(\"unselected.marker.color\"),a(\"selected.marker.size\"),a(\"unselected.marker.size\")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Fde.background:u=Fde.defaultLine,a(\"marker.line.color\",u),zde(t,\"marker.line\")&&Ode(t,r,i,a,{prefix:\"marker.line.\",cLetter:\"c\"}),a(\"marker.line.width\",s?1:0),o.noLineDash||a(\"marker.line.dash\")),s&&(a(\"marker.sizeref\"),a(\"marker.sizemin\"),a(\"marker.sizemode\")),o.gradient){var c=a(\"marker.gradient.type\");c!==\"none\"&&a(\"marker.gradient.color\")}}});var D0=ye((esr,Bde)=>{\"use strict\";var Jvt=Dr().isArrayOrTypedArray,$vt=pv().hasColorscale,Qvt=td();Bde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a(\"line.color\",n),$vt(t,\"line\"))Qvt(t,r,i,a,{prefix:\"line.\",cLetter:\"c\"});else{var l=(Jvt(s)?!1:s)||n;a(\"line.color\",l)}a(\"line.width\"),o.noDash||a(\"line.dash\"),o.backoff&&a(\"line.backoff\")}});var sT=ye((tsr,Nde)=>{\"use strict\";Nde.exports=function(t,r,n){var i=n(\"line.shape\");i===\"spline\"&&n(\"line.smoothing\")}});var F0=ye((rsr,Ude)=>{\"use strict\";var ept=Dr();Ude.exports=function(e,t,r,n,i){i=i||{},n(\"textposition\"),ept.coerceFont(n,\"textfont\",i.font||r.font,i),i.noSelect||(n(\"selected.textfont.color\"),n(\"unselected.textfont.color\"))}});var Fg=ye((isr,Gde)=>{\"use strict\";var tI=ka(),Vde=Dr().isArrayOrTypedArray;function tpt(e){for(var t=tI.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var n=tI.interpolate(e[r-1][1],e[r][1],.5);t=tI.interpolate(t,n,e[r-1][0]/e[r][0])}return t}Gde.exports=function(t,r,n,i,a){a||(a={});var o=!1;if(r.marker){var s=r.marker.color,l=(r.marker.line||{}).color;s&&!Vde(s)?o=s:l&&!Vde(l)&&(o=l)}var u;if(a.moduleHasFillgradient){var c=i(\"fillgradient.type\");if(c!==\"none\"){i(\"fillgradient.start\"),i(\"fillgradient.stop\");var f=i(\"fillgradient.colorscale\");f&&(u=tpt(f))}}i(\"fillcolor\",tI.addOpacity((r.line||{}).color||o||u||n,.5))}});var Xde=ye((nsr,Wde)=>{\"use strict\";var Hde=Dr(),rpt=qa(),ipt=pf(),npt=Lm(),lT=Ru(),apt=oT(),opt=Dg(),spt=Dde(),lpt=$p(),upt=D0(),jde=sT(),cpt=F0(),fpt=Fg(),hpt=Dr().coercePattern;Wde.exports=function(t,r,n,i){function a(d,v){return Hde.coerce(t,r,ipt,d,v)}var o=apt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){opt(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zorder\");var s=spt(t,r,i,a);i.scattermode===\"group\"&&r.orientation===void 0&&a(\"orientation\",\"v\");var l=!s&&o<npt.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"text\"),a(\"hovertext\"),a(\"mode\",l),lT.hasMarkers(r)&&lpt(t,r,n,i,a,{gradient:!0}),lT.hasLines(r)&&(upt(t,r,n,i,a,{backoff:!0}),jde(t,r,a),a(\"connectgaps\"),a(\"line.simplify\")),lT.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),cpt(t,r,i,a));var u=[];(lT.hasMarkers(r)||lT.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),u.push(\"points\")),a(\"fill\",s?s.fillDflt:\"none\"),r.fill!==\"none\"&&(fpt(t,r,n,a,{moduleHasFillgradient:!0}),lT.hasLines(r)||jde(t,r,a),hpt(a,\"fillpattern\",r.fillcolor,!1));var c=(r.line||{}).color,f=(r.marker||{}).color;(r.fill===\"tonext\"||r.fill===\"toself\")&&u.push(\"fills\"),a(\"hoveron\",u.join(\"+\")||\"points\"),r.hoveron!==\"fills\"&&(a(\"hovertemplate\"),a(\"hovertemplatefallback\"));var h=rpt.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,c||f||n,{axis:\"y\"}),h(t,r,c||f||n,{axis:\"x\",inherit:\"y\"}),Hde.coerceSelectionMarkerOpacity(r,a)}}});var e2=ye((asr,Zde)=>{\"use strict\";var dpt=Kb().getAxisGroup;Zde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:\"x\",h:\"y\"}[o]+\"axis\"],l=dpt(n,s)+o,u=n._alignmentOpts||{},c=i(\"alignmentgroup\"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i(\"offsetgroup\")||\"\",v=h.offsetGroups,_=v[d];r._offsetIndex=0,(a!==\"group\"||d)&&(_||(_=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=_.offsetIndex)}});var cU=ye((osr,Yde)=>{\"use strict\";var vpt=Dr(),ppt=e2(),gpt=pf();Yde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return vpt.coerce(i._input,i,gpt,h)}if(r.scattermode===\"group\")for(a=0;a<t.length;a++)i=t[a],i.type===\"scatter\"&&(n=i._input,ppt(n,i,r,s,o));for(a=0;a<t.length;a++){var l=t[a];if(l.type===\"scatter\"){var u=l.fill;if(!(u===\"none\"||u===\"toself\")&&(l.opacity=void 0,u===\"tonexty\"||u===\"tonextx\"))for(var c=a-1;c>=0;c--){var f=t[c];if(f.type===\"scatter\"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var Jde=ye((ssr,Kde)=>{\"use strict\";var mpt=Dr(),ypt=tL();Kde.exports=function(e,t){function r(i,a){return mpt.coerce(e,t,ypt,i,a)}var n=t.barmode===\"group\";t.scattermode===\"group\"&&r(\"scattergap\",n?t.bargap:.2)}});var zg=ye((lsr,Qde)=>{\"use strict\";var _pt=Eo(),$de=Dr(),xpt=$de.dateTime2ms,rI=$de.incrementMonth,bpt=fs(),wpt=bpt.ONEAVGMONTH;Qde.exports=function(t,r,n,i){if(r.type!==\"date\")return{vals:i};var a=t[n+\"periodalignment\"];if(!a)return{vals:i};var o=t[n+\"period\"],s;if(_pt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o==\"string\"&&o.charAt(0)===\"M\"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a===\"start\",f=a===\"end\",h=t[n+\"period0\"],d=xpt(h,u)||0,v=[],_=[],b=[],p=i.length,k=0;k<p;k++){var E=i[k],T,L,x;if(s){for(T=Math.round((E-d)/(s*wpt)),x=rI(d,s*T,u);x>E;)x=rI(x,-s,u);for(;x<=E;)x=rI(x,s,u);L=rI(x,-s,u)}else{for(T=Math.round((E-d)/o),x=d+T*o;x>E;)x-=o;for(;x<=E;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,_[k]=L,b[k]=x}return{vals:v,starts:_,ends:b}}});var z0=ye((usr,tve)=>{\"use strict\";var fU=pv().hasColorscale,hU=gv(),eve=Ru();tve.exports=function(t,r){eve.hasLines(r)&&fU(r,\"line\")&&hU(t,r,{vals:r.line.color,containerStr:\"line\",cLetter:\"c\"}),eve.hasMarkers(r)&&(fU(r,\"marker\")&&hU(t,r,{vals:r.marker.color,containerStr:\"marker\",cLetter:\"c\"}),fU(r,\"marker.line\")&&hU(t,r,{vals:r.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}))}});var Rm=ye((csr,rve)=>{\"use strict\";var qf=Dr();rve.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;qf.mergeArray(r.text,t,\"tx\"),qf.mergeArray(r.texttemplate,t,\"txt\"),qf.mergeArray(r.hovertext,t,\"htx\"),qf.mergeArray(r.customdata,t,\"data\"),qf.mergeArray(r.textposition,t,\"tp\"),r.textfont&&(qf.mergeArrayCastPositive(r.textfont.size,t,\"ts\"),qf.mergeArray(r.textfont.color,t,\"tc\"),qf.mergeArray(r.textfont.family,t,\"tf\"),qf.mergeArray(r.textfont.weight,t,\"tw\"),qf.mergeArray(r.textfont.style,t,\"ty\"),qf.mergeArray(r.textfont.variant,t,\"tv\"),qf.mergeArray(r.textfont.textcase,t,\"tC\"),qf.mergeArray(r.textfont.lineposition,t,\"tE\"),qf.mergeArray(r.textfont.shadow,t,\"tS\"));var i=r.marker;if(i){qf.mergeArrayCastPositive(i.size,t,\"ms\"),qf.mergeArrayCastPositive(i.opacity,t,\"mo\"),qf.mergeArray(i.symbol,t,\"mx\"),qf.mergeArray(i.angle,t,\"ma\"),qf.mergeArray(i.standoff,t,\"mf\"),qf.mergeArray(i.color,t,\"mc\");var a=i.line;i.line&&(qf.mergeArray(a.color,t,\"mlc\"),qf.mergeArrayCastPositive(a.width,t,\"mlw\"),qf.mergeArray(a.dash,t,\"mld\"));var o=i.gradient;o&&o.type!==\"none\"&&(qf.mergeArray(o.type,t,\"mgt\"),qf.mergeArray(o.color,t,\"mgc\"))}}});var O0=ye((fsr,nve)=>{\"use strict\";var ive=Dr();nve.exports=function(t,r){ive.isArrayOrTypedArray(r.selectedpoints)&&ive.tagSelected(t,r)}});var q0=ye((hsr,fve)=>{\"use strict\";var ave=Eo(),vU=Dr(),n4=ho(),ove=zg(),dU=fs().BADNUM,pU=Ru(),Tpt=z0(),Apt=Rm(),Spt=O0();function Mpt(e,t){var r=e._fullLayout,n=t._xA=n4.getFromId(e,t.xaxis||\"x\",\"x\"),i=t._yA=n4.getFromId(e,t.yaxis||\"y\",\"y\"),a=n.makeCalcdata(t,\"x\"),o=i.makeCalcdata(t,\"y\"),s=ove(t,n,\"x\",a),l=ove(t,i,\"y\",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=gU(t,r,n,i),_=!1,b,p,k,E,T,L;uve(r,t);var x=\"x\",C=\"y\",M;if(v)vU.pushUnique(v.traceIndices,t.index),b=v.orientation===\"v\",b?(C=\"s\",M=\"x\"):(x=\"s\",M=\"y\"),T=v.stackgaps===\"interpolate\";else{var g=lve(t,f);sve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,A=!!t.yperiodalignment;for(p=0;p<f;p++){var z=h[p]={},O=ave(u[p]),U=ave(c[p]);O&&U?(z[x]=u[p],z[C]=c[p],P&&(z.orig_x=a[p],z.xEnd=s.ends[p],z.xStart=s.starts[p]),A&&(z.orig_y=o[p],z.yEnd=l.ends[p],z.yStart=l.starts[p])):v&&(b?O:U)?(z[M]=b?u[p]:c[p],z.gap=!0,T?(z.s=dU,_=!0):z.s=0):z[x]=z[C]=dU,d&&(z.id=String(d[p]))}if(Apt(h,t),Tpt(e,t),Spt(h,t),v){for(p=0;p<h.length;)h[p][M]===dU?h.splice(p,1):p++;if(vU.sort(h,function(N,H){return N[M]-H[M]||N.i-H.i}),_){for(p=0;p<h.length-1&&h[p].gap;)p++;for(L=h[p].s,L||(L=h[p].s=0),k=0;k<p;k++)h[k].s=L;for(E=h.length-1;E>p&&h[E].gap;)E--;for(L=h[E].s,k=h.length-1;k>E;k--)h[k].s=L;for(;p<E;)if(p++,h[p].gap){for(k=p+1;h[k].gap;)k++;for(var G=h[p-1][M],Z=h[p-1].s,j=(h[k].s-Z)/(h[k][M]-G);p<k;)h[p].s=Z+(h[p][M]-G)*j,p++}}}return h}function sve(e,t,r,n,i,a,o){var s=t._length,l=e._fullLayout,u=r._id,c=n._id,f=l._firstScatter[cve(t)]===t.uid,h=(gU(t,l,r,n)||{}).orientation,d=t.fill;r._minDtick=0,n._minDtick=0;var v={padded:!0},_={padded:!0};o&&(v.ppad=_.ppad=o);var b=s<2||i[0]!==i[s-1]||a[0]!==a[s-1];b&&(d===\"tozerox\"||d===\"tonextx\"&&(f||h===\"h\"))?v.tozero=!0:!(t.error_y||{}).visible&&(d===\"tonexty\"||d===\"tozeroy\"||!pU.hasMarkers(t)&&!pU.hasText(t))&&(v.padded=!1,v.ppad=0),b&&(d===\"tozeroy\"||d===\"tonexty\"&&(f||h===\"v\"))?_.tozero=!0:(d===\"tonextx\"||d===\"tozerox\")&&(_.padded=!1),u&&(t._extremes[u]=n4.findExtremes(r,i,v)),c&&(t._extremes[c]=n4.findExtremes(n,a,_))}function lve(e,t){if(pU.hasMarkers(e)){var r=e.marker,n=1.6*(e.marker.sizeref||1),i;if(e.marker.sizemode===\"area\"?i=function(u){return Math.max(Math.sqrt((u||0)/n),3)}:i=function(u){return Math.max((u||0)/n,3)},vU.isArrayOrTypedArray(r.size)){var a={type:\"linear\"};n4.setConvert(a);for(var o=a.makeCalcdata(e.marker,\"size\"),s=new Array(t),l=0;l<t;l++)s[l]=i(o[l]);return s}else return i(r.size)}}function uve(e,t){var r=cve(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function cve(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?\"-\"+t:\"\")}function gU(e,t,r,n){var i=e.stackgroup;if(i){var a=t._scatterStackOpts[r._id+n._id][i],o=a.orientation===\"v\"?n:r;if(o.type===\"linear\"||o.type===\"log\")return a}}fve.exports={calc:Mpt,calcMarkerSize:lve,calcAxisExpansion:sve,setFirstScatter:uve,getStackOpts:gU}});var dve=ye((dsr,hve)=>{\"use strict\";hve.exports=iI;var Ept=Dr().distinctVals;function iI(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a<e.length;a++){for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l.p;u===void 0&&(u=l[n]),u!==void 0&&i.push(u)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var c=Ept(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var f=(t.posAxis||{}).type;(f===\"category\"||f===\"multicategory\")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}iI.prototype.put=function(t,r,n){var i=this.getLabel(t,r,n),a=this.bins[i]||0;return this.bins[i]=a+n,a};iI.prototype.get=function(t,r,n){var i=this.getLabel(t,r,n);return this.bins[i]||0};iI.prototype.getLabel=function(t,r,n){var i=n<0&&this.sepNegVal?\"v\":\"^\",a=this.overlapNoMerge?t:Math.round(t/this.binWidth);return i+a+\"g\"+r}});var A_=ye((vsr,vve)=>{\"use strict\";vve.exports={TEXTPAD:3,eventDataKeys:[\"value\",\"label\"]}});var t2=ye((psr,yve)=>{\"use strict\";var B0=Eo(),{isArrayOrTypedArray:qy}=Dr(),{BADNUM:uT}=fs(),kpt=qa(),a4=ho(),{getAxisGroup:Cpt}=Kb(),nI=dve(),{TEXTPAD:Lpt}=A_(),{LINE_SPACING:Ppt}=Dh(),{BR_TAG_ALL:Ipt}=Zl();function Rpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];if(c.visible===!0&&kpt.traceIs(c,\"bar\")&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation===\"h\"?s.push(o[u]):l.push(o[u]),c._computePh))for(var f=e.calcdata[u],h=0;h<f.length;h++)typeof f[h].ph0==\"function\"&&(f[h].ph0=f[h].ph0()),typeof f[h].ph1==\"function\"&&(f[h].ph1=f[h].ph1())}var d={xCat:r.type===\"category\"||r.type===\"multicategory\",yCat:n.type===\"category\"||n.type===\"multicategory\",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};yU(e,r,n,l,d),yU(e,n,r,s,d)}function yU(e,t,r,n,i){if(n.length){var a,o,s,l,u;switch(zpt(r,n),i.mode){case\"overlay\":mU(e,t,r,n,i);break;case\"group\":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.offset===void 0?o.push(l):a.push(l);o.length&&Opt(e,t,r,o,i),a.length&&mU(e,t,r,a,i);break;case\"stack\":case\"relative\":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.base===void 0?o.push(l):a.push(l);Fpt(o),o.length&&qpt(e,t,r,o,i),a.length&&mU(e,t,r,a,i);break}Dpt(n),Hpt(n,t)}}function Dpt(e){var t,r,n,i,a,o,s;for(t=0;t<e.length;t++)r=e[t],n=r[0].trace,i=r[0].t,i.cornerradiusvalue===void 0&&(a=n.marker?n.marker.cornerradius:void 0,a!==void 0&&(o=B0(a)?+a:+a.slice(0,-1),s=B0(a)?\"px\":\"%\",i.cornerradiusvalue=o,i.cornerradiusform=s))}function Fpt(e){if(!(e.length<2)){var t,r,n,i,a,o,s;for(t=0;t<e.length&&(r=e[t],n=r[0].trace,a=n.marker?n.marker.cornerradius:void 0,a===void 0);t++);if(a!==void 0)for(o=B0(a)?+a:+a.slice(0,-1),s=B0(a)?\"px\":\"%\",t=0;t<e.length;t++)r=e[t],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=s}}function zpt(e,t){var r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0].trace,o=a.type===\"funnel\"?a._base:a.base,s,l=a.orientation===\"h\"?a.xcalendar:a.ycalendar,u=e.type===\"category\"||e.type===\"multicategory\"?function(){return null}:e.d2c;if(qy(o)){for(n=0;n<Math.min(o.length,i.length);n++)s=u(o[n],0,l),B0(s)?(i[n].b=+s,i[n].hasB=1):i[n].b=0;for(;n<i.length;n++)i[n].b=0}else{s=u(o,0,l);var c=B0(s);for(s=c?s:0,n=0;n<i.length;n++)i[n].b=s,c&&(i[n].hasB=1)}}}function mU(e,t,r,n,i){for(var a=0;a<n.length;a++){var o=n[a],s=new nI([o],{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});_U(e,t,s,i),i.norm?(mve(s),xU(r,s,i)):gve(r,s)}}function Opt(e,t,r,n,i){var a=new nI(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});_U(e,t,a,i),Vpt(a,t),i.norm?(mve(a),xU(r,a,i)):gve(r,a)}function qpt(e,t,r,n,i){var a=new nI(n,{posAxis:t,sepNegVal:i.mode===\"relative\",overlapNoMerge:!(i.norm||i.mode===\"stack\"||i.mode===\"relative\")});_U(e,t,a,i),Upt(r,a,i);for(var o=0;o<n.length;o++)for(var s=n[o],l=s[0].t.offsetindex,u=0;u<s.length;u++){var c=s[u];if(c.s!==uT){var f=c.b+c.s===a.get(c.p,l,c.s);f&&(c._outmost=!0)}}i.norm&&xU(r,a,i)}function _U(e,t,r,n){var i=e._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,l=r.traces,u=l.length,c=a.length!==o.length,f=s*(1-n.gap),h,d,v,_;if(t._id===\"angularaxis\")h=f,d=h*(1-(n.groupgap||0)),v=-d/2;else{var b=Cpt(i,t._id)+l[0][0].trace.orientation;_=i._alignmentOpts[b]||{}}for(var p=0;p<u;p++){var k=l[p],E=k[0].trace;if(t._id!==\"angularaxis\"){var T=_[E.alignmentgroup]||{},L=Object.keys(T.offsetGroups||{}).length;L?h=f/L:h=c?f/u:f,d=h*(1-(n.groupgap||0)),L?v=((2*E._offsetIndex+1-L)*h-d)/2:v=c?((2*p+1-u)*h-d)/2:-d/2}var x=k[0].t;x.barwidth=d,x.offsetindex=E._offsetIndex||0,x.poffset=v,x.bargroupwidth=f,x.bardelta=s}r.binWidth=l[0][0].t.barwidth/100,Bpt(r),Npt(t,r),t._id===\"angularaxis\"?pve(t,r):pve(t,r,c)}function Bpt(e){var t=e.traces,r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0],o=a.trace,s=a.t,l=o._offset||o.offset,u=s.poffset,c;if(qy(l)){for(c=Array.prototype.slice.call(l,0,i.length),n=0;n<c.length;n++)B0(c[n])||(c[n]=u);for(n=c.length;n<i.length;n++)c.push(u);s.poffset=c}else l!==void 0&&(s.poffset=l);var f=o._width||o.width,h=s.barwidth;if(qy(f)){var d=Array.prototype.slice.call(f,0,i.length);for(n=0;n<d.length;n++)B0(d[n])||(d[n]=h);for(n=d.length;n<i.length;n++)d.push(h);if(s.barwidth=d,l===void 0){for(c=[],n=0;n<i.length;n++)c.push(u+(h-d[n])/2);s.poffset=c}}else f!==void 0&&(s.barwidth=f,l===void 0&&(s.poffset=u+(h-f)/2))}}function Npt(e,t){for(var r=t.traces,n=cT(e),i=0;i<r.length;i++)for(var a=r[i],o=a[0].t,s=o.poffset,l=qy(s),u=o.barwidth,c=qy(u),f=0;f<a.length;f++){var h=a[f],d=h.w=c?u[f]:u;h.p===void 0&&(h.p=h[n],h[\"orig_\"+n]=h[n]);var v=(l?s[f]:s)+d/2;h[n]=h.p+v}}function pve(e,t,r){var n=t.traces,i=t.minDiff,a=i/2;a4.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<n.length;o++){var s=n[o],l=s[0],u=l.trace,c=[],f,h,d,v;for(v=0;v<s.length;v++)f=s[v],h=f.p-a,d=f.p+a,c.push(h,d);if(u.width||u.offset){var _=l.t,b=_.poffset,p=_.barwidth,k=qy(b),E=qy(p);for(v=0;v<s.length;v++){f=s[v];var T=k?b[v]:b,L=E?p[v]:p;h=f.p+T,d=h+L,c.push(h,d)}}u._extremes[e._id]=a4.findExtremes(e,c,{padded:!1})}}function gve(e,t){for(var r=t.traces,n=cT(e),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,s=o.type===\"scatter\",l=o.orientation===\"v\",u=[],c=!1,f=0;f<a.length;f++){var h=a[f],d=s?0:h.b,v=s?l?h.y:h.x:d+h.s;h[n]=v,u.push(v),h.hasB&&u.push(d),(!h.hasB||!h.b)&&(c=!0)}let{ppadminus:_,ppadplus:b}=bU(o,a);o._extremes[e._id]=a4.findExtremes(e,u,{tozero:c,padded:!0,ppadplus:b,ppadminus:_})}}function Upt(e,t,r){var n=cT(e),i=t.traces,a,o,s,l,u,c,f;for(l=0;l<i.length;l++)if(a=i[l],o=a[0].trace,o.type===\"funnel\")for(f=a[0].t.offsetindex,u=0;u<a.length;u++)c=a[u],c.s!==uT&&t.put(c.p,f,-.5*c.s);for(l=0;l<i.length;l++){a=i[l],o=a[0].trace,s=o.type===\"funnel\",f=o.type===\"barpolar\"?0:a[0].t.offsetindex;var h=[];for(u=0;u<a.length;u++)if(c=a[u],c.s!==uT){var d;s?d=c.s:d=c.s+c.b;var v=t.put(c.p,f,d),_=v+d;c.b=v,c[n]=_,r.norm||(h.push(_),c.hasB&&h.push(v))}if(!r.norm){let{ppadminus:b,ppadplus:p}=bU(o,a);o._extremes[e._id]=a4.findExtremes(e,h,{tozero:!0,padded:!0,ppadplus:p,ppadminus:b})}}}function mve(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],i=n[0].t.offsetindex,a=0;a<n.length;a++){var o=n[a];o.s!==uT&&e.put(o.p,i,o.b+o.s)}}function Vpt(e,t){for(var r=e.traces,n=0;n<r.length;n++){var i=r[n],a=i[0].trace,o=i[0].t.offsetindex;if(a.base===void 0)for(var s=new nI([i],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var u=i[l];if(u.p!==uT){var c=s.put(u.p,o,u.b+u.s);c&&(u.b=c)}}}}function xU(e,t,r){var n=t.traces,i=cT(e),a=r.norm===\"fraction\"?1:100,o=a/1e9,s=e.l2c(e.c2l(0)),l=r.mode===\"stack\"?a:s;function u(x){return B0(e.c2l(x))&&(x<s-o||x>l+o||!B0(s))}for(var c=0;c<n.length;c++){for(var f=n[c],h=f[0].t.offsetindex,d=f[0].trace,v=[],_=!1,b=!1,p=0;p<f.length;p++){var k=f[p];if(k.s!==uT){var E=Math.abs(a/t.get(k.p,h,k.s));k.b*=E,k.s*=E;var T=k.b,L=T+k.s;k[i]=L,v.push(L),b=b||u(L),k.hasB&&(v.push(T),b=b||u(T)),(!k.hasB||!k.b)&&(_=!0)}}let{ppadminus:x,ppadplus:C}=bU(d,f);d._extremes[e._id]=a4.findExtremes(e,v,{tozero:_,padded:b,ppadplus:C,ppadminus:x})}}function bU(e,t){if(e.orientation===\"v\"&&(e.text||e.texttemplate)&&e.textposition===\"outside\"&&(e.textangle===\"auto\"||e.textangle===0)){let n=function(a){return!a||typeof a!=\"string\"?0:(a.match(Ipt)||[]).length+1};var r;e.texttemplate?r=n(e.texttemplate):r=qy(e.text)?Math.max(...e.text.map(a=>n(a))):n(e.text);let i=e.outsidetextfont.size*Ppt*r+Lpt;return{ppadplus:t.some(a=>a.s<0)?i:0,ppadminus:t.some(a=>a.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function Gpt(e,t,r,n){for(var i=cT(n),a=0;a<e.length;a++)for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=t[u],l._sMax=r[u]}}function Hpt(e,t){var r=cT(t),n={},i,a,o,s=1/0,l=-1/0;for(i=0;i<e.length;i++)for(o=e[i],a=0;a<o.length;a++){var u=o[a].p;B0(u)&&(s=Math.min(s,u),l=Math.max(l,u))}var c=1e4/(l-s),f=n.round=function(M){return String(Math.round(c*(M-s)))},h={},d={},v=e.some(function(M){var g=M[0].trace;return\"marker\"in g&&g.marker.cornerradius});for(i=0;i<e.length;i++){o=e[i],o[0].t.extents=n;var _=o[0].t.poffset,b=qy(_);for(a=0;a<o.length;a++){var p=o[a],k=p[r]-p.w/2;if(B0(k)){var E=p[r]+p.w/2,T=f(p.p);n[T]?n[T]=[Math.min(k,n[T][0]),Math.max(E,n[T][1])]:n[T]=[k,E]}if(p.p0=p.p+(b?_[a]:_),p.p1=p.p0+p.w,p.s0=p.b,p.s1=p.s0+p.s,v){var L=Math.min(p.s0,p.s1)||0,x=Math.max(p.s0,p.s1)||0,C=p[r];h[C]=C in h?Math.min(h[C],L):L,d[C]=C in d?Math.max(d[C],x):x}}}v&&Gpt(e,h,d,t)}function cT(e){return e._id.charAt(0)}yve.exports={crossTraceCalc:Rpt,setGroupPositions:yU}});var wve=ye((gsr,bve)=>{\"use strict\";var _ve=q0(),xve=t2().setGroupPositions;function jpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];c.visible===!0&&c.type===\"scatter\"&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation===\"h\"?s.push(o[u]):c.orientation===\"v\"&&l.push(o[u]))}var f={mode:i.scattermode,gap:i.scattergap};xve(e,r,n,l,f),xve(e,n,r,s,f)}bve.exports=function(t,r){t._fullLayout.scattermode===\"group\"&&jpt(t,r);var n=r.xaxis,i=r.yaxis,a=n._id+i._id,o=t._fullLayout._scatterStackOpts[a];if(o){var s=t.calcdata,l,u,c,f,h,d,v,_,b,p,k,E,T,L,x;for(var C in o){p=o[C];var M=p.traceIndices;if(M.length){for(k=p.stackgaps===\"interpolate\",E=p.groupnorm,p.orientation===\"v\"?(T=\"x\",L=\"y\"):(T=\"y\",L=\"x\"),x=new Array(M.length),l=0;l<x.length;l++)x[l]=!1;d=s[M[0]];var g=new Array(d.length);for(l=0;l<d.length;l++)g[l]=d[l][T];for(l=1;l<M.length;l++){for(h=s[M[l]],u=c=0;u<h.length;u++){for(v=h[u][T];v>g[c]&&c<g.length;c++)wU(h,u,g[c],l,x,k,T),u++;if(v!==g[c]){for(f=0;f<l;f++)wU(s[M[f]],c,v,f,x,k,T);g.splice(c,0,v)}c++}for(;c<g.length;c++)wU(h,u,g[c],l,x,k,T),u++}var P=g.length;for(u=0;u<d.length;u++){for(_=d[u][L]=d[u].s,l=1;l<M.length;l++)h=s[M[l]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=P,_+=h[u].s,h[u][L]=_;if(E)for(b=(E===\"fraction\"?_:_/100)||1,l=0;l<M.length;l++){var A=s[M[l]][u];A[L]/=b,A.sNorm=A.s/b}}for(l=0;l<M.length;l++){h=s[M[l]];var z=h[0].trace,O=_ve.calcMarkerSize(z,z._rawLength),U=Array.isArray(O);if(O&&x[l]||U){var G=O;for(O=new Array(P),u=0;u<P;u++)O[u]=h[u].gap?0:U?G[h[u].i]:G}var Z=new Array(P),j=new Array(P);for(u=0;u<P;u++)Z[u]=h[u].x,j[u]=h[u].y;_ve.calcAxisExpansion(t,z,n,i,Z,j,O),h[0].t.orientation=p.orientation}}}}};function wU(e,t,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,e.splice(t,0,s),t&&r===e[t-1][o]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=Wpt(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}function Wpt(e,t,r,n){var i=e[t-1],a=e[t+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}});var AU=ye((msr,kve)=>{\"use strict\";var Xpt=So(),Mve=fs(),o4=Mve.BADNUM,Eve=Mve.LOG_CLIP,Tve=Eve+.5,Ave=Eve-.5,aI=Dr(),Zpt=aI.segmentsIntersect,Sve=aI.constrain,TU=Lm();kve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type===\"log\",s=a.type===\"log\",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,_=v===\"linear\",b=n.fill&&n.fill!==\"none\",p=[],k=TU.minTolerance,E=t.length,T=new Array(E),L=0,x,C,M,g,P,A,z,O,U,G,Z,j,N,H,re,oe;function _e(dt){var Ge=t[dt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),We=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===o4){if(o&&(Je=i.c2p(Ge.x,!0)),Je===o4)return!1;s&&We===o4&&(Je*=Math.abs(i._m*u*(i._m>0?Tve:Ave)/(a._m*l*(a._m>0?Tve:Ave)))),Je*=1e3}if(We===o4){if(s&&(We=a.c2p(Ge.y,!0)),We===o4)return!1;We*=1e3}return[Je,We]}function Ce(dt,Ge,Je,We){var tt=Je-dt,xt=We-Ge,Ie=.5-dt,xe=.5-Ge,ke=tt*tt+xt*xt,vt=tt*Ie+xt*xe;if(vt>0&&vt<ke){var ir=Ie*xt-xe*tt;if(ir*ir<ke)return!0}}var Le,ge;function ie(dt,Ge){var Je=dt[0]/l,We=dt[1]/u,tt=Math.max(0,-Je,Je-1,-We,We-1);return tt&&Le!==void 0&&Ce(Je,We,Le,ge)&&(tt=0),tt&&Ge&&Ce(Je,We,Ge[0]/l,Ge[1]/u)&&(tt=0),(1+TU.toleranceGrowth*tt)*d}function Se(dt,Ge){var Je=dt[0]-Ge[0],We=dt[1]-Ge[1];return Math.sqrt(Je*Je+We*We)}var Ee=TU.maxScreensAway,Ae=-l*Ee,Be=l*(1+Ee),Pe=-u*Ee,me=u*(1+Ee),De=[[Ae,Pe,Be,Pe],[Be,Pe,Be,me],[Be,me,Ae,me],[Ae,me,Ae,Pe]],ce,je,lt,pt,Vt,ot;function ut(dt,Ge){for(var Je=[],We=0,tt=0;tt<4;tt++){var xt=De[tt],Ie=Zpt(dt[0],dt[1],Ge[0],Ge[1],xt[0],xt[1],xt[2],xt[3]);Ie&&(!We||Math.abs(Ie.x-Je[0][0])>1||Math.abs(Ie.y-Je[0][1])>1)&&(Ie=[Ie.x,Ie.y],We&&Se(Ie,dt)<Se(Je[0],dt)?Je.unshift(Ie):Je.push(Ie),We++)}return Je}function Wt(dt){if(dt[0]<Ae||dt[0]>Be||dt[1]<Pe||dt[1]>me)return[Sve(dt[0],Ae,Be),Sve(dt[1],Pe,me)]}function Nt(dt,Ge){if(dt[0]===Ge[0]&&(dt[0]===Ae||dt[0]===Be)||dt[1]===Ge[1]&&(dt[1]===Pe||dt[1]===me))return!0}function $t(dt,Ge){var Je=[],We=Wt(dt),tt=Wt(Ge);return We&&tt&&Nt(We,tt)||(We&&Je.push(We),tt&&Je.push(tt)),Je}function sr(dt,Ge,Je){return function(We,tt){var xt=Wt(We),Ie=Wt(tt),xe=[];if(xt&&Ie&&Nt(xt,Ie))return xe;xt&&xe.push(xt),Ie&&xe.push(Ie);var ke=2*aI.constrain((We[dt]+tt[dt])/2,Ge,Je)-((xt||We)[dt]+(Ie||tt)[dt]);if(ke){var vt;xt&&Ie?vt=ke>0==xt[dt]>Ie[dt]?xt:Ie:vt=xt||Ie,vt[dt]+=ke}return xe}}var Tr;v===\"linear\"||v===\"spline\"?Tr=ut:v===\"hv\"||v===\"vh\"?Tr=$t:v===\"hvh\"?Tr=sr(0,Ae,Be):v===\"vhv\"&&(Tr=sr(1,Pe,me));function fr(dt,Ge){var Je=Ge[0]-dt[0],We=(Ge[1]-dt[1])/Je,tt=(dt[1]*Ge[0]-Ge[1]*dt[0])/Je;return tt>0?[We>0?Ae:Be,me]:[We>0?Be:Ae,Pe]}function $e(dt){var Ge=dt[0],Je=dt[1],We=Ge===T[L-1][0],tt=Je===T[L-1][1];if(!(We&&tt))if(L>1){var xt=Ge===T[L-2][0],Ie=Je===T[L-2][1];We&&(Ge===Ae||Ge===Be)&&xt?Ie?L--:T[L-1]=dt:tt&&(Je===Pe||Je===me)&&Ie?xt?L--:T[L-1]=dt:T[L++]=dt}else T[L++]=dt}function St(dt){T[L-1][0]!==dt[0]&&T[L-1][1]!==dt[1]&&$e([lt,pt]),$e(dt),Vt=null,lt=pt=0}var Qt=aI.isArrayOrTypedArray(f);function Gt(dt){if(dt&&c&&(dt.i=x,dt.d=t,dt.trace=n,dt.marker=Qt?f[dt.i]:f,dt.backoff=c),Le=dt[0]/l,ge=dt[1]/u,ce=dt[0]<Ae?Ae:dt[0]>Be?Be:0,je=dt[1]<Pe?Pe:dt[1]>me?me:0,ce||je){if(!L)T[L++]=[ce||dt[0],je||dt[1]];else if(Vt){var Ge=Tr(Vt,dt);Ge.length>1&&(St(Ge[0]),T[L++]=Ge[1])}else ot=Tr(T[L-1],dt)[0],T[L++]=ot;var Je=T[L-1];ce&&je&&(Je[0]!==ce||Je[1]!==je)?(Vt&&(lt!==ce&&pt!==je?$e(lt&&pt?fr(Vt,dt):[lt||ce,pt||je]):lt&&pt&&$e([lt,pt])),$e([ce,je])):lt-ce&&pt-je&&$e([ce||lt,je||pt]),Vt=dt,lt=ce,pt=je}else Vt&&St(Tr(Vt,dt)[0]),T[L++]=dt}for(x=0;x<E;x++)if(C=_e(x),!!C){for(L=0,Vt=null,Gt(C),x++;x<E;x++){if(g=_e(x),!g){if(h)continue;break}if(!_||!r.simplify){Gt(g);continue}var _t=_e(x+1);if(G=Se(g,C),!(!(b&&(L===0||L===E-1))&&G<ie(g,_t)*k)){for(O=[(g[0]-C[0])/G,(g[1]-C[1])/G],P=C,Z=G,j=H=re=0,z=!1,M=g,x++;x<t.length;x++){if(A=_t,_t=_e(x+1),!A){if(h)continue;break}if(U=[A[0]-C[0],A[1]-C[1]],oe=U[0]*O[1]-U[1]*O[0],H=Math.min(H,oe),re=Math.max(re,oe),re-H>ie(A,_t))break;M=A,N=U[0]*O[0]+U[1]*O[1],N>Z?(Z=N,g=A,z=!1):N<j&&(j=N,P=A,z=!0)}if(z?(Gt(g),M!==P&&Gt(P)):(P!==C&&Gt(P),M!==g&&Gt(g)),Gt(M),x>=t.length||!A)break;Gt(A),C=A}}Vt&&$e([lt||Vt[0],pt||Vt[1]]),p.push(T.slice(0,L))}var It=v.slice(v.length-1);if(c&&It!==\"h\"&&It!==\"v\"){for(var mt=!1,er=-1,lr=[],wr=0;wr<p.length;wr++)for(var Lr=0;Lr<p[wr].length-1;Lr++){var ti=p[wr][Lr],Br=p[wr][Lr+1],Vr=Xpt.applyBackoff(Br,ti);(Vr[0]!==Br[0]||Vr[1]!==Br[1])&&(mt=!0),lr[er+1]||(er++,lr[er]=[ti,[Vr[0],Vr[1]]])}return mt?lr:p}return p}});var SU=ye((ysr,Lve)=>{\"use strict\";var Cve={tonextx:1,tonexty:1,tonext:1};Lve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a<n.length;a++)i=n[a][0].trace,o=i.stackgroup||\"\",o?o in u?l=u[o]:(l=u[o]=h,h++):i.fill in Cve&&d>=0?l=d:(l=d=h,h++),l<f&&(c=!0),i._groupIndex=f=l;var v=n.slice();c&&v.sort(function(b,p){var k=b[0].trace,E=p[0].trace;return k._groupIndex-E._groupIndex||k.index-E.index});var _={};for(a=0;a<v.length;a++)i=v[a][0].trace,o=i.stackgroup||\"\",i.visible===!0?(i._nexttrace=null,i.fill in Cve&&(s=_[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(i.fill.slice(0,6)===\"tozero\"||i.fill===\"toself\"||i.fill.slice(0,2)===\"to\"&&!i._prevtrace),_[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return v}});var dT=ye((_sr,Rve)=>{\"use strict\";var Og=Oa(),Ypt=qa(),s4=Dr(),fT=s4.ensureSingle,Ive=s4.identity,Kf=So(),hT=Ru(),Kpt=AU(),Jpt=SU(),oI=FM().tester;Rve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=Jpt(t,r,n);if(s=i.selectAll(\"g.trace\").data(f,function(d){return d[0].trace.uid}),s.enter().append(\"g\").attr(\"class\",function(d){return\"trace scatter trace\"+d[0].trace.uid}).style(\"stroke-miterlimit\",2),s.order(),$pt(t,s,r),c){o&&(l=o());var h=Og.transition().duration(a.duration).ease(a.easing).each(\"end\",function(){l&&l()}).each(\"interrupt\",function(){l&&l()});h.each(function(){i.selectAll(\"g.trace\").each(function(d,v){Pve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Pve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll(\"path:not([d])\").remove()};function $pt(e,t,r){t.each(function(n){var i=fT(Og.select(this),\"g\",\"fills\");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push(\"_ownFill\"),a._nexttrace&&o.push(\"_nextFill\");var s=i.selectAll(\"g\").data(o,Ive);s.enter().append(\"g\"),s.exit().remove(),s.order().each(function(l){a[l]=fT(Og.select(this),\"path\",\"js-fill\")})})}function Pve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;Qpt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(sr){return u?sr.transition():sr}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,_=Og.select(a),b=fT(_,\"g\",\"errorbars\"),p=fT(_,\"g\",\"lines\"),k=fT(_,\"g\",\"points\"),E=fT(_,\"g\",\"text\");if(Ypt.getComponentMethod(\"errorbars\",\"plot\")(e,b,r,o),d.visible!==!0)return;c(_).style(\"opacity\",d.opacity);var T,L,x=d.fill.charAt(d.fill.length-1);x!==\"x\"&&x!==\"y\"&&(x=\"\");var C,M;x===\"y\"?(C=1,M=h.c2p(0,!0)):x===\"x\"&&(C=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?\"nodeRangePlot3\":\"node3\"]=_;var g=\"\",P=[],A=d._prevtrace,z=null,O=null;A&&(g=A._prevRevpath||\"\",L=A._nextFill,P=A._ownPolygons,z=A._fillsegments,O=A._fillElement);var U,G,Z=\"\",j=\"\",N,H,re,oe,_e,Ce,Le=[];d._polygons=[];var ge=[],ie=[],Se=s4.noop;if(T=d._ownFill,hT.hasLines(d)||d.fill!==\"none\"){L&&L.datum(n),[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split(\"\").reverse().join(\"\"))):v.shape===\"spline\"?N=H=function(sr){var Tr=sr[sr.length-1];return sr.length>1&&sr[0][0]===Tr[0]&&sr[0][1]===Tr[1]?Kf.smoothclosed(sr.slice(1),v.smoothing):Kf.smoothopen(sr,v.smoothing)}:N=H=function(sr){return\"M\"+sr.join(\"L\")},re=function(sr){return H(sr.reverse())},ie=Kpt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l<ie.length;l++){var Ae,Be=ie[l];!Ae||!x?(Ae=Be.slice(),ge[Ee]=Ae,Ee++):Ae.push.apply(Ae,Be)}d._fillElement=null,d._fillExclusionElement=O,d._fillsegments=ge.slice(0,Ee),ge=d._fillsegments,ie.length&&(oe=ie[0][0].slice(),_e=ie[ie.length-1],Ce=_e[_e.length-1].slice()),Se=function(sr){return function(Tr){if(U=N(Tr),G=re(Tr),Z?x?(Z+=\"L\"+U.slice(1),j=G+(\"L\"+j.slice(1))):(Z+=\"Z\"+U,j=G+\"Z\"+j):(Z=U,j=G),hT.hasLines(d)){var fr=Og.select(this);if(fr.datum(n),sr)c(fr.style(\"opacity\",0).attr(\"d\",U).call(Kf.lineGroupStyle)).style(\"opacity\",1);else{var $e=c(fr);$e.attr(\"d\",U),Kf.singleLineStyle(n,$e)}}}}}var Pe=p.selectAll(\".js-line\").data(ie);c(Pe.exit()).style(\"opacity\",0).remove(),Pe.each(Se(!1)),Pe.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",s?\"none\":\"non-scaling-stroke\").call(Kf.lineGroupStyle).each(Se(!0)),Kf.setClipUrl(Pe,r.layerClipId,e);function me(sr){c(sr).attr(\"d\",\"M0,0Z\")}var De=function(){var sr=new Array(ge.length);for(l=0;l<ge.length;l++)sr[l]=oI(ge[l]);return sr},ce=function(sr){var Tr,fr;if(!sr||sr.length===0)for(Tr=new Array(ge.length),fr=0;fr<ge.length;fr++){var $e=ge[fr][0].slice(),St=ge[fr][ge[fr].length-1].slice();$e[C]=St[C]=M;var Qt=[St,$e],Gt=Qt.concat(ge[fr]);Tr[fr]=oI(Gt)}else{for(Tr=new Array(sr.length-1+ge.length),fr=0;fr<sr.length-1;fr++)Tr[fr]=oI(sr[fr]);var _t=sr[sr.length-1].slice();for(_t.reverse(),fr=0;fr<ge.length;fr++)Tr[sr.length-1+fr]=oI(ge[fr].concat(_t))}return Tr};ie.length?(T?(T.datum(n),oe&&Ce&&(x?(oe[C]=Ce[C]=M,c(T).attr(\"d\",\"M\"+Ce+\"L\"+oe+\"L\"+Z.slice(1)).call(Kf.singleFillStyle,e),Le=ce(null)):(c(T).attr(\"d\",Z+\"Z\").call(Kf.singleFillStyle,e),Le=De())),d._polygons=Le,d._fillElement=T):L&&(d.fill.slice(0,6)===\"tonext\"&&Z&&g?(d.fill===\"tonext\"?(c(L).attr(\"d\",Z+\"Z\"+g+\"Z\").call(Kf.singleFillStyle,e),Le=De(),d._polygons=Le.concat(P)):(c(L).attr(\"d\",Z+\"L\"+g.slice(1)+\"Z\").call(Kf.singleFillStyle,e),Le=ce(z),d._polygons=Le),d._fillElement=L):me(L)),d._prevRevpath=j):(T?me(T):L&&me(L),d._prevRevpath=null),d._ownPolygons=Le;function je(sr){return sr.filter(function(Tr){return!Tr.gap&&Tr.vis})}function lt(sr){return sr.filter(function(Tr){return Tr.vis})}function pt(sr){return sr.filter(function(Tr){return!Tr.gap})}function Vt(sr){return sr.id}function ot(sr){if(sr.ids)return Vt}function ut(){return!1}function Wt(sr,Tr,fr){var $e,St,Qt,Gt=fr[0].trace,_t=hT.hasMarkers(Gt),It=hT.hasText(Gt),mt=ot(Gt),er=ut,lr=ut;if(_t||It){var wr=Ive,Lr=Gt.stackgroup,ti=Lr&&e._fullLayout._scatterStackOpts[f._id+h._id][Lr].stackgaps===\"infer zero\";Gt.marker.maxdisplayed||Gt._needsCull?wr=ti?lt:je:Lr&&!ti&&(wr=pt),_t&&(er=wr),It&&(lr=wr)}St=sr.selectAll(\"path.point\"),$e=St.data(er,mt);var Br=$e.enter().append(\"path\").classed(\"point\",!0);u&&Br.call(Kf.pointStyle,Gt,e).call(Kf.translatePoints,f,h).style(\"opacity\",0).transition().style(\"opacity\",1),$e.order();var Vr;_t&&(Vr=Kf.makePointStyleFns(Gt)),$e.each(function(dt){var Ge=Og.select(this),Je=c(Ge);Qt=Kf.translatePoint(dt,Je,f,h),Qt?(Kf.singlePointStyle(dt,Je,Gt,Vr,e),r.layerClipId&&Kf.hideOutsideRangePoint(dt,Je,f,h,Gt.xcalendar,Gt.ycalendar),Gt.customdata&&Ge.classed(\"plotly-customdata\",dt.data!==null&&dt.data!==void 0)):Je.remove()}),u?$e.exit().transition().style(\"opacity\",0).remove():$e.exit().remove(),St=Tr.selectAll(\"g\"),$e=St.data(lr,mt),$e.enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),$e.order(),$e.each(function(dt){var Ge=Og.select(this),Je=c(Ge.select(\"text\"));Qt=Kf.translatePoint(dt,Je,f,h),Qt?r.layerClipId&&Kf.hideOutsideRangePoint(dt,Ge,f,h,Gt.xcalendar,Gt.ycalendar):Ge.remove()}),$e.selectAll(\"text\").call(Kf.textPointStyle,Gt,e).each(function(dt){var Ge=f.c2p(dt.x),Je=h.c2p(dt.y);Og.select(this).selectAll(\"tspan.line\").each(function(){c(Og.select(this)).attr({x:Ge,y:Je})})}),$e.exit().remove()}k.datum(n),E.datum(n),Wt(k,E,n);var Nt=d.cliponaxis===!1,$t=Nt?null:r.layerClipId;Kf.setClipUrl(k,$t,e),Kf.setClipUrl(E,$t,e)}function Qpt(e,t,r,n,i){var a=r.xaxis,o=r.yaxis,s=Og.extent(s4.simpleMap(a.range,a.r2c)),l=Og.extent(s4.simpleMap(o.range,o.r2c)),u=n[0].trace;if(hT.hasMarkers(u)){var c=u.marker.maxdisplayed;if(c!==0){var f=n.filter(function(_){return _.x>=s[0]&&_.x<=s[1]&&_.y>=l[0]&&_.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(_,b){var p=_[0].trace;hT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b<t&&d++});var v=Math.round(d*h/3+Math.floor(d/3)*h/7.1);n.forEach(function(_){delete _.vis}),f.forEach(function(_,b){Math.round((b+v)%h)===0&&(_.vis=!0)})}}}});var $d=ye((xsr,Dve)=>{\"use strict\";Dve.exports={container:\"marker\",min:\"cmin\",max:\"cmax\"}});var lI=ye((bsr,Fve)=>{\"use strict\";var sI=ho();Fve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=sI.getFromTrace(a,r,\"x\"),s=sI.getFromTrace(a,r,\"y\"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=sI.tickText(o,o.c2l(l),!0).text,i.yLabel=sI.tickText(s,s.c2l(u),!0).text,i}});var sp=ye((wsr,zve)=>{\"use strict\";var MU=Oa(),vT=So(),e0t=qa();function t0t(e){var t=MU.select(e).selectAll(\"g.trace.scatter\");t.style(\"opacity\",function(r){return r[0].trace.opacity}),t.selectAll(\"g.points\").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;EU(n,i,e)}),t.selectAll(\"g.text\").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;kU(n,i,e)}),t.selectAll(\"g.trace path.js-line\").call(vT.lineGroupStyle),t.selectAll(\"g.trace path.js-fill\").call(vT.fillGroupStyle,e,!1),e0t.getComponentMethod(\"errorbars\",\"style\")(t)}function EU(e,t,r){vT.pointStyle(e.selectAll(\"path.point\"),t,r)}function kU(e,t,r){vT.textPointStyle(e.selectAll(\"text\"),t,r)}function r0t(e,t,r){var n=t[0].trace;n.selectedpoints?(vT.selectedPointStyle(r.selectAll(\"path.point\"),n),vT.selectedTextStyle(r.selectAll(\"text\"),n)):(EU(r,n,e),kU(r,n,e))}zve.exports={style:t0t,stylePoints:EU,styleText:kU,styleOnSelect:r0t}});var gT=ye((Tsr,Ove)=>{\"use strict\";var pT=ka(),i0t=Ru();Ove.exports=function(t,r){var n,i;if(t.mode===\"lines\")return n=t.line.color,n&&pT.opacity(n)?n:t.fillcolor;if(t.mode===\"none\")return t.fill?t.fillcolor:\"\";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&pT.opacity(a)?a:o&&pT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:\"\",i?pT.opacity(i)<.3?pT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&pT.opacity(n)&&i0t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var mT=ye((Asr,Bve)=>{\"use strict\";var uI=Dr(),qve=vf(),n0t=qa(),a0t=gT(),CU=ka(),o0t=uI.fillText;Bve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||\"\",d=o.mode.indexOf(\"markers\")!==-1?3:.5,v=!!o.xperiodalignment,_=!!o.yperiodalignment;if(h.indexOf(\"points\")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(s.c2p(j.x)-u);return _e<re?oe*_e/re:_e-re+oe},p=function(j){if(_){var N=l.c2p(j.yStart),H=l.c2p(j.yEnd);return c>=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(l.c2p(j.y)-c);return _e<re?oe*_e/re:_e-re+oe},k=function(j){var N=Math.max(d,j.mrc||0),H=s.c2p(j.x)-u,re=l.c2p(j.y)-c;return Math.max(Math.sqrt(H*H+re*re)-N,1-d/N)},E=qve.getDistanceFunction(i,b,p,k);if(qve.getClosest(a,E,t),t.index!==!1){var T=a[t.index],L=s.c2p(T.x,!0),x=l.c2p(T.y,!0),C=T.mrc||1;t.index=T.i;var M=a[0].t.orientation,g=M&&(T.sNorm||T.s),P=M===\"h\"?g:T.orig_x!==void 0?T.orig_x:T.x,A=M===\"v\"?g:T.orig_y!==void 0?T.orig_y:T.y;return uI.extendFlat(t,{color:a0t(o,T),x0:L-C,x1:L+C,xLabelVal:P,y0:x-C,y1:x+C,yLabelVal:A,spikeDistance:k(T),hovertemplate:o.hovertemplate}),o0t(T,o,t),n0t.getComponentMethod(\"errorbars\",\"hoverInfo\")(T,o,t),[t]}}function z(j){if(!j)return!1;var N=j.node();try{var H=new DOMPoint(f[0],f[1]);return N.isPointInFill(H)}catch(oe){var re=N.ownerSVGElement.createSVGPoint();return re.x=f[0],re.y=f[1],N.isPointInFill(re)}}function O(j){var N,H=[],re=1/0,oe=-1/0,_e=1/0,Ce=-1/0,Le;for(N=0;N<j.length;N++){var ge=j[N];ge.contains(f)&&(H.push(ge),_e=Math.min(_e,ge.ymin),Ce=Math.max(Ce,ge.ymax))}if(H.length===0)return null;_e=Math.max(_e,0),Ce=Math.min(Ce,l._length),Le=(_e+Ce)/2;var ie,Se,Ee,Ae,Be,Pe,me;for(N=0;N<H.length;N++)for(Se=H[N].pts,ie=1;ie<Se.length;ie++)Pe=Se[ie-1][1],me=Se[ie][1],Pe>Le!=me>=Le&&(Ae=Se[ie-1][0],Be=Se[ie][0],me-Pe&&(Ee=Ae+(Be-Ae)*(Le-Pe)/(me-Pe),re=Math.min(re,Ee),oe=Math.max(oe,Ee)));return re=Math.max(re,0),oe=Math.min(oe,s._length),{x0:re,x1:oe,y0:Le,y1:Le}}if(h.indexOf(\"fills\")!==-1&&o._fillElement){var U=z(o._fillElement)&&!z(o._fillExclusionElement);if(U){var G=O(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=CU.defaultLine;return CU.opacity(o.fillcolor)?Z=o.fillcolor:CU.opacity((o.line||{}).color)&&(Z=o.line.color),uI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!uI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var yT=ye((Ssr,Uve)=>{\"use strict\";var Nve=Ru();Uve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Nve.hasMarkers(s)&&!Nve.hasText(s);if(h)return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++)u=n[l],c=i.c2p(u.x),f=a.c2p(u.y),u.i!==null&&r.contains([c,f],!1,l,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0;return o}});var Gve=ye((Msr,Vve)=>{\"use strict\";Vve.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}});var PU=ye((Esr,Wve)=>{\"use strict\";var l4=qa().traceIs,LU=V3();Wve.exports=function(t,r,n,i){n(\"autotypenumbers\",i.autotypenumbersDflt);var a=n(\"type\",(i.splomStash||{}).type);a===\"-\"&&(s0t(r,i.data),r.type===\"-\"?r.type=\"linear\":t.type=r.type)};function s0t(e,t){if(e.type===\"-\"){var r=e._id,n=r.charAt(0),i;r.indexOf(\"scene\")!==-1&&(r=n);var a=l0t(t,r,n);if(a){if(a.type===\"histogram\"&&n==={v:\"y\",h:\"x\"}[a.orientation||\"v\"]){e.type=\"linear\";return}var o=n+\"calendar\",s=a[o],l={noMultiCategory:!l4(a,\"cartesian\")||l4(a,\"noMultiCategory\")};if(a.type===\"box\"&&a._hasPreCompStats&&n==={h:\"x\",v:\"y\"}[a.orientation||\"v\"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,jve(a,n)){var u=Hve(a),c=[];for(i=0;i<t.length;i++){var f=t[i];!l4(f,\"box-violin\")||(f[n+\"axis\"]||n)!==r||(f[u]!==void 0?c.push(f[u][0]):f.name!==void 0?c.push(f.name):c.push(\"text\"),f[o]!==s&&(s=void 0))}e.type=LU(c,s,l)}else if(a.type===\"splom\"){var h=a.dimensions,d=h[a._axesDim[r]];d.visible&&(e.type=LU(d.values,s,l))}else e.type=LU(a[n]||[a[n+\"0\"]],s,l)}}}function l0t(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.type===\"splom\"&&i._length>0&&(i[\"_\"+r+\"axes\"]||{})[t])return i;if((i[r+\"axis\"]||r)===t){if(jve(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}function Hve(e){return{v:\"x\",h:\"y\"}[e.orientation||\"v\"]}function jve(e,t){var r=Hve(e),n=l4(e,\"box-violin\"),i=l4(e._fullInput||{},\"candlestick\");return n&&!i&&t===r&&e[r]===void 0&&e[r+\"0\"]===void 0}});var cI=ye((ksr,Xve)=>{\"use strict\";var u0t=vv().isTypedArraySpec;function c0t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a<t.data.length;a++){var s=t.data[a];s[r+\"axis\"]===e._id&&i.push(s)}for(a=0;a<i.length;a++){var l=i[a][r];for(o=0;o<l.length;o++){var u=l[o];u!=null&&(n[u]=1)}}return Object.keys(n)}Xve.exports=function(t,r,n,i){if(r.type===\"category\"){var a=t.categoryarray,o=Array.isArray(a)&&a.length>0||u0t(a),s;o&&(s=\"array\");var l=n(\"categoryorder\",s),u;l===\"array\"&&(u=n(\"categoryarray\")),!o&&l===\"array\"&&(l=r.categoryorder=\"trace\"),l===\"trace\"?r._initialCategories=[]:l===\"array\"?r._initialCategories=u.slice():(u=c0t(r,i).sort(),l===\"category ascending\"?r._initialCategories=u:l===\"category descending\"&&(r._initialCategories=u.reverse()))}}});var u4=ye((Csr,Yve)=>{\"use strict\";var Zve=fd().mix,f0t=Ih(),h0t=Dr();Yve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(M,g){return h0t.coerce2(t,r,i.attributes,M,g)}var s=o(\"linecolor\",a),l=o(\"linewidth\"),u=n(\"showline\",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Zve(a,i.bgColor,i.blend||f0t.lightFraction).toRgbString(),f=o(\"gridcolor\",c),h=o(\"gridwidth\"),d=o(\"griddash\"),v=n(\"showgrid\",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var _=Zve(r.gridcolor,i.bgColor,67).toRgbString(),b=o(\"minor.gridcolor\",_),p=o(\"minor.gridwidth\",r.gridwidth||1),k=o(\"minor.griddash\",r.griddash||\"solid\"),E=n(\"minor.showgrid\",!!b||!!p||!!k);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var T=o(\"zerolinelayer\"),L=o(\"zerolinecolor\",a),x=o(\"zerolinewidth\"),C=n(\"zeroline\",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var f4=ye((Lsr,tpe)=>{\"use strict\";var Kve=Eo(),d0t=qa(),c4=Dr(),v0t=vl(),p0t=Zd(),IU=Rd(),Jve=Lb(),$ve=F3(),g0t=s_(),m0t=l_(),y0t=cI(),_0t=u4(),x0t=AB(),Qve=xm(),fI=Rh().WEEKDAY_PATTERN,b0t=Rh().HOUR_PATTERN;tpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n(\"visible\",!i.visibleDflt),c=r._template||{},f=r.type||c.type||\"-\",h;if(f===\"date\"){var d=d0t.getComponentMethod(\"calendars\",\"handleDefaults\");d(t,r,\"calendar\",i.calendar),i.noTicklabelmode||(h=n(\"ticklabelmode\"))}!i.noTicklabelindex&&(f===\"date\"||f===\"linear\")&&n(\"ticklabelindex\");var v=\"\";(!i.noTicklabelposition||f===\"multicategory\")&&(v=c4.coerce(t,r,{ticklabelposition:{valType:\"enumerated\",dflt:\"outside\",values:h===\"period\"?[\"outside\",\"inside\"]:o===\"x\"?[\"outside\",\"inside\",\"outside left\",\"inside left\",\"outside right\",\"inside right\"]:[\"outside\",\"inside\",\"outside top\",\"inside top\",\"outside bottom\",\"inside bottom\"]}},\"ticklabelposition\")),i.noTicklabeloverflow||n(\"ticklabeloverflow\",v.indexOf(\"inside\")!==-1?\"hide past domain\":f===\"category\"||f===\"multicategory\"?\"allow\":\"hide past div\"),Qve(r,a),x0t(t,r,n,i),y0t(t,r,n,i),i.noHover||(f!==\"category\"&&n(\"hoverformat\"),i.noUnifiedhovertitle||n(\"unifiedhovertitle.text\"));var _=n(\"color\"),b=_!==IU.color.dflt?_:s.color,p=l.label||a._dfltTitle[o];if(m0t(t,r,n,f,i),!u)return r;n(\"title.text\",p),c4.coerceFont(n,\"title.font\",s,{overrideDflt:{size:c4.bigFont(s.size),color:b}}),Jve(t,r,n,f);var k=i.hasMinor;if(k&&(v0t.newContainer(r,\"minor\"),Jve(t,r,n,f,{isMinor:!0})),g0t(t,r,n,f,i),$ve(t,r,n,i),k){var E=i.isMinor;i.isMinor=!0,$ve(t,r,n,i),i.isMinor=E}_0t(t,r,n,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:IU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n(\"mirror\");var T=f===\"multicategory\";if(!i.noTickson&&(f===\"category\"||T)&&(r.ticks||r.showgrid)&&(T?(n(\"tickson\",\"boundaries\"),delete r.ticklabelposition):n(\"tickson\")),T){var L=n(\"showdividers\");L&&(n(\"dividercolor\"),n(\"dividerwidth\"))}if(f===\"date\")if(p0t(t,r,{name:\"rangebreaks\",inclusionAttr:\"enabled\",handleItemDefaults:w0t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x<r.rangebreaks.length;x++)if(r.rangebreaks[x].pattern===fI){r._hasDayOfWeekBreaks=!0;break}if(Qve(r,a),a._has(\"scattergl\")||a._has(\"splom\"))for(var C=0;C<i.data.length;C++){var M=i.data[C];(M.type===\"scattergl\"||M.type===\"splom\")&&(M.visible=!1,c4.warn(M.type+\" traces do not work on axes with rangebreaks. Setting trace \"+M.index+\" to `visible: false`.\"))}}return r};function w0t(e,t,r){function n(h,d){return c4.coerce(e,t,IU.rangebreaks,h,d)}var i=n(\"enabled\");if(i){var a=n(\"bounds\");if(a&&a.length>=2){var o=\"\",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=epe(a[s]),l){o=fI;break}}var u=n(\"pattern\",o);if(u===fI)for(s=0;s<2;s++)l=epe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case fI:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case b0t:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(a[0]<c[0]&&a[1]>c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]<c[1]){t.enabled=!1;return}}}else{var f=n(\"values\");if(f&&f.length)n(\"dvalue\");else{t.enabled=!1;return}}}}var T0t={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function epe(e){if(typeof e==\"string\")return T0t[e.slice(0,3).toLowerCase()]}});var dI=ye((Psr,rpe)=>{\"use strict\";var A0t=Eo(),hI=Dr();rpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,_;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+\"side\"].split(\" \")[0],d=l.domain[s][h===\"right\"||h===\"top\"?1:0])),f=f||[0,1],c=c||(A0t(t.position)?\"free\":a[0]||\"free\"),h=h||(s===\"x\"?\"bottom\":\"left\"),d=d||0,v=0,_=!1;var b=hI.coerce(t,r,{anchor:{valType:\"enumerated\",values:[\"free\"].concat(a),dflt:c}},\"anchor\"),p=hI.coerce(t,r,{side:{valType:\"enumerated\",values:s===\"x\"?[\"bottom\",\"top\"]:[\"left\",\"right\"],dflt:h}},\"side\");if(b===\"free\"){if(s===\"y\"){var k=n(\"autoshift\");k&&(d=p===\"left\"?u[0]:u[1],_=r.automargin?r.automargin:!0,v=p===\"left\"?-3:3),n(\"shift\",v)}n(\"position\",d)}n(\"automargin\",_);var E=!1;if(o.length&&(E=hI.coerce(t,r,{overlaying:{valType:\"enumerated\",values:[!1].concat(o),dflt:!1}},\"overlaying\")),!E){var T=n(\"domain\",f);T[0]>T[1]-1/4096&&(r.domain=f),hI.noneOrAll(t.domain,r.domain,f),r.tickmode===\"sync\"&&(r.tickmode=\"auto\")}return n(\"layer\"),r}});var fpe=ye((Isr,cpe)=>{\"use strict\";var r2=Dr(),ipe=ka(),S0t=ip().isUnifiedHover,M0t=YB(),npe=vl(),E0t=_3(),ape=Rd(),k0t=PU(),ope=f4(),C0t=Kb(),spe=dI(),DU=hf(),Dm=DU.id2name,lpe=DU.name2id,L0t=Rh().AX_ID_PATTERN,upe=qa(),vI=upe.traceIs,RU=upe.getComponentMethod;function pI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}cpe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},_,b;for(_=0;_<n.length;_++){var p=n[_];if(vI(p,\"cartesian\")){var k;if(p.xaxis)k=Dm(p.xaxis),pI(a,k,p);else if(p.xaxes)for(b=0;b<p.xaxes.length;b++)pI(a,Dm(p.xaxes[b]),p);var E;if(p.yaxis)E=Dm(p.yaxis),pI(a,E,p);else if(p.yaxes)for(b=0;b<p.yaxes.length;b++)pI(a,Dm(p.yaxes[b]),p);if(p.type===\"funnel\"?p.orientation===\"h\"?(k&&(o[k]=!0),E&&(f[E]=!0)):E&&(s[E]=!0):p.type===\"image\"?(E&&(h[E]=!0),k&&(h[k]=!0)):(E&&(u[E]=!0,c[E]=!0),(!vI(p,\"carpet\")||p.type===\"carpet\"&&!p._cheater)&&k&&(l[k]=!0)),p.type===\"carpet\"&&p._cheater&&k&&(o[k]=!0),vI(p,\"2dMap\")&&(d[k]=!0,d[E]=!0),vI(p,\"oriented\")){var T=p.orientation===\"h\"?E:k;v[T]=!0}}}var L=r._subplots,x=L.xaxis,C=L.yaxis,M=r2.simpleMap(x,Dm),g=r2.simpleMap(C,Dm),P=M.concat(g),A=ipe.background;x.length&&C.length&&(A=r2.coerce(t,r,E0t,\"plot_bgcolor\"));var z=ipe.combine(A,r.paper_bgcolor),O,U,G,Z,j;function N(){var St=a[O]||[];j._traceIndices=St.map(function(Qt){return Qt.index}),j._annIndices=[],j._shapeIndices=[],j._selectionIndices=[],j._imgIndices=[],j._subplotsWith=[],j._counterAxes=[],j._name=j._attr=O,j._id=U}function H(St,Qt){return r2.coerce(Z,j,ape,St,Qt)}function re(St,Qt){return r2.coerce2(Z,j,ape,St,Qt)}function oe(St){return St===\"x\"?C:x}function _e(St,Qt){for(var Gt=St===\"x\"?M:g,_t=[],It=0;It<Gt.length;It++){var mt=Gt[It];mt!==Qt&&!(t[mt]||{}).overlaying&&_t.push(lpe(mt))}return _t}var Ce={x:oe(\"x\"),y:oe(\"y\")},Le=Ce.x.concat(Ce.y),ge={},ie=[];function Se(){var St=Z.matches;L0t.test(St)&&Le.indexOf(St)===-1&&(ge[St]=Z.type,ie=Object.keys(ge))}var Ee=M0t(t,r),Ae=S0t(Ee);for(_=0;_<P.length;_++){O=P[_],U=lpe(O),G=O.charAt(0),r2.isPlainObject(t[O])||(t[O]={}),Z=t[O],j=npe.newContainer(r,O,G+\"axis\"),N();var Be=G===\"x\"&&!l[O]&&o[O]||G===\"y\"&&!u[O]&&s[O],Pe=G===\"y\"&&(!c[O]&&f[O]||h[O]),me={hasMinor:!0,letter:G,font:r.font,outerTicks:d[O],showGrid:!v[O],data:a[O]||[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:Be,reverseDflt:Pe,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[U],noAutotickangles:G===\"y\"};H(\"uirevision\",r.uirevision),k0t(Z,j,H,me),ope(Z,j,H,me,r);var De=Ae&&G===Ee.charAt(0),ce=re(\"spikecolor\",Ae?j.color:void 0),je=re(\"spikethickness\",Ae?1.5:void 0),lt=re(\"spikedash\",Ae?\"dot\":void 0),pt=re(\"spikemode\",Ae?\"across\":void 0),Vt=re(\"spikesnap\"),ot=H(\"showspikes\",!!De||!!ce||!!je||!!lt||!!pt||!!Vt);ot||(delete j.spikecolor,delete j.spikethickness,delete j.spikedash,delete j.spikemode,delete j.spikesnap);var ut=Dm(Z.overlaying),Wt=[0,1];if(r[ut]!==void 0){var Nt=Dm(r[ut].anchor);r[Nt]!==void 0&&(Wt=r[Nt].domain)}spe(Z,j,H,{letter:G,counterAxes:Ce[G],overlayableAxes:_e(G,O),grid:r.grid,overlayingDomain:Wt}),H(\"title.standoff\"),Se(),j._input=Z}for(_=0;_<ie.length;){U=ie[_++],O=Dm(U),G=O.charAt(0),r2.isPlainObject(t[O])||(t[O]={}),Z=t[O],j=npe.newContainer(r,O,G+\"axis\"),N();var $t={letter:G,font:r.font,outerTicks:d[O],showGrid:!v[O],data:[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[U]};H(\"uirevision\",r.uirevision),j.type=ge[U]||\"linear\",ope(Z,j,H,$t,r),spe(Z,j,H,{letter:G,counterAxes:Ce[G],overlayableAxes:_e(G,O),grid:r.grid}),H(\"fixedrange\"),H(\"modebardisable\"),Se(),j._input=Z}var sr=RU(\"rangeslider\",\"handleDefaults\"),Tr=RU(\"rangeselector\",\"handleDefaults\");for(_=0;_<M.length;_++)O=M[_],Z=t[O],j=r[O],sr(t,r,O),j.type===\"date\"&&Tr(Z,j,r,g,j.calendar),H(\"fixedrange\"),H(\"modebardisable\");for(_=0;_<g.length;_++){O=g[_],Z=t[O],j=r[O];var fr=r[Dm(j.anchor)],$e=RU(\"rangeslider\",\"isVisible\")(fr);H(\"fixedrange\",$e),H(\"modebardisable\")}C0t.handleDefaults(t,r,{axIds:Le.concat(ie).sort(DU.idSort),axHasImage:h})}});var vpe=ye((Rsr,dpe)=>{\"use strict\";var P0t=Oa(),hpe=qa(),gI=Dr(),Qp=So(),mI=ho();dpe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){mI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select(\"#\"+b.clipId+\"> rect\").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var E=b.plot.selectAll(\".scatterlayer .trace\");E.selectAll(\".point\").call(Qp.setPointGroupScale,1,1),E.selectAll(\".textpoint\").call(Qp.setTextPointsScale,1,1),E.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,E=k.xaxis,T=k.yaxis,L=E._length,x=T._length,C=!!b.xr1,M=!!b.yr1,g=[];if(C){var P=gI.simpleMap(b.xr0,E.r2l),A=gI.simpleMap(b.xr1,E.r2l),z=P[1]-P[0],O=A[1]-A[0];g[0]=(P[0]*(1-p)+p*A[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*O/z),E.range[0]=E.l2r(P[0]*(1-p)+p*A[0]),E.range[1]=E.l2r(P[1]*(1-p)+p*A[1])}else g[0]=0,g[2]=L;if(M){var U=gI.simpleMap(b.yr0,T.r2l),G=gI.simpleMap(b.yr1,T.r2l),Z=U[1]-U[0],j=G[1]-G[0];g[1]=(U[1]*(1-p)+p*G[1]-U[1])/(U[0]-U[1])*x,g[3]=x*(1-p+p*j/Z),T.range[0]=E.l2r(U[0]*(1-p)+p*G[0]),T.range[1]=T.l2r(U[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;mI.drawOne(t,E,{skipTitle:!0}),mI.drawOne(t,T,{skipTitle:!0}),mI.redrawComponents(t,[E._id,T._id]);var N=C?L/g[2]:1,H=M?x/g[3]:1,re=C?g[0]:0,oe=M?g[1]:0,_e=C?g[0]/g[2]*L:0,Ce=M?g[1]/g[3]*x:0,Le=E._offset-_e,ge=T._offset-Ce;k.clipRect.call(Qp.setTranslate,re,oe).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Le,ge).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;p<r.length;p++){var k=r[p],E=k.plotinfo.xaxis,T=k.plotinfo.yaxis;k.xr1&&(b[E._name+\".range\"]=k.xr1.slice()),k.yr1&&(b[T._name+\".range\"]=k.yr1.slice())}return l&&l(),hpe.call(\"relayout\",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}function c(){for(var b={},p=0;p<r.length;p++){var k=r[p],E=k.plotinfo.xaxis,T=k.plotinfo.yaxis;k.xr0&&(b[E._name+\".range\"]=k.xr0.slice()),k.yr0&&(b[T._name+\".range\"]=k.yr0.slice())}return hpe.call(\"relayout\",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}var f,h,d,v=P0t.ease(n.easing);t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,c()});function _(){h=Date.now();for(var b=Math.min(1,(h-f)/n.duration),p=v(b),k=0;k<r.length;k++)s(r[k],p);h-f>n.duration?(u(),d=window.cancelAnimationFrame(_)):d=window.requestAnimationFrame(_)}return f=Date.now(),d=window.requestAnimationFrame(_),Promise.resolve()}});var mh=ye(xv=>{\"use strict\";var _I=Oa(),ppe=qa(),i2=Dr(),I0t=Mc(),R0t=So(),gpe=Id().getModuleCalcData,S_=hf(),qg=Rh(),D0t=Wp(),iu=i2.ensureSingle;function yI(e,t,r){return i2.ensureSingle(e,t,r,function(n){n.datum(r)})}var n2=qg.zindexSeparator;xv.name=\"cartesian\";xv.attr=[\"xaxis\",\"yaxis\"];xv.idRoot=[\"x\",\"y\"];xv.idRegex=qg.idRegex;xv.attrRegex=qg.attrRegex;xv.attributes=Gve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=fpe();xv.transitionAxes=vpe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u<o.length;u++){var h=o[u].split(\"y\");s[h[0]]=1,l[\"y\"+h[1]]=1}for(u=0;u<n.length;u++)c=n[u],s[c]||(f=(e[S_.id2name(c)]||{}).anchor,qg.idRegex.y.test(f)||(f=\"y\"),a.push(c+f),o.push(c+f),l[f]||(l[f]=1,i2.pushUnique(i,f)));for(u=0;u<i.length;u++)f=i[u],l[f]||(c=(e[S_.id2name(f)]||{}).anchor,qg.idRegex.x.test(c)||(c=\"x\"),a.push(c+f),o.push(c+f),s[c]||(s[c]=1,i2.pushUnique(n,c)));if(!o.length){c=\"\",f=\"\";for(var d in e)if(qg.attrRegex.test(d)){var v=d.charAt(0);v===\"x\"?(!c||+d.slice(5)<+c.slice(5))&&(c=d):(!f||+d.slice(5)<+f.slice(5))&&(f=d)}c=c?S_.name2id(c):\"x\",f=f?S_.name2id(f):\"y\",n.push(c),i.push(f),a.push(c+f)}};xv.plot=function(e,t,r,n){var i=e._fullLayout,a=i._subplots.cartesian,o=e.calcdata,s;if(!Array.isArray(t))for(t=[],s=0;s<o.length;s++)t.push(s);for(var l=i._zindices,u=0;u<l.length;u++){var c=l[u];for(s=0;s<a.length;s++){var f=a[s],h=i._plots[f];if(u>0){var d=h.id;if(d.indexOf(n2)!==-1)continue;d+=n2+(u+1),h=i2.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(\".subplot\").select(\".\"+d)})}for(var v=[],_,b=0;b<o.length;b++){var p=o[b],k=p[0].trace;c===(k.zorder||0)&&k.xaxis+k.yaxis===f&&((t.indexOf(k.index)!==-1||k.carpet)&&(_&&_[0].trace.xaxis+_[0].trace.yaxis===f&&[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(k.fill)!==-1&&v.indexOf(_)===-1&&v.push(_),v.push(p)),_=p)}mpe(e,h,v,r,n)}}};function mpe(e,t,r,n,i){for(var a=qg.traceLayerClasses,o=e._fullLayout,s=o._zindices,l=o._modules,u,c,f,h=[],d=[],v=0;v<s.length;v++)for(var _=s[v],b=0;b<l.length;b++){u=l[b];var p=u.name,k=ppe.modules[p].categories;if(k.svg){var E=u.layerName||p+\"layer\",T=E+(v?Number(v)+1:\"\"),L=u.plot;c=gpe(r,L,_),f=c[0],r=c[1],f.length&&h.push({i:a.indexOf(E),zindex:v,className:T,plotMethod:L,cdModule:f}),k.zoomScale&&d.push(\".\"+T)}}h.sort(function(M,g){return(M.zindex||0)-(g.zindex||0)||M.i-g.i});var x=t.plot.selectAll(\"g.mlayer\").data(h,function(M){return M.className});if(x.enter().append(\"g\").attr(\"class\",function(M){return M.className}).classed(\"mlayer\",!0).classed(\"rangeplot\",t.isRangePlot),x.exit().remove(),x.order(),x.each(function(M){var g=_I.select(this),P=M.className;M.plotMethod(e,t,M.cdModule,g,n,i),qg.clipOnAxisFalseQuery.indexOf(\".\"+P)===-1&&R0t.setClipUrl(g,t.layerClipId,e)}),o._has(\"scattergl\")&&(u=ppe.getModule(\"scattergl\"),f=gpe(r,u)[0],u.plot(e,t,f)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(qg.clipOnAxisFalseQuery.join(\",\")).selectAll(\".trace\")),d.length)){var C=t.plot.selectAll(d.join(\",\")).selectAll(\".trace\");t.zoomScalePts=C.selectAll(\"path.point\"),t.zoomScaleTxt=C.selectAll(\".textpoint\")}}xv.clean=function(e,t,r,n){var i=n._plots||{},a=t._plots||{},o=n._subplots||{},s,l,u;if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(u in i)s=i[u],s.plotgroup&&s.plotgroup.remove();var c=n._has&&n._has(\"gl\"),f=t._has&&t._has(\"gl\");if(c&&!f)for(u in i)s=i[u],s._scene&&s._scene.destroy();if(o.xaxis&&o.yaxis){var h=S_.listIds({_fullLayout:n});for(l=0;l<h.length;l++){var d=h[l];t[S_.id2name(d)]||n._infolayer.selectAll(\".g-\"+d+\"title\").remove()}}var v=n._has&&n._has(\"cartesian\"),_=t._has&&t._has(\"cartesian\");if(v&&!_)_pe(n._cartesianlayer.selectAll(\".subplot\"),n),n._defs.selectAll(\".axesclip\").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(o.cartesian)for(l=0;l<o.cartesian.length;l++){var b=o.cartesian[l];if(b.indexOf(n2)===-1&&!a[b]){var p=\".\"+b+\",.\"+b+\"-x,.\"+b+\"-y\";n._cartesianlayer.selectAll(p).remove(),xpe(b,n)}}};xv.drawFramework=function(e){var t=e._fullLayout,r=e.calcdata,n,i={};for(n=0;n<r.length;n++){var a=r[n][0],o=a.trace,s=o.zorder||0;i[s]||(i[s]=[]),i[s].push(a)}var l=Object.keys(i).map(Number).sort(i2.sorterAsc);l.length||(l=[0]),t._zindices=l;var u=F0t(e),c=u.length,f=[];for(n=0;n<c;n++)f[n]=u[n].slice();for(var h=1;h<l.length;h++){var d=[];for(n=0;n<c;n++)d[n]=u[n].slice(),d[n][0]+=n2+(h+1);f=f.concat(d)}var v=t._cartesianlayer.selectAll(\".subplot\").data(f,String);v.enter().append(\"g\").attr(\"class\",function(_){return\"subplot \"+_[0]}),v.order(),v.exit().call(_pe,t),v.each(function(_){var b=_[0],p=b.indexOf(n2),k=p!==-1,E=k?b.slice(0,p):b,T=t._plots[b];T||(T=i2.extendFlat({},t._plots[E]),T&&(T.id=b,t._plots[b]=T,t._subplots.cartesian.push(b))),T&&(T.plotgroup=_I.select(this),ype(e,T),k||(T.draglayer=iu(t._draggers,\"g\",b)))})};xv.rangePlot=function(e,t,r){ype(e,t),mpe(e,t,r),I0t.style(e)};function F0t(e){var t=e._fullLayout,r=t._zindices.length,n=t._subplots.cartesian,i=n.length,a,o,s,l,u,c,f=[],h=[];for(a=0;a<i;a++){s=n[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;var d=u._mainAxis,v=c._mainAxis,_=d._id+v._id,b=t._plots[_];l.overlays=[],_!==s&&b?(l.mainplot=_,l.mainplotinfo=b,h.push(s)):(l.mainplot=void 0,l.mainplotinfo=void 0,f.push(s))}for(a=0;a<h.length;a++)s=h[a],l=t._plots[s],l.mainplotinfo.overlays.push(l);var p=f.concat(h),k=[];for(a=0;a<i;a++){s=p[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;for(var E=[],T=1;T<=r;T++){var L=\"\";for(T>1&&(L+=n2+T),E.push(s+L),o=0;o<l.overlays.length;o++)E.push(l.overlays[o].id+L)}E=E.concat([u.layer,c.layer,u.overlaying||\"\",c.overlaying||\"\"]),k.push(E)}return k}function ype(e,t){var r=e._fullLayout,n=t.plotgroup,i=t.id,a=i.indexOf(n2),o=a!==-1,s=qg.layerValue2layerClass[t.xaxis.layer],l=qg.layerValue2layerClass[t.yaxis.layer],u=r._hasOnlyLargeSploms,c=r._zindices.length>1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,\"path\",\"xlines-above\"),t.ylines=iu(n,\"path\",\"ylines-above\"),t.xaxislayer=iu(n,\"g\",\"xaxislayer-above\"),t.yaxislayer=iu(n,\"g\",\"yaxislayer-above\");else{if(!o){var h=iu(n,\"g\",\"layer-subplot\");t.shapelayer=iu(h,\"g\",\"shapelayer\"),t.imagelayer=iu(h,\"g\",\"imagelayer\"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,\"g\",\"minor-gridlayer\"),t.gridlayer=iu(n,\"g\",\"gridlayer\"),t.zerolinelayer=iu(n,\"g\",\"zerolinelayer\"));var d=iu(n,\"g\",\"layer-between\");t.shapelayerBetween=iu(d,\"g\",\"shapelayer\"),t.imagelayerBetween=iu(d,\"g\",\"imagelayer\"),iu(n,\"path\",\"xlines-below\"),iu(n,\"path\",\"ylines-below\"),t.overlinesBelow=iu(n,\"g\",\"overlines-below\"),iu(n,\"g\",\"xaxislayer-below\"),iu(n,\"g\",\"yaxislayer-below\"),t.overaxesBelow=iu(n,\"g\",\"overaxes-below\")}t.overplot=iu(n,\"g\",\"overplot\"),t.plot=iu(t.overplot,\"g\",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,\"g\",\"zerolinelayer-above\"),o||(t.xlines=iu(n,\"path\",\"xlines-above\"),t.ylines=iu(n,\"path\",\"ylines-above\"),t.overlinesAbove=iu(n,\"g\",\"overlines-above\"),iu(n,\"g\",\"xaxislayer-above\"),iu(n,\"g\",\"yaxislayer-above\"),t.overaxesAbove=iu(n,\"g\",\"overaxes-above\"),t.xlines=n.select(\".xlines-\"+s),t.ylines=n.select(\".ylines-\"+l),t.xaxislayer=n.select(\".xaxislayer-\"+s),t.yaxislayer=n.select(\".yaxislayer-\"+l))}else{var v=f.plotgroup,_=i+\"-x\",b=i+\"-y\";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,\"path\",_),iu(f.overlinesBelow,\"path\",b),iu(f.overaxesBelow,\"g\",_),iu(f.overaxesBelow,\"g\",b),t.plot=iu(f.overplot,\"g\",i),iu(f.overlinesAbove,\"path\",_),iu(f.overlinesAbove,\"path\",b),iu(f.overaxesAbove,\"g\",_),iu(f.overaxesAbove,\"g\",b),t.xlines=v.select(\".overlines-\"+s).select(\".\"+_),t.ylines=v.select(\".overlines-\"+l).select(\".\"+b),t.xaxislayer=v.select(\".overaxes-\"+s).select(\".\"+_),t.yaxislayer=v.select(\".overaxes-\"+l).select(\".\"+b)}o||(u||(yI(t.minorGridlayer,\"g\",t.xaxis._id),yI(t.minorGridlayer,\"g\",t.yaxis._id),t.minorGridlayer.selectAll(\"g\").map(function(p){return p[0]}).sort(S_.idSort),yI(t.gridlayer,\"g\",t.xaxis._id),yI(t.gridlayer,\"g\",t.yaxis._id),t.gridlayer.selectAll(\"g\").map(function(p){return p[0]}).sort(S_.idSort)),t.xlines.style(\"fill\",\"none\").classed(\"crisp\",!0),t.ylines.style(\"fill\",\"none\").classed(\"crisp\",!0))}function _pe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=_I.select(this);c.remove(),xpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(\".trace\").remove()}}}function xpe(e,t){t._draggers.selectAll(\"g.\"+e).remove(),t._defs.select(\"#clip\"+t._uid+e+\"plot\").remove()}xv.toSVG=function(e){var t=e._fullLayout._glimages,r=_I.select(e).selectAll(\".svg-container\"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\");function i(){var a=this,o=a.toDataURL(\"image/png\"),s=t.append(\"svg:image\");s.attr({xmlns:D0t.svg,\"xlink:href\":o,preserveAspectRatio:\"none\",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i)};xv.updateFx=WN().updateFx});var wpe=ye((Fsr,bpe)=>{\"use strict\";var xI=Ru();bpe.exports={hasLines:xI.hasLines,hasMarkers:xI.hasMarkers,hasText:xI.hasText,isBubble:xI.isBubble,attributes:pf(),layoutAttributes:tL(),supplyDefaults:Xde(),crossTraceDefaults:cU(),supplyLayoutDefaults:Jde(),calc:q0().calc,crossTraceCalc:wve(),arraysToCalcdata:Rm(),plot:dT(),colorbar:$d(),formatLabels:lI(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:mT(),selectPoints:yT(),animatable:!0,moduleType:\"trace\",name:\"scatter\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\",\"zoomScale\"],meta:{}}});var Spe=ye((zsr,Ape)=>{\"use strict\";var z0t=Oa(),O0t=ka(),Tpe=ON(),FU=Dr(),q0t=FU.strScale,B0t=FU.strRotate,N0t=FU.strTranslate;Ape.exports=function(t,r,n){var i=t.node(),a=Tpe[n.arrowhead||0],o=Tpe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf(\"start\")>=0,c=r.indexOf(\"end\")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,_,b;if(i.nodeName===\"line\"){d={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},v={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var p=d.x-v.x,k=d.y-v.y;if(_=Math.atan2(k,p),b=_+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){U();return}if(f){if(f*f>p*p+k*k){U();return}var E=f*Math.cos(_),T=f*Math.sin(_);v.x+=E,v.y+=T,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){U();return}var L=h*Math.cos(_),x=h*Math.sin(_);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName===\"path\"){var C=i.getTotalLength(),M=\"\";if(C<f+h){U();return}var g=i.getPointAtLength(0),P=i.getPointAtLength(.1);_=Math.atan2(g.y-P.y,g.x-P.x),d=i.getPointAtLength(Math.min(h,C)),M=\"0px,\"+h+\"px,\";var A=i.getPointAtLength(C),z=i.getPointAtLength(C-.1);b=Math.atan2(A.y-z.y,A.x-z.x),v=i.getPointAtLength(Math.max(0,C-f));var O=M?h+f:f;M+=C-O+\"px,\"+C+\"px\",t.style(\"stroke-dasharray\",M)}function U(){t.style(\"stroke-dasharray\",\"0px,100px\")}function G(Z,j,N,H){Z.path&&(Z.noRotate&&(N=0),z0t.select(i.parentNode).append(\"path\").attr({class:t.attr(\"class\"),d:Z.path,transform:N0t(j.x,j.y)+B0t(N*180/Math.PI)+q0t(H)}).style({fill:O0t.rgb(n.arrowcolor),\"stroke-width\":0}))}u&&G(o,d,_,l),c&&G(a,v,b,s)}});var bI=ye((Osr,Lpe)=>{\"use strict\";var Mpe=Oa(),zU=qa(),U0t=Mc(),E_=Dr(),OU=E_.strTranslate,d4=ho(),a2=ka(),By=So(),Epe=vf(),qU=Zl(),BU=Eg(),h4=yv(),V0t=vl().arrayEditor,G0t=Spe();Lpe.exports={draw:H0t,drawOne:kpe,drawRaw:Cpe};function H0t(e){var t=e._fullLayout;t._infolayer.selectAll(\".annotation\").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&kpe(e,r);return U0t.previousPromises(e)}function kpe(e,t){var r=e._fullLayout,n=r.annotations[t]||{},i=d4.getFromId(e,n.xref),a=d4.getFromId(e,n.yref);i&&i.setScale(),a&&a.setScale(),Cpe(e,n,t,!1,i,a)}function M_(e,t,r,n,i){var a=i[r],o=i[r+\"ref\"],s=r.indexOf(\"y\")!==-1,l=d4.getRefType(o)===\"domain\",u=s?n.h:n.w;return e?l?a+(s?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(s?-t:t)/u}function Cpe(e,t,r,n,i,a){var o=e._fullLayout,s=e._fullLayout._size,l=e._context.edits,u,c;n?(u=\"annotation-\"+n,c=n+\".annotations\"):(u=\"annotation\",c=\"annotations\");var f=V0t(e.layout,c,t),h=f.modifyBase,d=f.modifyItem,v=f.getUpdateObj;o._infolayer.selectAll(\".\"+u+'[data-index=\"'+r+'\"]').remove();var _=\"clip\"+o._uid+\"_ann\"+r;if(!t._input||t.visible===!1){Mpe.selectAll(\"#\"+_).remove();return}var b={x:{},y:{}},p=+t.textangle||0,k=o._infolayer.append(\"g\").classed(u,!0).attr(\"data-index\",String(r)).style(\"opacity\",t.opacity),E=k.append(\"g\").classed(\"annotation-text-g\",!0),T=l[t.showarrow?\"annotationTail\":\"annotationPosition\"],L=t.captureevents||l.annotationText||T;function x(H){var re={index:r,annotation:t._input,fullAnnotation:t,event:H};return n&&(re.subplotId=n),re}var C=E.append(\"g\").style(\"pointer-events\",L?\"all\":null).call(BU,\"pointer\").on(\"click\",function(){e._dragging=!1,e.emit(\"plotly_clickannotation\",x(Mpe.event))});t.hovertext&&C.on(\"mouseover\",function(){var H=t.hoverlabel,re=H.font,oe=this.getBoundingClientRect(),_e=e.getBoundingClientRect();Epe.loneHover({x0:oe.left-_e.left,x1:oe.right-_e.left,y:(oe.top+oe.bottom)/2-_e.top,text:t.hovertext,color:H.bgcolor,borderColor:H.bordercolor,fontFamily:re.family,fontSize:re.size,fontColor:re.color,fontWeight:re.weight,fontStyle:re.style,fontVariant:re.variant,fontShadow:re.fontShadow,fontLineposition:re.fontLineposition,fontTextcase:re.fontTextcase},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:e})}).on(\"mouseout\",function(){Epe.loneUnhover(o._hoverlayer.node())});var M=t.borderwidth,g=t.borderpad,P=M+g,A=C.append(\"rect\").attr(\"class\",\"bg\").style(\"stroke-width\",M+\"px\").call(a2.stroke,t.bordercolor).call(a2.fill,t.bgcolor),z=t.width||t.height,O=o._topclips.selectAll(\"#\"+_).data(z?[0]:[]);O.enter().append(\"clipPath\").classed(\"annclip\",!0).attr(\"id\",_).append(\"rect\"),O.exit().remove();var U=t.font,G=o._meta?E_.templateString(t.text,o._meta):t.text,Z=C.append(\"text\").classed(\"annotation-text\",!0).text(G);function j(H){return H.call(By.font,U).attr({\"text-anchor\":{left:\"start\",right:\"end\"}[t.align]||\"middle\"}),qU.convertToTspans(H,e,N),H}function N(){var H=Z.selectAll(\"a\");if(H.size()===1&&H.text()===Z.text()){var re=C.insert(\"a\",\":first-child\").attr({\"xlink:xlink:href\":H.attr(\"xlink:href\"),\"xlink:xlink:show\":H.attr(\"xlink:show\")}).style({cursor:\"pointer\"});re.node().appendChild(A.node())}var oe=C.select(\".annotation-text-math-group\"),_e=!oe.empty(),Ce=By.bBox((_e?oe:Z).node()),Le=Ce.width,ge=Ce.height,ie=t.width||Le,Se=t.height||ge,Ee=Math.round(ie+2*P),Ae=Math.round(Se+2*P);function Be(We,tt){return tt===\"auto\"&&(We<1/3?tt=\"left\":We>2/3?tt=\"right\":tt=\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[tt]}for(var Pe=!1,me=[\"x\",\"y\"],De=0;De<me.length;De++){var ce=me[De],je=t[ce+\"ref\"]||ce,lt=t[\"a\"+ce+\"ref\"],pt={x:i,y:a}[ce],Vt=(p+(ce===\"x\"?0:-90))*Math.PI/180,ot=Ee*Math.cos(Vt),ut=Ae*Math.sin(Vt),Wt=Math.abs(ot)+Math.abs(ut),Nt=t[ce+\"anchor\"],$t=t[ce+\"shift\"]*(ce===\"x\"?1:-1),sr=b[ce],Tr,fr,$e,St,Qt,Gt=d4.getRefType(je);if(pt&&Gt!==\"domain\"){var _t=pt.r2fraction(t[ce]);(_t<0||_t>1)&&(lt===je?(_t=pt.r2fraction(t[\"a\"+ce]),(_t<0||_t>1)&&(Pe=!0)):Pe=!0),Tr=pt._offset+pt.r2p(t[ce]),St=.5}else{var It=Gt===\"domain\";ce===\"x\"?($e=t[ce],Tr=It?pt._offset+pt._length*$e:Tr=s.l+s.w*$e):($e=1-t[ce],Tr=It?pt._offset+pt._length*$e:Tr=s.t+s.h*$e),St=t.showarrow?.5:$e}if(t.showarrow){sr.head=Tr;var mt=t[\"a\"+ce];if(Qt=ot*Be(.5,t.xanchor)-ut*Be(.5,t.yanchor),lt===je){var er=d4.getRefType(lt);er===\"domain\"?(ce===\"y\"&&(mt=1-mt),sr.tail=pt._offset+pt._length*mt):er===\"paper\"?ce===\"y\"?(mt=1-mt,sr.tail=s.t+s.h*mt):sr.tail=s.l+s.w*mt:sr.tail=pt._offset+pt.r2p(mt),fr=Qt}else sr.tail=Tr+mt,fr=Qt+mt;sr.text=sr.tail+Qt;var lr=o[ce===\"x\"?\"width\":\"height\"];if(je===\"paper\"&&(sr.head=E_.constrain(sr.head,1,lr-1)),lt===\"pixel\"){var wr=-Math.max(sr.tail-3,sr.text),Lr=Math.min(sr.tail+3,sr.text)-lr;wr>0?(sr.tail+=wr,sr.text+=wr):Lr>0&&(sr.tail-=Lr,sr.text-=Lr)}sr.tail+=$t,sr.head+=$t}else Qt=Wt*Be(St,Nt),fr=Qt,sr.text=Tr+Qt;sr.text+=$t,Qt+=$t,fr+=$t,t[\"_\"+ce+\"padplus\"]=Wt/2+fr,t[\"_\"+ce+\"padminus\"]=Wt/2-fr,t[\"_\"+ce+\"size\"]=Wt,t[\"_\"+ce+\"shift\"]=Qt}if(Pe){C.remove();return}var ti=0,Br=0;if(t.align!==\"left\"&&(ti=(ie-Le)*(t.align===\"center\"?.5:1)),t.valign!==\"top\"&&(Br=(Se-ge)*(t.valign===\"middle\"?.5:1)),_e)oe.select(\"svg\").attr({x:P+ti-1,y:P+Br}).call(By.setClipUrl,z?_:null,e);else{var Vr=P+Br-Ce.top,dt=P+ti-Ce.left;Z.call(qU.positionText,dt,Vr).call(By.setClipUrl,z?_:null,e)}O.select(\"rect\").call(By.setRect,P,P,ie,Se),A.call(By.setRect,M/2,M/2,Ee-M,Ae-M),C.call(By.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Ae/2)),E.attr({transform:\"rotate(\"+p+\",\"+b.x.text+\",\"+b.y.text+\")\"});var Ge=function(We,tt){k.selectAll(\".annotation-arrow-g\").remove();var xt=b.x.head,Ie=b.y.head,xe=b.x.tail+We,ke=b.y.tail+tt,vt=b.x.text+We,ir=b.y.text+tt,ar=E_.rotationXYMatrix(p,vt,ir),vr=E_.apply2DTransform(ar),ii=E_.apply2DTransform2(ar),pi=+A.attr(\"width\"),$r=+A.attr(\"height\"),di=vt-.5*pi,ji=di+pi,In=ir-.5*$r,wi=In+$r,On=[[di,In,di,wi],[di,wi,ji,wi],[ji,wi,ji,In],[ji,In,di,In]].map(ii);if(!On.reduce(function(Qr,Oi){return Qr^!!E_.segmentsIntersect(xt,Ie,xt+1e6,Ie+1e6,Oi[0],Oi[1],Oi[2],Oi[3])},!1)){On.forEach(function(Qr){var Oi=E_.segmentsIntersect(xe,ke,xt,Ie,Qr[0],Qr[1],Qr[2],Qr[3]);Oi&&(xe=Oi.x,ke=Oi.y)});var qn=t.arrowwidth,Fn=t.arrowcolor,ra=t.arrowside,la=k.append(\"g\").style({opacity:a2.opacity(Fn)}).classed(\"annotation-arrow-g\",!0),Ut=la.append(\"path\").attr(\"d\",\"M\"+xe+\",\"+ke+\"L\"+xt+\",\"+Ie).style(\"stroke-width\",qn+\"px\").call(a2.stroke,a2.rgb(Fn));if(G0t(Ut,ra,t),l.annotationPosition&&Ut.node().parentNode&&!n){var wt=xt,rr=Ie;if(t.standoff){var nr=Math.sqrt(Math.pow(xt-xe,2)+Math.pow(Ie-ke,2));wt+=t.standoff*(xe-xt)/nr,rr+=t.standoff*(ke-Ie)/nr}var Er=la.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).classed(\"cursor-move\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(xe-wt)+\",\"+(ke-rr),transform:OU(wt,rr)}).style(\"stroke-width\",qn+6+\"px\").call(a2.stroke,\"rgba(0,0,0,0)\").call(a2.fill,\"rgba(0,0,0,0)\"),Xr,ri;h4.init({element:Er.node(),gd:e,prepFn:function(){var Qr=By.getTranslate(C);Xr=Qr.x,ri=Qr.y,i&&i.autorange&&h(i._name+\".autorange\",!0),a&&a.autorange&&h(a._name+\".autorange\",!0)},moveFn:function(Qr,Oi){var $i=vr(Xr,ri),tn=$i[0]+Qr,fn=$i[1]+Oi;C.call(By.setTranslate,tn,fn),d(\"x\",M_(i,Qr,\"x\",s,t)),d(\"y\",M_(a,Oi,\"y\",s,t)),t.axref===t.xref&&d(\"ax\",M_(i,Qr,\"ax\",s,t)),t.ayref===t.yref&&d(\"ay\",M_(a,Oi,\"ay\",s,t)),la.attr(\"transform\",OU(Qr,Oi)),E.attr({transform:\"rotate(\"+p+\",\"+tn+\",\"+fn+\")\"})},doneFn:function(){zU.call(\"_guiRelayout\",e,v());var Qr=document.querySelector(\".js-notes-box-panel\");Qr&&Qr.redraw(Qr.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),T){var Je;h4.init({element:C.node(),gd:e,prepFn:function(){Je=E.attr(\"transform\")},moveFn:function(We,tt){var xt=\"pointer\";if(t.showarrow)t.axref===t.xref?d(\"ax\",M_(i,We,\"ax\",s,t)):d(\"ax\",t.ax+We),t.ayref===t.yref?d(\"ay\",M_(a,tt,\"ay\",s.w,t)):d(\"ay\",t.ay+tt),Ge(We,tt);else{if(n)return;var Ie,xe;if(i)Ie=M_(i,We,\"x\",s,t);else{var ke=t._xsize/s.w,vt=t.x+(t._xshift-t.xshift)/s.w-ke/2;Ie=h4.align(vt+We/s.w,ke,0,1,t.xanchor)}if(a)xe=M_(a,tt,\"y\",s,t);else{var ir=t._ysize/s.h,ar=t.y-(t._yshift+t.yshift)/s.h-ir/2;xe=h4.align(ar-tt/s.h,ir,0,1,t.yanchor)}d(\"x\",Ie),d(\"y\",xe),(!i||!a)&&(xt=h4.getCursor(i?.5:Ie,a?.5:xe,t.xanchor,t.yanchor))}E.attr({transform:OU(We,tt)+Je}),BU(C,xt)},clickFn:function(We,tt){t.captureevents&&e.emit(\"plotly_clickannotation\",x(tt))},doneFn:function(){BU(C),zU.call(\"_guiRelayout\",e,v());var We=document.querySelector(\".js-notes-box-panel\");We&&We.redraw(We.selectedObj)}})}}l.annotationText?Z.call(qU.makeEditable,{delegate:C,gd:e}).call(j).on(\"edit\",function(H){t.text=H,this.call(j),d(\"text\",H),i&&i.autorange&&h(i._name+\".autorange\",!0),a&&a.autorange&&h(a._name+\".autorange\",!0),zU.call(\"_guiRelayout\",e,v())}):Z.call(j)}});var zpe=ye((qsr,Fpe)=>{\"use strict\";var Ppe=Dr(),j0t=qa(),Ipe=vl().arrayEditor;Fpe.exports={hasClickToShow:W0t,onClick:X0t};function W0t(e,t){var r=Dpe(e,t);return r.on.length>0||r.explicitOff.length>0}function X0t(e,t){var r=Dpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s<n.length;s++)l=Ipe(e.layout,\"annotations\",o[n[s]]),l.modifyItem(\"visible\",!0),Ppe.extendFlat(a,l.getUpdateObj());for(s=0;s<i.length;s++)l=Ipe(e.layout,\"annotations\",o[i[s]]),l.modifyItem(\"visible\",!1),Ppe.extendFlat(a,l.getUpdateObj());return j0t.call(\"update\",e,{},a)}}function Dpe(e,t){var r=e._fullLayout.annotations,n=[],i=[],a=[],o=(t||[]).length,s,l,u,c,f,h,d,v;for(s=0;s<r.length;s++)if(u=r[s],c=u.clicktoshow,c){for(l=0;l<o;l++)if(f=t[l],h=f.xaxis,d=f.yaxis,h._id===u.xref&&d._id===u.yref&&h.d2r(f.x)===Rpe(u._xclick,h)&&d.d2r(f.y)===Rpe(u._yclick,d)){u.visible?c===\"onout\"?v=i:v=a:v=n,v.push(s);break}l===o&&u.visible&&c===\"onout\"&&i.push(s)}return{on:n,off:i,explicitOff:a}}function Rpe(e,t){return t.type===\"log\"?t.l2r(e):t.d2r(e)}});var UU=ye((Bsr,Ope)=>{\"use strict\";var NU=Dr(),_T=ka();Ope.exports=function(t,r,n,i){i(\"opacity\");var a=i(\"bgcolor\"),o=i(\"bordercolor\"),s=_T.opacity(o);i(\"borderpad\");var l=i(\"borderwidth\"),u=i(\"showarrow\");i(\"text\",u?\" \":n._dfltTitle.annotation),i(\"textangle\"),NU.coerceFont(i,\"font\",n.font),i(\"width\"),i(\"align\");var c=i(\"height\");if(c&&i(\"valign\"),u){var f=i(\"arrowside\"),h,d;f.indexOf(\"end\")!==-1&&(h=i(\"arrowhead\"),d=i(\"arrowsize\")),f.indexOf(\"start\")!==-1&&(i(\"startarrowhead\",h),i(\"startarrowsize\",d)),i(\"arrowcolor\",s?r.bordercolor:_T.defaultLine),i(\"arrowwidth\",(s&&l||1)*2),i(\"standoff\"),i(\"startstandoff\")}var v=i(\"hovertext\"),_=n.hoverlabel||{};if(v){var b=i(\"hoverlabel.bgcolor\",_.bgcolor||(_T.opacity(a)?_T.rgb(a):_T.defaultLine)),p=i(\"hoverlabel.bordercolor\",_.bordercolor||_T.contrast(b)),k=NU.extendFlat({},_.font);k.color||(k.color=p),NU.coerceFont(i,\"hoverlabel.font\",k)}i(\"captureevents\",!!v)}});var Bpe=ye((Nsr,qpe)=>{\"use strict\";var VU=Dr(),o2=ho(),Z0t=Zd(),Y0t=UU(),K0t=Jb();qpe.exports=function(t,r){Z0t(t,r,{name:\"annotations\",handleItemDefaults:J0t})};function J0t(e,t,r){function n(E,T){return VU.coerce(e,t,K0t,E,T)}var i=n(\"visible\"),a=n(\"clicktoshow\");if(i||a){Y0t(e,t,r,n);for(var o=t.showarrow,s=[\"x\",\"y\"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=o2.coerceRef(e,t,u,f,\"\",\"paper\");if(h!==\"paper\"){var d=o2.getFromId(u,h);d._annIndices.push(t._index)}if(o2.coercePosition(t,u,n,h,f,.5),o){var v=\"a\"+f,_=o2.coerceRef(e,t,u,v,\"pixel\",[\"pixel\",\"paper\"]);_!==\"pixel\"&&_!==h&&(_=t[v]=\"pixel\");var b=_===\"pixel\"?l[c]:.4;o2.coercePosition(t,u,n,_,v,b)}n(f+\"anchor\"),n(f+\"shift\")}if(VU.noneOrAll(e,t,[\"x\",\"y\"]),o&&VU.noneOrAll(e,t,[\"ax\",\"ay\"]),a){var p=n(\"xclick\"),k=n(\"yclick\");t._xclick=p===void 0?t.x:o2.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:o2.cleanPosition(k,u,t.yref)}}}});var Vpe=ye((Usr,Upe)=>{\"use strict\";var GU=Dr(),s2=ho(),$0t=bI().draw;Upe.exports=function(t){var r=t._fullLayout,n=GU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return GU.syncOrAsync([$0t,Q0t],t)};function Q0t(e){var t=e._fullLayout;GU.filterVisible(t.annotations).forEach(function(r){var n=s2.getFromId(e,r.xref),i=s2.getFromId(e,r.yref),a=s2.getRefType(r.xref),o=s2.getRefType(r.yref);r._extremes={},a===\"range\"&&Npe(r,n),o===\"range\"&&Npe(r,i)})}function Npe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e[\"a\"+n],o=e[n+\"ref\"],s=e[\"a\"+n+\"ref\"],l=e[\"_\"+n+\"padplus\"],u=e[\"_\"+n+\"padminus\"],c={x:1,y:-1}[n]*e[n+\"shift\"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,_=v+c,b=v-c,p;if(s===o){var k=s2.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=s2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,_),ppadminus:Math.max(u,b)});p={min:[k.min[0],E.min[0]],max:[k.max[0],E.max[0]]}}else _=a?_+a:_,b=a?b-a:b,p=s2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,_),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Hpe=ye((Vsr,Gpe)=>{\"use strict\";var egt=Eo(),tgt=S6();Gpe.exports=function(t,r,n,i){r=r||{};var a=n===\"log\"&&r.type===\"linear\",o=n===\"linear\"&&r.type===\"log\";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],_=null;a?_=tgt(v,r.range):_=Math.pow(10,v),egt(_)||(_=null),i(c+d,_)}for(var h=0;h<s.length;h++)u=s[h],c=\"annotations[\"+h+\"].\",u[l+\"ref\"]===r._id&&f(l),u[\"a\"+l+\"ref\"]===r._id&&f(\"a\"+l)}});var Xpe=ye((Gsr,Wpe)=>{\"use strict\";var HU=bI(),jpe=zpe();Wpe.exports={moduleType:\"component\",name:\"annotations\",layoutAttributes:Jb(),supplyLayoutDefaults:Bpe(),includeBasePlot:WM()(\"annotations\"),calcAutorange:Vpe(),draw:HU.draw,drawOne:HU.drawOne,drawRaw:HU.drawRaw,hasClickToShow:jpe.hasClickToShow,onClick:jpe.onClick,convertCoords:Hpe()}});var wI=ye((Hsr,Zpe)=>{\"use strict\";var kc=Jb(),rgt=mc().overrideAll,igt=vl().templatedArray;Zpe.exports=rgt(igt(\"annotation\",{visible:kc.visible,x:{valType:\"any\"},y:{valType:\"any\"},z:{valType:\"any\"},ax:{valType:\"number\"},ay:{valType:\"number\"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),\"calc\",\"from-root\")});var Kpe=ye((jsr,Ype)=>{\"use strict\";var jU=Dr(),ngt=ho(),agt=Zd(),ogt=UU(),sgt=wI();Ype.exports=function(t,r,n){agt(t,r,{name:\"annotations\",handleItemDefaults:lgt,fullLayout:n.fullLayout})};function lgt(e,t,r,n){function i(s,l){return jU.coerce(e,t,sgt,s,l)}function a(s){var l=s+\"axis\",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ngt.coercePosition(t,u,i,s,s,.5)}var o=i(\"visible\");o&&(ogt(e,t,n.fullLayout,i),a(\"x\"),a(\"y\"),a(\"z\"),jU.noneOrAll(e,t,[\"x\",\"y\",\"z\"]),t.xref=\"x\",t.yref=\"y\",t.zref=\"z\",i(\"xanchor\"),i(\"yanchor\"),i(\"xshift\"),i(\"yshift\"),t.showarrow&&(t.axref=\"pixel\",t.ayref=\"pixel\",i(\"ax\",-10),i(\"ay\",-30),jU.noneOrAll(e,t,[\"ax\",\"ay\"])))}});var e0e=ye((Wsr,Qpe)=>{\"use strict\";var Jpe=Dr(),$pe=ho();Qpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i<n.length;i++)ugt(n[i],t);t.fullLayout._infolayer.selectAll(\".annotation-\"+t.id).remove()};function ugt(e,t){var r=t.fullSceneLayout,n=r.domain,i=t.fullLayout._size,a={pdata:null,type:\"linear\",autorange:!1,range:[-1/0,1/0]};e._xa={},Jpe.extendFlat(e._xa,a),$pe.setConvert(e._xa),e._xa._offset=i.l+n.x[0]*i.w,e._xa.l2p=function(){return .5*(1+e._pdata[0]/e._pdata[3])*i.w*(n.x[1]-n.x[0])},e._ya={},Jpe.extendFlat(e._ya,a),$pe.setConvert(e._ya),e._ya._offset=i.t+(1-n.y[1])*i.h,e._ya.l2p=function(){return .5*(1-e._pdata[1]/e._pdata[3])*i.h*(n.y[1]-n.y[0])}}});var XU=ye((Xsr,t0e)=>{\"use strict\";function WU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function cgt(e,t){var r=WU(e.projection,WU(e.view,WU(e.model,[t[0],t[1],t[2],1])));return r}t0e.exports=cgt});var i0e=ye((Zsr,r0e)=>{\"use strict\";var fgt=bI().drawRaw,hgt=XU(),dgt=[\"x\",\"y\",\"z\"];r0e.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a<i.length;a++){for(var o=i[a],s=!1,l=0;l<3;l++){var u=dgt[l],c=o[u],f=r[u+\"axis\"],h=f.r2fraction(c);if(h<0||h>1){s=!0;break}}s?t.fullLayout._infolayer.select(\".annotation-\"+t.id+'[data-index=\"'+a+'\"]').remove():(o._pdata=hgt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),fgt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var o0e=ye((Ysr,a0e)=>{\"use strict\";var vgt=qa(),n0e=Dr();a0e.exports={moduleType:\"component\",name:\"annotations3d\",schema:{subplots:{scene:{annotations:wI()}}},layoutAttributes:wI(),handleDefaults:Kpe(),includeBasePlot:pgt,convert:e0e(),draw:i0e()};function pgt(e,t){var r=vgt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a<i.length;a++){var o=i[a];n.test(o)&&(e[o].annotations||[]).length&&(n0e.pushUnique(t._basePlotModules,r),n0e.pushUnique(t._subplots.gl3d,o))}}});var ZU=ye(($sr,c0e)=>{\"use strict\";var Ksr=Rh(),s0e=ec(),l0e=pf().line,ggt=Pd().dash,Bg=Ao().extendFlat,mgt=vl().templatedArray,Jsr=HM(),xT=Gl(),u0e=Jb(),{shapeTexttemplateAttrs:ygt,templatefallbackAttrs:_gt}=Ll(),xgt=D6();c0e.exports=mgt(\"shape\",{visible:Bg({},xT.visible,{editType:\"calc+arraydraw\"}),showlegend:{valType:\"boolean\",dflt:!1,editType:\"calc+arraydraw\"},legend:Bg({},xT.legend,{editType:\"calc+arraydraw\"}),legendgroup:Bg({},xT.legendgroup,{editType:\"calc+arraydraw\"}),legendgrouptitle:{text:Bg({},xT.legendgrouptitle.text,{editType:\"calc+arraydraw\"}),font:s0e({editType:\"calc+arraydraw\"}),editType:\"calc+arraydraw\"},legendrank:Bg({},xT.legendrank,{editType:\"calc+arraydraw\"}),legendwidth:Bg({},xT.legendwidth,{editType:\"calc+arraydraw\"}),type:{valType:\"enumerated\",values:[\"circle\",\"rect\",\"path\",\"line\"],editType:\"calc+arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\",\"between\"],dflt:\"above\",editType:\"arraydraw\"},xref:Bg({},u0e.xref,{arrayOk:!0}),xsizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},xanchor:{valType:\"any\",editType:\"calc+arraydraw\"},x0:{valType:\"any\",editType:\"calc+arraydraw\"},x1:{valType:\"any\",editType:\"calc+arraydraw\"},x0shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},x1shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},yref:Bg({},u0e.yref,{arrayOk:!0}),ysizemode:{valType:\"enumerated\",values:[\"scaled\",\"pixel\"],dflt:\"scaled\",editType:\"calc+arraydraw\"},yanchor:{valType:\"any\",editType:\"calc+arraydraw\"},y0:{valType:\"any\",editType:\"calc+arraydraw\"},y1:{valType:\"any\",editType:\"calc+arraydraw\"},y0shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},y1shift:{valType:\"number\",dflt:0,min:-1,max:1,editType:\"calc\"},path:{valType:\"string\",editType:\"calc+arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},line:{color:Bg({},l0e.color,{editType:\"arraydraw\"}),width:Bg({},l0e.width,{editType:\"calc+arraydraw\"}),dash:Bg({},ggt,{editType:\"arraydraw\"}),editType:\"calc+arraydraw\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},fillrule:{valType:\"enumerated\",values:[\"evenodd\",\"nonzero\"],dflt:\"evenodd\",editType:\"arraydraw\"},editable:{valType:\"boolean\",dflt:!1,editType:\"calc+arraydraw\"},label:{text:{valType:\"string\",dflt:\"\",editType:\"arraydraw\"},texttemplate:ygt({},{keys:Object.keys(xgt)}),texttemplatefallback:_gt({editType:\"arraydraw\"}),font:s0e({editType:\"calc+arraydraw\",colorEditType:\"arraydraw\"}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\",\"start\",\"middle\",\"end\"],editType:\"arraydraw\"},textangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc+arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calc+arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],editType:\"calc+arraydraw\"},padding:{valType:\"number\",dflt:3,min:0,editType:\"arraydraw\"},editType:\"arraydraw\"},editType:\"arraydraw\"})});var h0e=ye((Qsr,f0e)=>{\"use strict\";var bT=Dr(),e0=ho(),bgt=Zd(),wgt=ZU(),v4=x_();f0e.exports=function(t,r){bgt(t,r,{name:\"shapes\",handleItemDefaults:Agt})};function Tgt(e,t){return e?\"bottom\":t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\"}function Agt(e,t,r){function n(E,T){return bT.coerce(e,t,wgt,E,T)}t._isShape=!0;var i=n(\"visible\");if(!i)return;var a=n(\"showlegend\");a&&(n(\"legend\"),n(\"legendwidth\"),n(\"legendgroup\"),n(\"legendgrouptitle.text\"),bT.coerceFont(n,\"legendgrouptitle.font\"),n(\"legendrank\"));var o=n(\"path\"),s=o?\"path\":\"rect\",l=n(\"type\",s),u=l!==\"path\";u&&delete t.path,n(\"editable\"),n(\"layer\"),n(\"opacity\"),n(\"fillcolor\"),n(\"fillrule\");var c=n(\"line.width\");c&&(n(\"line.color\"),n(\"line.dash\"));var f=n(\"xsizemode\"),h=n(\"ysizemode\");let d=[.25,.75],v=[0,10];[\"x\",\"y\"].forEach(E=>{var T=E+\"anchor\",L=E===\"x\"?f:h,x={_fullLayout:r},C,M,g,P;let A=E+\"ref\",z=e[A];if(Array.isArray(z)&&z.length>0){let O=v4.countDefiningCoords(l,o,E);P=e0.coerceRefArray(e,t,x,E,void 0,\"paper\",O),t[\"_\"+E+\"refArray\"]=!0}else P=e0.coerceRef(e,t,x,E,void 0,\"paper\");if(Array.isArray(P))P.forEach(function(O){e0.getRefType(O)===\"range\"&&(C=e0.getFromId(x,O),C&&C._shapeIndices.indexOf(t._index)===-1&&C._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(O){let U=P[O];e0.getRefType(U)===\"range\"?(C=e0.getFromId(x,U),M=v4.shapePositionToRange(C),g=v4.rangeToShapePosition(C),(C.type===\"category\"||C.type===\"multicategory\")&&n(E+O+\"shift\")):M=g=bT.identity;let Z=E+O,j=e[Z];if(e[Z]=M(e[Z],!0),L===\"pixel\"?n(Z,v[O]):e0.coercePosition(t,x,n,U,Z,d[O]),t[Z]=g(t[Z]),e[Z]=j,O===0&&L===\"pixel\"){let N=e[T];e[T]=M(e[T],!0),e0.coercePosition(t,x,n,U,T,.25),t[T]=g(t[T]),e[T]=N}});else{if(e0.getRefType(P)===\"range\"?(C=e0.getFromId(x,P),C._shapeIndices.push(t._index),g=v4.rangeToShapePosition(C),M=v4.shapePositionToRange(C),u&&(C.type===\"category\"||C.type===\"multicategory\")&&(n(E+\"0shift\"),n(E+\"1shift\"))):M=g=bT.identity,u){let U=E+\"0\",G=E+\"1\",Z=e[U],j=e[G];e[U]=M(e[U],!0),e[G]=M(e[G],!0),L===\"pixel\"?(n(U,v[0]),n(G,v[1])):(e0.coercePosition(t,x,n,P,U,d[0]),e0.coercePosition(t,x,n,P,G,d[1])),t[U]=g(t[U]),t[G]=g(t[G]),e[U]=Z,e[G]=j}if(L===\"pixel\"){let U=e[T];e[T]=M(e[T],!0),e0.coercePosition(t,x,n,P,T,.25),t[T]=g(t[T]),e[T]=U}}}),u&&bT.noneOrAll(e,t,[\"x0\",\"x1\",\"y0\",\"y1\"]);var _=l===\"line\",b,p;if(u&&(b=n(\"label.texttemplate\"),n(\"label.texttemplatefallback\")),b||(p=n(\"label.text\")),p||b){n(\"label.textangle\");var k=n(\"label.textposition\",_?\"middle\":\"middle center\");n(\"label.xanchor\"),n(\"label.yanchor\",Tgt(_,k)),n(\"label.padding\"),bT.coerceFont(n,\"label.font\",r.font)}}});var p0e=ye((elr,v0e)=>{\"use strict\";var Sgt=ka(),d0e=Dr();function Mgt(e,t){return e?\"bottom\":t.indexOf(\"top\")!==-1?\"top\":t.indexOf(\"bottom\")!==-1?\"bottom\":\"middle\"}v0e.exports=function(t,r,n){n(\"newshape.visible\"),n(\"newshape.name\"),n(\"newshape.showlegend\"),n(\"newshape.legend\"),n(\"newshape.legendwidth\"),n(\"newshape.legendgroup\"),n(\"newshape.legendgrouptitle.text\"),d0e.coerceFont(n,\"newshape.legendgrouptitle.font\"),n(\"newshape.legendrank\"),n(\"newshape.drawdirection\"),n(\"newshape.layer\"),n(\"newshape.fillcolor\"),n(\"newshape.fillrule\"),n(\"newshape.opacity\");var i=n(\"newshape.line.width\");if(i){var a=(t||{}).plot_bgcolor||\"#FFF\";n(\"newshape.line.color\",Sgt.contrast(a)),n(\"newshape.line.dash\")}var o=t.dragmode===\"drawline\",s=n(\"newshape.label.text\"),l=n(\"newshape.label.texttemplate\");if(n(\"newshape.label.texttemplatefallback\"),s||l){n(\"newshape.label.textangle\");var u=n(\"newshape.label.textposition\",o?\"middle\":\"middle center\");n(\"newshape.label.xanchor\"),n(\"newshape.label.yanchor\",Mgt(o,u)),n(\"newshape.label.padding\"),d0e.coerceFont(n,\"newshape.label.font\",r.font)}n(\"activeshape.fillcolor\"),n(\"activeshape.opacity\")}});var w0e=ye((tlr,b0e)=>{\"use strict\";var YU=Dr(),N0=ho(),Fm=TM(),KU=x_();b0e.exports=function(t){var r=t._fullLayout,n=YU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i<n.length;i++){var a=n[i];a._extremes={};var o,s,l=N0.getRefType(a.xref),u=N0.getRefType(a.yref);if(l===\"array\"){let c=g0e(t,a,\"x\");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,m0e(a))})}else a.xref!==\"paper\"&&l!==\"domain\"&&(o=N0.getFromId(t,a.xref),s=_0e(o,a,Fm.paramIsX),s&&(a._extremes[o._id]=N0.findExtremes(o,s,m0e(a))));if(u===\"array\"){let c=g0e(t,a,\"y\");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,y0e(a))})}else a.yref!==\"paper\"&&u!==\"domain\"&&(o=N0.getFromId(t,a.yref),s=_0e(o,a,Fm.paramIsY),s&&(a._extremes[o._id]=N0.findExtremes(o,s,y0e(a))))}};function g0e(e,t,r){let n=t[r+\"ref\"],i=r===\"x\"?Fm.paramIsX:Fm.paramIsY;function a(f,h){f===\"paper\"||N0.getRefType(f)===\"domain\"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type===\"path\"&&t.path){let f=t.path.match(Fm.segmentRE)||[];for(var s=0,l=0;l<f.length;l++){let h=f[l],d=h.charAt(0),v=i[d].drawn;if(v===void 0)continue;let _=h.slice(1).match(Fm.paramRE);_&&_.length>v&&(a(n[s],_[v]),s++)}}else a(n[0],t[r+\"0\"]),a(n[1],t[r+\"1\"]);let u={};for(let f in o){let h=N0.getFromId(e,f);if(h){var c=h.type===\"category\"||h.type===\"multicategory\"?h.r2c:h.d2c;h.type===\"date\"&&(c=KU.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function m0e(e){return x0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function y0e(e){return x0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function x0e(e,t,r,n,i,a){var o=e/2,s=a;if(t===\"pixel\"){var l=i?KU.extractPathCoords(i,a?Fm.paramIsY:Fm.paramIsX):[r,n],u=YU.aggNums(Math.max,null,l),c=YU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function _0e(e,t,r){var n=e._id.charAt(0)===\"x\"?\"x\":\"y\",i=e.type===\"category\"||e.type===\"multicategory\",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+\"sizemode\"]===\"scaled\";if(c?(a=t[n+\"0\"],o=t[n+\"1\"],i&&(s=t[n+\"0shift\"],l=t[n+\"1shift\"])):(a=t[n+\"anchor\"],o=t[n+\"anchor\"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(Fm.segmentRE),v,_,b,p,k;for(e.type===\"date\"&&(u=KU.decodeDate(u)),v=0;v<d.length;v++)_=d[v],b=r[_.charAt(0)].drawn,b!==void 0&&(p=d[v].slice(1).match(Fm.paramRE),!(!p||p.length<b)&&(k=u(p[b]),k<f&&(f=k),k>h&&(h=k)));if(h>=f)return[f,h]}}});var S0e=ye((rlr,A0e)=>{\"use strict\";var T0e=dP();A0e.exports={moduleType:\"component\",name:\"shapes\",layoutAttributes:ZU(),supplyLayoutDefaults:h0e(),supplyDrawNewShapeDefaults:p0e(),includeBasePlot:WM()(\"shapes\"),calcAutorange:w0e(),draw:T0e.draw,drawOne:T0e.drawOne}});var JU=ye((nlr,E0e)=>{\"use strict\";var M0e=Rh(),Egt=vl().templatedArray,ilr=HM();E0e.exports=Egt(\"image\",{visible:{valType:\"boolean\",dflt:!0,editType:\"arraydraw\"},source:{valType:\"string\",editType:\"arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},sizex:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizey:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizing:{valType:\"enumerated\",values:[\"fill\",\"contain\",\"stretch\"],dflt:\"contain\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},x:{valType:\"any\",dflt:0,editType:\"arraydraw\"},y:{valType:\"any\",dflt:0,editType:\"arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"top\",editType:\"arraydraw\"},xref:{valType:\"enumerated\",values:[\"paper\",M0e.idRegex.x.toString()],dflt:\"paper\",editType:\"arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",M0e.idRegex.y.toString()],dflt:\"paper\",editType:\"arraydraw\"},editType:\"arraydraw\"})});var C0e=ye((alr,k0e)=>{\"use strict\";var kgt=Dr(),$U=ho(),Cgt=Zd(),Lgt=JU(),Pgt=\"images\";k0e.exports=function(t,r){var n={name:Pgt,handleItemDefaults:Igt};Cgt(t,r,n)};function Igt(e,t,r){function n(h,d){return kgt.coerce(e,t,Lgt,h,d)}var i=n(\"source\"),a=n(\"visible\",!!i);if(!a)return t;n(\"layer\"),n(\"xanchor\"),n(\"yanchor\"),n(\"sizex\"),n(\"sizey\"),n(\"sizing\"),n(\"opacity\");for(var o={_fullLayout:r},s=[\"x\",\"y\"],l=0;l<2;l++){var u=s[l],c=$U.coerceRef(e,t,o,u,\"paper\",void 0);if(c!==\"paper\"){var f=$U.getFromId(o,c);f._imgIndices.push(t._index)}$U.coercePosition(t,o,n,c,u,0)}return t}});var R0e=ye((olr,I0e)=>{\"use strict\";var L0e=Oa(),Rgt=So(),wT=ho(),P0e=hf(),Dgt=Wp();I0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s<r.images.length;s++){var l=r.images[s];if(l.visible)if(l.layer===\"below\"&&l.xref!==\"paper\"&&l.yref!==\"paper\"){o=P0e.ref2id(l.xref)+P0e.ref2id(l.yref);var u=r._plots[o];if(!u){a.push(l);continue}u.mainplot&&(o=u.mainplot.id),i[o]||(i[o]=[]),i[o].push(l)}else l.layer===\"above\"?n.push(l):a.push(l)}var c={x:{left:{sizing:\"xMin\",offset:0},center:{sizing:\"xMid\",offset:-1/2},right:{sizing:\"xMax\",offset:-1}},y:{top:{sizing:\"YMin\",offset:0},middle:{sizing:\"YMid\",offset:-1/2},bottom:{sizing:\"YMax\",offset:-1}}};function f(T){var L=L0e.select(this);if(this._imgSrc!==T.source)if(L.attr(\"xmlns\",Dgt.svg),!t._context.staticPlot||T.source&&T.source.slice(0,5)===\"data:\")L.attr(\"xlink:href\",T.source),this._imgSrc=T.source;else{var x=new Promise(function(C){var M=new Image;this.img=M,M.setAttribute(\"crossOrigin\",\"anonymous\"),M.onerror=g,M.onload=function(){var P=document.createElement(\"canvas\");P.width=this.width,P.height=this.height;var A=P.getContext(\"2d\",{willReadFrequently:!0});A.drawImage(this,0,0);var z=P.toDataURL(\"image/png\");L.attr(\"xlink:href\",z),C()},L.on(\"error\",g),M.src=T.source,this._imgSrc=T.source;function g(){L.remove(),C()}}.bind(this));t._promises.push(x)}}function h(T){var L=L0e.select(this),x=wT.getFromId(t,T.xref),C=wT.getFromId(t,T.yref),M=wT.getRefType(T.xref)===\"domain\",g=wT.getRefType(T.yref)===\"domain\",P=r._size,A,z;x!==void 0?A=typeof T.xref==\"string\"&&M?x._length*T.sizex:Math.abs(x.l2p(T.sizex)-x.l2p(0)):A=T.sizex*P.w,C!==void 0?z=typeof T.yref==\"string\"&&g?C._length*T.sizey:Math.abs(C.l2p(T.sizey)-C.l2p(0)):z=T.sizey*P.h;var O=A*c.x[T.xanchor].offset,U=z*c.y[T.yanchor].offset,G=c.x[T.xanchor].sizing+c.y[T.yanchor].sizing,Z,j;switch(x!==void 0?Z=typeof T.xref==\"string\"&&M?x._length*T.x+x._offset:x.r2p(T.x)+x._offset:Z=T.x*P.w+P.l,Z+=O,C!==void 0?j=typeof T.yref==\"string\"&&g?C._length*(1-T.y)+C._offset:C.r2p(T.y)+C._offset:j=P.h-T.y*P.h+P.t,j+=U,T.sizing){case\"fill\":G+=\" slice\";break;case\"stretch\":G=\"none\";break}L.attr({x:Z,y:j,width:A,height:z,preserveAspectRatio:G,opacity:T.opacity});var N=x&&wT.getRefType(T.xref)!==\"domain\"?x._id:\"\",H=C&&wT.getRefType(T.yref)!==\"domain\"?C._id:\"\",re=N+H;Rgt.setClipUrl(L,re?\"clip\"+r._uid+re:null,t)}function d(T){return[T.xref,T.x,T.sizex,T.yref,T.y,T.sizey].join(\"_\")}function v(T,L){return T._index-L._index}var _=r._imageLowerLayer.selectAll(\"image\").data(a,d),b=r._imageUpperLayer.selectAll(\"image\").data(n,d);_.enter().append(\"image\"),b.enter().append(\"image\"),_.exit().remove(),b.exit().remove(),_.each(function(T){f.bind(this)(T),h.bind(this)(T)}),b.each(function(T){f.bind(this)(T),h.bind(this)(T)}),_.sort(v),b.sort(v);var p=Object.keys(r._plots);for(s=0;s<p.length;s++){o=p[s];var k=r._plots[o];if(k.imagelayer){var E=k.imagelayer.selectAll(\"image\").data(i[o]||[],d);E.enter().append(\"image\"),E.exit().remove(),E.each(function(T){f.bind(this)(T),h.bind(this)(T)}),E.sort(v)}}}});var z0e=ye((slr,F0e)=>{\"use strict\";var D0e=Eo(),Fgt=S6();F0e.exports=function(t,r,n,i){r=r||{};var a=n===\"log\"&&r.type===\"linear\",o=n===\"linear\"&&r.type===\"log\";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f<s.length;f++)if(u=s[f],c=\"images[\"+f+\"].\",u[l+\"ref\"]===r._id){var h=u[l],d=u[\"size\"+l],v=null,_=null;if(a){v=Fgt(h,r.range);var b=d/Math.pow(10,v)/2;_=2*Math.log(b+Math.sqrt(1+b*b))/Math.LN10}else v=Math.pow(10,h),_=v*(Math.pow(10,d/2)-Math.pow(10,-d/2));D0e(v)?D0e(_)||(_=null):(v=null,_=null),i(c+l,v),i(c+\"size\"+l,_)}}}});var q0e=ye((llr,O0e)=>{\"use strict\";O0e.exports={moduleType:\"component\",name:\"images\",layoutAttributes:JU(),supplyLayoutDefaults:C0e(),includeBasePlot:WM()(\"images\"),draw:R0e(),convertCoords:z0e()}});var TI=ye((ulr,B0e)=>{\"use strict\";B0e.exports={name:\"updatemenus\",containerClassName:\"updatemenu-container\",headerGroupClassName:\"updatemenu-header-group\",headerClassName:\"updatemenu-header\",headerArrowClassName:\"updatemenu-header-arrow\",dropdownButtonGroupClassName:\"updatemenu-dropdown-button-group\",dropdownButtonClassName:\"updatemenu-dropdown-button\",buttonClassName:\"updatemenu-button\",itemRectClassName:\"updatemenu-item-rect\",itemTextClassName:\"updatemenu-item-text\",menuIndexAttrName:\"updatemenu-active-index\",autoMarginIdRoot:\"updatemenu-\",blankHeaderOpts:{label:\"  \"},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\"#F4FAFF\",hoverColor:\"#F4FAFF\",arrowSymbol:{left:\"\\u25C4\",right:\"\\u25BA\",up:\"\\u25B2\",down:\"\\u25BC\"}}});var QU=ye((clr,U0e)=>{\"use strict\";var zgt=ec(),Ogt=Ih(),qgt=Ao().extendFlat,Bgt=mc().overrideAll,Ngt=F6(),N0e=vl().templatedArray,Ugt=N0e(\"button\",{visible:{valType:\"boolean\"},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},args2:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\",dflt:\"\"},execute:{valType:\"boolean\",dflt:!0}});U0e.exports=Bgt(N0e(\"updatemenu\",{_arrayAttrRegexps:[/^updatemenus\\[(0|[1-9][0-9]+)\\]\\.buttons/],visible:{valType:\"boolean\"},type:{valType:\"enumerated\",values:[\"dropdown\",\"buttons\"],dflt:\"dropdown\"},direction:{valType:\"enumerated\",values:[\"left\",\"right\",\"up\",\"down\"],dflt:\"down\"},active:{valType:\"integer\",min:-1,dflt:0},showactive:{valType:\"boolean\",dflt:!0},buttons:Ugt,x:{valType:\"number\",min:-2,max:3,dflt:-.05},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"right\"},y:{valType:\"number\",min:-2,max:3,dflt:1},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},pad:qgt(Ngt({editType:\"arraydraw\"}),{}),font:zgt({}),bgcolor:{valType:\"color\"},bordercolor:{valType:\"color\",dflt:Ogt.borderLine},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"arraydraw\"}}),\"arraydraw\",\"from-root\")});var j0e=ye((flr,H0e)=>{\"use strict\";var AI=Dr(),V0e=Zd(),G0e=QU(),Vgt=TI(),Ggt=Vgt.name,Hgt=G0e.buttons;H0e.exports=function(t,r){var n={name:Ggt,handleItemDefaults:jgt};V0e(t,r,n)};function jgt(e,t,r){function n(o,s){return AI.coerce(e,t,G0e,o,s)}var i=V0e(e,t,{name:\"buttons\",handleItemDefaults:Wgt}),a=n(\"visible\",i.length>0);a&&(n(\"active\"),n(\"direction\"),n(\"type\"),n(\"showactive\"),n(\"x\"),n(\"y\"),AI.noneOrAll(e,t,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),AI.coerceFont(n,\"font\",r.font),n(\"bgcolor\",r.paper_bgcolor),n(\"bordercolor\"),n(\"borderwidth\"))}function Wgt(e,t){function r(i,a){return AI.coerce(e,t,Hgt,i,a)}var n=r(\"visible\",e.method===\"skip\"||Array.isArray(e.args));n&&(r(\"method\"),r(\"args\"),r(\"args2\"),r(\"label\"),r(\"execute\"))}});var Z0e=ye((hlr,X0e)=>{\"use strict\";X0e.exports=Mf;var Ng=Oa(),W0e=ka(),TT=So(),SI=Dr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\"rect.scrollbox-bg\").data([0]),this.bg.exit().on(\".drag\",null).on(\"wheel\",null).remove(),this.bg.enter().append(\"rect\").classed(\"scrollbox-bg\",!0).style(\"pointer-events\",\"all\").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor=\"#808BA4\";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f===\"down\",d=f===\"left\",v=f===\"right\",_=f===\"up\",b=l,p=c,k,E,T,L;!h&&!d&&!v&&!_&&(this.position.direction=\"down\",h=!0);var x=h||_;x?(k=s,E=k+b,h?(T=u,L=Math.min(T+p,o),p=L-T):(L=u+p,T=Math.max(L-p,0),p=L-T)):(T=u,L=T+p,d?(E=s+b,k=Math.max(E-b,0),b=E-k):(k=s,E=Math.min(k+b,a),b=E-k)),this._box={l:k,t:T,w:b,h:p};var C=l>b,M=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,A=u+c;A+g>o&&(A=o-g);var z=this.container.selectAll(\"rect.scrollbar-horizontal\").data(C?[0]:[]);z.exit().on(\".drag\",null).remove(),z.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(W0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:A,width:M,height:g}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=c>p,U=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+U>a&&(Z=a-U);var N=this.container.selectAll(\"rect.scrollbar-vertical\").data(O?[0]:[]);N.exit().on(\".drag\",null).remove(),N.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(W0e.fill,Mf.barColor),O?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:U,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,re=k-.5,oe=O?E+U+.5:E+.5,_e=T-.5,Ce=C?L+g+.5:L+.5,Le=i._topdefs.selectAll(\"#\"+H).data(C||O?[0]:[]);if(Le.exit().remove(),Le.enter().append(\"clipPath\").attr(\"id\",H).append(\"rect\"),C||O?(this._clipRect=Le.select(\"rect\").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(re),height:Math.ceil(Ce)-Math.floor(_e)}),this.container.call(TT.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(TT.setClipUrl,null),delete this._clipRect),C||O){var ge=Ng.behavior.drag().on(\"dragstart\",function(){Ng.event.sourceEvent.preventDefault()}).on(\"drag\",this._onBoxDrag.bind(this));this.container.on(\"wheel\",null).on(\"wheel\",this._onBoxWheel.bind(this)).on(\".drag\",null).call(ge);var ie=Ng.behavior.drag().on(\"dragstart\",function(){Ng.event.sourceEvent.preventDefault(),Ng.event.sourceEvent.stopPropagation()}).on(\"drag\",this._onBarDrag.bind(this));C&&this.hbar.on(\".drag\",null).call(ie),O&&this.vbar.on(\".drag\",null).call(ie)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on(\"wheel\",null).on(\".drag\",null).call(TT.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(\".drag\",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(\".drag\",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Ng.event.dx),this.vbar&&(r-=Ng.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Ng.event.deltaY),this.vbar&&(r+=Ng.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=SI.constrain(Ng.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=SI.constrain(Ng.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=SI.constrain(t||0,0,n),r=SI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(TT.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(TT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(TT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var nge=ye((dlr,ige)=>{\"use strict\";var AT=Oa(),p4=Mc(),g4=ka(),ST=So(),t0=Dr(),MI=Zl(),Xgt=vl().arrayEditor,K0e=Dh().LINE_SPACING,es=TI(),Zgt=Z0e();ige.exports=function(t){var r=t._fullLayout,n=t0.filterVisible(r[es.name]);function i(h){p4.autoMargin(t,tge(h))}var a=r._menulayer.selectAll(\"g.\"+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append(\"g\").classed(es.containerClassName,!0).style(\"cursor\",\"pointer\"),a.exit().each(function(){AT.select(this).selectAll(\"g.\"+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll(\"g.\"+es.headerGroupClassName).data(n,Ygt);o.enter().append(\"g\").classed(es.headerGroupClassName,!0);for(var s=t0.ensureSingle(a,\"g\",es.dropdownButtonGroupClassName,function(h){h.style(\"pointer-events\",\"all\")}),l=0;l<n.length;l++){var u=n[l];tmt(t,u)}var c=\"updatemenus\"+r._uid,f=new Zgt(t,s,c);o.enter().size()&&(s.node().parentNode.appendChild(s.node()),s.call(tV)),o.exit().each(function(h){s.call(tV),i(h)}).remove(),o.each(function(h){var d=AT.select(this),v=h.type===\"dropdown\"?s:null;p4.manageCommandObserver(t,h,h.buttons,function(_){eV(t,h,h.buttons[_.index],d,v,f,_.index,!0)}),h.type===\"dropdown\"?($0e(t,d,s,f,h),J0e(s,h)&&m4(t,d,s,f,h)):m4(t,d,null,null,h)})}};function Ygt(e){return e._index}function Kgt(e){return+e.attr(es.menuIndexAttrName)==-1}function J0e(e,t){return+e.attr(es.menuIndexAttrName)===t._index}function eV(e,t,r,n,i,a,o,s){t.active=o,Xgt(e.layout,es.name,t).applyUpdate(\"active\",o),t.type===\"buttons\"?m4(e,n,null,null,t):t.type===\"dropdown\"&&(i.attr(es.menuIndexAttrName,\"-1\"),$0e(e,n,i,a,t),s||m4(e,n,i,a,t))}function $0e(e,t,r,n,i){var a=t0.ensureSingle(t,\"g\",es.headerClassName,function(h){h.style(\"pointer-events\",\"all\")}),o=i._dims,s=i.active,l=i.buttons[s]||es.blankHeaderOpts,u={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};a.call(rV,i,l,e).call(rge,i,u,c);var f=t0.ensureSingle(t,\"text\",es.headerArrowClassName,function(h){h.attr(\"text-anchor\",\"end\").call(ST.font,i.font).text(es.arrowSymbol[i.direction])});f.attr({x:o.headerWidth-es.arrowOffsetX+i.pad.l,y:o.headerHeight/2+es.textOffsetY+i.pad.t}),a.on(\"click\",function(){r.call(tV,String(J0e(r,i)?-1:i._index)),m4(e,t,r,n,i)}),a.on(\"mouseover\",function(){a.call(Q0e)}),a.on(\"mouseout\",function(){a.call(ege,i)}),ST.setTranslate(t,o.lx,o.ly)}function m4(e,t,r,n,i){r||(r=t,r.attr(\"pointer-events\",\"all\"));var a=!Kgt(r)||i.type===\"buttons\"?i.buttons:[],o=i.type===\"dropdown\"?es.dropdownButtonClassName:es.buttonClassName,s=r.selectAll(\"g.\"+o).data(t0.filterVisible(a)),l=s.enter().append(\"g\").classed(o,!0),u=s.exit();i.type===\"dropdown\"?(l.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),u.transition().attr(\"opacity\",\"0\").remove()):u.remove();var c=0,f=0,h=i._dims,d=[\"up\",\"down\"].indexOf(i.direction)!==-1;i.type===\"dropdown\"&&(d?f=h.headerHeight+es.gapButtonHeader:c=h.headerWidth+es.gapButtonHeader),i.type===\"dropdown\"&&i.direction===\"up\"&&(f=-es.gapButtonHeader+es.gapButton-h.openHeight),i.type===\"dropdown\"&&i.direction===\"left\"&&(c=-es.gapButtonHeader+es.gapButton-h.openWidth);var v={x:h.lx+c+i.pad.l,y:h.ly+f+i.pad.t,yPad:es.gapButton,xPad:es.gapButton,index:0},_={l:v.x+i.borderwidth,t:v.y+i.borderwidth};s.each(function(b,p){var k=AT.select(this);k.call(rV,i,b,e).call(rge,i,v),k.on(\"click\",function(){AT.event.defaultPrevented||(b.execute&&(b.args2&&i.active===p?(eV(e,i,b,t,r,n,-1),p4.executeAPICommand(e,b.method,b.args2)):(eV(e,i,b,t,r,n,p),p4.executeAPICommand(e,b.method,b.args))),e.emit(\"plotly_buttonclicked\",{menu:i,button:b,active:i.active}))}),k.on(\"mouseover\",function(){k.call(Q0e)}),k.on(\"mouseout\",function(){k.call(ege,i),s.call(Y0e,i)})}),s.call(Y0e,i),d?(_.w=Math.max(h.openWidth,h.headerWidth),_.h=v.y-_.t):(_.w=v.x-_.l,_.h=Math.max(h.openHeight,h.headerHeight)),_.direction=i.direction,n&&(s.size()?Jgt(e,t,r,n,i,_):$gt(n))}function Jgt(e,t,r,n,i,a){var o=i.direction,s=o===\"up\"||o===\"down\",l=i._dims,u=i.active,c,f,h;if(s)for(f=0,h=0;h<u;h++)f+=l.heights[h]+es.gapButton;else for(c=0,h=0;h<u;h++)c+=l.widths[h]+es.gapButton;n.enable(a,c,f),n.hbar&&n.hbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),n.vbar&&n.vbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\")}function $gt(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){t=!1,r||e.disable()}),r&&e.vbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){r=!1,t||e.disable()})}function rV(e,t,r,n){e.call(Qgt,t).call(emt,t,r,n)}function Qgt(e,t){var r=t0.ensureSingle(e,\"rect\",es.itemRectClassName,function(n){n.attr({rx:es.rx,ry:es.ry,\"shape-rendering\":\"crispEdges\"})});r.call(g4.stroke,t.bordercolor).call(g4.fill,t.bgcolor).style(\"stroke-width\",t.borderwidth+\"px\")}function emt(e,t,r,n){var i=t0.ensureSingle(e,\"text\",es.itemTextClassName,function(s){s.attr({\"text-anchor\":\"start\",\"data-notex\":1})}),a=r.label,o=n._fullLayout._meta;o&&(a=t0.templateString(a,o)),i.call(ST.font,t.font).text(a).call(MI.convertToTspans,n)}function Y0e(e,t){var r=t.active;e.each(function(n,i){var a=AT.select(this);i===r&&t.showactive&&a.select(\"rect.\"+es.itemRectClassName).call(g4.fill,es.activeColor)})}function Q0e(e){e.select(\"rect.\"+es.itemRectClassName).call(g4.fill,es.hoverColor)}function ege(e,t){e.select(\"rect.\"+es.itemRectClassName).call(g4.fill,t.bgcolor)}function tmt(e,t){var r=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},n=ST.tester.selectAll(\"g.\"+es.dropdownButtonClassName).data(t0.filterVisible(t.buttons));n.enter().append(\"g\").classed(es.dropdownButtonClassName,!0);var i=[\"up\",\"down\"].indexOf(t.direction)!==-1;n.each(function(c,f){var h=AT.select(this);h.call(rV,t,c,e);var d=h.select(\".\"+es.itemTextClassName),v=d.node()&&ST.bBox(d.node()).width,_=Math.max(v+es.textPadX,es.minWidth),b=t.font.size*K0e,p=MI.lineCount(d),k=Math.max(b*p,es.minHeight)+es.textOffsetY;k=Math.ceil(k),_=Math.ceil(_),r.widths[f]=_,r.heights[f]=k,r.height1=Math.max(r.height1,k),r.width1=Math.max(r.width1,_),i?(r.totalWidth=Math.max(r.totalWidth,_),r.openWidth=r.totalWidth,r.totalHeight+=k+es.gapButton,r.openHeight+=k+es.gapButton):(r.totalWidth+=_+es.gapButton,r.openWidth+=_+es.gapButton,r.totalHeight=Math.max(r.totalHeight,k),r.openHeight=r.totalHeight)}),i?r.totalHeight-=es.gapButton:r.totalWidth-=es.gapButton,r.headerWidth=r.width1+es.arrowPadX,r.headerHeight=r.height1,t.type===\"dropdown\"&&(i?(r.width1+=es.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=es.arrowPadX),n.remove();var a=r.totalWidth+t.pad.l+t.pad.r,o=r.totalHeight+t.pad.t+t.pad.b,s=e._fullLayout._size;r.lx=s.l+s.w*t.x,r.ly=s.t+s.h*(1-t.y);var l=\"left\";t0.isRightAnchor(t)&&(r.lx-=a,l=\"right\"),t0.isCenterAnchor(t)&&(r.lx-=a/2,l=\"center\");var u=\"top\";t0.isBottomAnchor(t)&&(r.ly-=o,u=\"bottom\"),t0.isMiddleAnchor(t)&&(r.ly-=o/2,u=\"middle\"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),p4.autoMargin(e,tge(t),{x:t.x,y:t.y,l:a*({right:1,center:.5}[l]||0),r:a*({left:1,center:.5}[l]||0),b:o*({top:1,middle:.5}[u]||0),t:o*({bottom:1,middle:.5}[u]||0)})}function tge(e){return es.autoMarginIdRoot+e._index}function rge(e,t,r,n){n=n||{};var i=e.select(\".\"+es.itemRectClassName),a=e.select(\".\"+es.itemTextClassName),o=t.borderwidth,s=r.index,l=t._dims;ST.setTranslate(e,o+r.x,o+r.y);var u=[\"up\",\"down\"].indexOf(t.direction)!==-1,c=n.height||(u?l.heights[s]:l.height1);i.attr({x:0,y:0,width:n.width||(u?l.width1:l.widths[s]),height:c});var f=t.font.size*K0e,h=MI.lineCount(a),d=(h-1)*f/2;MI.positionText(a,es.textOffsetX,c/2-d+es.textOffsetY),u?r.y+=l.heights[s]+r.yPad:r.x+=l.widths[s]+r.xPad,r.index++}function tV(e,t){e.attr(es.menuIndexAttrName,t||\"-1\").selectAll(\"g.\"+es.dropdownButtonClassName).remove()}});var oge=ye((vlr,age)=>{\"use strict\";var rmt=TI();age.exports={moduleType:\"component\",name:rmt.name,layoutAttributes:QU(),supplyLayoutDefaults:j0e(),draw:nge()}});var y4=ye((plr,sge)=>{\"use strict\";sge.exports={name:\"sliders\",containerClassName:\"slider-container\",groupClassName:\"slider-group\",inputAreaClass:\"slider-input-area\",railRectClass:\"slider-rail-rect\",railTouchRectClass:\"slider-rail-touch-rect\",gripRectClass:\"slider-grip-rect\",tickRectClass:\"slider-tick-rect\",inputProxyClass:\"slider-input-proxy\",labelsClass:\"slider-labels\",labelGroupClass:\"slider-label-group\",labelClass:\"slider-label\",currentValueClass:\"slider-current-value\",railHeight:5,menuIndexAttrName:\"slider-active-index\",autoMarginIdRoot:\"slider-\",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:\"#bec8d9\",railBgColor:\"#f8fafc\",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:\"#bec8d9\",gripBgColor:\"#f6f8fa\",gripBgActiveColor:\"#dbdde0\",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:\"#333\",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:\"#333\",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var iV=ye((glr,cge)=>{\"use strict\";var lge=ec(),imt=F6(),nmt=Ao().extendDeepAll,amt=mc().overrideAll,omt=jS(),uge=vl().templatedArray,l2=y4(),smt=uge(\"step\",{visible:{valType:\"boolean\",dflt:!0},method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\"},value:{valType:\"string\"},execute:{valType:\"boolean\",dflt:!0}});cge.exports=amt(uge(\"slider\",{visible:{valType:\"boolean\",dflt:!0},active:{valType:\"number\",min:0,dflt:0},steps:smt,lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",min:-2,max:3,dflt:0},pad:nmt(imt({editType:\"arraydraw\"}),{},{t:{dflt:20}}),xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\"},y:{valType:\"number\",min:-2,max:3,dflt:0},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"top\"},transition:{duration:{valType:\"number\",min:0,dflt:150},easing:{valType:\"enumerated\",values:omt.transition.easing.values,dflt:\"cubic-in-out\"}},currentvalue:{visible:{valType:\"boolean\",dflt:!0},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\"},offset:{valType:\"number\",dflt:10},prefix:{valType:\"string\"},suffix:{valType:\"string\"},font:lge({})},font:lge({}),activebgcolor:{valType:\"color\",dflt:l2.gripBgActiveColor},bgcolor:{valType:\"color\",dflt:l2.railBgColor},bordercolor:{valType:\"color\",dflt:l2.railBorderColor},borderwidth:{valType:\"number\",min:0,dflt:l2.railBorderWidth},ticklen:{valType:\"number\",min:0,dflt:l2.tickLength},tickcolor:{valType:\"color\",dflt:l2.tickColor},tickwidth:{valType:\"number\",min:0,dflt:1},minorticklen:{valType:\"number\",min:0,dflt:l2.minorTickLength}}),\"arraydraw\",\"from-root\")});var vge=ye((mlr,dge)=>{\"use strict\";var MT=Dr(),fge=Zd(),hge=iV(),lmt=y4(),umt=lmt.name,cmt=hge.steps;dge.exports=function(t,r){fge(t,r,{name:umt,handleItemDefaults:fmt})};function fmt(e,t,r){function n(f,h){return MT.coerce(e,t,hge,f,h)}for(var i=fge(e,t,{name:\"steps\",handleItemDefaults:hmt}),a=0,o=0;o<i.length;o++)i[o].visible&&a++;var s;if(a<2?s=t.visible=!1:s=n(\"visible\"),!!s){t._stepCount=a;var l=t._visibleSteps=MT.filterVisible(i),u=n(\"active\");(i[u]||{}).visible||(t.active=l[0]._index),n(\"x\"),n(\"y\"),MT.noneOrAll(e,t,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"len\"),n(\"lenmode\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),MT.coerceFont(n,\"font\",r.font);var c=n(\"currentvalue.visible\");c&&(n(\"currentvalue.xanchor\"),n(\"currentvalue.prefix\"),n(\"currentvalue.suffix\"),n(\"currentvalue.offset\"),MT.coerceFont(n,\"currentvalue.font\",t.font)),n(\"transition.duration\"),n(\"transition.easing\"),n(\"bgcolor\"),n(\"activebgcolor\"),n(\"bordercolor\"),n(\"borderwidth\"),n(\"ticklen\"),n(\"tickwidth\"),n(\"tickcolor\"),n(\"minorticklen\")}}function hmt(e,t){function r(a,o){return MT.coerce(e,t,cmt,a,o)}var n;if(e.method!==\"skip\"&&!Array.isArray(e.args)?n=t.visible=!1:n=r(\"visible\"),n){r(\"method\"),r(\"args\");var i=r(\"label\",\"step-\"+t._index);r(\"value\",i),r(\"execute\")}}});var Age=ye((ylr,Tge)=>{\"use strict\";var Ug=Oa(),EI=Mc(),k_=ka(),Vg=So(),r0=Dr(),dmt=r0.strTranslate,_4=Zl(),vmt=vl().arrayEditor,Rs=y4(),oV=Dh(),mge=oV.LINE_SPACING,nV=oV.FROM_TL,aV=oV.FROM_BR;Tge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=pmt(n,t),a=n._infolayer.selectAll(\"g.\"+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append(\"g\").classed(Rs.containerClassName,!0).style(\"cursor\",r?null:\"ew-resize\");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),EI.autoMargin(t,yge(c))}if(a.exit().each(function(){Ug.select(this).selectAll(\"g.\"+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll(\"g.\"+Rs.groupClassName).data(i,gmt);s.enter().append(\"g\").classed(Rs.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l<i.length;l++){var u=i[l];mmt(t,u)}s.each(function(c){var f=Ug.select(this);wmt(c),EI.manageCommandObserver(t,c,c._visibleSteps,function(h){var d=f.data()[0];d.active!==h.index&&(d._dragging||xge(t,f,d,h.index,!1,!0))}),ymt(t,Ug.select(this),c)})}};function yge(e){return Rs.autoMarginIdRoot+e._index}function pmt(e,t){for(var r=e[Rs.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=t,n.push(a))}return n}function gmt(e){return e._index}function mmt(e,t){var r=Vg.tester.selectAll(\"g.\"+Rs.labelGroupClass).data(t._visibleSteps);r.enter().append(\"g\").classed(Rs.labelGroupClass,!0);var n=0,i=0;r.each(function(v){var _=Ug.select(this),b=_ge(_,{step:v},t),p=b.node();if(p){var k=Vg.bBox(p);i=Math.max(i,k.height),n=Math.max(n,k.width)}}),r.remove();var a=t._dims={};a.inputAreaWidth=Math.max(Rs.railWidth,Rs.gripHeight);var o=e._fullLayout._size;a.lx=o.l+o.w*t.x,a.ly=o.t+o.h*(1-t.y),t.lenmode===\"fraction\"?a.outerLength=Math.round(o.w*t.len):a.outerLength=t.len,a.inputAreaStart=0,a.inputAreaLength=Math.round(a.outerLength-t.pad.l-t.pad.r);var s=a.inputAreaLength-2*Rs.stepInset,l=s/(t._stepCount-1),u=n+Rs.labelPadding;if(a.labelStride=Math.max(1,Math.ceil(u/l)),a.labelHeight=i,a.currentValueMaxWidth=0,a.currentValueHeight=0,a.currentValueTotalHeight=0,a.currentValueMaxLines=1,t.currentvalue.visible){var c=Vg.tester.append(\"g\");r.each(function(v){var _=kI(c,t,v.label),b=_.node()&&Vg.bBox(_.node())||{width:0,height:0},p=_4.lineCount(_);a.currentValueMaxWidth=Math.max(a.currentValueMaxWidth,Math.ceil(b.width)),a.currentValueHeight=Math.max(a.currentValueHeight,Math.ceil(b.height)),a.currentValueMaxLines=Math.max(a.currentValueMaxLines,p)}),a.currentValueTotalHeight=a.currentValueHeight+t.currentvalue.offset,c.remove()}a.height=a.currentValueTotalHeight+Rs.tickOffset+t.ticklen+Rs.labelOffset+a.labelHeight+t.pad.t+t.pad.b;var f=\"left\";r0.isRightAnchor(t)&&(a.lx-=a.outerLength,f=\"right\"),r0.isCenterAnchor(t)&&(a.lx-=a.outerLength/2,f=\"center\");var h=\"top\";r0.isBottomAnchor(t)&&(a.ly-=a.height,h=\"bottom\"),r0.isMiddleAnchor(t)&&(a.ly-=a.height/2,h=\"middle\"),a.outerLength=Math.ceil(a.outerLength),a.height=Math.ceil(a.height),a.lx=Math.round(a.lx),a.ly=Math.round(a.ly);var d={y:t.y,b:a.height*aV[h],t:a.height*nV[h]};t.lenmode===\"fraction\"?(d.l=0,d.xl=t.x-t.len*nV[f],d.r=0,d.xr=t.x+t.len*aV[f]):(d.x=t.x,d.l=a.outerLength*nV[f],d.r=a.outerLength*aV[f]),EI.autoMargin(e,yge(t),d)}function ymt(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(kI,r).call(Amt,r).call(xmt,r).call(bmt,r).call(Tmt,e,r).call(_mt,e,r);var n=r._dims;Vg.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(wge,r,!1),t.call(kI,r)}function kI(e,t,r){if(t.currentvalue.visible){var n=t._dims,i,a;switch(t.currentvalue.xanchor){case\"right\":i=n.inputAreaLength-Rs.currentValueInset-n.currentValueMaxWidth,a=\"left\";break;case\"center\":i=n.inputAreaLength*.5,a=\"middle\";break;default:i=Rs.currentValueInset,a=\"left\"}var o=r0.ensureSingle(e,\"text\",Rs.labelClass,function(h){h.attr({\"text-anchor\":a,\"data-notex\":1})}),s=t.currentvalue.prefix?t.currentvalue.prefix:\"\";if(typeof r==\"string\")s+=r;else{var l=t.steps[t.active].label,u=t._gd._fullLayout._meta;u&&(l=r0.templateString(l,u)),s+=l}t.currentvalue.suffix&&(s+=t.currentvalue.suffix),o.call(Vg.font,t.currentvalue.font).text(s).call(_4.convertToTspans,t._gd);var c=_4.lineCount(o),f=(n.currentValueMaxLines+1-c)*t.currentvalue.font.size*mge;return _4.positionText(o,i,f),o}}function _mt(e,t,r){var n=r0.ensureSingle(e,\"rect\",Rs.gripRectClass,function(i){i.call(bge,t,e,r).style(\"pointer-events\",\"all\")});n.attr({width:Rs.gripWidth,height:Rs.gripHeight,rx:Rs.gripRadius,ry:Rs.gripRadius}).call(k_.stroke,r.bordercolor).call(k_.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\")}function _ge(e,t,r){var n=r0.ensureSingle(e,\"text\",Rs.labelClass,function(o){o.attr({\"text-anchor\":\"middle\",\"data-notex\":1})}),i=t.step.label,a=r._gd._fullLayout._meta;return a&&(i=r0.templateString(i,a)),n.call(Vg.font,r.font).text(i).call(_4.convertToTspans,r._gd),n}function xmt(e,t){var r=r0.ensureSingle(e,\"g\",Rs.labelsClass),n=t._dims,i=r.selectAll(\"g.\"+Rs.labelGroupClass).data(n.labelSteps);i.enter().append(\"g\").classed(Rs.labelGroupClass,!0),i.exit().remove(),i.each(function(a){var o=Ug.select(this);o.call(_ge,a,t),Vg.setTranslate(o,sV(t,a.fraction),Rs.tickOffset+t.ticklen+t.font.size*mge+Rs.labelOffset+n.currentValueTotalHeight)})}function pge(e,t,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&xge(e,t,r,o,!0,i)}function xge(e,t,r,n,i,a){var o=r.active;r.active=n,vmt(e.layout,Rs.name,r).applyUpdate(\"active\",n);var s=r.steps[r.active];t.call(wge,r,a),t.call(kI,r),e.emit(\"plotly_sliderchange\",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=a):(t._nextMethod={step:s,doCallback:i,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame(function(){var l=t._nextMethod.step;l.method&&(l.execute&&EI.executeAPICommand(e,l.method,l.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function bge(e,t,r){if(t._context.staticPlot)return;var n=r.node(),i=Ug.select(t);function a(){return r.data()[0]}function o(){var s=a();t.emit(\"plotly_sliderstart\",{slider:s});var l=r.select(\".\"+Rs.gripRectClass);Ug.event.stopPropagation(),Ug.event.preventDefault(),l.call(k_.fill,s.activebgcolor);var u=gge(s,Ug.mouse(n)[0]);pge(t,r,s,u,!0),s._dragging=!0;function c(){var h=a(),d=gge(h,Ug.mouse(n)[0]);pge(t,r,h,d,!1)}i.on(\"mousemove\",c),i.on(\"touchmove\",c);function f(){var h=a();h._dragging=!1,l.call(k_.fill,h.bgcolor),i.on(\"mouseup\",null),i.on(\"mousemove\",null),i.on(\"touchend\",null),i.on(\"touchmove\",null),t.emit(\"plotly_sliderend\",{slider:h,step:h.steps[h.active]})}i.on(\"mouseup\",f),i.on(\"touchend\",f)}e.on(\"mousedown\",o),e.on(\"touchstart\",o)}function bmt(e,t){var r=e.selectAll(\"rect.\"+Rs.tickRectClass).data(t._visibleSteps),n=t._dims;r.enter().append(\"rect\").classed(Rs.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+\"px\",\"shape-rendering\":\"crispEdges\"}),r.each(function(i,a){var o=a%n.labelStride===0,s=Ug.select(this);s.attr({height:o?t.ticklen:t.minorticklen}).call(k_.fill,t.tickcolor),Vg.setTranslate(s,sV(t,a/(t._stepCount-1))-.5*t.tickwidth,(o?Rs.tickOffset:Rs.minorTickOffset)+n.currentValueTotalHeight)})}function wmt(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}function wge(e,t,r){for(var n=e.select(\"rect.\"+Rs.gripRectClass),i=0,a=0;a<t._stepCount;a++)if(t._visibleSteps[a]._index===t.active){i=a;break}var o=sV(t,i/(t._stepCount-1));if(!t._invokingCommand){var s=n;r&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr(\"transform\",dmt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function sV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function gge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function Tmt(e,t,r){var n=r._dims,i=r0.ensureSingle(e,\"rect\",Rs.railTouchRectClass,function(a){a.call(bge,t,e,r).style(\"pointer-events\",\"all\")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(k_.fill,r.bgcolor).attr(\"opacity\",0),Vg.setTranslate(i,0,n.currentValueTotalHeight)}function Amt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=r0.ensureSingle(e,\"rect\",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,\"shape-rendering\":\"crispEdges\"}).call(k_.stroke,t.bordercolor).call(k_.fill,t.bgcolor).style(\"stroke-width\",t.borderwidth+\"px\"),Vg.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var Mge=ye((_lr,Sge)=>{\"use strict\";var Smt=y4();Sge.exports={moduleType:\"component\",name:Smt.name,layoutAttributes:iV(),supplyLayoutDefaults:vge(),draw:Age()}});var CI=ye((xlr,kge)=>{\"use strict\";var Ege=Ih();kge.exports={bgcolor:{valType:\"color\",dflt:Ege.background,editType:\"plot\"},bordercolor:{valType:\"color\",dflt:Ege.defaultLine,editType:\"plot\"},borderwidth:{valType:\"integer\",dflt:0,min:0,editType:\"plot\"},autorange:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"calc\",impliedEdits:{\"^autorange\":!1}}],editType:\"calc\",impliedEdits:{autorange:!1}},thickness:{valType:\"number\",dflt:.15,min:0,max:1,editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"}});var lV=ye((blr,Cge)=>{\"use strict\";Cge.exports={_isSubplotObj:!0,rangemode:{valType:\"enumerated\",values:[\"auto\",\"fixed\",\"match\"],dflt:\"match\",editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},editType:\"calc\"}});var LI=ye((wlr,Lge)=>{\"use strict\";Lge.exports={name:\"rangeslider\",containerClassName:\"rangeslider-container\",bgClassName:\"rangeslider-bg\",rangePlotClassName:\"rangeslider-rangeplot\",maskMinClassName:\"rangeslider-mask-min\",maskMaxClassName:\"rangeslider-mask-max\",slideBoxClassName:\"rangeslider-slidebox\",grabberMinClassName:\"rangeslider-grabber-min\",grabAreaMinClassName:\"rangeslider-grabarea-min\",handleMinClassName:\"rangeslider-handle-min\",grabberMaxClassName:\"rangeslider-grabber-max\",grabAreaMaxClassName:\"rangeslider-grabarea-max\",handleMaxClassName:\"rangeslider-handle-max\",maskMinOppAxisClassName:\"rangeslider-mask-min-opp-axis\",maskMaxOppAxisClassName:\"rangeslider-mask-max-opp-axis\",maskColor:\"rgba(0,0,0,0.4)\",maskOppAxisColor:\"rgba(0,0,0,0.2)\",slideBoxFill:\"transparent\",slideBoxCursor:\"ew-resize\",grabAreaFill:\"transparent\",grabAreaCursor:\"col-resize\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Rge=ye(II=>{\"use strict\";var Mmt=hf(),Emt=Zl(),Pge=LI(),kmt=Dh().LINE_SPACING,PI=Pge.name;function Ige(e){var t=e&&e[PI];return t&&t.visible}II.isVisible=Ige;II.makeData=function(e){for(var t=Mmt.list({_fullLayout:e},\"x\",!0),r=e.margin,n=[],i=0;i<t.length;i++){var a=t[i];if(Ige(a)){n.push(a);var o=a[PI];o._id=PI+a._id,o._height=(e.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}e._rangeSliderData=n};II.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[PI],i=t._id.charAt(0),a=0,o=0;if(t.side===\"bottom\"&&(a=t._depth,t.title.text!==r._dfltTitle[i])){o=1.5*t.title.font.size+10+n._offsetShift;var s=(t.title.text.match(Emt.BR_TAG_ALL)||[]).length;o+=s*t.title.font.size*kmt}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+a+Math.max(r.margin.b,o),pad:Pge.extraPad+n._offsetShift*2}}});var Oge=ye((Alr,zge)=>{\"use strict\";var RI=Dr(),Dge=vl(),Fge=hf(),Cmt=CI(),Lmt=lV();zge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;RI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Dge.newContainer(a,\"rangeslider\");function l(L,x){return RI.coerce(o,s,Cmt,L,x)}var u,c;function f(L,x){return RI.coerce(u,c,Lmt,L,x)}var h=l(\"visible\");if(h){l(\"bgcolor\",r.plot_bgcolor),l(\"bordercolor\"),l(\"borderwidth\"),l(\"thickness\"),l(\"autorange\",!a.isValidRange(o.range)),l(\"range\");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf(\"y\")))===Fge.name2id(n)}).map(function(L){return L.slice(L.indexOf(\"y\"),L.length)}),_=RI.simpleMap(v,Fge.id2name),b=0;b<_.length;b++){var p=_[b];u=o[p]||{},c=Dge.newContainer(s,p,\"yaxis\");var k=r[p],E;u.range&&k.isValidRange(u.range)&&(E=\"fixed\");var T=f(\"rangemode\",E);T!==\"match\"&&f(\"range\",k.range.slice())}s._input=o}}});var Bge=ye((Slr,qge)=>{\"use strict\";var Pmt=hf().list,Imt=Mg().getAutoRange,Rmt=LI();qge.exports=function(t){for(var r=Pmt(t,\"x\",!0),n=0;n<r.length;n++){var i=r[n],a=i[Rmt.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=Imt(t,i))}}});var Gge=ye((Mlr,Vge)=>{\"use strict\";var DI=Oa(),Dmt=qa(),Fmt=Mc(),Jf=Dr(),FI=Jf.strTranslate,Uge=So(),C_=ka(),zmt=zb(),Omt=mh(),uV=hf(),qmt=yv(),Bmt=Eg(),rl=LI();Vge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n<r.length;n++){var i=r[n][rl.name];i._clipId=i._id+\"-\"+t._uid}function a(s){return s._name}var o=t._infolayer.selectAll(\"g.\"+rl.containerClassName).data(r,a);o.exit().each(function(s){var l=s[rl.name];t._topdefs.select(\"#\"+l._clipId).remove()}).remove(),r.length!==0&&(o.enter().append(\"g\").classed(rl.containerClassName,!0).attr(\"pointer-events\",\"all\"),o.each(function(s){var l=DI.select(this),u=s[rl.name],c=t[uV.id2name(s.anchor)],f=u[uV.id2name(s.anchor)];if(u.range){var h=Jf.simpleMap(u.range,s.r2l),d=Jf.simpleMap(s.range,s.r2l),v;d[0]<d[1]?v=[Math.min(h[0],d[0]),Math.max(h[1],d[1])]:v=[Math.max(h[0],d[0]),Math.min(h[1],d[1])],u.range=u._input.range=Jf.simpleMap(v,s.l2r)}s.cleanRange(\"rangeslider.range\");var _=t._size,b=s.domain;u._width=_.w*(b[1]-b[0]);var p=Math.round(_.l+_.w*b[0]),k=Math.round(_.t+_.h*(1-s._counterDomainMin)+(s.side===\"bottom\"?s._depth:0)+u._offsetShift+rl.extraPad);l.attr(\"transform\",FI(p,k)),u._rl=Jf.simpleMap(u.range,s.r2l);var E=u._rl[0],T=u._rl[1],L=T-E;if(u.p2d=function(G){return G/u._width*L+E},u.d2p=function(G){return(G-E)/L*u._width},s.rangebreaks){var x=s.locateBreaks(E,T);if(x.length){var C,M,g=0;for(C=0;C<x.length;C++)M=x[C],g+=M.max-M.min;var P=u._width/(T-E-g),A=[-P*E];for(C=0;C<x.length;C++)M=x[C],A.push(A[A.length-1]-P*(M.max-M.min));for(u.d2p=function(G){for(var Z=A[0],j=0;j<x.length;j++){var N=x[j];if(G>=N.max)Z=A[j+1];else if(G<N.min)break}return Z+P*G},C=0;C<x.length;C++)M=x[C],M.pmin=u.d2p(M.min),M.pmax=u.d2p(M.max);u.p2d=function(G){for(var Z=A[0],j=0;j<x.length;j++){var N=x[j];if(G>=N.pmax)Z=A[j+1];else if(G<N.pmin)break}return(G-Z)/P}}}if(f.rangemode!==\"match\"){var z=c.r2l(f.range[0]),O=c.r2l(f.range[1]),U=O-z;u.d2pOppAxis=function(G){return(G-z)/U*u._height}}l.call(Gmt,e,s,u).call(Hmt,e,s,u).call(jmt,e,s,u).call(Xmt,e,s,u,f).call(Zmt,e,s,u).call(Ymt,e,s,u),Nmt(l,e,s,u),Vmt(l,e,s,u,c,f),s.side===\"bottom\"&&zmt.draw(e,s._id+\"title\",{propContainer:s,propName:s._name+\".title.text\",placeholder:t._dfltTitle.x,attributes:{x:s._offset+s._length/2,y:k+u._height+u._offsetShift+10+1.5*s.title.font.size,\"text-anchor\":\"middle\"}})}))};function Nge(e){return typeof e.clientX==\"number\"?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function Nmt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select(\"rect.\"+rl.slideBoxClassName).node(),a=e.select(\"rect.\"+rl.grabAreaMinClassName).node(),o=e.select(\"rect.\"+rl.grabAreaMaxClassName).node();function s(){var l=DI.event,u=l.target,c=Nge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=qmt.coverSlip();this.addEventListener(\"touchmove\",_),this.addEventListener(\"touchend\",b),v.addEventListener(\"mousemove\",_),v.addEventListener(\"mouseup\",b);function _(p){var k=Nge(p),E=+k-c,T,L,x;switch(u){case i:if(x=\"ew-resize\",h+E>r._length||d+E<0)return;T=h+E,L=d+E;break;case a:if(x=\"col-resize\",h+E>r._length)return;T=h+E,L=d;break;case o:if(x=\"col-resize\",d+E<0)return;T=h,L=d+E;break;default:x=\"ew-resize\",T=f,L=f+E;break}if(L<T){var C=L;L=T,T=C}n._pixelMin=T,n._pixelMax=L,Bmt(DI.select(v),x),Umt(e,t,r,n)}function b(){v.removeEventListener(\"mousemove\",_),v.removeEventListener(\"mouseup\",b),this.removeEventListener(\"touchmove\",_),this.removeEventListener(\"touchend\",b),Jf.removeElement(v)}}e.on(\"mousedown\",s),e.on(\"touchstart\",s)}function Umt(e,t,r,n){function i(s){return r.l2r(Jf.constrain(s,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){Dmt.call(\"_guiRelayout\",t,r._name+\".range\",[a,o])})}function Vmt(e,t,r,n,i,a){var o=rl.handleWidth/2;function s(p){return Jf.constrain(p,0,n._width)}function l(p){return Jf.constrain(p,0,n._height)}function u(p){return Jf.constrain(p,-o,n._width+o)}var c=s(n.d2p(r._rl[0])),f=s(n.d2p(r._rl[1]));if(e.select(\"rect.\"+rl.slideBoxClassName).attr(\"x\",c).attr(\"width\",f-c),e.select(\"rect.\"+rl.maskMinClassName).attr(\"width\",c),e.select(\"rect.\"+rl.maskMaxClassName).attr(\"x\",f).attr(\"width\",n._width-f),a.rangemode!==\"match\"){var h=n._height-l(n.d2pOppAxis(i._rl[1])),d=n._height-l(n.d2pOppAxis(i._rl[0]));e.select(\"rect.\"+rl.maskMinOppAxisClassName).attr(\"x\",c).attr(\"height\",h).attr(\"width\",f-c),e.select(\"rect.\"+rl.maskMaxOppAxisClassName).attr(\"x\",c).attr(\"y\",d).attr(\"height\",n._height-d).attr(\"width\",f-c),e.select(\"rect.\"+rl.slideBoxClassName).attr(\"y\",h).attr(\"height\",d-h)}var v=.5,_=Math.round(u(c-o))-v,b=Math.round(u(f-o))+v;e.select(\"g.\"+rl.grabberMinClassName).attr(\"transform\",FI(_,v)),e.select(\"g.\"+rl.grabberMaxClassName).attr(\"transform\",FI(b,v))}function Gmt(e,t,r,n){var i=Jf.ensureSingle(e,\"rect\",rl.bgClassName,function(l){l.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})}),a=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=Uge.crispRound(t,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:FI(o,o),\"stroke-width\":s}).call(C_.stroke,n.bordercolor).call(C_.fill,n.bgcolor)}function Hmt(e,t,r,n){var i=t._fullLayout,a=Jf.ensureSingleById(i._topdefs,\"clipPath\",n._clipId,function(o){o.append(\"rect\").attr({x:0,y:0})});a.select(\"rect\").attr({width:n._width,height:n._height})}function jmt(e,t,r,n){var i=t.calcdata,a=e.selectAll(\"g.\"+rl.rangePlotClassName).data(r._subplotsWith,Jf.identity);a.enter().append(\"g\").attr(\"class\",function(s){return rl.rangePlotClassName+\" \"+s}).call(Uge.setClipUrl,n._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,l){var u=DI.select(this),c=l===0,f=uV.getFromId(t,s,\"y\"),h=f._name,d=n[h],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:n.range.slice(),calendar:r.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(v.layout.xaxis.rangebreaks=r.rangebreaks),v.layout[h]={type:f.type,domain:[0,1],range:d.rangemode!==\"match\"?d.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(v.layout[h].rangebreaks=f.rangebreaks),Fmt.supplyDefaults(v);var _=v._fullLayout.xaxis,b=v._fullLayout[h];_.clearCalc(),_.setScale(),b.clearCalc(),b.setScale();var p={id:s,plotgroup:u,xaxis:_,yaxis:b,isRangePlot:!0};c?o=p:(p.mainplot=\"xy\",p.mainplotinfo=o),Omt.rangePlot(t,p,Wmt(i,s))})}function Wmt(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n],a=i[0].trace;a.xaxis+a.yaxis===t&&r.push(i)}return r}function Xmt(e,t,r,n,i){var a=Jf.ensureSingle(e,\"rect\",rl.maskMinClassName,function(u){u.attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"})});a.attr(\"height\",n._height).call(C_.fill,rl.maskColor);var o=Jf.ensureSingle(e,\"rect\",rl.maskMaxClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});if(o.attr(\"height\",n._height).call(C_.fill,rl.maskColor),i.rangemode!==\"match\"){var s=Jf.ensureSingle(e,\"rect\",rl.maskMinOppAxisClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});s.attr(\"width\",n._width).call(C_.fill,rl.maskOppAxisColor);var l=Jf.ensureSingle(e,\"rect\",rl.maskMaxOppAxisClassName,function(u){u.attr({y:0,\"shape-rendering\":\"crispEdges\"})});l.attr(\"width\",n._width).style(\"border-top\",rl.maskOppBorder).call(C_.fill,rl.maskOppAxisColor)}}function Zmt(e,t,r,n){if(!t._context.staticPlot){var i=Jf.ensureSingle(e,\"rect\",rl.slideBoxClassName,function(a){a.attr({y:0,cursor:rl.slideBoxCursor,\"shape-rendering\":\"crispEdges\"})});i.attr({height:n._height,fill:rl.slideBoxFill})}}function Ymt(e,t,r,n){var i=Jf.ensureSingle(e,\"g\",rl.grabberMinClassName),a=Jf.ensureSingle(e,\"g\",rl.grabberMaxClassName),o={x:0,width:rl.handleWidth,rx:rl.handleRadius,fill:C_.background,stroke:C_.defaultLine,\"stroke-width\":rl.handleStrokeWidth,\"shape-rendering\":\"crispEdges\"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},l=Jf.ensureSingle(i,\"rect\",rl.handleMinClassName,function(d){d.attr(o)});l.attr(s);var u=Jf.ensureSingle(a,\"rect\",rl.handleMaxClassName,function(d){d.attr(o)});u.attr(s);var c={width:rl.grabAreaWidth,x:0,y:0,fill:rl.grabAreaFill,cursor:t._context.staticPlot?void 0:rl.grabAreaCursor},f=Jf.ensureSingle(i,\"rect\",rl.grabAreaMinClassName,function(d){d.attr(c)});f.attr(\"height\",n._height);var h=Jf.ensureSingle(a,\"rect\",rl.grabAreaMaxClassName,function(d){d.attr(c)});h.attr(\"height\",n._height)}});var jge=ye((Elr,Hge)=>{\"use strict\";var Kmt=Dr(),Jmt=CI(),$mt=lV(),cV=Rge();Hge.exports={moduleType:\"component\",name:\"rangeslider\",schema:{subplots:{xaxis:{rangeslider:Kmt.extendFlat({},Jmt,{yaxis:$mt})}}},layoutAttributes:CI(),handleDefaults:Oge(),calcAutorange:Bge(),draw:Gge(),isVisible:cV.isVisible,makeData:cV.makeData,autoMarginOpts:cV.autoMarginOpts}});var zI=ye((klr,Xge)=>{\"use strict\";var Qmt=ec(),Wge=Ih(),eyt=vl().templatedArray,tyt=eyt(\"button\",{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},step:{valType:\"enumerated\",values:[\"month\",\"year\",\"day\",\"hour\",\"minute\",\"second\",\"all\"],dflt:\"month\",editType:\"plot\"},stepmode:{valType:\"enumerated\",values:[\"backward\",\"todate\"],dflt:\"backward\",editType:\"plot\"},count:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},label:{valType:\"string\",editType:\"plot\"},editType:\"plot\"});Xge.exports={visible:{valType:\"boolean\",editType:\"plot\"},buttons:tyt,x:{valType:\"number\",min:-2,max:3,editType:\"plot\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"plot\"},y:{valType:\"number\",min:-2,max:3,editType:\"plot\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"bottom\",editType:\"plot\"},font:Qmt({editType:\"plot\"}),bgcolor:{valType:\"color\",dflt:Wge.lightLine,editType:\"plot\"},activecolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:Wge.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"}});var fV=ye((Clr,Zge)=>{\"use strict\";Zge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Jge=ye((Llr,Kge)=>{\"use strict\";var OI=Dr(),ryt=ka(),iyt=vl(),nyt=Zd(),Yge=zI(),hV=fV();Kge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=iyt.newContainer(r,\"rangeselector\");function l(d,v){return OI.coerce(o,s,Yge,d,v)}var u=nyt(o,s,{name:\"buttons\",handleItemDefaults:ayt,calendar:a}),c=l(\"visible\",u.length>0);if(c){var f=oyt(r,n,i);l(\"x\",f[0]),l(\"y\",f[1]),OI.noneOrAll(t,r,[\"x\",\"y\"]),l(\"xanchor\"),l(\"yanchor\"),OI.coerceFont(l,\"font\",n.font);var h=l(\"bgcolor\");l(\"activecolor\",ryt.contrast(h,hV.lightAmount,hV.darkAmount)),l(\"bordercolor\"),l(\"borderwidth\")}};function ayt(e,t,r,n){var i=n.calendar;function a(l,u){return OI.coerce(e,t,Yge.buttons,l,u)}var o=a(\"visible\");if(o){var s=a(\"step\");s!==\"all\"&&(i&&i!==\"gregorian\"&&(s===\"month\"||s===\"year\")?t.stepmode=\"backward\":a(\"stepmode\"),a(\"count\")),a(\"label\")}}function oyt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a<n.length;a++){var o=t[n[a]].domain;o&&(i=Math.max(o[1],i))}return[e.domain[0],i+hV.yPad]}});var Qge=ye((Plr,$ge)=>{\"use strict\";var syt=SO(),lyt=Dr().titleCase;$ge.exports=function(t,r){var n=t._name,i={};if(r.step===\"all\")i[n+\".autorange\"]=!0;else{var a=uyt(t,r);i[n+\".range[0]\"]=a[0],i[n+\".range[1]\"]=a[1]}return i};function uyt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=syt[\"utc\"+lyt(i)],o=t.count,s;switch(t.stepmode){case\"backward\":s=e.l2r(+a.offset(n,-o));break;case\"todate\":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var sme=ye((Ilr,ome)=>{\"use strict\";var BI=Oa(),cyt=qa(),fyt=Mc(),eme=ka(),ame=So(),Ny=Dr(),tme=Ny.strTranslate,qI=Zl(),hyt=hf(),pV=Dh(),rme=pV.LINE_SPACING,ime=pV.FROM_TL,nme=pV.FROM_BR,vV=fV(),dyt=Qge();ome.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(\".rangeselector\").data(vyt(t),pyt);n.enter().append(\"g\").classed(\"rangeselector\",!0),n.exit().remove(),n.style({cursor:\"pointer\",\"pointer-events\":\"all\"}),n.each(function(i){var a=BI.select(this),o=i,s=o.rangeselector,l=a.selectAll(\"g.button\").data(Ny.filterVisible(s.buttons));l.enter().append(\"g\").classed(\"button\",!0),l.exit().remove(),l.each(function(u){var c=BI.select(this),f=dyt(o,u);u._isActive=gyt(o,u,f),c.call(dV,s,u),c.call(yyt,s,u,t),c.on(\"click\",function(){t._dragged||cyt.call(\"_guiRelayout\",t,f)}),c.on(\"mouseover\",function(){u._isHovered=!0,c.call(dV,s,u)}),c.on(\"mouseout\",function(){u._isHovered=!1,c.call(dV,s,u)})}),xyt(t,l,s,o._name,a)})};function vyt(e){for(var t=hyt.list(e,\"x\",!0),r=[],n=0;n<t.length;n++){var i=t[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function pyt(e){return e._id}function gyt(e,t,r){if(t.step===\"all\")return e.autorange===!0;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}function dV(e,t,r){var n=Ny.ensureSingle(e,\"rect\",\"selector-rect\",function(i){i.attr(\"shape-rendering\",\"crispEdges\")});n.attr({rx:vV.rx,ry:vV.ry}),n.call(eme.stroke,t.bordercolor).call(eme.fill,myt(t,r)).style(\"stroke-width\",t.borderwidth+\"px\")}function myt(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}function yyt(e,t,r,n){function i(o){qI.convertToTspans(o,n)}var a=Ny.ensureSingle(e,\"text\",\"selector-text\",function(o){o.attr(\"text-anchor\",\"middle\")});a.call(ame.font,t.font).text(_yt(r,n._fullLayout._meta)).call(i)}function _yt(e,t){return e.label?t?Ny.templateString(e.label,t):e.label:e.step===\"all\"?\"all\":e.count+e.step.charAt(0)}function xyt(e,t,r,n,i){var a=0,o=0,s=r.borderwidth;t.each(function(){var d=BI.select(this),v=d.select(\".selector-text\"),_=r.font.size*rme,b=Math.max(_*qI.lineCount(v),16)+3;o=Math.max(o,b)}),t.each(function(){var d=BI.select(this),v=d.select(\".selector-rect\"),_=d.select(\".selector-text\"),b=_.node()&&ame.bBox(_.node()).width,p=r.font.size*rme,k=qI.lineCount(_),E=Math.max(b+10,vV.minButtonWidth);d.attr(\"transform\",tme(s+a,s)),v.attr({x:0,y:0,width:E,height:o}),qI.positionText(_,E/2,o/2-(k-1)*p/2+3),a+=E+5});var l=e._fullLayout._size,u=l.l+l.w*r.x,c=l.t+l.h*(1-r.y),f=\"left\";Ny.isRightAnchor(r)&&(u-=a,f=\"right\"),Ny.isCenterAnchor(r)&&(u-=a/2,f=\"center\");var h=\"top\";Ny.isBottomAnchor(r)&&(c-=o,h=\"bottom\"),Ny.isMiddleAnchor(r)&&(c-=o/2,h=\"middle\"),a=Math.ceil(a),o=Math.ceil(o),u=Math.round(u),c=Math.round(c),fyt.autoMargin(e,n+\"-range-selector\",{x:r.x,y:r.y,l:a*ime[f],r:a*nme[f],b:o*nme[h],t:o*ime[h]}),i.attr(\"transform\",tme(u,c))}});var ume=ye((Rlr,lme)=>{\"use strict\";lme.exports={moduleType:\"component\",name:\"rangeselector\",schema:{subplots:{xaxis:{rangeselector:zI()}}},layoutAttributes:zI(),handleDefaults:Jge(),draw:sme()}});var Cc=ye(gV=>{\"use strict\";var cme=Ao().extendFlat;gV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:\"info_array\",editType:e.editType,items:[{valType:\"number\",min:0,max:1,editType:e.editType},{valType:\"number\",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+\" \":\"\",i=e.trace?\"trace \":\"subplot \",a=t.description?\" \"+t.description:\"\",o={x:cme({},r,{}),y:cme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:\"integer\",min:0,dflt:0,editType:e.editType},o.column={valType:\"integer\",min:0,dflt:0,editType:e.editType}),o};gV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r(\"domain.column\");s!==void 0&&(s<o.columns?i=o._domains.x[s]:delete e.domain.column);var l=r(\"domain.row\");l!==void 0&&(l<o.rows?a=o._domains.y[l]:delete e.domain.row)}var u=r(\"domain.x\",i),c=r(\"domain.y\",a);u[0]<u[1]||(e.domain.x=i.slice()),c[0]<c[1]||(e.domain.y=a.slice())}});var yV=ye((Flr,vme)=>{\"use strict\";var byt=Dr(),wyt=p3().counter,Tyt=Cc().attributes,fme=Rh().idRegex,Ayt=vl(),mV={rows:{valType:\"integer\",min:1,editType:\"plot\"},roworder:{valType:\"enumerated\",values:[\"top to bottom\",\"bottom to top\"],dflt:\"top to bottom\",editType:\"plot\"},columns:{valType:\"integer\",min:1,editType:\"plot\"},subplots:{valType:\"info_array\",freeLength:!0,dimensions:2,items:{valType:\"enumerated\",values:[wyt(\"xy\").toString(),\"\"],editType:\"plot\"},editType:\"plot\"},xaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[fme.x.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},yaxes:{valType:\"info_array\",freeLength:!0,items:{valType:\"enumerated\",values:[fme.y.toString(),\"\"],editType:\"plot\"},editType:\"plot\"},pattern:{valType:\"enumerated\",values:[\"independent\",\"coupled\"],dflt:\"coupled\",editType:\"plot\"},xgap:{valType:\"number\",min:0,max:1,editType:\"plot\"},ygap:{valType:\"number\",min:0,max:1,editType:\"plot\"},domain:Tyt({name:\"grid\",editType:\"plot\",noGridCell:!0},{}),xside:{valType:\"enumerated\",values:[\"bottom\",\"bottom plot\",\"top plot\",\"top\"],dflt:\"bottom plot\",editType:\"plot\"},yside:{valType:\"enumerated\",values:[\"left\",\"left plot\",\"right plot\",\"right\"],dflt:\"left plot\",editType:\"plot\"},editType:\"plot\"};function NI(e,t,r){var n=t[r+\"axes\"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Syt(e,t){var r=e.grid||{},n=NI(t,r,\"x\"),i=NI(t,r,\"y\");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=Ayt.newContainer(t,\"grid\");function h(x,C){return byt.coerce(r,f,mV,x,C)}var d=h(\"rows\",u),v=h(\"columns\",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var _=h(\"pattern\")===\"independent\";_&&(a=!0)}f._hasSubplotGrid=a;var b=h(\"roworder\"),p=b===\"top to bottom\",k=a?.2:.1,E=a?.3:.1,T,L;l&&t._splomGridDflt&&(T=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:hme(\"x\",h,k,T,v),y:hme(\"y\",h,E,L,d,p)}}function hme(e,t,r,n,i,a){var o=t(e+\"gap\",r),s=t(\"domain.\"+e);t(e+\"side\",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var d=u+c*h;l[a?i-1-h:h]=[d,d+f]}return l}function Myt(e,t){var r=t.grid;if(!(!r||!r._domains)){var n=e.grid||{},i=t._subplots,a=r._hasSubplotGrid,o=r.rows,s=r.columns,l=r.pattern===\"independent\",u,c,f,h,d,v,_,b=r._axisMap={};if(a){var p=n.subplots||[];v=r.subplots=new Array(o);var k=1;for(u=0;u<o;u++){var E=v[u]=new Array(s),T=p[u]||[];for(c=0;c<s;c++)if(l?(d=k===1?\"xy\":\"x\"+k+\"y\"+k,k++):d=T[c],E[c]=\"\",i.cartesian.indexOf(d)!==-1){if(_=d.indexOf(\"y\"),f=d.slice(0,_),h=d.slice(_),b[f]!==void 0&&b[f]!==c||b[h]!==void 0&&b[h]!==u)continue;E[c]=d,b[f]=c,b[h]=u}}}else{var L=NI(t,n,\"x\"),x=NI(t,n,\"y\");r.xaxes=dme(L,i.xaxis,s,b,\"x\"),r.yaxes=dme(x,i.yaxis,o,b,\"y\")}var C=r._anchors={},M=r.roworder===\"top to bottom\";for(var g in b){var P=g.charAt(0),A=r[P+\"side\"],z,O,U;if(A.length<8)C[g]=\"free\";else if(P===\"x\"){if(A.charAt(0)===\"t\"===M?(z=0,O=1,U=o):(z=o-1,O=-1,U=-1),a){var G=b[g];for(u=z;u!==U;u+=O)if(d=v[u][G],!!d&&(_=d.indexOf(\"y\"),d.slice(0,_)===g)){C[g]=d.slice(_);break}}else for(u=z;u!==U;u+=O)if(h=r.yaxes[u],i.cartesian.indexOf(g+h)!==-1){C[g]=h;break}}else if(A.charAt(0)===\"l\"?(z=0,O=1,U=s):(z=s-1,O=-1,U=-1),a){var Z=b[g];for(u=z;u!==U;u+=O)if(d=v[Z][u],!!d&&(_=d.indexOf(\"y\"),d.slice(_)===g)){C[g]=d.slice(0,_);break}}else for(u=z;u!==U;u+=O)if(f=r.xaxes[u],i.cartesian.indexOf(f+g)!==-1){C[g]=f;break}}}}function dme(e,t,r,n,i){var a=new Array(r),o;function s(l,u){t.indexOf(u)!==-1&&n[u]===void 0?(a[l]=u,n[u]=l):a[l]=\"\"}if(Array.isArray(e))for(o=0;o<r;o++)s(o,e[o]);else for(s(0,i),o=1;o<r;o++)s(o,i+(o+1));return a}vme.exports={moduleType:\"component\",name:\"grid\",schema:{layout:{grid:mV}},layoutAttributes:mV,sizeDefaults:Syt,contentDefaults:Myt}});var _V=ye((zlr,pme)=>{\"use strict\";pme.exports={visible:{valType:\"boolean\",editType:\"calc\"},type:{valType:\"enumerated\",values:[\"percent\",\"constant\",\"sqrt\",\"data\"],editType:\"calc\"},symmetric:{valType:\"boolean\",editType:\"calc\"},array:{valType:\"data_array\",editType:\"calc\"},arrayminus:{valType:\"data_array\",editType:\"calc\"},value:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},valueminus:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},traceref:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},tracerefminus:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},copy_ystyle:{valType:\"boolean\",editType:\"plot\"},copy_zstyle:{valType:\"boolean\",editType:\"style\"},color:{valType:\"color\",editType:\"style\"},thickness:{valType:\"number\",min:0,dflt:2,editType:\"style\"},width:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\"}});var yme=ye((Olr,mme)=>{\"use strict\";var gme=Eo(),Eyt=qa(),kyt=Dr(),Cyt=vl(),Lyt=_V();mme.exports=function(e,t,r,n){var i=\"error_\"+n.axis,a=Cyt.newContainer(t,i),o=e[i]||{};function s(v,_){return kyt.coerce(o,a,Lyt,v,_)}var l=o.array!==void 0||o.value!==void 0||o.type===\"sqrt\",u=s(\"visible\",l);if(u!==!1){var c=s(\"type\",\"array\"in o?\"data\":\"percent\"),f=!0;c!==\"sqrt\"&&(f=s(\"symmetric\",!((c===\"data\"?\"arrayminus\":\"valueminus\")in o))),c===\"data\"?(s(\"array\"),s(\"traceref\"),f||(s(\"arrayminus\"),s(\"tracerefminus\"))):(c===\"percent\"||c===\"constant\")&&(s(\"value\"),f||s(\"valueminus\"));var h=\"copy_\"+n.inherit+\"style\";if(n.inherit){var d=t[\"error_\"+n.inherit];(d||{}).visible&&s(h,!(o.color||gme(o.thickness)||gme(o.width)))}(!n.inherit||!a[h])&&(s(\"color\",r),s(\"thickness\"),s(\"width\",Eyt.traceIs(t,\"gl3d\")?0:4))}}});var xV=ye((qlr,xme)=>{\"use strict\";xme.exports=function(t){var r=t.type,n=t.symmetric;if(r===\"data\"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=_me(r,t.value),s=_me(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function _me(e,t){if(e===\"percent\")return function(r){return Math.abs(r*t/100)};if(e===\"constant\")return function(){return Math.abs(t)};if(e===\"sqrt\")return function(r){return Math.sqrt(Math.abs(r))}}});var Tme=ye((Blr,wme)=>{\"use strict\";var bV=Eo(),Pyt=qa(),wV=ho(),Iyt=Dr(),Ryt=xV();wme.exports=function(t){for(var r=t.calcdata,n=0;n<r.length;n++){var i=r[n],a=i[0].trace;if(a.visible===!0&&Pyt.traceIs(a,\"errorBarsOK\")){var o=wV.getFromId(t,a.xaxis),s=wV.getFromId(t,a.yaxis);bme(i,a,o,\"x\"),bme(i,a,s,\"y\")}}};function bme(e,t,r,n){var i=t[\"error_\"+n]||{},a=i.visible&&[\"linear\",\"log\"].indexOf(r.type)!==-1,o=[];if(a){for(var s=Ryt(i),l=0;l<e.length;l++){var u=e[l],c=u.i;if(c===void 0)c=l;else if(c===null)continue;var f=u[n];if(bV(r.c2l(f))){var h=s(f,c);if(bV(h[0])&&bV(h[1])){var d=u[n+\"s\"]=f-h[0],v=u[n+\"h\"]=f+h[1];o.push(d,v)}}}var _=r._id,b=t._extremes[_],p=wV.findExtremes(r,o,Iyt.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(p.min),b.max=b.max.concat(p.max)}}});var Mme=ye((Nlr,Sme)=>{\"use strict\";var Ame=Oa(),L_=Eo(),Dyt=So(),Fyt=Ru();Sme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var _=Fyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=Ame.select(this).selectAll(\"g.errorbar\").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll(\"path.xerror\").remove(),d.visible||b.selectAll(\"path.yerror\").remove(),b.style(\"opacity\",1);var p=b.enter().append(\"g\").classed(\"errorbar\",!0);l&&p.style(\"opacity\",0).transition().duration(i.duration).style(\"opacity\",1),Dyt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var E=Ame.select(this),T=zyt(k,o,s);if(!(_&&!k.vis)){var L,x=E.select(\"path.yerror\");if(d.visible&&L_(T.x)&&L_(T.yh)&&L_(T.ys)){var C=d.width;L=\"M\"+(T.x-C)+\",\"+T.yh+\"h\"+2*C+\"m-\"+C+\",0V\"+T.ys,T.noYS||(L+=\"m-\"+C+\",0h\"+2*C),a=!x.size(),a?x=E.append(\"path\").style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").classed(\"yerror\",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr(\"d\",L)}else x.remove();var M=E.select(\"path.xerror\");if(h.visible&&L_(T.y)&&L_(T.xh)&&L_(T.xs)){var g=(h.copy_ystyle?d:h).width;L=\"M\"+T.xh+\",\"+(T.y-g)+\"v\"+2*g+\"m0,-\"+g+\"H\"+T.xs,T.noXS||(L+=\"m0,-\"+g+\"v\"+2*g),a=!M.size(),a?M=E.append(\"path\").style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").classed(\"xerror\",!0):l&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr(\"d\",L)}else M.remove()}})}})};function zyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),L_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),L_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Cme=ye((Ulr,kme)=>{\"use strict\";var Oyt=Oa(),Eme=ka();kme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Oyt.select(this);o.selectAll(\"path.yerror\").style(\"stroke-width\",i.thickness+\"px\").call(Eme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll(\"path.xerror\").style(\"stroke-width\",a.thickness+\"px\").call(Eme.stroke,a.color)})}});var Ime=ye((Vlr,Pme)=>{\"use strict\";var x4=Dr(),Lme=mc().overrideAll,b4=_V(),u2={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4)};delete u2.error_x.copy_zstyle;delete u2.error_y.copy_zstyle;delete u2.error_y.copy_ystyle;var w4={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4),error_z:x4.extendFlat({},b4)};delete w4.error_x.copy_ystyle;delete w4.error_y.copy_ystyle;delete w4.error_z.copy_ystyle;delete w4.error_z.copy_zstyle;Pme.exports={moduleType:\"component\",name:\"errorbars\",schema:{traces:{scatter:u2,bar:u2,histogram:u2,scatter3d:Lme(w4,\"calc\",\"nested\"),scattergl:Lme(u2,\"calc\",\"nested\")}},supplyDefaults:yme(),calc:Tme(),makeComputeError:xV(),plot:Mme(),style:Cme(),hoverInfo:qyt};function qyt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Dme=ye((Glr,Rme)=>{\"use strict\";Rme.exports={cn:{colorbar:\"colorbar\",cbbg:\"cbbg\",cbfill:\"cbfill\",cbfills:\"cbfills\",cbline:\"cbline\",cblines:\"cblines\",cbaxis:\"cbaxis\",cbtitleunshift:\"cbtitleunshift\",cbtitle:\"cbtitle\",cboutline:\"cboutline\",crisp:\"crisp\",jsPlaceholder:\"js-placeholder\"}}});var Ume=ye((Hlr,Nme)=>{\"use strict\";var P_=Oa(),TV=fd(),VI=Mc(),Fme=qa(),Uy=ho(),UI=yv(),U0=Dr(),Hg=U0.strTranslate,Bme=Ao().extendFlat,AV=Eg(),Gg=So(),SV=ka(),Byt=zb(),Nyt=Zl(),Uyt=pv().flipScale,Vyt=f4(),Gyt=dI(),Hyt=Rd(),MV=Dh(),zme=MV.LINE_SPACING,Ome=MV.FROM_TL,qme=MV.FROM_BR,gf=Dme().cn;function jyt(e){var t=e._fullLayout,r=t._infolayer.selectAll(\"g.\"+gf.colorbar).data(Wyt(e),function(n){return n._id});r.enter().append(\"g\").attr(\"class\",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=P_.select(this);U0.ensureSingle(i,\"rect\",gf.cbbg),U0.ensureSingle(i,\"g\",gf.cbfills),U0.ensureSingle(i,\"g\",gf.cblines),U0.ensureSingle(i,\"g\",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),U0.ensureSingle(i,\"g\",gf.cbtitleunshift,function(o){o.append(\"g\").classed(gf.cbtitle,!0)}),U0.ensureSingle(i,\"rect\",gf.cboutline);var a=Xyt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Zyt(i,n,e)}),r.exit().each(function(n){VI.autoMargin(e,n._id)}).remove(),r.order()}function Wyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(E){return Bme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc==\"function\"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Uyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c<r.length;c++){var f=r[c];if(o=f[0].trace,!!o._module){var h=o._module.colorbar;if(o.visible===!0&&h)for(var d=Array.isArray(h),v=d?h:[h],_=0;_<v.length;_++){s=v[_];var b=s.container;a=b?o[b]:o,a&&a.showscale&&(i=l(a.colorbar),i._id=\"cb\"+o.uid+(d&&b?\"-\"+b:\"\"),i._traceIndex=o.index,i._propPrefix=(b?b+\".\":\"\")+\"colorbar.\",i._meta=o._meta,u(),n.push(i))}}}for(var p in t._colorAxes)if(a=t[p],a.showscale){var k=t._colorAxes[p];i=l(a.colorbar),i._id=\"cb\"+p,i._propPrefix=p+\".colorbar.\",i._meta=t._meta,s={min:\"cmin\",max:\"cmax\"},k[0]!==\"heatmap\"&&(o=k[1],s.calc=o._module.colorbar.calc),u(),n.push(i)}return n}function Xyt(e,t,r){var n=t.orientation===\"v\",i=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,d=t.xpad,v=t.ypad,_=t.x,b=n?t.y:1-t.y,p=t.yref===\"paper\",k=t.xref===\"paper\",E=r._fullLayout,T=E._size,L=t._fillcolor,x=t._line,C=t.title,M=C.side,g=t._zrange||P_.extent((typeof L==\"function\"?L:x.color).domain()),P=typeof x.color==\"function\"?x.color:function(){return x.color},A=typeof L==\"function\"?L:function(){return L},z=t._levels,O=Yyt(r,t,g),U=O.fill,G=O.line,Z=Math.round(o*(s===\"fraction\"?n?T.w:T.h:1)),j=Z/(n?T.w:T.h),N=Math.round(i*(a===\"fraction\"?n?T.h:T.w:1)),H=N/(n?T.h:T.w),re=k?T.w:r._fullLayout.width,oe=p?T.h:r._fullLayout.height,_e=Math.round(n?_*re+d:b*oe+v),Ce={center:.5,right:1}[f]||0,Le={top:1,middle:.5}[h]||0,ge=n?_-Ce*j:b-Le*j,ie=n?b-Le*H:_-Ce*H,Se=Math.round(n?oe*(1-ie):re*ie);t._lenFrac=H,t._thickFrac=j,t._uFrac=ge,t._vFrac=ie;var Ee=t._axis=Kyt(r,t,g);Ee.position=j+(n?_+d/T.w:b+v/T.h);var Ae=[\"top\",\"bottom\"].indexOf(M)!==-1;if(n&&Ae&&(Ee.title.side=M,Ee.titlex=_+d/T.w,Ee.titley=ie+(C.side===\"top\"?H-v/T.h:v/T.h)),!n&&!Ae&&(Ee.title.side=M,Ee.titley=b+v/T.h,Ee.titlex=ie+d/T.w),x.color&&t.tickmode===\"auto\"){Ee.tickmode=\"linear\",Ee.tick0=z.start;var Be=z.size,Pe=U0.constrain(N/50,4,15)+1,me=(g[1]-g[0])/((t.nticks||Pe)*Be);if(me>1){var De=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Be*=De*U0.roundUp(me/De,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=Be}Ee.domain=n?[ie+v/T.h,ie+H-v/T.h]:[ie+d/T.w,ie+H-d/T.w],Ee.setScale(),e.attr(\"transform\",Hg(Math.round(T.l),Math.round(T.t)));var ce=e.select(\".\"+gf.cbtitleunshift).attr(\"transform\",Hg(-Math.round(T.l),-Math.round(T.t))),je=Ee.ticklabelposition,lt=Ee.title.font.size,pt=e.select(\".\"+gf.cbaxis),Vt,ot=0,ut=0;function Wt(fr,$e){var St={propContainer:Ee,propName:t._propPrefix+\"title.text\",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select(\".\"+gf.cbtitle)},Qt=fr.charAt(0)===\"h\"?fr.slice(1):\"h\"+fr;e.selectAll(\".\"+Qt+\",.\"+Qt+\"-math-group\").remove(),Byt.draw(r,fr,Bme(St,$e||{}))}function Nt(){if(n&&Ae||!n&&!Ae){var fr,$e;M===\"top\"&&(fr=d+T.l+re*_,$e=v+T.t+oe*(1-ie-H)+3+lt*.75),M===\"bottom\"&&(fr=d+T.l+re*_,$e=v+T.t+oe*(1-ie)-3-lt*.25),M===\"right\"&&($e=v+T.t+oe*b+3+lt*.75,fr=d+T.l+re*ie),Wt(Ee._id+\"title\",{attributes:{x:fr,y:$e,\"text-anchor\":n?\"start\":\"middle\"}})}}function $t(){if(n&&!Ae||!n&&Ae){var fr=Ee.position||0,$e=Ee._offset+Ee._length/2,St,Qt;if(M===\"right\")Qt=$e,St=T.l+re*fr+10+lt*(Ee.showticklabels?1:.5);else if(St=$e,M===\"bottom\"&&(Qt=T.t+oe*fr+10+(je.indexOf(\"inside\")===-1?Ee.tickfont.size:0)+(Ee.ticks!==\"inside\"&&t.ticklen||0)),M===\"top\"){var Gt=C.text.split(\"<br>\").length;Qt=T.t+oe*fr+10-Z-zme*lt*Gt}Wt((n?\"h\":\"v\")+Ee._id+\"title\",{avoid:{selection:P_.select(r).selectAll(\"g.\"+Ee._id+\"tick\"),side:M,offsetTop:n?0:T.t,offsetLeft:n?T.l:0,maxShift:n?E.width:E.height},attributes:{x:St,y:Qt,\"text-anchor\":\"middle\"},transform:{rotate:n?-90:0,offset:0}})}}function sr(){if(!n&&!Ae||n&&Ae){var fr=e.select(\".\"+gf.cbtitle),$e=fr.select(\"text\"),St=[-l/2,l/2],Qt=fr.select(\".h\"+Ee._id+\"title-math-group\").node(),Gt=15.6;$e.node()&&(Gt=parseInt($e.node().style.fontSize,10)*zme);var _t;if(Qt?(_t=Gg.bBox(Qt),ut=_t.width,ot=_t.height,ot>Gt&&(St[1]-=(ot-Gt)/2)):$e.node()&&!$e.classed(gf.jsPlaceholder)&&(_t=Gg.bBox($e.node()),ut=_t.width,ot=_t.height),n){if(ot){if(ot+=5,M===\"top\")Ee.domain[1]-=ot/T.h,St[1]*=-1;else{Ee.domain[0]+=ot/T.h;var It=Nyt.lineCount($e);St[1]+=(1-It)*Gt}fr.attr(\"transform\",Hg(St[0],St[1])),Ee.setScale()}}else ut&&(M===\"right\"&&(Ee.domain[0]+=(ut+lt/2)/T.w),fr.attr(\"transform\",Hg(St[0],St[1])),Ee.setScale())}e.selectAll(\".\"+gf.cbfills+\",.\"+gf.cblines).attr(\"transform\",n?Hg(0,Math.round(T.h*(1-Ee.domain[1]))):Hg(Math.round(T.w*Ee.domain[0]),0)),pt.attr(\"transform\",n?Hg(0,Math.round(-T.t)):Hg(Math.round(-T.l),0));var mt=e.select(\".\"+gf.cbfills).selectAll(\"rect.\"+gf.cbfill).attr(\"style\",\"\").data(U);mt.enter().append(\"rect\").classed(gf.cbfill,!0).attr(\"style\",\"\"),mt.exit().remove();var er=g.map(Ee.c2p).map(Math.round).sort(function(Br,Vr){return Br-Vr});mt.each(function(Br,Vr){var dt=[Vr===0?g[0]:(U[Vr]+U[Vr-1])/2,Vr===U.length-1?g[1]:(U[Vr]+U[Vr+1])/2].map(Ee.c2p).map(Math.round);n&&(dt[1]=U0.constrain(dt[1]+(dt[1]>dt[0])?1:-1,er[0],er[1]));var Ge=P_.select(this).attr(n?\"x\":\"y\",_e).attr(n?\"y\":\"x\",P_.min(dt)).attr(n?\"width\":\"height\",Math.max(Z,2)).attr(n?\"height\":\"width\",Math.max(P_.max(dt)-P_.min(dt),2));if(t._fillgradient)Gg.gradient(Ge,r,t._id,n?\"vertical\":\"horizontalreversed\",t._fillgradient,\"fill\");else{var Je=A(Br).replace(\"e-\",\"\");Ge.attr(\"fill\",TV(Je).toHexString())}});var lr=e.select(\".\"+gf.cblines).selectAll(\"path.\"+gf.cbline).data(x.color&&x.width?G:[]);lr.enter().append(\"path\").classed(gf.cbline,!0),lr.exit().remove(),lr.each(function(Br){var Vr=_e,dt=Math.round(Ee.c2p(Br))+x.width/2%1;P_.select(this).attr(\"d\",\"M\"+(n?Vr+\",\"+dt:dt+\",\"+Vr)+(n?\"h\":\"v\")+Z).call(Gg.lineGroupStyle,x.width,P(Br),x.dash)}),pt.selectAll(\"g.\"+Ee._id+\"tick,path\").remove();var wr=_e+Z+(l||0)/2-(t.ticks===\"outside\"?1:0),Lr=Uy.calcTicks(Ee),ti=Uy.getTickSigns(Ee)[2];return Uy.drawTicks(r,Ee,{vals:Ee.ticks===\"inside\"?Uy.clipEnds(Ee,Lr):Lr,layer:pt,path:Uy.makeTickPath(Ee,wr,ti),transFn:Uy.makeTransTickFn(Ee)}),Uy.drawLabels(r,Ee,{vals:Lr,layer:pt,transFn:Uy.makeTransTickLabelFn(Ee),labelFns:Uy.makeLabelFns(Ee,wr)})}function Tr(){var fr,$e=Z+l/2;je.indexOf(\"inside\")===-1&&(fr=Gg.bBox(pt.node()),$e+=n?fr.width:fr.height),Vt=ce.select(\"text\");var St=0,Qt=n&&M===\"top\",Gt=!n&&M===\"right\",_t=0;if(Vt.node()&&!Vt.classed(gf.jsPlaceholder)){var It,mt=ce.select(\".h\"+Ee._id+\"title-math-group\").node();mt&&(n&&Ae||!n&&!Ae)?(fr=Gg.bBox(mt),St=fr.width,It=fr.height):(fr=Gg.bBox(ce.node()),St=fr.right-T.l-(n?_e:Se),It=fr.bottom-T.t-(n?Se:_e),!n&&M===\"top\"&&($e+=fr.height,_t=fr.height)),Gt&&(Vt.attr(\"transform\",Hg(St/2+lt/2,0)),St*=2),$e=Math.max($e,n?St:It)}var er=(n?d:v)*2+$e+u+l/2,lr=0;!n&&C.text&&h===\"bottom\"&&b<=0&&(lr=er/2,er+=lr,_t+=lr),E._hColorbarMoveTitle=lr,E._hColorbarMoveCBTitle=_t;var wr=u+l,Lr=(n?_e:Se)-wr/2-(n?d:0),ti=(n?Se:_e)-(n?N:v+_t-lr);e.select(\".\"+gf.cbbg).attr(\"x\",Lr).attr(\"y\",ti).attr(n?\"width\":\"height\",Math.max(er-lr,2)).attr(n?\"height\":\"width\",Math.max(N+wr,2)).call(SV.fill,c).call(SV.stroke,t.bordercolor).style(\"stroke-width\",u);var Br=Gt?Math.max(St-10,0):0;e.selectAll(\".\"+gf.cboutline).attr(\"x\",(n?_e:Se+d)+Br).attr(\"y\",(n?Se+v-N:_e)+(Qt?ot:0)).attr(n?\"width\":\"height\",Math.max(Z,2)).attr(n?\"height\":\"width\",Math.max(N-(n?2*v+ot:2*d+Br),2)).call(SV.stroke,t.outlinecolor).style({fill:\"none\",\"stroke-width\":l});var Vr=n?Ce*er:0,dt=n?0:(1-Le)*er-_t;if(Vr=k?T.l-Vr:-Vr,dt=p?T.t-dt:-dt,e.attr(\"transform\",Hg(Vr,dt)),!n&&(u||TV(c).getAlpha()&&!TV.equals(E.paper_bgcolor,c))){var Ge=pt.selectAll(\"text\"),Je=Ge[0].length,We=e.select(\".\"+gf.cbbg).node(),tt=Gg.bBox(We),xt=Gg.getTranslate(e),Ie=2;Ge.each(function(di,ji){var In=0,wi=Je-1;if(ji===In||ji===wi){var On=Gg.bBox(this),qn=Gg.getTranslate(this),Fn;if(ji===wi){var ra=On.right+qn.x,la=tt.right+xt.x+Se-u-Ie+_;Fn=la-ra,Fn>0&&(Fn=0)}else if(ji===In){var Ut=On.left+qn.x,wt=tt.left+xt.x+Se+u+Ie;Fn=wt-Ut,Fn<0&&(Fn=0)}Fn&&(Je<3?this.setAttribute(\"transform\",\"translate(\"+Fn+\",0) \"+this.getAttribute(\"transform\")):this.setAttribute(\"visibility\",\"hidden\"))}})}var xe={},ke=Ome[f],vt=qme[f],ir=Ome[h],ar=qme[h],vr=er-Z;n?(a===\"pixels\"?(xe.y=b,xe.t=N*ir,xe.b=N*ar):(xe.t=xe.b=0,xe.yt=b+i*ir,xe.yb=b-i*ar),s===\"pixels\"?(xe.x=_,xe.l=er*ke,xe.r=er*vt):(xe.l=vr*ke,xe.r=vr*vt,xe.xl=_-o*ke,xe.xr=_+o*vt)):(a===\"pixels\"?(xe.x=_,xe.l=N*ke,xe.r=N*vt):(xe.l=xe.r=0,xe.xl=_+i*ke,xe.xr=_-i*vt),s===\"pixels\"?(xe.y=1-b,xe.t=er*ir,xe.b=er*ar):(xe.t=vr*ir,xe.b=vr*ar,xe.yt=b-o*ir,xe.yb=b+o*ar));var ii=t.y<.5?\"b\":\"t\",pi=t.x<.5?\"l\":\"r\";r._fullLayout._reservedMargin[t._id]={};var $r={r:E.width-Lr-Vr,l:Lr+xe.r,b:E.height-ti-dt,t:ti+xe.b};k&&p?VI.autoMargin(r,t._id,xe):k?r._fullLayout._reservedMargin[t._id][ii]=$r[ii]:p||n?r._fullLayout._reservedMargin[t._id][pi]=$r[pi]:r._fullLayout._reservedMargin[t._id][ii]=$r[ii]}return U0.syncOrAsync([VI.previousPromises,Nt,sr,$t,VI.previousPromises,Tr],r)}function Zyt(e,t,r){var n=t.orientation===\"v\",i=r._fullLayout,a=i._size,o,s,l;UI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr(\"transform\"),AV(e)},moveFn:function(u,c){e.attr(\"transform\",o+Hg(u,c)),s=UI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=UI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=UI.getCursor(s,l,t.xanchor,t.yanchor);AV(e,f)},doneFn:function(){if(AV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+\"x\"]=s,u[t._propPrefix+\"y\"]=l,t._traceIndex!==void 0?Fme.call(\"_guiRestyle\",r,u,t._traceIndex):Fme.call(\"_guiRelayout\",r,u)}}})}function Yyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o<f&&i.push(o);if(t._fillgradient)a=[0];else if(typeof t._fillcolor==\"function\"){var h=t._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,s=0;s<1e5&&(o=h.start+s*u,!(u>0?o>=l:o<=l));s++)o>r[0]&&o<r[1]&&a.push(o);else a=i.map(function(d){return d-n.size/2}),a.push(a[a.length-1]+n.size)}else t._fillcolor&&typeof t._fillcolor==\"string\"&&(a=[0]);return n.size<0&&(i.reverse(),a.reverse()),{line:i,fill:a}}function Kyt(e,t,r){var n=e._fullLayout,i=t.orientation===\"v\",a={type:\"linear\",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:\"free\",side:i?\"right\":\"bottom\",position:1},o=i?\"y\":\"x\",s={type:\"linear\",_id:o+t._id},l={letter:o,font:n.font,noAutotickangles:o===\"y\",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function u(c,f){return U0.coerce(a,s,Hyt,c,f)}return Vyt(a,s,u,l,n),Gyt(a,s,u,l),s}Nme.exports={draw:jyt}});var Gme=ye((jlr,Vme)=>{\"use strict\";Vme.exports={moduleType:\"component\",name:\"colorbar\",attributes:uL(),supplyDefaults:Fq(),draw:Ume().draw,hasColorbar:kq()}});var jme=ye((Wlr,Hme)=>{\"use strict\";Hme.exports={moduleType:\"component\",name:\"legend\",layoutAttributes:CB(),supplyLayoutDefaults:PB(),draw:HB(),style:NB()}});var Xme=ye((Xlr,Wme)=>{\"use strict\";Wme.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"],year:\"%Y\",month:\"%b %Y\",dayMonth:\"%b %-d\",dayMonthYear:\"%b %-d, %Y\"}}});var Yme=ye((Zlr,Zme)=>{\"use strict\";Zme.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}});var kV=ye((Ylr,Qme)=>{\"use strict\";var Jyt=qa(),$me=Dr(),EV=$me.extendFlat,Kme=$me.extendDeep;function Jme(e){var t;switch(e){case\"themes__thumb\":t={autosize:!0,width:150,height:150,title:{text:\"\"},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\"thumbnail\":t={title:{text:\"\"},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\"\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function $yt(e){var t=[\"xaxis\",\"yaxis\",\"zaxis\"];return t.indexOf(e.slice(0,5))>-1}Qme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Kme([],i),s=Kme({},a,Jme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass===\"thumbnail\"||r.tileClass===\"themes__thumb\"){s.annotations=[];var u=Object.keys(s);for(n=0;n<u.length;n++)$yt(u[n])&&(s[u[n]].title={text:\"\"});for(n=0;n<o.length;n++){var c=o[n];c.showscale=!1,c.marker&&(c.marker.showscale=!1),Jyt.traceIs(c,\"pie-like\")&&(c.textposition=\"none\")}}if(Array.isArray(r.annotations))for(n=0;n<r.annotations.length;n++)s.annotations.push(r.annotations[n]);var f=Object.keys(s).filter(function(b){return b.match(/^scene\\d*$/)});if(f.length){var h={};for(r.tileClass===\"thumbnail\"&&(h={title:{text:\"\"},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<f.length;n++){var d=s[f[n]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),EV(d.xaxis,h),EV(d.yaxis,h),EV(d.zaxis,h),d._scene=null}}var v=document.createElement(\"div\");r.tileClass&&(v.className=r.tileClass);var _={gd:v,td:v,layout:s,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:l.mapboxAccessToken}};return r.setBackground!==\"transparent\"&&(_.config.setBackground=r.setBackground||\"opaque\"),_.gd.defaultLayout=Jme(r.tileClass),_}});var rye=ye((Klr,tye)=>{\"use strict\";var Qyt=Ab().EventEmitter,e1t=qa(),t1t=Dr(),eye=Oy(),r1t=kV(),i1t=YP(),n1t=KP();function a1t(e,t){var r=new Qyt,n=r1t(e,{format:\"png\"}),i=n.gd;i.style.position=\"absolute\",i.style.left=\"-5000px\",document.body.appendChild(i);function a(){var s=eye.getDelay(i._fullLayout);setTimeout(function(){var l=i1t(i),u=document.createElement(\"canvas\");u.id=t1t.randstr(),r=n1t({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=eye.getRedrawFunc(i);return e1t.call(\"_doPlot\",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit(\"error\",s)}),r}tye.exports=a1t});var aye=ye((Jlr,nye)=>{\"use strict\";var iye=Oy(),o1t={getDelay:iye.getDelay,getRedrawFunc:iye.getRedrawFunc,clone:kV(),toSVG:YP(),svgToImg:KP(),toImage:rye(),downloadImage:sU()};nye.exports=o1t});var sye=ye(Vy=>{\"use strict\";Vy.version=g6().version;bee();une();var s1t=qa(),T4=Vy.register=s1t.register,LV=Ede(),oye=Object.keys(LV);for(GI=0;GI<oye.length;GI++)ET=oye[GI],ET.charAt(0)!==\"_\"&&(Vy[ET]=LV[ET]),T4({moduleType:\"apiMethod\",name:ET,fn:LV[ET]});var ET,GI;T4(wpe());T4([Xpe(),o0e(),Of(),S0e(),q0e(),oge(),Mge(),jge(),ume(),yV(),Ime(),tc(),Gme(),jme(),vf(),pN()]);T4([Xme(),Yme()]);window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(T4(window.PlotlyLocales),delete window.PlotlyLocales);Vy.Icons=$L();var HI=vf(),CV=Mc();Vy.Plots={resize:CV.resize,graphJson:CV.graphJson,sendDataToCloud:CV.sendDataToCloud};Vy.Fx={hover:HI.hover,unhover:HI.unhover,loneHover:HI.loneHover,loneUnhover:HI.loneUnhover};Vy.Snapshot=aye();Vy.PlotSchema=P3()});var uye=ye((Qlr,lye)=>{\"use strict\";lye.exports=sye()});var zm=ye((eur,vye)=>{\"use strict\";var Bf=pf(),cye=df().axisHoverFormat,{hovertemplateAttrs:l1t,texttemplateAttrs:u1t,templatefallbackAttrs:fye}=Ll(),dye=Tu(),c1t=ec(),hye=A_(),f1t=Pd().pattern,c2=Ao().extendFlat,PV=c1t({editType:\"calc\",arrayOk:!0,colorEditType:\"style\"}),h1t=Bf.marker,d1t=h1t.line,v1t=c2({},d1t.width,{dflt:0}),p1t=c2({width:v1t,editType:\"calc\"},dye(\"marker.line\")),g1t=c2({line:p1t,editType:\"calc\"},dye(\"marker\"),{opacity:{valType:\"number\",arrayOk:!0,dflt:1,min:0,max:1,editType:\"style\"},pattern:f1t,cornerradius:{valType:\"any\",editType:\"calc\"}});vye.exports={x:Bf.x,x0:Bf.x0,dx:Bf.dx,y:Bf.y,y0:Bf.y0,dy:Bf.dy,xperiod:Bf.xperiod,yperiod:Bf.yperiod,xperiod0:Bf.xperiod0,yperiod0:Bf.yperiod0,xperiodalignment:Bf.xperiodalignment,yperiodalignment:Bf.yperiodalignment,xhoverformat:cye(\"x\"),yhoverformat:cye(\"y\"),text:Bf.text,texttemplate:u1t({editType:\"plot\"},{keys:hye.eventDataKeys}),texttemplatefallback:fye({editType:\"plot\"}),hovertext:Bf.hovertext,hovertemplate:l1t({},{keys:hye.eventDataKeys}),hovertemplatefallback:fye(),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"calc\"},insidetextanchor:{valType:\"enumerated\",values:[\"end\",\"middle\",\"start\"],dflt:\"end\",editType:\"plot\"},textangle:{valType:\"angle\",dflt:\"auto\",editType:\"plot\"},textfont:c2({},PV,{}),insidetextfont:c2({},PV,{}),outsidetextfont:c2({},PV,{}),constraintext:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"both\",\"none\"],dflt:\"both\",editType:\"calc\"},cliponaxis:c2({},Bf.cliponaxis,{}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},base:{valType:\"any\",dflt:null,arrayOk:!0,editType:\"calc\"},offset:{valType:\"number\",dflt:null,arrayOk:!0,editType:\"calc\"},width:{valType:\"number\",dflt:null,min:0,arrayOk:!0,editType:\"calc\"},marker:g1t,offsetgroup:Bf.offsetgroup,alignmentgroup:Bf.alignmentgroup,selected:{marker:{opacity:Bf.selected.marker.opacity,color:Bf.selected.marker.color,editType:\"style\"},textfont:Bf.selected.textfont,editType:\"style\"},unselected:{marker:{opacity:Bf.unselected.marker.opacity,color:Bf.unselected.marker.color,editType:\"style\"},textfont:Bf.unselected.textfont,editType:\"style\"},zorder:Bf.zorder}});var jI=ye((tur,pye)=>{\"use strict\";pye.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},barcornerradius:{valType:\"any\",editType:\"calc\"}}});var WI=ye((rur,yye)=>{\"use strict\";var m1t=ka(),gye=pv().hasColorscale,mye=td(),y1t=Dr().coercePattern;yye.exports=function(t,r,n,i,a){var o=n(\"marker.color\",i),s=gye(t,\"marker\");s&&mye(t,r,a,n,{prefix:\"marker.\",cLetter:\"c\"}),n(\"marker.line.color\",m1t.defaultLine),gye(t,\"marker.line\")&&mye(t,r,a,n,{prefix:\"marker.line.\",cLetter:\"c\"}),n(\"marker.line.width\"),n(\"marker.opacity\"),y1t(n,\"marker.pattern\",o,s),n(\"selected.marker.color\"),n(\"unselected.marker.color\")}});var i0=ye((iur,Aye)=>{\"use strict\";var _ye=Eo(),kT=Dr(),xye=ka(),_1t=qa(),x1t=oT(),b1t=Dg(),w1t=WI(),T1t=e2(),bye=zm(),XI=kT.coerceFont;function A1t(e,t,r,n){function i(u,c){return kT.coerce(e,t,bye,u,c)}var a=x1t(e,t,n,i);if(!a){t.visible=!1;return}b1t(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"zorder\"),i(\"orientation\",t.x&&!t.y?\"h\":\"v\"),i(\"base\"),i(\"offset\"),i(\"width\"),i(\"text\"),i(\"hovertext\"),i(\"hovertemplate\"),i(\"hovertemplatefallback\");var o=i(\"textposition\");Tye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),w1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=_1t.getComponentMethod(\"errorbars\",\"supplyDefaults\");l(e,t,s||xye.defaultLine,{axis:\"y\"}),l(e,t,s||xye.defaultLine,{axis:\"x\",inherit:\"y\"}),kT.coerceSelectionMarkerOpacity(t,i)}function S1t(e,t){var r,n;function i(s,l){return kT.coerce(n._input,n,bye,s,l)}for(var a=0;a<e.length;a++)if(n=e[a],n.type===\"bar\"){r=n._input;var o=i(\"marker.cornerradius\",t.barcornerradius);n.marker&&(n.marker.cornerradius=wye(o)),T1t(r,n,t,i,t.barmode)}}function wye(e){if(_ye(e)){if(e=+e,e>=0)return e}else if(typeof e==\"string\"&&(e=e.trim(),e.slice(-1)===\"%\"&&_ye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+\"%\"}function Tye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i===\"auto\",v=d||i===\"inside\",_=d||i===\"outside\";if(v||_){var b=XI(n,\"textfont\",r.font),p=kT.extendFlat({},b),k=e.textfont&&e.textfont.color,E=!k;if(E&&delete p.color,XI(n,\"insidetextfont\",p),h){var T=kT.extendFlat({},b);E&&delete T.color,XI(n,\"pathbar.textfont\",T)}_&&XI(n,\"outsidetextfont\",b),o&&n(\"selected.textfont.color\"),s&&n(\"unselected.textfont.color\"),l&&n(\"constraintext\"),u&&n(\"cliponaxis\"),c&&n(\"textangle\"),n(\"texttemplate\"),n(\"texttemplatefallback\")}v&&f&&n(\"insidetextanchor\")}Aye.exports={supplyDefaults:A1t,crossTraceDefaults:S1t,handleText:Tye,validateCornerradius:wye}});var IV=ye((nur,Sye)=>{\"use strict\";var M1t=qa(),E1t=ho(),k1t=Dr(),C1t=jI(),L1t=i0().validateCornerradius;Sye.exports=function(e,t,r){function n(_,b){return k1t.coerce(e,t,C1t,_,b)}for(var i=!1,a=!1,o=!1,s={},l=n(\"barmode\"),u=l===\"group\",c=0;c<r.length;c++){var f=r[c];if(M1t.traceIs(f,\"bar\")&&f.visible)i=!0;else continue;var h=f.xaxis+f.yaxis;if(u?(s[h]&&(o=!0),s[h]=!0):(h+=f._input.offsetgroup,s.length>0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type===\"histogram\"){var d=E1t.getFromId({_fullLayout:t},f[f.orientation===\"v\"?\"xaxis\":\"yaxis\"]);d.type!==\"category\"&&(a=!0)}}if(!i){delete t.barmode;return}l!==\"overlay\"&&n(\"barnorm\"),n(\"bargap\",a&&!o?0:.2),n(\"bargroupgap\");var v=n(\"barcornerradius\");t.barcornerradius=L1t(v)}});var A4=ye((aur,Mye)=>{\"use strict\";var CT=Dr();Mye.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;CT.mergeArray(r.text,t,\"tx\"),CT.mergeArray(r.hovertext,t,\"htx\");var i=r.marker;if(i){CT.mergeArray(i.opacity,t,\"mo\",!0),CT.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(CT.mergeArray(a.color,t,\"mlc\"),CT.mergeArrayCastPositive(a.width,t,\"mlw\"))}}});var Iye=ye((our,Pye)=>{\"use strict\";var Eye=ho(),kye=zg(),Cye=pv().hasColorscale,Lye=gv(),P1t=A4(),I1t=O0();Pye.exports=function(t,r){var n=Eye.getFromId(t,r.xaxis||\"x\"),i=Eye.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\",f),s=i.makeCalcdata(r,\"y\"),l=kye(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\",f),s=n.makeCalcdata(r,\"x\"),l=kye(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v<h;v++)d[v]={p:o[v],s:a[v]},u&&(d[v].orig_p=s[v],d[v][c+\"End\"]=l.ends[v],d[v][c+\"Start\"]=l.starts[v]),r.ids&&(d[v].id=String(r.ids[v]));return Cye(r,\"marker\")&&Lye(t,r,{vals:r.marker.color,containerStr:\"marker\",cLetter:\"c\"}),Cye(r,\"marker.line\")&&Lye(t,r,{vals:r.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),P1t(d,r),I1t(d,r),d}});var bv=ye((sur,Dye)=>{\"use strict\";var R1t=Oa(),D1t=Dr();function F1t(e,t,r){var n=e._fullLayout,i=n[\"_\"+r+\"Text_minsize\"];if(i){var a=n.uniformtext.mode===\"hide\",o;switch(r){case\"funnelarea\":case\"pie\":case\"sunburst\":o=\"g.slice\";break;case\"treemap\":case\"icicle\":o=\"g.slice, g.pathbar\";break;default:o=\"g.points > g.point\"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=R1t.select(this).select(\"text\");D1t.setTransormAndDisplay(u,l)}})}}function z1t(e,t,r){if(r.uniformtext.mode){var n=Rye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a<i,r[n]=r[n]||1/0,t.hide||(r[n]=Math.min(r[n],Math.max(a,i)))}}function O1t(e,t){var r=Rye(e);t[r]=void 0}function Rye(e){return\"_\"+e+\"Text_minsize\"}Dye.exports={recordMinTextSize:z1t,clearMinTextSize:O1t,resizeText:F1t}});var ZI=ye(f2=>{\"use strict\";var q1t=Eo(),B1t=fd(),Fye=Dr().isArrayOrTypedArray;f2.coerceString=function(e,t,r){if(typeof t==\"string\"){if(t||!e.noBlank)return t}else if((typeof t==\"number\"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};f2.coerceNumber=function(e,t,r){if(q1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&t<n||i!==void 0&&t>i;if(!a)return t}return r!==void 0?r:e.dflt};f2.coerceColor=function(e,t,r){return B1t(t).isValid()?t:r!==void 0?r:e.dflt};f2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};f2.getValue=function(e,t){var r;return Fye(e)?t<e.length&&(r=e[t]):r=e,r};f2.getLineWidth=function(e,t){var r=0<t.mlw?t.mlw:Fye(e.marker.line.width)?0:e.marker.line.width;return r}});var V0=ye((uur,Wye)=>{\"use strict\";var S4=Oa(),N1t=ka(),M4=So(),zye=Dr(),Oye=qa(),qye=bv().resizeText,RV=zm(),U1t=RV.textfont,V1t=RV.insidetextfont,G1t=RV.outsidetextfont,Qd=ZI();function H1t(e){var t=S4.select(e).selectAll('g[class^=\"barlayer\"]').selectAll(\"g.trace\");qye(e,t,\"bar\");var r=t.size(),n=e._fullLayout;t.style(\"opacity\",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode===\"stack\"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&S4.select(this).attr(\"shape-rendering\",\"crispEdges\")}),t.selectAll(\"g.points\").each(function(i){var a=S4.select(this),o=i[0].trace;Bye(a,o,e)}),Oye.getComponentMethod(\"errorbars\",\"style\")(t)}function Bye(e,t,r){M4.pointStyle(e.selectAll(\"path\"),t,r),Nye(e,t,r)}function Nye(e,t,r){e.selectAll(\"text\").each(function(n){var i=S4.select(this),a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));M4.font(i,a)})}function j1t(e,t,r){var n=t[0].trace;n.selectedpoints?W1t(r,n,e):(Bye(r,n,e),Oye.getComponentMethod(\"errorbars\",\"style\")(r))}function W1t(e,t,r){M4.selectedPointStyle(e.selectAll(\"path\"),t),X1t(e.selectAll(\"text\"),t,r)}function X1t(e,t,r){e.each(function(n){var i=S4.select(this),a;if(n.selected){a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),M4.font(i,a)}else M4.selectedTextStyle(i,t)})}function Uye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed(\"bartext-inside\")){var o=jye(t,r);a=Gye(r,t.i,i,o)}else e.classed(\"bartext-outside\")&&(a=Hye(r,t.i,i));return a}function Vye(e,t,r){return DV(U1t,e.textfont,t,r)}function Gye(e,t,r,n){var i=Vye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:N1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),DV(V1t,e.insidetextfont,t,i)}function Hye(e,t,r){var n=Vye(e,t,r);return DV(G1t,e.outsidetextfont,t,n)}function DV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function jye(e,t){return t.type===\"waterfall\"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Wye.exports={style:H1t,styleTextPoints:Nye,styleOnSelect:j1t,getInsideTextFont:Gye,getOutsideTextFont:Hye,getBarColor:jye,resizeText:qye}});var d2=ye((cur,e1e)=>{\"use strict\";var YI=Oa(),KI=Eo(),Dd=Dr(),Z1t=Zl(),Y1t=ka(),I_=So(),K1t=qa(),JI=ho().tickText,Xye=bv(),J1t=Xye.recordMinTextSize,$1t=Xye.clearMinTextSize,FV=V0(),LT=ZI(),Q1t=A_(),Zye=zm(),e_t=Zye.text,t_t=Zye.textposition,r_t=ip().appendArrayPointValue,Gv=Q1t.TEXTPAD;function i_t(e){return e.id}function n_t(e){if(e.ids)return i_t}function zV(e){return(e>0)-(e<0)}function Om(e,t){return e<t?1:-1}function a_t(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}function Yye(e,t,r,n){if(!t.uniformtext.mode&&Kye(r)){var i;return n&&(i=n()),e.transition().duration(r.duration).ease(r.easing).each(\"end\",function(){i&&i()}).each(\"interrupt\",function(){i&&i()})}else return e}function Kye(e){return e&&e.duration>0}function o_t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},$1t(\"bar\",l));var c=Dd.makeTraceGroups(n,r,\"trace bars\").each(function(f){var h=YI.select(this),d=f[0].trace,v=f[0].t,_=d.type===\"waterfall\",b=d.type===\"funnel\",p=d.type===\"histogram\",k=d.type===\"bar\",E=k||b,T=0;_&&d.connector.visible&&d.connector.mode===\"between\"&&(T=d.connector.line.width/2);var L=d.orientation===\"h\",x=Kye(i),C=Dd.ensureSingle(h,\"g\",\"points\"),M=n_t(d),g=C.selectAll(\"g.point\").data(Dd.identity,M);g.enter().append(\"g\").classed(\"point\",!0),g.exit().remove(),g.each(function(A,z){var O=YI.select(this),U=a_t(A,o,s,L),G=U[0][0],Z=U[0][1],j=U[1][0],N=U[1][1],H=(L?Z-G:N-j)===0;H&&E&&LT.getLineWidth(d,A)&&(H=!1),H||(H=!KI(G)||!KI(Z)||!KI(j)||!KI(N)),A.isBlank=H,H&&(L?Z=G:N=j),T&&!H&&(L?(G-=Om(G,Z)*T,Z+=Om(G,Z)*T):(j-=Om(j,N)*T,N+=Om(j,N)*T));var re,oe;if(d.type===\"waterfall\"){if(!H){var _e=d[A.dir].marker;re=_e.line.width,oe=_e.color}}else re=LT.getLineWidth(d,A),oe=A.mc||d.marker.color;function Ce($e){var St=YI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?YI.round(Math.round($e)-St,2):$e}function Le($e,St,Qt){return Qt&&$e===St?$e:Math.abs($e-St)>=2?Ce($e):$e>St?Math.ceil($e):Math.floor($e)}var ge=Y1t.opacity(oe),ie=ge<1||re>.01?Ce:Le;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),j=ie(j,N,!L),N=ie(N,j,!L));var Se=L?o.c2p:s.c2p,Ee;A.s0>0?Ee=A._sMax:A.s0<0?Ee=A._sMin:Ee=A.s1>0?A._sMax:A._sMin;function Ae($e,St){if(!$e)return 0;var Qt=Math.abs(L?N-j:Z-G),Gt=Math.abs(L?Z-G:N-j),_t=ie(Math.abs(Se(Ee,!0)-Se(0,!0))),It=A.hasB?Math.min(Qt/2,Gt/2):Math.min(Qt/2,_t),mt;if(St===\"%\"){var er=Math.min(50,$e);mt=Qt*(er/100)}else mt=$e;return ie(Math.max(Math.min(mt,It),0))}var Be=k||p?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Pe,me,De=\"M\"+G+\",\"+j+\"V\"+N+\"H\"+Z+\"V\"+j+\"Z\",ce=0;if(Be&&A.s){var je=zV(A.s0)===0||zV(A.s)===zV(A.s0)?A.s1:A.s0;if(ce=ie(A.hasB?0:Math.abs(Se(Ee,!0)-Se(je,!0))),ce<Be){var lt=Om(G,Z),pt=Om(j,N),Vt=lt===-pt?1:0;if(L)if(A.hasB)Pe=\"M\"+(G+Be*lt)+\",\"+j+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+G+\",\"+(j+Be*pt)+\"V\"+(N-Be*pt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(G+Be*lt)+\",\"+N+\"H\"+(Z-Be*lt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+Z+\",\"+(N-Be*pt)+\"V\"+(j+Be*pt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(Z-Be*lt)+\",\"+j+\"Z\";else{me=Math.abs(Z-G)+ce;var ot=me<Be?Be-Math.sqrt(me*(2*Be-me)):0,ut=ce>0?Math.sqrt(ce*(2*Be-ce)):0,Wt=lt>0?Math.max:Math.min;Pe=\"M\"+G+\",\"+j+\"V\"+(N-ot*pt)+\"H\"+Wt(Z-(Be-ce)*lt,G)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+Z+\",\"+(N-Be*pt-ut)+\"V\"+(j+Be*pt+ut)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+Wt(Z-(Be-ce)*lt,G)+\",\"+(j+ot*pt)+\"Z\"}else if(A.hasB)Pe=\"M\"+(G+Be*lt)+\",\"+j+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+G+\",\"+(j+Be*pt)+\"V\"+(N-Be*pt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(G+Be*lt)+\",\"+N+\"H\"+(Z-Be*lt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+Z+\",\"+(N-Be*pt)+\"V\"+(j+Be*pt)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(Z-Be*lt)+\",\"+j+\"Z\";else{me=Math.abs(N-j)+ce;var Nt=me<Be?Be-Math.sqrt(me*(2*Be-me)):0,$t=ce>0?Math.sqrt(ce*(2*Be-ce)):0,sr=pt>0?Math.max:Math.min;Pe=\"M\"+(G+Nt*lt)+\",\"+j+\"V\"+sr(N-(Be-ce)*pt,j)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(G+Be*lt-$t)+\",\"+N+\"H\"+(Z-Be*lt+$t)+\"A \"+Be+\",\"+Be+\" 0 0 \"+Vt+\" \"+(Z-Nt*lt)+\",\"+sr(N-(Be-ce)*pt,j)+\"V\"+j+\"Z\"}}else Pe=De}else Pe=De;var Tr=Yye(Dd.ensureSingle(O,\"path\"),l,i,a);if(Tr.style(\"vector-effect\",u?\"none\":\"non-scaling-stroke\").attr(\"d\",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?\"M0,0Z\":Pe).call(I_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var fr=I_.makePointStyleFns(d);I_.singlePointStyle(A,Tr,d,fr,e)}s_t(e,t,O,f,z,G,Z,j,N,Be,ce,i,a),t.layerClipId&&I_.hideOutsideRangePoint(A,O.select(\"text\"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;I_.setClipUrl(h,P?null:t.layerClipId,e)});K1t.getComponentMethod(\"errorbars\",\"plot\")(e,c,t,i)}function s_t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,_=e._fullLayout,b;function p(me,De,ce){var je=Dd.ensureSingle(me,\"text\").text(De).attr({class:\"bartext bartext-\"+b,\"text-anchor\":\"middle\",\"data-notex\":1}).call(I_.font,ce).call(Z1t.convertToTspans,e);return je}var k=n[0].trace,E=k.orientation===\"h\",T=c_t(_,n,i,d,v);b=f_t(k,i);var L=f.mode===\"stack\"||f.mode===\"relative\",x=n[i],C=!L||x._outmost,M=x.hasB,g=u&&u-c>Gv;if(!T||b===\"none\"||(x.isBlank||a===o||s===l)&&(b===\"auto\"||b===\"inside\")){r.select(\"text\").remove();return}var P=_.font,A=FV.getBarColor(n[i],k),z=FV.getInsideTextFont(k,i,P,A),O=FV.getOutsideTextFont(k,i,P),U=k.insidetextanchor||\"end\",G=r.datum();E?d.type===\"log\"&&G.s0<=0&&(d.range[0]<d.range[1]?a=0:a=d._length):v.type===\"log\"&&G.s0<=0&&(v.range[0]<v.range[1]?s=v._length:s=0);var Z=Math.abs(o-a),j=Math.abs(l-s),N=Z-2*Gv,H=j-2*Gv,re,oe,_e,Ce,Le;if(b===\"outside\"&&!C&&!x.hasB&&(b=\"inside\"),b===\"auto\")if(C){b=\"inside\",Le=Dd.ensureUniformFontSize(e,z),re=p(r,T,Le),oe=I_.bBox(re.node()),_e=oe.width,Ce=oe.height;var ge=_e>0&&Ce>0,ie;g?M?ie=h2(N-2*u,H,_e,Ce,E)||h2(N,H-2*u,_e,Ce,E):E?ie=h2(N-(u-c),H,_e,Ce,E)||h2(N,H-2*(u-c),_e,Ce,E):ie=h2(N,H-(u-c),_e,Ce,E)||h2(N-2*(u-c),H,_e,Ce,E):ie=h2(N,H,_e,Ce,E),ge&&ie?b=\"inside\":(b=\"outside\",re.remove(),re=null)}else b=\"inside\";if(!re){Le=Dd.ensureUniformFontSize(e,b===\"outside\"?O:z),re=p(r,T,Le);var Se=re.attr(\"transform\");if(re.attr(\"transform\",\"\"),oe=I_.bBox(re.node()),_e=oe.width,Ce=oe.height,re.attr(\"transform\",Se),_e<=0||Ce<=0){re.remove();return}}var Ee=k.textangle,Ae,Be;b===\"outside\"?(Be=k.constraintext===\"both\"||k.constraintext===\"outside\",Ae=u_t(a,o,s,l,oe,{isHorizontal:E,constrained:Be,angle:Ee})):(Be=k.constraintext===\"both\"||k.constraintext===\"inside\",Ae=Qye(a,o,s,l,oe,{isHorizontal:E,constrained:Be,angle:Ee,anchor:U,hasB:M,r:u,overhead:c})),Ae.fontSize=Le.size,J1t(k.type===\"histogram\"?\"bar\":k.type,Ae,_),x.transform=Ae;var Pe=Yye(re,_,f,h);Dd.setTransormAndDisplay(Pe,Ae)}function h2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Jye(e){return e===\"auto\"?0:e}function $ye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function Qye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u===\"end\",f=u===\"start\",h=a.leftToRight||0,d=(h+1)/2,v=1-d,_=a.hasB,b=a.r,p=a.overhead,k=i.width,E=i.height,T=Math.abs(t-e),L=Math.abs(n-r),x=T>2*Gv&&L>2*Gv?Gv:0;T-=2*x,L-=2*x;var C=Jye(l);l===\"auto\"&&!(k<=T&&E<=L)&&(k>T||E>L)&&(!(k>L||E>T)||k<E!=T<L)&&(C+=90);var M=$ye(i,C),g,P;if(b&&b-p>Gv){var A=l_t(e,t,r,n,M,b,p,o,_);g=A.scale,P=A.pad}else g=1,s&&(g=Math.min(1,T/M.x,L/M.y)),P=0;var z=i.left*v+i.right*d,O=(i.top+i.bottom)/2,U=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||_)&&(x+=P);var H=o?Om(e,t):Om(r,n);o?f?(U=e+H*x,Z=-H*N):(U=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:O,targetX:U,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function l_t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,_,b,p,k,E;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(_=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):l?(_=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):(_=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)),k=Math.min(1,k),s?E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:E}}function u_t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var _=Jye(l),b=$ye(i,_),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,E=(i.top+i.bottom)/2,T=(e+t)/2,L=(r+n)/2,x=0,C=0,M=o?Om(t,e):Om(r,n);return o?(T=t-M*d,x=M*p):(L=n+M*d,C=-M*p),{textX:k,textY:E,targetX:T,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:_}}function c_t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=h_t(e,t,r,n,i):a.textinfo?s=d_t(t,r,n,i):s=LT.getValue(a.text,r),LT.coerceString(e_t,s)}function f_t(e,t){var r=LT.getValue(e.textposition,t);return LT.coerceEnumerated(t_t,r)}function h_t(e,t,r,n,i){var a=t[0].trace,o=Dd.castOption(a,r,\"texttemplate\");if(!o)return\"\";var s=a.type===\"histogram\",l=a.type===\"waterfall\",u=a.type===\"funnel\",c=a.orientation===\"h\",f,h,d,v;c?(f=\"y\",h=i,d=\"x\",v=n):(f=\"x\",h=n,d=\"y\",v=i);function _(x){return JI(h,h.c2l(x),!0).text}function b(x){return JI(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+\"Label\"]=_(p.p);var E=Dd.castOption(a,p.i,\"text\");(E===0||E)&&(k.text=E),k.value=p.s,k.valueLabel=k[d+\"Label\"]=b(p.s);var T={};r_t(T,a,p.i),(s||T.x===void 0)&&(T.x=c?k.value:k.label),(s||T.y===void 0)&&(T.y=c?k.label:k.value),(s||T.xLabel===void 0)&&(T.xLabel=c?k.valueLabel:k.labelLabel),(s||T.yLabel===void 0)&&(T.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Dd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Dd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Dd.formatPercent(p.sumR));var L=Dd.castOption(a,p.i,\"customdata\");return L&&(k.customdata=L),Dd.texttemplateString({data:[T,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function d_t(e,t,r,n){var i=e[0].trace,a=i.orientation===\"h\",o=i.type===\"waterfall\",s=i.type===\"funnel\";function l(L){var x=a?n:r;return JI(x,L,!0).text}function u(L){var x=a?r:n;return JI(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split(\"+\"),d=[],v,_=function(L){return h.indexOf(L)!==-1};if(_(\"label\")&&d.push(l(e[t].p)),_(\"text\")&&(v=Dd.castOption(i,f.i,\"text\"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;_(\"initial\")&&d.push(u(k)),_(\"delta\")&&d.push(u(b)),_(\"final\")&&d.push(u(p))}if(s){_(\"value\")&&d.push(u(f.s));var E=0;_(\"percent initial\")&&E++,_(\"percent previous\")&&E++,_(\"percent total\")&&E++;var T=E>1;_(\"percent initial\")&&(v=Dd.formatPercent(f.begR),T&&(v+=\" of initial\"),d.push(v)),_(\"percent previous\")&&(v=Dd.formatPercent(f.difR),T&&(v+=\" of previous\"),d.push(v)),_(\"percent total\")&&(v=Dd.formatPercent(f.sumR),T&&(v+=\" of total\"),d.push(v))}return d.join(\"<br>\")}e1e.exports={plot:o_t,toMoveInsideBar:Qye}});var PT=ye((fur,n1e)=>{\"use strict\";var E4=vf(),v_t=qa(),t1e=ka(),p_t=Dr().fillText,g_t=ZI().getLineWidth,OV=ho().hoverLabelText,m_t=fs().BADNUM;function y_t(e,t,r,n,i){var a=r1e(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=i1e(s,l),v_t.getComponentMethod(\"errorbars\",\"hoverInfo\")(l,s,a),[a]}}function r1e(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n===\"closest\",u=o.type===\"waterfall\",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,_,b,p,k;o.orientation===\"h\"?(h=r,d=t,v=\"y\",_=\"x\",b=G,p=z):(h=t,d=r,v=\"x\",_=\"y\",p=G,b=z);var E=o[v+\"period\"],T=l||E;function L(ie){return C(ie,-1)}function x(ie){return C(ie,1)}function C(ie,Se){var Ee=ie.w;return ie[v]+Se*Ee/2}function M(ie){return ie[v+\"End\"]-ie[v+\"Start\"]}var g=l?L:E?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?x:E?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(x(ie),ie.p+s.bardelta/2)};function A(ie,Se,Ee){return i.finiteRange&&(Ee=0),E4.inbox(ie-h,Se-h,Ee+Math.min(1,Math.abs(Se-ie)/k)-1)}function z(ie){return A(g(ie),P(ie),c)}function O(ie){return A(L(ie),x(ie),f)}function U(ie){var Se=ie[_];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Se+=Ee:d<0&&(Se-=Ee)}return Se}function G(ie){var Se=d,Ee=ie.b,Ae=U(ie);return E4.inbox(Ee-Se,Ae-Se,c+(Ae-Se)/(Ae-Ee)-1)}function Z(ie){var Se=d,Ee=ie.b,Ae=U(ie);return E4.inbox(Ee-Se,Ae-Se,f+(Ae-Se)/(Ae-Ee)-1)}var j=e[v+\"a\"],N=e[_+\"a\"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(ie){return(b(ie)+p(ie))/2}var re=E4.getDistanceFunction(n,b,p,H);if(E4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==m_t){T||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(x(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],Ce=o.base?_e.b+_e.s:_e.s;e[_+\"0\"]=e[_+\"1\"]=N.c2p(_e[_],!0),e[_+\"LabelVal\"]=Ce;var Le=s.extents[s.extents.round(_e.p)];e[v+\"0\"]=j.c2p(l?g(_e):Le[0],!0),e[v+\"1\"]=j.c2p(l?P(_e):Le[1],!0);var ge=_e.orig_p!==void 0;return e[v+\"LabelVal\"]=ge?_e.orig_p:_e.p,e.labelLabel=OV(j,e[v+\"LabelVal\"],o[v+\"hoverformat\"]),e.valueLabel=OV(N,e[_+\"LabelVal\"],o[_+\"hoverformat\"]),e.baseLabel=OV(N,_e.b,o[_+\"hoverformat\"]),e.spikeDistance=(Z(_e)+O(_e))/2,e[v+\"Spike\"]=j.c2p(_e.p,!0),p_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function i1e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=g_t(e,t);if(t1e.opacity(r))return r;if(t1e.opacity(n)&&i)return n}n1e.exports={hoverPoints:y_t,hoverOnBars:r1e,getTraceColor:i1e}});var o1e=ye((hur,a1e)=>{\"use strict\";a1e.exports=function(t,r,n){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation===\"h\"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var IT=ye((dur,s1e)=>{\"use strict\";s1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type===\"funnel\",l=o.orientation===\"h\",u=[],c;if(r===!1)for(c=0;c<n.length;c++)n[c].selected=0;else for(c=0;c<n.length;c++){var f=n[c],h=\"ct\"in f?f.ct:__t(f,i,a,l,s);r.contains(h,!1,c,t)?(u.push({pointNumber:c,x:i.c2d(f.x),y:a.c2d(f.y)}),f.selected=1):f.selected=0}return u};function __t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}});var u1e=ye((vur,l1e)=>{\"use strict\";l1e.exports={attributes:zm(),layoutAttributes:jI(),supplyDefaults:i0().supplyDefaults,crossTraceDefaults:i0().crossTraceDefaults,supplyLayoutDefaults:IV(),calc:Iye(),crossTraceCalc:t2().crossTraceCalc,colorbar:$d(),arraysToCalcdata:A4(),plot:d2().plot,style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:PT().hoverPoints,eventData:o1e(),selectPoints:IT(),moduleType:\"trace\",name:\"bar\",basePlotModule:mh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"oriented\",\"errorBarsOK\",\"showLegend\",\"zoomScale\"],animatable:!0,meta:{}}});var f1e=ye((pur,c1e)=>{\"use strict\";c1e.exports=u1e()});var k4=ye((gur,p1e)=>{\"use strict\";var x_t=Pg(),G0=pf(),h1e=zm(),b_t=Ih(),d1e=df().axisHoverFormat,{hovertemplateAttrs:w_t,templatefallbackAttrs:T_t}=Ll(),Gy=Ao().extendFlat,RT=G0.marker,v1e=RT.line;p1e.exports={y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",editType:\"calc\"},dy:{valType:\"number\",editType:\"calc\"},xperiod:G0.xperiod,yperiod:G0.yperiod,xperiod0:G0.xperiod0,yperiod0:G0.yperiod0,xperiodalignment:G0.xperiodalignment,yperiodalignment:G0.yperiodalignment,xhoverformat:d1e(\"x\"),yhoverformat:d1e(\"y\"),name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},q1:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},median:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},q3:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},lowerfence:{valType:\"data_array\",editType:\"calc\"},upperfence:{valType:\"data_array\",editType:\"calc\"},notched:{valType:\"boolean\",editType:\"calc\"},notchwidth:{valType:\"number\",min:0,max:.5,dflt:.25,editType:\"calc\"},notchspan:{valType:\"data_array\",editType:\"calc\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],editType:\"calc\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calc\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calc\"},sdmultiple:{valType:\"number\",min:0,editType:\"calc\",dflt:1},sizemode:{valType:\"enumerated\",values:[\"quartiles\",\"sd\"],editType:\"calc\",dflt:\"quartiles\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],editType:\"calc\"},mean:{valType:\"data_array\",editType:\"calc\"},sd:{valType:\"data_array\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},quartilemethod:{valType:\"enumerated\",values:[\"linear\",\"exclusive\",\"inclusive\"],dflt:\"linear\",editType:\"calc\"},width:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:Gy({},RT.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:Gy({},RT.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),angle:Gy({},RT.angle,{arrayOk:!1,editType:\"calc\"}),size:Gy({},RT.size,{arrayOk:!1,editType:\"calc\"}),color:Gy({},RT.color,{arrayOk:!1,editType:\"style\"}),line:{color:Gy({},v1e.color,{arrayOk:!1,dflt:b_t.defaultLine,editType:\"style\"}),width:Gy({},v1e.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:x_t(),whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calc\"},showwhiskers:{valType:\"boolean\",editType:\"calc\"},offsetgroup:h1e.offsetgroup,alignmentgroup:h1e.alignmentgroup,selected:{marker:G0.selected.marker,editType:\"style\"},unselected:{marker:G0.unselected.marker,editType:\"style\"},text:Gy({},G0.text,{}),hovertext:Gy({},G0.hovertext,{}),hovertemplate:w_t({}),hovertemplatefallback:T_t(),hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"},zorder:G0.zorder}});var C4=ye((mur,g1e)=>{\"use strict\";g1e.exports={boxmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},boxgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"},boxgroupgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"}}});var P4=ye((yur,x1e)=>{\"use strict\";var H0=Dr(),A_t=qa(),S_t=ka(),M_t=Dg(),E_t=e2(),m1e=V3(),L4=k4();function k_t(e,t,r,n){function i(v,_){return H0.coerce(e,t,L4,v,_)}if(y1e(e,t,i,n),t.visible!==!1){M_t(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\");var a=t._hasPreCompStats;a&&(i(\"lowerfence\"),i(\"upperfence\")),i(\"line.color\",(e.marker||{}).color||r),i(\"line.width\"),i(\"fillcolor\",S_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i(\"mean\"),l=i(\"sd\");s&&s.length&&(o=!0,l&&l.length&&(o=\"sd\"))}i(\"whiskerwidth\");var u=i(\"sizemode\"),c;u===\"quartiles\"&&(c=i(\"boxmean\",o)),i(\"showwhiskers\",u===\"quartiles\"),(u===\"sd\"||c===\"sd\")&&i(\"sdmultiple\"),i(\"width\"),i(\"quartilemethod\");var f=!1;if(a){var h=i(\"notchspan\");h&&h.length&&(f=!0)}else H0.validate(e.notchwidth,L4.notchwidth)&&(f=!0);var d=i(\"notched\",f);d&&i(\"notchwidth\"),_1e(e,t,i,{prefix:\"box\"}),i(\"zorder\")}}function y1e(e,t,r,n){function i(P){var A=0;return P&&P.length&&(A+=1,H0.isArrayOrTypedArray(P[0])&&P[0].length&&(A+=1)),A}function a(P){return H0.validate(e[P],L4[P])}var o=r(\"y\"),s=r(\"x\"),l;if(t.type===\"box\"){var u=r(\"q1\"),c=r(\"median\"),f=r(\"q3\");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(H0.minRowLength(u),H0.minRowLength(c),H0.minRowLength(f))}var h=i(o),d=i(s),v=h&&H0.minRowLength(o),_=d&&H0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case\"00\":var T=a(\"x0\")||a(\"dx\"),L=a(\"y0\")||a(\"dy\");L&&!T?k=\"h\":k=\"v\",E=l;break;case\"10\":k=\"v\",E=Math.min(l,_);break;case\"20\":k=\"h\",E=Math.min(l,s.length);break;case\"01\":k=\"h\",E=Math.min(l,v);break;case\"02\":k=\"v\",E=Math.min(l,o.length);break;case\"12\":k=\"v\",E=Math.min(l,_,o.length);break;case\"21\":k=\"h\",E=Math.min(l,s.length,v);break;case\"11\":E=0;break;case\"22\":var x=!1,C;for(C=0;C<s.length;C++)if(m1e(s[C],b,p)===\"category\"){x=!0;break}if(x)k=\"v\",E=Math.min(l,_,o.length);else{for(C=0;C<o.length;C++)if(m1e(o[C],b,p)===\"category\"){x=!0;break}x?(k=\"h\",E=Math.min(l,s.length,v)):(k=\"v\",E=Math.min(l,_,o.length))}break}else h>0?(k=\"v\",d>0?E=Math.min(_,v):E=Math.min(v)):d>0?(k=\"h\",E=Math.min(_)):E=0;if(!E){t.visible=!1;return}t._length=E;var M=r(\"orientation\",k);t._hasPreCompStats?M===\"v\"&&d===0?(r(\"x0\",0),r(\"dx\",1)):M===\"h\"&&h===0&&(r(\"y0\",0),r(\"dy\",1)):M===\"v\"&&d===0?r(\"x0\"):M===\"h\"&&h===0&&r(\"y0\");var g=A_t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");g(e,t,[\"x\",\"y\"],n)}function _1e(e,t,r,n){var i=n.prefix,a=H0.coerce2(e,t,L4,\"marker.outliercolor\"),o=r(\"marker.line.outliercolor\"),s=\"outliers\";t._hasPreCompStats?s=\"all\":(a||o)&&(s=\"suspectedoutliers\");var l=r(i+\"points\",s);l?(r(\"jitter\",l===\"all\"?.3:0),r(\"pointpos\",l===\"all\"?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.angle\"),r(\"marker.color\",t.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),l===\"suspectedoutliers\"&&(r(\"marker.line.outliercolor\",t.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\"),r(\"hovertext\")):delete t.marker;var u=r(\"hoveron\");(u===\"all\"||u.indexOf(\"points\")!==-1)&&(r(\"hovertemplate\"),r(\"hovertemplatefallback\")),H0.coerceSelectionMarkerOpacity(t,r)}function C_t(e,t){var r,n;function i(l){return H0.coerce(n._input,n,L4,l)}for(var a=0;a<e.length;a++){n=e[a];var o=n.type;if(o===\"box\"||o===\"violin\"){r=n._input;var s=t[o+\"mode\"];s===\"group\"&&E_t(r,n,t,i,s)}}}x1e.exports={supplyDefaults:k_t,crossTraceDefaults:C_t,handleSampleDefaults:y1e,handlePointsDefaults:_1e}});var $I=ye((_ur,w1e)=>{\"use strict\";var L_t=qa(),P_t=Dr(),I_t=C4();function b1e(e,t,r,n,i){for(var a=i+\"Layout\",o=!1,s=0;s<r.length;s++){var l=r[s];if(L_t.traceIs(l,a)){o=!0;break}}o&&(n(i+\"mode\"),n(i+\"gap\"),n(i+\"groupgap\"))}function R_t(e,t,r){function n(i,a){return P_t.coerce(e,t,I_t,i,a)}b1e(e,t,r,n,\"box\")}w1e.exports={supplyLayoutDefaults:R_t,_supply:b1e}});var NV=ye((xur,P1e)=>{\"use strict\";var BV=Eo(),QI=ho(),D_t=zg(),yh=Dr(),n0=fs().BADNUM,Hy=yh._;P1e.exports=function(t,r){var n=t._fullLayout,i=QI.getFromId(t,r.xaxis||\"x\"),a=QI.getFromId(t,r.yaxis||\"y\"),o=[],s=r.type===\"violin\"?\"_numViolins\":\"_numBoxes\",l,u,c,f,h,d,v;r.orientation===\"h\"?(c=i,f=\"x\",h=a,d=\"y\",v=!!r.yperiodalignment):(c=a,f=\"y\",h=i,d=\"x\",v=!!r.xperiodalignment);var _=F_t(r,d,h,n[s]),b=_[0],p=_[1],k=yh.distinctVals(b,h),E=k.vals,T=k.minDiff/2,L,x,C,M,g,P,A=(r.boxpoints||r.points)===\"all\"?yh.identity:function(Vt){return Vt.v<L.lf||Vt.v>L.uf};if(r._hasPreCompStats){var z=r[f],O=function(Vt){return c.d2c((r[Vt]||[])[l])},U=1/0,G=-1/0;for(l=0;l<r._length;l++){var Z=b[l];if(BV(Z)){if(L={},L.pos=L[d]=Z,v&&p&&(L.orig_p=p[l]),L.q1=O(\"q1\"),L.med=O(\"median\"),L.q3=O(\"q3\"),x=[],z&&yh.isArrayOrTypedArray(z[l]))for(u=0;u<z[l].length;u++)P=c.d2c(z[l][u]),P!==n0&&(g={v:P,i:[l,u]},T1e(g,r,[l,u]),x.push(g));if(L.pts=x.sort(A1e),C=L[f]=x.map(S1e),M=C.length,L.med!==n0&&L.q1!==n0&&L.q3!==n0&&L.med>=L.q1&&L.q3>=L.med){var j=O(\"lowerfence\");L.lf=j!==n0&&j<=L.q1?j:M1e(L,C,M);var N=O(\"upperfence\");L.uf=N!==n0&&N>=L.q3?N:E1e(L,C,M);var H=O(\"mean\");L.mean=H!==n0?H:M?yh.mean(C,M):(L.q1+L.q3)/2;var re=O(\"sd\");L.sd=H!==n0&&re>=0?re:M?yh.stdev(C,M,L.mean):L.q3-L.q1,L.lo=k1e(L),L.uo=C1e(L);var oe=O(\"notchspan\");oe=oe!==n0&&oe>0?oe:L1e(L,M),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,Ce=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Ce=Math.max(Ce,C[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Ce=Math.max(Ce,L.un)),L.min=_e,L.max=Ce}else{yh.warn([\"Invalid input - make sure that q1 <= median <= q3\",\"q1 = \"+L.q1,\"median = \"+L.med,\"q3 = \"+L.q3].join(`\n",
       "`));var Le;L.med!==n0?Le=L.med:L.q1!==n0?L.q3!==n0?Le=(L.q1+L.q3)/2:Le=L.q1:L.q3!==n0?Le=L.q3:Le=0,L.med=Le,L.q1=L.q3=Le,L.lf=L.uf=Le,L.mean=L.sd=Le,L.ln=L.un=Le,L.min=L.max=Le}U=Math.min(U,L.min),G=Math.max(G,L.max),L.pts2=x.filter(A),o.push(L)}}r._extremes[c._id]=QI.findExtremes(c,[U,G],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=z_t(E,T),Se=E.length,Ee=O_t(Se);for(l=0;l<r._length;l++)if(P=ge[l],!!BV(P)){var Ae=yh.findBin(b[l],ie);Ae>=0&&Ae<Se&&(g={v:P,i:l},T1e(g,r,l),Ee[Ae].push(g))}var Be=1/0,Pe=-1/0,me=r.quartilemethod,De=me===\"exclusive\",ce=me===\"inclusive\";for(l=0;l<Se;l++)if(Ee[l].length>0){if(L={},L.pos=L[d]=E[l],x=L.pts=Ee[l].sort(A1e),C=L[f]=x.map(S1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=yh.mean(C,M),L.sd=yh.stdev(C,M,L.mean)*r.sdmultiple,L.med=yh.interp(C,.5),M%2&&(De||ce)){var je,lt;De?(je=C.slice(0,M/2),lt=C.slice(M/2+1)):ce&&(je=C.slice(0,M/2+1),lt=C.slice(M/2)),L.q1=yh.interp(je,.5),L.q3=yh.interp(lt,.5)}else L.q1=yh.interp(C,.25),L.q3=yh.interp(C,.75);L.lf=M1e(L,C,M),L.uf=E1e(L,C,M),L.lo=k1e(L),L.uo=C1e(L);var pt=L1e(L,M);L.ln=L.med-pt,L.un=L.med+pt,Be=Math.min(Be,L.ln),Pe=Math.max(Pe,L.un),L.pts2=x.filter(A),o.push(L)}r.notched&&yh.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=QI.findExtremes(c,r.notched?ge.concat([Be,Pe]):ge,{padded:!0})}return q_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:T,posLetter:d,valLetter:f,labels:{med:Hy(t,\"median:\"),min:Hy(t,\"min:\"),q1:Hy(t,\"q1:\"),q3:Hy(t,\"q3:\"),max:Hy(t,\"max:\"),mean:r.boxmean===\"sd\"||r.sizemode===\"sd\"?Hy(t,\"mean \\xB1 \\u03C3:\").replace(\"\\u03C3\",r.sdmultiple===1?\"\\u03C3\":r.sdmultiple+\"\\u03C3\"):Hy(t,\"mean:\"),lf:Hy(t,\"lower fence:\"),uf:Hy(t,\"upper fence:\")}},n[s]++,o):[{t:{empty:!0}}]};function F_t(e,t,r,n){var i=t in e,a=t+\"0\"in e,o=\"d\"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=D_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+\"0\"]:\"name\"in e&&(r.type===\"category\"||BV(e.name)&&[\"linear\",\"log\"].indexOf(r.type)!==-1||yh.isDateTime(e.name)&&r.type===\"date\")?u=e.name:u=n;for(var c=r.type===\"multicategory\"?r.r2c_just_indices(u):r.d2c(u,0,e[t+\"calendar\"]),f=e._length,h=new Array(f),d=0;d<f;d++)h[d]=c;return[h]}function z_t(e,t){for(var r=e.length,n=new Array(r+1),i=0;i<r;i++)n[i]=e[i]-t;return n[r]=e[r-1]+t,n}function O_t(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}var qV={text:\"tx\",hovertext:\"htx\"};function T1e(e,t,r){for(var n in qV)yh.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?yh.isArrayOrTypedArray(t[n][r[0]])&&(e[qV[n]]=t[n][r[0]][r[1]]):e[qV[n]]=t[n][r])}function q_t(e,t){if(yh.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var n=e[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;yh.tagSelected(n,t,i)}}function A1e(e,t){return e.v-t.v}function S1e(e){return e.v}function M1e(e,t,r){return r===0?e.q1:Math.min(e.q1,t[Math.min(yh.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function E1e(e,t,r){return r===0?e.q3:Math.max(e.q3,t[Math.max(yh.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function k1e(e){return 4*e.q1-3*e.q3}function C1e(e){return 4*e.q3-3*e.q1}function L1e(e,t){return t===0?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}});var e8=ye((bur,F1e)=>{\"use strict\";var I1e=ho(),B_t=Dr(),N_t=Kb().getAxisGroup,R1e=[\"v\",\"h\"];function U_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a<R1e.length;a++){for(var o=R1e[a],s=o===\"h\"?i:n,l=[],u=0;u<r.length;u++){var c=r[u],f=c[0].t,h=c[0].trace;h.visible===!0&&(h.type===\"box\"||h.type===\"candlestick\")&&!f.empty&&(h.orientation||\"v\")===o&&h.xaxis===n._id&&h.yaxis===i._id&&l.push(u)}D1e(\"box\",e,l,s)}}function D1e(e,t,r,n){var i=t.calcdata,a=t._fullLayout,o=n._id,s=o.charAt(0),l,u,c,f=[],h=0;for(l=0;l<r.length;l++)for(c=i[r[l]],u=0;u<c.length;u++)f.push(n.c2l(c[u].pos,!0)),h+=(c[u].pts2||[]).length;if(f.length){var d=B_t.distinctVals(f);(n.type===\"category\"||n.type===\"multicategory\")&&(d.minDiff=1);var v=d.minDiff/2;I1e.minDtick(n,d.minDiff,d.vals[0],!0);var _=e===\"violin\"?\"_numViolins\":\"_numBoxes\",b=a[_],p=a[e+\"mode\"]===\"group\"&&b>1,k=1-a[e+\"gap\"],E=1-a[e+\"groupgap\"];for(l=0;l<r.length;l++){c=i[r[l]];var T=c[0].trace,L=c[0].t,x=T.width,C=T.side,M,g,P,A;if(x)M=g=A=x/2,P=0;else if(M=v,p){var z=N_t(a,n._id)+T.orientation,O=a._alignmentOpts[z]||{},U=O[T.alignmentgroup]||{},G=Object.keys(U.offsetGroups||{}).length,Z=G||b,j=G?T._offsetIndex:L.num;g=M*k*E/Z,P=2*M*(-.5+(j+.5)/Z)*k,A=M*k/Z}else g=M*k*E,P=0,A=M;L.dPos=M,L.bPos=P,L.bdPos=g,L.wHover=A;var N,H,re=P+g,oe,_e,Ce,Le,ge,ie,Se=!!x,Ee=(T.boxpoints||T.points)&&h>0;if(C===\"positive\"?(N=M*(x?1:.5),oe=re,H=oe=P):C===\"negative\"?(N=oe=P,H=M*(x?1:.5),_e=re):(N=H=M,oe=_e=re),Ee){var Ae=T.pointpos,Be=T.jitter,Pe=T.marker.size/2,me=0;Ae+Be>=0&&(me=re*(Ae+Be),me>N?(Se=!0,ge=Pe,Ce=me):me>oe&&(ge=Pe,Ce=N)),me<=N&&(Ce=N);var De=0;Ae-Be<=0&&(De=-re*(Ae-Be),De>H?(Se=!0,ie=Pe,Le=De):De>_e&&(ie=Pe,Le=H)),De<=H&&(Le=H)}else Ce=N,Le=H;var ce=new Array(c.length);for(u=0;u<c.length;u++)ce[u]=c[u].pos;T._extremes[o]=I1e.findExtremes(n,ce,{padded:Se,vpadminus:Le,vpadplus:Ce,vpadLinearized:!0,ppadminus:{x:ie,y:ge}[s],ppadplus:{x:ge,y:ie}[s]})}}}F1e.exports={crossTraceCalc:U_t,setPositionOffset:D1e}});var t8=ye((wur,N1e)=>{\"use strict\";var DT=Oa(),v2=Dr(),V_t=So(),z1e=5,G_t=.01;function H_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;v2.makeTraceGroups(n,r,\"trace boxes\").each(function(s){var l=DT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation===\"h\"?(h=o,d=a):(h=a,d=o),O1e(l,{pos:h,val:d},f,c,i),q1e(l,{x:a,y:o},f,c),B1e(l,{pos:h,val:d},f,c)})}function O1e(e,t,r,n,i){var a=r.orientation===\"h\",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,_=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll(\"path.box\").data(r.type!==\"violin\"||r.box.visible?v2.identity:[]);k.enter().append(\"path\").style(\"vector-effect\",i?\"none\":\"non-scaling-stroke\").attr(\"class\",\"box\"),k.exit().remove(),k.each(function(E){if(E.empty)return DT.select(this).attr(\"d\",\"M0,0Z\");var T=s.c2l(E.pos+u,!0),L=s.l2p(T-b)+f,x=s.l2p(T+p)+f,C=l?(L+x)/2:s.l2p(T)+f,M=r.whiskerwidth,g=l?L*M+(1-M)*C:s.l2p(T-c)+f,P=l?x*M+(1-M)*C:s.l2p(T+c)+f,A=s.l2p(T-b*_)+f,z=s.l2p(T+p*_)+f,O=r.sizemode===\"sd\",U=o.c2p(O?E.mean-E.sd:E.q1,!0),G=O?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),Z=v2.constrain(O?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(U,G)+1,Math.max(U,G)-1),j=E.lf===void 0||r.boxpoints===!1||O,N=o.c2p(j?E.min:E.lf,!0),H=o.c2p(j?E.max:E.uf,!0),re=o.c2p(E.ln,!0),oe=o.c2p(E.un,!0);a?DT.select(this).attr(\"d\",\"M\"+Z+\",\"+A+\"V\"+z+\"M\"+U+\",\"+L+\"V\"+x+(v?\"H\"+re+\"L\"+Z+\",\"+z+\"L\"+oe+\",\"+x:\"\")+\"H\"+G+\"V\"+L+(v?\"H\"+oe+\"L\"+Z+\",\"+A+\"L\"+re+\",\"+L:\"\")+\"Z\"+(d?\"M\"+U+\",\"+C+\"H\"+N+\"M\"+G+\",\"+C+\"H\"+H+(h===0?\"\":\"M\"+N+\",\"+g+\"V\"+P+\"M\"+H+\",\"+g+\"V\"+P):\"\")):DT.select(this).attr(\"d\",\"M\"+A+\",\"+Z+\"H\"+z+\"M\"+L+\",\"+U+\"H\"+x+(v?\"V\"+re+\"L\"+z+\",\"+Z+\"L\"+x+\",\"+oe:\"\")+\"V\"+G+\"H\"+L+(v?\"V\"+oe+\"L\"+A+\",\"+Z+\"L\"+L+\",\"+re:\"\")+\"Z\"+(d?\"M\"+C+\",\"+U+\"V\"+N+\"M\"+C+\",\"+G+\"V\"+H+(h===0?\"\":\"M\"+g+\",\"+N+\"H\"+P+\"M\"+g+\",\"+H+\"H\"+P):\"\"))})}function q1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;v2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll(\"g.points\").data(l?u:[]);c.enter().append(\"g\").attr(\"class\",\"points\"),c.exit().remove();var f=c.selectAll(\"path\").data(function(h){var d,v=h.pts2,_=Math.max((h.max-h.min)/10,h.q3-h.q1),b=_*1e-9,p=_*G_t,k=[],E=0,T;if(r.jitter){if(_===0)for(E=1,k=new Array(v.length),d=0;d<v.length;d++)k[d]=1;else for(d=0;d<v.length;d++){var L=Math.max(0,d-z1e),x=v[L].v,C=Math.min(v.length-1,d+z1e),M=v[C].v;l!==\"all\"&&(v[d].v<h.lf?M=Math.min(M,h.lf):x=Math.max(x,h.uf));var g=Math.sqrt(p*(C-L)/(M-x+b))||0;g=v2.constrain(Math.abs(g),0,1),k.push(g),E=Math.max(g,E)}T=r.jitter*2/(E||1)}for(d=0;d<v.length;d++){var P=v[d],A=P.v,z=r.jitter?T*k[d]*(v2.pseudoRandom()-.5):0,O=h.pos+s+o*(r.pointpos+z);r.orientation===\"h\"?(P.y=O,P.x=A):(P.x=O,P.y=A),l===\"suspectedoutliers\"&&A<h.uo&&A>h.lo&&(P.so=!0)}return v});f.enter().append(\"path\").classed(\"point\",!0),f.exit().remove(),f.call(V_t.translatePoints,i,a)}function B1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll(\"path.mean\").data(r.type===\"box\"&&r.boxmean||r.type===\"violin\"&&r.box.visible&&r.meanline.visible?v2.identity:[]);h.enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),_=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(_+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),T=i.c2p(d.mean+d.sd,!0);r.orientation===\"h\"?DT.select(this).attr(\"d\",\"M\"+k+\",\"+_+\"V\"+b+(u===\"sd\"?\"m0,0L\"+E+\",\"+p+\"L\"+k+\",\"+_+\"L\"+T+\",\"+p+\"Z\":\"\")):DT.select(this).attr(\"d\",\"M\"+_+\",\"+k+\"H\"+b+(u===\"sd\"?\"m0,0L\"+p+\",\"+E+\"L\"+_+\",\"+k+\"L\"+p+\",\"+T+\"Z\":\"\"))})}N1e.exports={plot:H_t,plotBoxAndWhiskers:O1e,plotPoints:q1e,plotBoxMean:B1e}});var r8=ye((Tur,U1e)=>{\"use strict\";var UV=Oa(),VV=ka(),GV=So();function j_t(e,t,r){var n=r||UV.select(e).selectAll(\"g.trace.boxes\");n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=UV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style(\"stroke-width\",h+\"px\").call(VV.stroke,d).call(VV.fill,v)}var u=a.selectAll(\"path.box\");if(o.type===\"candlestick\")u.each(function(f){if(!f.empty){var h=UV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style(\"opacity\",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll(\"path.mean\").style({\"stroke-width\":s,\"stroke-dasharray\":2*s+\"px,\"+s+\"px\"}).call(VV.stroke,o.line.color);var c=a.selectAll(\"path.point\");GV.pointStyle(c,o,e)}})}function W_t(e,t,r){var n=t[0].trace,i=r.selectAll(\"path.point\");n.selectedpoints?GV.selectedPointStyle(i,n):GV.pointStyle(i,n,e)}U1e.exports={style:j_t,styleOnSelect:W_t}});var jV=ye((Aur,j1e)=>{\"use strict\";var X_t=ho(),HV=Dr(),R_=vf(),V1e=ka(),Z_t=HV.fillText;function Y_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf(\"boxes\")!==-1&&(s=s.concat(G1e(e,t,r,n))),o.indexOf(\"points\")!==-1&&(l=H1e(e,t,r)),n===\"closest\"?l?[l]:s:(l&&s.push(l),s)}function G1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type===\"violin\",c,f,h,d,v,_,b,p,k,E,T,L=l.bdPos,x,C,M=l.wHover,g=function(Pe){return h.c2l(Pe.pos)+l.bPos-h.c2l(_)};u&&s.side!==\"both\"?(s.side===\"positive\"&&(k=function(Pe){var me=g(Pe);return R_.inbox(me,me+M,E)},x=L,C=0),s.side===\"negative\"&&(k=function(Pe){var me=g(Pe);return R_.inbox(me-M,me,E)},x=0,C=L)):(k=function(Pe){var me=g(Pe);return R_.inbox(me-M,me+M,E)},x=C=L);var P;u?P=function(Pe){return R_.inbox(Pe.span[0]-v,Pe.span[1]-v,E)}:P=function(Pe){return R_.inbox(Pe.min-v,Pe.max-v,E)},s.orientation===\"h\"?(v=t,_=r,b=P,p=k,c=\"y\",h=o,f=\"x\",d=a):(v=r,_=t,b=k,p=P,c=\"x\",h=a,f=\"y\",d=o);var A=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));E=e.maxHoverDistance-A,T=e.maxSpikeDistance-A;function z(Pe){return(b(Pe)+p(Pe))/2}var O=R_.getDistanceFunction(n,b,p,z);if(R_.getClosest(i,O,e),e.index===!1)return[];var U=i[e.index],G=s.line.color,Z=(s.marker||{}).color;V1e.opacity(G)&&s.line.width?e.color=G:V1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+\"0\"]=h.c2p(U.pos+l.bPos-C,!0),e[c+\"1\"]=h.c2p(U.pos+l.bPos+x,!0),e[c+\"LabelVal\"]=U.orig_p!==void 0?U.orig_p:U.pos;var j=c+\"Spike\";e.spikeDistance=z(U)*T/E,e[j]=h.c2p(U.pos,!0);var N=s.boxmean||s.sizemode===\"sd\"||(s.meanline||{}).visible,H=s.boxpoints||s.points,re=H&&N?[\"max\",\"uf\",\"q3\",\"med\",\"mean\",\"q1\",\"lf\",\"min\"]:H&&!N?[\"max\",\"uf\",\"q3\",\"med\",\"q1\",\"lf\",\"min\"]:!H&&N?[\"max\",\"q3\",\"med\",\"mean\",\"q1\",\"min\"]:[\"max\",\"q3\",\"med\",\"q1\",\"min\"],oe=d.range[1]<d.range[0];s.orientation===(oe?\"v\":\"h\")&&re.reverse();for(var _e=e.spikeDistance,Ce=e[j],Le=[],ge=0;ge<re.length;ge++){var ie=re[ge];if(ie in U){var Se=U[ie],Ee=d.c2p(Se,!0),Ae=HV.extendFlat({},e);Ae.attr=ie,Ae[f+\"0\"]=Ae[f+\"1\"]=Ee,Ae[f+\"LabelVal\"]=Se,Ae[f+\"Label\"]=(l.labels?l.labels[ie]+\" \":\"\")+X_t.hoverLabelText(d,Se,s[f+\"hoverformat\"]),Ae.hoverOnBox=!0,ie===\"mean\"&&\"sd\"in U&&(s.boxmean===\"sd\"||s.sizemode===\"sd\")&&(Ae[f+\"err\"]=U.sd),Ae.hovertemplate=!1,Le.push(Ae)}}e.name=\"\",e.spikeDistance=void 0,e[j]=void 0;for(var Be=0;Be<Le.length;Be++)Le[Be].attr!==\"med\"?(Le[Be].name=\"\",Le[Be].spikeDistance=void 0,Le[Be][j]=void 0):(Le[Be].spikeDistance=_e,Le[Be][j]=Ce);return Le}function H1e(e,t,r){for(var n=e.cd,i=e.xa,a=e.ya,o=n[0].trace,s=i.c2p(t),l=a.c2p(r),u,c=function(P){var A=Math.max(3,P.mrc||0);return Math.max(Math.abs(i.c2p(P.x)-s)-A,1-3/A)},f=function(P){var A=Math.max(3,P.mrc||0);return Math.max(Math.abs(a.c2p(P.y)-l)-A,1-3/A)},h=R_.quadrature(c,f),d=!1,v,_,b=0;b<n.length;b++){v=n[b];for(var p=0;p<(v.pts||[]).length;p++){_=v.pts[p];var k=h(_);k<=e.distance&&(e.distance=k,d=[b,p])}}if(!d)return!1;v=n[d[0]],_=v.pts[d[1]];var E=i.c2p(_.x,!0),T=a.c2p(_.y,!0),L=_.mrc||1;u=HV.extendFlat({},e,{index:_.i,color:(o.marker||{}).color,name:o.name,x0:E-L,x1:E+L,y0:T-L,y1:T+L,spikeDistance:e.distance,hovertemplate:o.hovertemplate});var x=v.orig_p,C=x!==void 0?x:v.pos,M;o.orientation===\"h\"?(M=a,u.xLabelVal=_.x,u.yLabelVal=C):(M=i,u.xLabelVal=C,u.yLabelVal=_.y);var g=M._id.charAt(0);return u[g+\"Spike\"]=M.c2p(v.pos,!0),Z_t(_,o,u),u}j1e.exports={hoverPoints:Y_t,hoverOnBoxes:G1e,hoverOnPoints:H1e}});var X1e=ye((Sur,W1e)=>{\"use strict\";W1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),\"xVal\"in r&&(t.x=r.xVal),\"yVal\"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var WV=ye((Mur,Z1e)=>{\"use strict\";Z1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++)n[s].pts[l].selected=0;else for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++){var u=n[s].pts[l],c=i.c2p(u.x),f=a.c2p(u.y);r.contains([c,f],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0}return o}});var K1e=ye((Eur,Y1e)=>{\"use strict\";Y1e.exports={attributes:k4(),layoutAttributes:C4(),supplyDefaults:P4().supplyDefaults,crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:$I().supplyLayoutDefaults,calc:NV(),crossTraceCalc:e8().crossTraceCalc,plot:t8().plot,style:r8().style,styleOnSelect:r8().styleOnSelect,hoverPoints:jV().hoverPoints,eventData:X1e(),selectPoints:WV(),moduleType:\"trace\",name:\"box\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"boxLayout\",\"zoomScale\"],meta:{}}});var $1e=ye((kur,J1e)=>{\"use strict\";J1e.exports=K1e()});var FT=ye((Cur,e_e)=>{\"use strict\";var K_t=Tu(),{extendFlat:Pp}=Ao(),J_t=Gl(),{axisHoverFormat:XV}=df(),$_t=ec(),{hovertemplateAttrs:Q_t,templatefallbackAttrs:Q1e,texttemplateAttrs:ext}=Ll(),a0=pf();e_e.exports=Pp({z:{valType:\"data_array\",editType:\"calc\"},x:Pp({},a0.x,{impliedEdits:{xtype:\"array\"}}),x0:Pp({},a0.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:Pp({},a0.dx,{impliedEdits:{xtype:\"scaled\"}}),y:Pp({},a0.y,{impliedEdits:{ytype:\"array\"}}),y0:Pp({},a0.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:Pp({},a0.dy,{impliedEdits:{ytype:\"scaled\"}}),xperiod:Pp({},a0.xperiod,{impliedEdits:{xtype:\"scaled\"}}),yperiod:Pp({},a0.yperiod,{impliedEdits:{ytype:\"scaled\"}}),xperiod0:Pp({},a0.xperiod0,{impliedEdits:{xtype:\"scaled\"}}),yperiod0:Pp({},a0.yperiod0,{impliedEdits:{ytype:\"scaled\"}}),xperiodalignment:Pp({},a0.xperiodalignment,{impliedEdits:{xtype:\"scaled\"}}),yperiodalignment:Pp({},a0.yperiodalignment,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},hoverongaps:{valType:\"boolean\",dflt:!0,editType:\"none\"},connectgaps:{valType:\"boolean\",editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},xhoverformat:XV(\"x\"),yhoverformat:XV(\"y\"),zhoverformat:XV(\"z\",1),hovertemplate:Q_t(),hovertemplatefallback:Q1e(),texttemplate:ext({arrayOk:!1,editType:\"plot\"},{keys:[\"x\",\"y\",\"z\",\"text\"]}),texttemplatefallback:Q1e({editType:\"plot\"}),textfont:$_t({editType:\"plot\",autoSize:!0,autoColor:!0,colorEditType:\"style\"}),showlegend:Pp({},J_t.showlegend,{dflt:!1}),zorder:a0.zorder},K_t(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var n8=ye((Lur,r_e)=>{\"use strict\";var txt=Eo(),i8=Dr(),rxt=qa();r_e.exports=function(t,r,n,i,a,o){var s=n(\"z\");a=a||\"x\",o=o||\"y\";var l,u;if(s===void 0||!s.length)return 0;if(i8.isArray1D(s)){l=n(a),u=n(o);var c=i8.minRowLength(l),f=i8.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=t_e(a,n),u=t_e(o,n),!ixt(s))return 0;n(\"transpose\"),r._length=null}var h=rxt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");return h(t,r,[a,o],i),!0};function t_e(e,t){var r=t(e),n=r?t(e+\"type\",\"array\"):\"scaled\";return n===\"scaled\"&&(t(e+\"0\"),t(\"d\"+e)),r}function ixt(e){for(var t=!0,r=!1,n=!1,i,a=0;a<e.length;a++){if(i=e[a],!i8.isArrayOrTypedArray(i)){t=!1;break}i.length>0&&(r=!0);for(var o=0;o<i.length;o++)if(txt(i[o])){n=!0;break}}return t&&r&&n}});var I4=ye((Pur,n_e)=>{\"use strict\";var i_e=Dr();n_e.exports=function(t,r){t(\"texttemplate\"),t(\"texttemplatefallback\");var n=i_e.extendFlat({},r.font,{color:\"auto\",size:\"auto\"});i_e.coerceFont(t,\"textfont\",n)}});var ZV=ye((Iur,a_e)=>{\"use strict\";a_e.exports=function(t,r,n){var i=n(\"zsmooth\");i===!1&&(n(\"xgap\"),n(\"ygap\")),n(\"zhoverformat\")}});var l_e=ye((Rur,s_e)=>{\"use strict\";var o_e=Dr(),nxt=n8(),axt=I4(),oxt=Dg(),sxt=ZV(),lxt=td(),uxt=FT();s_e.exports=function(t,r,n,i){function a(s,l){return o_e.coerce(t,r,uxt,s,l)}var o=nxt(t,r,a,i);if(!o){r.visible=!1;return}oxt(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),axt(a,i),sxt(t,r,a,i),a(\"hoverongaps\"),a(\"connectgaps\",o_e.isArray1D(r.z)&&r.zsmooth!==!1),lxt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),a(\"zorder\")}});var YV=ye((Dur,u_e)=>{\"use strict\";var zT=Eo();u_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return zT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return zT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(zT(i))if(i=Number(i),zT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(zT(i))if(i=Number(i),zT(r[e])){if(r[e]<i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0}}});var KV=ye((Fur,c_e)=>{\"use strict\";c_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i<r;i++)e[i]*=n},probability:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]/=t},density:function(e,t,r,n){var i=e.length;n=n||1;for(var a=0;a<i;a++)e[a]*=r[a]*n},\"probability density\":function(e,t,r,n){var i=e.length;n&&(t/=n);for(var a=0;a<i;a++)e[a]*=r[a]/t}}});var JV=ye((zur,f_e)=>{\"use strict\";f_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a<n;a++)r[a]?(t[a]/=r[a],i+=t[a]):t[a]=null;return i}});var $V=ye((Our,__e)=>{\"use strict\";var OT=fs(),p2=OT.ONEAVGYEAR,h_e=OT.ONEAVGMONTH,o8=OT.ONEDAY,d_e=OT.ONEHOUR,v_e=OT.ONEMIN,p_e=OT.ONESEC,g_e=ho().tickIncrement;__e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(a8(u+s,u+l,i,a),a8(c+s,c+l,i,a)),h=Math.min(a8(u+o,u+s,i,a),a8(c+o,c+s,i,a)),d,v;if(f>h&&h<Math.abs(c-u)/4e3?(d=f,v=!1):(d=Math.min(f,h),v=!0),i.type===\"date\"&&d>o8){var _=d===p2?1:6,b=d===p2?\"M12\":\"M1\";return function(p,k){var E=i.c2d(p,p2,a),T=E.indexOf(\"-\",_);T>0&&(E=E.slice(0,T));var L=i.d2c(E,0,a);if(L<p){var x=g_e(L,b,!1,a);(L+x)/2<p+t&&(L=x)}return k&&v?g_e(L,b,!0,a):L}}return function(p,k){var E=d*Math.round(p/d);return E+d/10<p&&E+d*.9<p+t&&(E+=d),k&&v&&(E-=d),E}};function a8(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),a=r.type===\"date\",o=m_e(i,a),s=0;s<10;s++){var l=m_e(o*80,a);if(o===l)break;if(cxt(l,e,t,a,r,n))o=l;else break}return o}function m_e(e,t){return t&&e>p_e?e>o8?e>p2*1.1?p2:e>h_e*1.1?h_e:o8:e>d_e?d_e:e>v_e?v_e:p_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function cxt(e,t,r,n,i,a){if(n&&e>o8){var o=y_e(t,i,a),s=y_e(r,i,a),l=e===p2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function y_e(e,t,r){var n=t.c2d(e,p2,r).split(\"-\");return n[0]===\"\"&&(n.unshift(),n[0]=\"-\"+n[0]),n}});var tG=ye((qur,A_e)=>{\"use strict\";var QV=Eo(),Hv=Dr(),x_e=qa(),j0=ho(),{hasColorscale:b_e}=pv(),w_e=gv(),fxt=A4(),T_e=YV(),hxt=KV(),dxt=JV(),vxt=$V();function pxt(e,t){var r=[],n=[],i=t.orientation===\"h\",a=j0.getFromId(e,i?t.yaxis:t.xaxis),o=i?\"y\":\"x\",s={x:\"y\",y:\"x\"}[o],l=t[o+\"calendar\"],u=t.cumulative,c,f=eG(e,t,a,o),h=f[0],d=f[1],v=typeof h.size==\"string\",_=[],b=v?_:h,p=[],k=[],E=[],T=0,L=t.histnorm,x=t.histfunc,C=L.indexOf(\"density\")!==-1,M,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,\"\"),C=!1);var A=x===\"max\"||x===\"min\",z=A?null:0,O=T_e.count,U=hxt[L],G=!1,Z=function(me){return a.r2c(me,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!==\"count\"&&(j=t[s],G=x===\"avg\",O=T_e[x]),c=Z(h.start),g=Z(h.end)+(c-j0.tickIncrement(c,h.size,!1,l))/1e6;c<g&&r.length<1e6&&(M=j0.tickIncrement(c,h.size,!1,l),r.push((c+M)/2),n.push(z),E.push([]),_.push(c),C&&p.push(1/(M-c)),G&&k.push(0),!(M<=c));)c=M;_.push(c),!v&&a.type===\"date\"&&(b={start:Z(b.start),end:Z(b.end),size:b.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var N=t[\"_\"+o+\"bingroup\"],H={leftGap:1/0,rightGap:1/0};N&&(e._fullLayout._roundFnOpts[N]||(e._fullLayout._roundFnOpts[N]=H),H=e._fullLayout._roundFnOpts[N]);var re=n.length,oe=!0,_e=H.leftGap,Ce=H.rightGap,Le={};for(c=0;c<d.length;c++){var ge=d[c];P=Hv.findBin(ge,b),P>=0&&P<re&&(T+=O(P,c,n,j,k),oe&&E[P].length&&ge!==d[E[P][0]]&&(oe=!1),E[P].push(c),Le[c]=P,_e=Math.min(_e,ge-_[P]),Ce=Math.min(Ce,_[P+1]-ge))}H.leftGap=_e,H.rightGap=Ce;var ie;oe||(ie=function(me,De){return function(){var ce=e._fullLayout._roundFnOpts[N];return vxt(ce.leftGap,ce.rightGap,_,a,l)(me,De)}}),G&&(T=dxt(n,k)),U&&U(n,T,p),u.enabled&&yxt(n,u.direction,u.currentbin);var Se=Math.min(r.length,n.length),Ee=[],Ae=0,Be=Se-1;for(c=0;c<Se;c++)if(n[c]){Ae=c;break}for(c=Se-1;c>=Ae;c--)if(n[c]){Be=c;break}for(c=Ae;c<=Be;c++)if(QV(r[c])&&QV(n[c])){var Pe={p:r[c],s:n[c],b:0};u.enabled||(Pe.pts=E[c],oe?Pe.ph0=Pe.ph1=E[c].length?d[E[c][0]]:r[c]:(t._computePh=!0,Pe.ph0=ie(_[c]),Pe.ph1=ie(_[c+1],!0))),Ee.push(Pe)}return Ee.length===1&&(Ee[0].width1=j0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),b_e(t,\"marker\")&&w_e(e,t,{vals:t.marker.color,containerStr:\"marker\",cLetter:\"c\"}),b_e(t,\"marker.line\")&&w_e(e,t,{vals:t.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),fxt(Ee,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(Ee,t,Le),Ee}function eG(e,t,r,n,i){var a=n+\"bins\",o=e._fullLayout,s=t[\"_\"+n+\"bingroup\"],l=o._histogramBinOpts[s],u=o.barmode===\"overlay\",c,f,h,d,v,_,b,p=function(ge){return r.r2c(ge,0,d)},k=function(ge){return r.c2r(ge,0,d)},E=r.type===\"date\"?function(ge){return ge||ge===0?Hv.cleanDate(ge,null,d):null}:function(ge){return QV(ge)?Number(ge):null};function T(ge,ie,Se){ie[ge+\"Found\"]?(ie[ge]=E(ie[ge]),ie[ge]===null&&(ie[ge]=Se[ge])):(_[ge]=ie[ge]=Se[ge],Hv.nestedProperty(f[0],a+\".\"+ge).set(Se[ge]))}if(t[\"_\"+n+\"autoBinFinished\"])delete t[\"_\"+n+\"autoBinFinished\"];else{f=l.traces;var L=[],x=!0,C=!1,M=!1;for(c=0;c<f.length;c++)if(h=f[c],h.visible){var g=l.dirs[c];v=h[\"_\"+g+\"pos0\"]=r.makeCalcdata(h,g),L=Hv.concat(L,v),delete h[\"_\"+n+\"autoBinFinished\"],t.visible===!0&&(x?x=!1:(delete h._autoBin,h[\"_\"+n+\"autoBinFinished\"]=1),x_e.traceIs(h,\"2dMap\")&&(C=!0),h.type===\"histogram2dcontour\"&&(M=!0))}d=f[0][n+\"calendar\"];var P=j0.autoBin(L,r,l.nbins,C,d,l.sizeFound&&l.size),A=f[0]._autoBin={};if(_=A[l.dirs[0]]={},M&&(l.size||(P.start=k(j0.tickIncrement(p(P.start),P.size,!0,d))),l.end===void 0&&(P.end=k(j0.tickIncrement(p(P.end),P.size,!1,d)))),u&&!x_e.traceIs(t,\"2dMap\")&&P._dataSpan===0&&r.type!==\"category\"&&r.type!==\"multicategory\"&&t.bingroup===\"\"&&typeof t.xbins==\"undefined\"){if(i)return[P,v,!0];P=gxt(e,t,r,n,a)}b=h.cumulative||{},b.enabled&&b.currentbin!==\"include\"&&(b.direction===\"decreasing\"?P.start=k(j0.tickIncrement(p(P.start),P.size,!0,d)):P.end=k(j0.tickIncrement(p(P.end),P.size,!1,d))),l.size=P.size,l.sizeFound||(_.size=P.size,Hv.nestedProperty(f[0],a+\".size\").set(P.size)),T(\"start\",l,P),T(\"end\",l,P)}v=t[\"_\"+n+\"pos0\"],delete t[\"_\"+n+\"pos0\"];var z=t._input[a]||{},O=Hv.extendFlat({},l),U=l.start,G=r.r2l(z.start),Z=G!==void 0;if((l.startFound||Z)&&G!==r.r2l(U)){var j=Z?G:Hv.aggNums(Math.min,null,v),N={type:r.type===\"category\"||r.type===\"multicategory\"?\"linear\":r.type,r2l:r.r2l,dtick:l.size,tick0:U,calendar:d,range:[j,j0.tickIncrement(j,l.size,!1,d)].map(r.l2r)},H=j0.tickFirst(N);H>r.r2l(j)&&(H=j0.tickIncrement(H,l.size,!0,d)),O.start=r.l2r(H),Z||Hv.nestedProperty(t,a+\".start\").set(O.start)}var re=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(re)){var Ce=_e?oe:Hv.aggNums(Math.max,null,v);O.end=r.l2r(Ce),_e||Hv.nestedProperty(t,a+\".start\").set(O.end)}var Le=\"autobin\"+n;return t._input[Le]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Le],delete t[Le]),[O,v]}function gxt(e,t,r,n,i){var a=e._fullLayout,o=mxt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c<o.length;c++)if(f=o[c],f===t)s=!0;else if(!s)h=a._histogramBinOpts[f[\"_\"+n+\"bingroup\"]],l=Math.min(l,h.size||f[i].size);else{var d=eG(e,f,r,n,!0),v=d[0],_=d[2];f[\"_\"+n+\"autoBinFinished\"]=1,f[\"_\"+n+\"pos0\"]=d[1],_?u.push(f):l=Math.min(l,v.size)}var b=new Array(u.length);for(c=0;c<u.length;c++)for(var p=u[c][\"_\"+n+\"pos0\"],k=0;k<p.length;k++)if(p[k]!==void 0){b[c]=p[k];break}for(isFinite(l)||(l=Hv.distinctVals(b).minDiff),c=0;c<u.length;c++){f=u[c];var E=f[n+\"calendar\"],T={start:r.c2r(b[c]-l/2,0,E),end:r.c2r(b[c]+l/2,0,E),size:l};f._input[i]=f[i]=T,h=a._histogramBinOpts[f[\"_\"+n+\"bingroup\"]],h&&Hv.extendFlat(h,T)}return t[i]}function mxt(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;s<o.length;s++){var l=o[s];l.type===\"histogram\"&&l.visible===!0&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}function yxt(e,t,r){var n,i,a;function o(l){a=e[l],e[l]/=2}function s(l){i=e[l],e[l]=a+i/2,a+=i}if(r===\"half\")if(t===\"increasing\")for(o(0),n=1;n<e.length;n++)s(n);else for(o(e.length-1),n=e.length-2;n>=0;n--)s(n);else if(t===\"increasing\"){for(n=1;n<e.length;n++)e[n]+=e[n-1];r===\"exclude\"&&(e.unshift(0),e.pop())}else{for(n=e.length-2;n>=0;n--)e[n]+=e[n+1];r===\"exclude\"&&(e.push(0),e.shift())}}A_e.exports={calc:pxt,calcAllAutoBins:eG}});var I_e=ye((Bur,P_e)=>{\"use strict\";var S_e=Dr(),qT=ho(),M_e=YV(),_xt=KV(),xxt=JV(),bxt=$V(),E_e=tG().calcAllAutoBins;P_e.exports=function(t,r){var n=qT.getFromId(t,r.xaxis),i=qT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(It){return n.r2c(It,0,a)},l=function(It){return i.r2c(It,0,o)},u=function(It){return n.c2r(It,0,a)},c=function(It){return i.c2r(It,0,o)},f,h,d,v,_=E_e(t,r,n,\"x\"),b=_[0],p=_[1],k=E_e(t,r,i,\"y\"),E=k[0],T=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),T.length>L&&T.splice(L,T.length-L);var x=[],C=[],M=[],g=typeof b.size==\"string\",P=typeof E.size==\"string\",A=[],z=[],O=g?A:b,U=P?z:E,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,re=N.indexOf(\"density\")!==-1,oe=H===\"max\"||H===\"min\",_e=oe?null:0,Ce=M_e.count,Le=_xt[N],ge=!1,ie=[],Se=[],Ee=\"z\"in r?r.z:\"marker\"in r&&Array.isArray(r.marker.color)?r.marker.color:\"\";Ee&&H!==\"count\"&&(ge=H===\"avg\",Ce=M_e[H]);var Ae=b.size,Be=s(b.start),Pe=s(b.end)+(Be-qT.tickIncrement(Be,Ae,!1,a))/1e6;for(f=Be;f<Pe;f=qT.tickIncrement(f,Ae,!1,a))C.push(_e),A.push(f),ge&&M.push(0);A.push(f);var me=C.length,De=(f-Be)/me,ce=u(Be+De/2),je=E.size,lt=l(E.start),pt=l(E.end)+(lt-qT.tickIncrement(lt,je,!1,o))/1e6;for(f=lt;f<pt;f=qT.tickIncrement(f,je,!1,o)){x.push(C.slice()),z.push(f);var Vt=new Array(me);for(h=0;h<me;h++)Vt[h]=[];j.push(Vt),ge&&Z.push(M.slice())}z.push(f);var ot=x.length,ut=(f-lt)/ot,Wt=c(lt+ut/2);re&&(ie=k_e(C.length,O,De,g),Se=k_e(x.length,U,ut,P)),!g&&n.type===\"date\"&&(O=C_e(s,O)),!P&&i.type===\"date\"&&(U=C_e(l,U));var Nt=!0,$t=!0,sr=new Array(me),Tr=new Array(ot),fr=1/0,$e=1/0,St=1/0,Qt=1/0;for(f=0;f<L;f++){var Gt=p[f],_t=T[f];d=S_e.findBin(Gt,O),v=S_e.findBin(_t,U),d>=0&&d<me&&v>=0&&v<ot&&(G+=Ce(d,f,x[v],Ee,Z[v]),j[v][d].push(f),Nt&&(sr[d]===void 0?sr[d]=Gt:sr[d]!==Gt&&(Nt=!1)),$t&&(Tr[v]===void 0?Tr[v]=_t:Tr[v]!==_t&&($t=!1)),fr=Math.min(fr,Gt-A[d]),$e=Math.min($e,A[d+1]-Gt),St=Math.min(St,_t-z[v]),Qt=Math.min(Qt,z[v+1]-_t))}if(ge)for(v=0;v<ot;v++)G+=xxt(x[v],Z[v]);if(Le)for(v=0;v<ot;v++)Le(x[v],G,ie,Se[v]);return{x:p,xRanges:L_e(A,Nt&&sr,fr,$e,n,a),x0:ce,dx:De,y:T,yRanges:L_e(z,$t&&Tr,St,Qt,i,o),y0:Wt,dy:ut,z:x,pts:j}};function k_e(e,t,r,n){var i=new Array(e),a;if(n)for(a=0;a<e;a++)i[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)i[a]=o}return i}function C_e(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function L_e(e,t,r,n,i,a){var o,s=e.length-1,l=new Array(s),u=bxt(r,n,e,i,a);for(o=0;o<s;o++){var c=(t||[])[o];l[o]=c===void 0?[u(e[o]),u(e[o+1],!0)]:[c,c]}return l}});var s8=ye((Nur,F_e)=>{\"use strict\";var qm=Dr(),R_e=fs().BADNUM,D_e=zg();F_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=D_e(t,r,i,l).vals,u=D_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&qm.isArray1D(c),h=t.hovertext,d=h!==void 0&&qm.isArray1D(h),v,_,b=qm.distinctVals(l),p=b.vals,k=qm.distinctVals(u),E=k.vals,T=[],L,x,C=E.length,M=p.length;for(v=0;v<o.length;v++)T[v]=qm.init2dArray(C,M);f&&(L=qm.init2dArray(C,M)),d&&(x=qm.init2dArray(C,M));var g=qm.init2dArray(C,M);for(v=0;v<s;v++)if(l[v]!==R_e&&u[v]!==R_e){var P=qm.findBin(l[v]+b.minDiff/2,p),A=qm.findBin(u[v]+k.minDiff/2,E);for(_=0;_<o.length;_++){var z=o[_],O=t[z],U=T[_];U[A][P]=O[v],g[A][P]=v}f&&(L[A][P]=c[v]),d&&(x[A][P]=h[v])}for(t[\"_\"+i]=p,t[\"_\"+a]=E,_=0;_<o.length;_++)t[\"_\"+o[_]]=T[_];f&&(t._text=L),d&&(t._hovertext=x),r&&r.type===\"category\"&&(t[\"_\"+i+\"CategoryMap\"]=p.map(function(G){return r._categories[G]})),n&&n.type===\"category\"&&(t[\"_\"+a+\"CategoryMap\"]=E.map(function(G){return n._categories[G]})),t._after2before=g}});var u8=ye((Uur,z_e)=>{\"use strict\";var wxt=Eo(),Txt=Dr(),l8=fs().BADNUM;z_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(wxt(p))return+p}if(r&&r.transpose){for(a=0,u=0;u<t.length;u++)a=Math.max(a,t[u].length);if(a===0)return!1;s=function(p){return p.length},l=function(p,k,E){return(p[E]||[])[k]}}else a=t.length,s=function(p,k){return p[k].length},l=function(p,k,E){return(p[k]||[])[E]};var h=function(p,k,E){return k===l8||E===l8?l8:l(p,k,E)};function d(p){if(r&&r.type!==\"carpet\"&&r.type!==\"contourcarpet\"&&p&&p.type===\"category\"&&r[\"_\"+p._id.charAt(0)].length){var k=p._id.charAt(0),E={},T=r[\"_\"+k+\"CategoryMap\"]||r[k];for(u=0;u<T.length;u++)E[T[u]]=u;return function(L){var x=E[p._categories[L]];return x+1?x:l8}}else return Txt.identity}var v=d(n),_=d(i);i&&i.type===\"category\"&&(a=i._categories.length);var b=new Array(a);for(u=0;u<a;u++)for(n&&n.type===\"category\"?o=n._categories.length:o=s(t,u),b[u]=new Array(o),c=0;c<o;c++)b[u][c]=f(h(t,_(u),v(c)));return b}});var c8=ye((Vur,B_e)=>{\"use strict\";var Axt=Dr(),O_e=.01,Sxt=[[-1,0],[1,0],[0,-1],[0,1]];function Mxt(e){return .5-.25*Math.min(1,e*.5)}B_e.exports=function(t,r){var n=1,i;for(q_e(t,r),i=0;i<r.length&&!(r[i][2]<4);i++);for(r=r.slice(i),i=0;i<100&&n>O_e;i++)n=q_e(t,r,Mxt(n));return n>O_e&&Axt.log(\"interp2d didn't converge quickly\",n),t};function q_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,_,b;for(s=0;s<t.length;s++){for(i=t[s],a=i[0],o=i[1],v=e[a][o],d=0,h=0,l=0;l<4;l++)u=Sxt[l],c=e[a+u[0]],c&&(f=c[o+u[1]],f!==void 0&&(d===0?_=b=f:(_=Math.min(_,f),b=Math.max(b,f)),h++,d+=f));if(h===0)throw\"iterateInterp2d order is wrong: no defined neighbors\";e[a][o]=d/h,v===void 0?h<4&&(n=1):(e[a][o]=(1+r)*e[a][o]-r*v,b>_&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-_))))}return n}});var f8=ye((Gur,N_e)=>{\"use strict\";var Ext=Dr().maxRowLength;N_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=Ext(t),u,c,f,h,d,v,_,b;for(c=0;c<t.length;c++)for(u=o,o=a,a=t[c+1]||[],f=0;f<l;f++)o[f]===void 0&&(v=(o[f-1]!==void 0?1:0)+(o[f+1]!==void 0?1:0)+(u[f]!==void 0?1:0)+(a[f]!==void 0?1:0),v?(c===0&&v++,f===0&&v++,c===t.length-1&&v++,f===o.length-1&&v++,v<4&&(n[[c,f]]=[c,f,v]),r.push([c,f,v])):i.push([c,f]));for(;i.length;){for(_={},b=!1,d=i.length-1;d>=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(_[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw\"findEmpties iterated with no new neighbors\";for(h in _)n[h]=_[h],r.push(_[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var rG=ye((Hur,G_e)=>{\"use strict\";var U_e=qa(),V_e=Dr().isArrayOrTypedArray;G_e.exports=function(t,r,n,i,a,o){var s=[],l=U_e.traceIs(t,\"contour\"),u=U_e.traceIs(t,\"histogram\"),c,f,h,d=V_e(r)&&r.length>1;if(d&&!u&&o.type!==\"category\"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type===\"log\"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type===\"log\"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h<v;h++)s.push(Math.sqrt(r[h-1]*r[h]));s.push(Math.pow(r[v-1],1.5)/Math.pow(r[v-2],.5))}else{for(s=[1.5*r[0]-.5*r[1]],h=1;h<v;h++)s.push((r[h-1]+r[h])*.5);s.push(1.5*r[v-1]-.5*r[v-2])}if(v<a){var _=s[s.length-1],b;if(o.type===\"log\")for(b=_/s[s.length-2],h=v;h<a;h++)_*=b,s.push(_);else for(b=_-s[s.length-2],h=v;h<a;h++)_+=b,s.push(_)}}else return l?r.slice(0,a):r.slice(0,a+1)}else{var p=t[o._id.charAt(0)+\"calendar\"];if(u)c=o.r2c(n,0,p);else if(V_e(r)&&r.length===1)c=r[0];else if(n===void 0)c=0;else{var k=o.type===\"log\"?o.d2c:o.r2c;c=k(n,0,p)}for(f=i||1,h=l?0:-.5;h<a;h++)s.push(c+f*h)}return s}});var v8=ye((jur,X_e)=>{\"use strict\";var H_e=qa(),iG=Dr(),h8=ho(),j_e=zg(),kxt=I_e(),Cxt=gv(),Lxt=s8(),Pxt=u8(),Ixt=c8(),Rxt=f8(),d8=rG(),nG=fs().BADNUM;X_e.exports=function(t,r){var n=h8.getFromId(t,r.xaxis||\"x\"),i=h8.getFromId(t,r.yaxis||\"y\"),a=H_e.traceIs(r,\"contour\"),o=H_e.traceIs(r,\"histogram\"),s=a?\"best\":r.zsmooth,l,u,c,f,h,d,v,_,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=kxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,_=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var E=r.z;iG.isArray1D(E)?(Lxt(r,n,i,\"x\",\"y\",[\"z\"]),l=r._x,h=r._y,E=r._z):(f=r.x?n.makeCalcdata(r,\"x\"):[],_=r.y?i.makeCalcdata(r,\"y\"):[],l=j_e(r,n,\"x\",f).vals,h=j_e(r,i,\"y\",_).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=Pxt(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=Dxt(l,h,b),o||(l=W_e(l),h=W_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=Rxt(b),Ixt(b,r._emptypoints));function T(O){s=r._input.zsmooth=r.zsmooth=!1,iG.warn('cannot use zsmooth: \"fast\": '+O)}function L(O){if(O.length>1){var U=(O[O.length-1]-O[0])/(O.length-1),G=Math.abs(U/100);for(p=0;p<O.length-1;p++)if(Math.abs(O[p+1]-O[p]-U)>G)return!1}return!0}r._islinear=!1,n.type===\"log\"||i.type===\"log\"?s===\"fast\"&&T(\"log axis found\"):L(l)?L(h)?r._islinear=!0:s===\"fast\"&&T(\"y scale is not linear\"):s===\"fast\"&&T(\"x scale is not linear\");var x=iG.maxRowLength(b),C=r.xtype===\"scaled\"?\"\":l,M=d8(r,C,u,c,x,n),g=r.ytype===\"scaled\"?\"\":h,P=d8(r,g,d,v,b.length,i);r._extremes[n._id]=h8.findExtremes(n,M),r._extremes[i._id]=h8.findExtremes(i,P);var A={x:M,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(A.orig_x=f),r.yperiodalignment&&_&&(A.orig_y=_),C&&C.length===M.length-1&&(A.xCenter=C),g&&g.length===P.length-1&&(A.yCenter=g),o&&(A.xRanges=k.xRanges,A.yRanges=k.yRanges,A.pts=k.pts),a||Cxt(t,r,{vals:b,cLetter:\"z\"}),a&&r.contours&&r.contours.coloring===\"heatmap\"){var z={type:r.type===\"contour\"?\"heatmap\":\"histogram2d\",xcalendar:r.xcalendar,ycalendar:r.ycalendar};A.xfill=d8(z,C,u,c,x,n),A.yfill=d8(z,g,d,v,b.length,i)}return[A]};function W_e(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e[n];i!==nG&&t.push(i)}return t}function Dxt(e,t,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(t[a]!==nG){i++,n[i]=[];for(var o=0;o<r[a].length;o++)e[o]!==nG&&n[i].push(r[a][o])}return n}});var g8=ye(p8=>{\"use strict\";p8.CSS_DECLARATIONS=[[\"image-rendering\",\"optimizeSpeed\"],[\"image-rendering\",\"-moz-crisp-edges\"],[\"image-rendering\",\"-o-crisp-edges\"],[\"image-rendering\",\"-webkit-optimize-contrast\"],[\"image-rendering\",\"optimize-contrast\"],[\"image-rendering\",\"crisp-edges\"],[\"image-rendering\",\"pixelated\"]];p8.STYLE=p8.CSS_DECLARATIONS.map(function(e){return e.join(\": \")+\"; \"}).join(\"\")});var oG=ye((Xur,Y_e)=>{\"use strict\";var Z_e=g8(),Fxt=So(),aG=Dr(),BT=null;function zxt(){if(BT!==null)return BT;BT=!1;var e=aG.isSafari()||aG.isMacWKWebView()||aG.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(Z_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r==\"function\")BT=t.some(function(o){return r.apply(null,o)});else{var n=Fxt.tester.append(\"image\").attr(\"style\",Z_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;BT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return BT}Y_e.exports=zxt});var m8=ye((Zur,nxe)=>{\"use strict\";var K_e=Oa(),Oxt=fd(),qxt=qa(),Bxt=So(),Nxt=ho(),W0=Dr(),J_e=Zl(),Uxt=lI(),Vxt=ka(),Gxt=tc().extractOpts,Hxt=tc().makeColorScaleFuncFromTrace,jxt=Wp(),Wxt=Dh(),sG=Wxt.LINE_SPACING,Xxt=oG(),Zxt=g8().STYLE,rxe=\"heatmap-label\";function ixe(e){return e.selectAll(\"g.\"+rxe)}function $_e(e){ixe(e).remove()}nxe.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;W0.makeTraceGroups(n,r,\"hm\").each(function(o){var s=K_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,_=l.xCenter,b=l.yCenter,p=qxt.traceIs(u,\"contour\"),k=p?\"best\":u.zsmooth,E=h.length,T=W0.maxRowLength(h),L=!1,x=!1,C,M,g,P,A,z,O,U;for(z=0;C===void 0&&z<d.length-1;)C=i.c2p(d[z]),z++;for(z=d.length-1;M===void 0&&z>0;)M=i.c2p(d[z]),z--;for(M<C&&(g=M,M=C,C=g,L=!0),z=0;P===void 0&&z<v.length-1;)P=a.c2p(v[z]),z++;for(z=v.length-1;A===void 0&&z>0;)A=a.c2p(v[z]),z--;A<P&&(g=P,P=A,A=g,x=!0),p&&(_=d,b=v,d=l.xfill,v=l.yfill);var G=\"default\";if(k?G=k===\"best\"?\"smooth\":\"fast\":u._islinear&&c===0&&f===0&&Xxt()&&(G=\"fast\"),G!==\"fast\"){var Z=k===\"best\"?0:.5;C=Math.max(-Z*i._length,C),M=Math.min((1+Z)*i._length,M),P=Math.max(-Z*a._length,P),A=Math.min((1+Z)*a._length,A)}var j=Math.round(M-C),N=Math.round(A-P),H=C>=i._length||M<=0||P>=a._length||A<=0;if(H){var re=s.selectAll(\"image\").data([]);re.exit().remove(),$_e(s);return}var oe,_e;G===\"fast\"?(oe=T,_e=E):(oe=j,_e=N);var Ce=document.createElement(\"canvas\");Ce.width=oe,Ce.height=_e;var Le=Ce.getContext(\"2d\",{willReadFrequently:!0}),ge=Hxt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G===\"fast\"?(ie=L?function(fn){return T-1-fn}:W0.identity,Se=x?function(fn){return E-1-fn}:W0.identity):(ie=function(fn){return W0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return W0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var Ee=Se(0),Ae=[Ee,Ee],Be=L?0:1,Pe=x?0:1,me=0,De=0,ce=0,je=0,lt,pt,Vt,ot,ut;function Wt(fn,yn){if(fn!==void 0){var Sn=ge(fn);return Sn[0]=Math.round(Sn[0]),Sn[1]=Math.round(Sn[1]),Sn[2]=Math.round(Sn[2]),me+=yn,De+=Sn[0]*yn,ce+=Sn[1]*yn,je+=Sn[2]*yn,Sn}return[0,0,0,0]}function Nt(fn,yn,Sn,Ba){var ua=fn[Sn.bin0];if(ua===void 0)return Wt(void 0,1);var ma=fn[Sn.bin1],Wa=yn[Sn.bin0],Fa=yn[Sn.bin1],Xo=ma-ua||0,da=Wa-ua||0,Wn;return ma===void 0?Fa===void 0?Wn=0:Wa===void 0?Wn=2*(Fa-ua):Wn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?Wn=0:Wn=(2*ua-ma-Wa)*2/3:Wa===void 0?Wn=(2*Fa-ma-ua)*2/3:Wn=Fa+ua-ma-Wa,Wt(ua+Sn.frac*Xo+Ba.frac*(da+Sn.frac*Wn))}if(G!==\"default\"){var $t=0,sr;try{sr=new Uint8Array(oe*_e*4)}catch(fn){sr=new Array(oe*_e*4)}if(G===\"smooth\"){var Tr=_||d,fr=b||v,$e=new Array(Tr.length),St=new Array(fr.length),Qt=new Array(j),Gt=_?exe:Q_e,_t=b?exe:Q_e,It,mt,er;for(z=0;z<Tr.length;z++)$e[z]=Math.round(i.c2p(Tr[z])-C);for(z=0;z<fr.length;z++)St[z]=Math.round(a.c2p(fr[z])-P);for(z=0;z<j;z++)Qt[z]=Gt(z,$e);for(O=0;O<N;O++)for(It=_t(O,St),mt=h[It.bin0],er=h[It.bin1],z=0;z<j;z++,$t+=4)ut=Nt(mt,er,Qt[z],It),txe(sr,$t,ut)}else for(O=0;O<E;O++)for(ot=h[O],Ae=Se(O),z=0;z<T;z++)ut=Wt(ot[z],1),$t=(Ae*T+ie(z))*4,txe(sr,$t,ut);var lr=Le.createImageData(oe,_e);try{lr.data.set(sr)}catch(fn){var wr=lr.data,Lr=wr.length;for(O=0;O<Lr;O++)wr[O]=sr[O]}Le.putImageData(lr,0,0)}else{var ti=Math.floor(c/2),Br=Math.floor(f/2);for(O=0;O<E;O++)if(ot=h[O],Ae.reverse(),Ae[Pe]=Se(O+1),!(Ae[0]===Ae[1]||Ae[0]===void 0||Ae[1]===void 0))for(pt=ie(0),lt=[pt,pt],z=0;z<T;z++)lt.reverse(),lt[Be]=ie(z+1),!(lt[0]===lt[1]||lt[0]===void 0||lt[1]===void 0)&&(Vt=ot[z],ut=Wt(Vt,(lt[1]-lt[0])*(Ae[1]-Ae[0])),Le.fillStyle=\"rgba(\"+ut.join(\",\")+\")\",Le.fillRect(lt[0]+ti,Ae[0]+Br,lt[1]-lt[0]-c,Ae[1]-Ae[0]-f))}De=Math.round(De/me),ce=Math.round(ce/me),je=Math.round(je/me);var Vr=Oxt(\"rgb(\"+De+\",\"+ce+\",\"+je+\")\");e._hmpixcount=(e._hmpixcount||0)+me,e._hmlumcount=(e._hmlumcount||0)+me*Vr.getLuminance();var dt=s.selectAll(\"image\").data(o);dt.enter().append(\"svg:image\").attr({xmlns:jxt.svg,preserveAspectRatio:\"none\"}),dt.attr({height:N,width:j,x:C,y:P,\"xlink:href\":Ce.toDataURL(\"image/png\")}),G===\"fast\"&&!k&&dt.attr(\"style\",Zxt),$_e(s);var Ge=u.texttemplate;if(Ge){var Je=Gxt(u),We={type:\"linear\",range:[Je.min,Je.max],_separators:i._separators,_numFormat:i._numFormat},tt=u.type===\"histogram2dcontour\",xt=u.type===\"contour\",Ie=xt?1:0,xe=xt?E-1:E,ke=xt?1:0,vt=xt?T-1:T,ir=[];for(z=Ie;z<xe;z++){var ar;if(xt)ar=l.y[z];else if(tt){if(z===0||z===E-1)continue;ar=l.y[z]}else if(l.yCenter)ar=l.yCenter[z];else{if(z+1===E&&l.y[z+1]===void 0)continue;ar=(l.y[z]+l.y[z+1])/2}var vr=Math.round(a.c2p(ar));if(!(0>vr||vr>a._length))for(O=ke;O<vt;O++){var ii;if(xt)ii=l.x[O];else if(tt){if(O===0||O===T-1)continue;ii=l.x[O]}else if(l.xCenter)ii=l.xCenter[O];else{if(O+1===T&&l.x[O+1]===void 0)continue;ii=(l.x[O]+l.x[O+1])/2}var pi=Math.round(i.c2p(ii));if(!(0>pi||pi>i._length)){var $r=Uxt({x:ii,y:ar},u,e._fullLayout);$r.x=ii,$r.y=ar;var di=l.z[z][O];di===void 0?($r.z=\"\",$r.zLabel=\"\"):($r.z=di,$r.zLabel=Nxt.tickText(We,di,\"hover\").text);var ji=l.text&&l.text[z]&&l.text[z][O];(ji===void 0||ji===!1)&&(ji=\"\"),$r.text=ji;var In=W0.texttemplateString({data:[$r,u._meta],fallback:u.texttemplatefallback,labels:$r,locale:e._fullLayout._d3locale,template:Ge});if(In){var wi=In.split(\"<br>\"),On=wi.length,qn=0;for(U=0;U<On;U++)qn=Math.max(qn,wi[U].length);ir.push({l:On,c:qn,t:In,x:pi,y:vr,z:di})}}}}var Fn=u.textfont,ra=Fn.size,la=e._fullLayout.font.size;if(!ra||ra===\"auto\"){var Ut=1/0,wt=1/0,rr=0,nr=0;for(U=0;U<ir.length;U++){var Er=ir[U];if(rr=Math.max(rr,Er.l),nr=Math.max(nr,Er.c),U<ir.length-1){var Xr=ir[U+1],ri=Math.abs(Xr.x-Er.x),Qr=Math.abs(Xr.y-Er.y);ri&&(Ut=Math.min(Ut,ri)),Qr&&(wt=Math.min(wt,Qr))}}!isFinite(Ut)||!isFinite(wt)?ra=la:(Ut-=c,wt-=f,Ut/=nr,wt/=rr,Ut/=sG/2,wt/=sG,ra=Math.min(Math.floor(Ut),Math.floor(wt),la))}if(ra<=0||!isFinite(ra))return;var Oi=function(fn){return fn.x},$i=function(fn){return fn.y-ra*(fn.l*sG/2-1)},tn=ixe(s).data(ir);tn.enter().append(\"g\").classed(rxe,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(fn){var yn=K_e.select(this),Sn=Fn.color;(!Sn||Sn===\"auto\")&&(Sn=Vxt.contrast(fn.z===void 0?e._fullLayout.plot_bgcolor:\"rgba(\"+ge(fn.z).join()+\")\")),yn.attr(\"data-notex\",1).call(J_e.positionText,Oi(fn),$i(fn)).call(Bxt.font,{family:Fn.family,size:ra,color:Sn,weight:Fn.weight,style:Fn.style,variant:Fn.variant,textcase:Fn.textcase,lineposition:Fn.lineposition,shadow:Fn.shadow}).text(fn.t).call(J_e.convertToTspans,e)})}})};function Q_e(e,t){var r=t.length-2,n=W0.constrain(W0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=W0.constrain(n+(e-i)/(a-i)-.5,0,r),s=Math.round(o),l=Math.abs(o-s);return!o||o===r||!l?{bin0:s,bin1:s,frac:0}:{bin0:s,frac:l,bin1:Math.round(s+l/(o-s))}}function exe(e,t){var r=t.length-1,n=W0.constrain(W0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=(e-i)/(a-i)||0;return o<=0?{bin0:n,bin1:n,frac:0}:o<.5?{bin0:n,bin1:n+1,frac:o}:{bin0:n+1,bin1:n,frac:1-o}}function txe(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(r[3]*255)}});var D_=ye((Yur,axe)=>{\"use strict\";axe.exports={min:\"zmin\",max:\"zmax\"}});var y8=ye((Kur,oxe)=>{\"use strict\";var Yxt=Oa();oxe.exports=function(t){Yxt.select(t).selectAll(\".hm image\").style(\"opacity\",function(r){return r.trace.opacity})}});var x8=ye((Jur,lxe)=>{\"use strict\";var sxe=vf(),R4=Dr(),_8=R4.isArrayOrTypedArray,Kxt=ho(),Jxt=tc().extractOpts;lxe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,_=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,E=h,T,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){R4.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(sxe.inbox(r-f[0],r-f[f.length-1],0)>0||sxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(k=[2*f[0]-f[1]],M=1;M<f.length;M++)k.push((f[M]+f[M-1])/2);for(k.push([2*f[f.length-1]-f[f.length-2]]),E=[2*h[0]-h[1]],M=1;M<h.length;M++)E.push((h[M]+h[M-1])/2);E.push([2*h[h.length-1]-h[h.length-2]])}x=Math.max(0,Math.min(k.length-2,R4.findBin(r,k))),C=Math.max(0,Math.min(E.length-2,R4.findBin(n,E)))}var g=u.c2p(f[x]),P=u.c2p(f[x+1]),A=c.c2p(h[C]),z=c.c2p(h[C+1]),O,U;o?(O=s.orig_x||f,U=s.orig_y||h,P=g,T=O[x],z=A,L=U[C]):(O=s.orig_x||v||f,U=s.orig_y||_||h,T=v?O[x]:(O[x]+O[x+1])/2,L=_?U[C]:(U[C]+U[C+1])/2,u&&u.type===\"category\"&&(T=f[x]),c&&c.type===\"category\"&&(L=h[C]),l.zsmooth&&(g=P=u.c2p(T),A=z=c.c2p(L)));var G=d[C][x];if(b&&!b[C][x]&&(G=void 0),!(G===void 0&&!l.hoverongaps)){var Z;_8(s.hovertext)&&_8(s.hovertext[C])?Z=s.hovertext[C][x]:_8(s.text)&&_8(s.text[C])&&(Z=s.text[C][x]);var j=Jxt(l),N={type:\"linear\",range:[j.min,j.max],hoverformat:p,_separators:u._separators,_numFormat:u._numFormat},H=Kxt.tickText(N,G,\"hover\").text;return[R4.extendFlat(t,{index:l._after2before?l._after2before[C][x]:[C,x],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:g,x1:P,y0:A,y1:z,xLabelVal:T,yLabelVal:L,zLabelVal:G,zLabel:H,text:Z})]}}});var cxe=ye(($ur,uxe)=>{\"use strict\";uxe.exports={attributes:FT(),supplyDefaults:l_e(),calc:v8(),plot:m8(),colorbar:D_(),style:y8(),hoverPoints:x8(),moduleType:\"trace\",name:\"heatmap\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"showLegend\"],meta:{}}});var hxe=ye((Qur,fxe)=>{\"use strict\";fxe.exports=cxe()});var lG=ye((ecr,dxe)=>{\"use strict\";dxe.exports=function(t,r){return{start:{valType:\"any\",editType:\"calc\"},end:{valType:\"any\",editType:\"calc\"},size:{valType:\"any\",editType:\"calc\"},editType:\"calc\"}}});var pxe=ye((tcr,vxe)=>{\"use strict\";vxe.exports={eventDataKeys:[\"binNumber\"]}});var b8=ye((rcr,_xe)=>{\"use strict\";var Ip=zm(),gxe=df().axisHoverFormat,{hovertemplateAttrs:$xt,texttemplateAttrs:Qxt,templatefallbackAttrs:mxe}=Ll(),uG=ec(),yxe=lG(),ebt=pxe(),cG=Ao().extendFlat;_xe.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},xhoverformat:gxe(\"x\"),yhoverformat:gxe(\"y\"),text:cG({},Ip.text,{}),hovertext:cG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"min\",\"max\"],dflt:\"count\",editType:\"calc\"},histnorm:{valType:\"enumerated\",values:[\"\",\"percent\",\"probability\",\"density\",\"probability density\"],dflt:\"\",editType:\"calc\"},cumulative:{enabled:{valType:\"boolean\",dflt:!1,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"increasing\",\"decreasing\"],dflt:\"increasing\",editType:\"calc\"},currentbin:{valType:\"enumerated\",values:[\"include\",\"exclude\",\"half\"],dflt:\"include\",editType:\"calc\"},editType:\"calc\"},nbinsx:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},xbins:yxe(\"x\",!0),nbinsy:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},ybins:yxe(\"y\",!0),autobinx:{valType:\"boolean\",dflt:null,editType:\"calc\"},autobiny:{valType:\"boolean\",dflt:null,editType:\"calc\"},bingroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:$xt({},{keys:ebt.eventDataKeys}),hovertemplatefallback:mxe(),texttemplate:Qxt({arrayOk:!1,editType:\"plot\"},{keys:[\"label\",\"value\"]}),texttemplatefallback:mxe({editType:\"plot\"}),textposition:cG({},Ip.textposition,{arrayOk:!1}),textfont:uG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),outsidetextfont:uG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextfont:uG({arrayOk:!1,editType:\"plot\",colorEditType:\"style\"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var Txe=ye((icr,wxe)=>{\"use strict\";var xxe=qa(),D4=Dr(),bxe=ka(),tbt=i0().handleText,rbt=WI(),ibt=b8();wxe.exports=function(t,r,n,i){function a(k,E){return D4.coerce(t,r,ibt,k,E)}var o=a(\"x\"),s=a(\"y\"),l=a(\"cumulative.enabled\");l&&(a(\"cumulative.direction\"),a(\"cumulative.currentbin\")),a(\"text\");var u=a(\"textposition\");tbt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"xhoverformat\"),a(\"yhoverformat\");var c=a(\"orientation\",s&&!o?\"h\":\"v\"),f=c===\"v\"?\"x\":\"y\",h=c===\"v\"?\"y\":\"x\",d=o&&s?Math.min(D4.minRowLength(o)&&D4.minRowLength(s)):D4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=xxe.getComponentMethod(\"calendars\",\"handleTraceDefaults\");v(t,r,[\"x\",\"y\"],i);var _=r[h];_&&a(\"histfunc\"),a(\"histnorm\"),a(\"autobin\"+f),rbt(t,r,a,n,i),D4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=xxe.getComponentMethod(\"errorbars\",\"supplyDefaults\");p(t,r,b||bxe.defaultLine,{axis:\"y\"}),p(t,r,b||bxe.defaultLine,{axis:\"x\",inherit:\"y\"}),a(\"zorder\")}});var T8=ye((ncr,Mxe)=>{\"use strict\";var F4=Dr(),nbt=hf(),w8=qa().traceIs,abt=e2(),obt=i0().validateCornerradius,Axe=F4.nestedProperty,fG=Kb().getAxisGroup,Sxe=[{aStr:{x:\"xbins.start\",y:\"ybins.start\"},name:\"start\"},{aStr:{x:\"xbins.end\",y:\"ybins.end\"},name:\"end\"},{aStr:{x:\"xbins.size\",y:\"ybins.size\"},name:\"size\"},{aStr:{x:\"nbinsx\",y:\"nbinsy\"},name:\"nbins\"}],sbt=[\"x\",\"y\"];Mxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return F4.coerce(s._input,s,s._module.attributes,G,Z)}function _(G){return G.orientation===\"v\"?\"x\":\"y\"}function b(G,Z){var j=nbt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+\"__\"+j;Z||(Z=N);var H=b(G,j),re=G[j+\"calendar\"]||\"\",oe=n[Z],_e=!0;oe&&(H===oe.axType&&re===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(j)):(Z=N,H!==oe.axType&&F4.warn([\"Attempted to group the bins of trace\",G.index,\"set on a\",\"type:\"+H,\"axis\",\"with bins on\",\"type:\"+oe.axType,\"axis.\"].join(\" \")),re!==oe.calendar&&F4.warn([\"Attempted to group the bins of trace\",G.index,\"set with a\",re,\"calendar\",\"with bins\",oe.calendar?\"on a \"+oe.calendar+\" calendar\":\"w/o a set calendar\"].join(\" \")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+\"calendar\"]||\"\"}),G[\"_\"+j+\"bingroup\"]=Z}for(f=0;f<t.length;f++)if(s=t[f],w8(s,\"histogram\")){if(i.push(s),delete s._xautoBinFinished,delete s._yautoBinFinished,s.type===\"histogram\"){var k=v(\"marker.cornerradius\",r.barcornerradius);s.marker&&(s.marker.cornerradius=obt(k))}w8(s,\"2dMap\")||abt(s._input,s,r,v,r.barmode)}var E=r._alignmentOpts||{};for(f=0;f<i.length;f++){if(s=i[f],u=\"\",!w8(s,\"2dMap\")){if(c=_(s),r.barmode===\"group\"&&s.alignmentgroup){var T=s[c+\"axis\"],L=fG(r,T)+s.orientation;(E[L]||{})[s.alignmentgroup]&&(u=L)}!u&&r.barmode!==\"overlay\"&&(u=fG(r,s.xaxis)+fG(r,s.yaxis)+_(s))}u?(a[u]||(a[u]=[]),a[u].push(s)):o.push(s)}for(u in a){if(l=a[u],l.length===1){o.push(l[0]);continue}var x=!1;for(l.length&&(s=l[0],x=v(\"bingroup\")),u=x||u,f=0;f<l.length;f++){s=l[f];var C=s._input.bingroup;C&&C!==u&&F4.warn([\"Trace\",s.index,\"must match\",\"within bingroup\",u+\".\",\"Ignoring its bingroup:\",C,\"setting.\"].join(\" \")),s.bingroup=u,p(s,u,_(s))}}for(f=0;f<o.length;f++){s=o[f];var M=v(\"bingroup\");if(w8(s,\"2dMap\"))for(d=0;d<2;d++){c=sbt[d];var g=v(c+\"bingroup\",M?M+\"__\"+c:null);p(s,g,c)}else p(s,M,_(s))}for(u in n){var P=n[u];for(l=P.traces,h=0;h<Sxe.length;h++){var A=Sxe[h],z=A.name,O,U;if(!(z===\"nbins\"&&P.sizeFound)){for(f=0;f<l.length;f++){if(s=l[f],c=P.dirs[f],O=A.aStr[c],Axe(s._input,O).get()!==void 0){P[z]=v(O),P[z+\"Found\"]=!0;break}U=(s._autoBin||{})[c]||{},U[z]&&Axe(s,O).set(U[z])}if(z===\"start\"||z===\"end\")for(;f<l.length;f++)s=l[f],s[\"_\"+c+\"bingroup\"]&&(U=(s._autoBin||{})[c]||{},v(O,U[z]));z===\"nbins\"&&!P.sizeFound&&!P.nbinsFound&&(s=l[0],P[z]=v(O))}}}}});var kxe=ye((acr,Exe)=>{\"use strict\";var lbt=PT().hoverPoints,ubt=ho().hoverLabelText;Exe.exports=function(t,r,n,i,a){var o=lbt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation===\"h\"?\"y\":\"x\";t[u+\"Label\"]=ubt(t[u+\"a\"],[s.ph0,s.ph1],l[u+\"hoverformat\"])}return o}}});var hG=ye((ocr,Cxe)=>{\"use strict\";Cxe.exports=function(t,r,n,i,a){if(t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"zLabelVal\"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l<o.length;l++)s=s.concat(n._indexToPoints[o[l]])}else s=o;t.pointIndices=s}return t}});var Pxe=ye((scr,Lxe)=>{\"use strict\";Lxe.exports={attributes:b8(),layoutAttributes:jI(),supplyDefaults:Txe(),crossTraceDefaults:T8(),supplyLayoutDefaults:IV(),calc:tG().calc,crossTraceCalc:t2().crossTraceCalc,plot:d2().plot,layerName:\"barlayer\",style:V0().style,styleOnSelect:V0().styleOnSelect,colorbar:$d(),hoverPoints:kxe(),selectPoints:IT(),eventData:hG(),moduleType:\"trace\",name:\"histogram\",basePlotModule:mh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"bar\",\"histogram\",\"oriented\",\"errorBarsOK\",\"showLegend\"],meta:{}}});var Rxe=ye((lcr,Ixe)=>{\"use strict\";Ixe.exports=Pxe()});var S8=ye((ucr,zxe)=>{\"use strict\";var jg=b8(),Dxe=lG(),A8=FT(),cbt=Gl(),dG=df().axisHoverFormat,{hovertemplateAttrs:fbt,texttemplateAttrs:hbt,templatefallbackAttrs:Fxe}=Ll(),dbt=Tu(),z4=Ao().extendFlat;zxe.exports=z4({x:jg.x,y:jg.y,z:{valType:\"data_array\",editType:\"calc\"},marker:{color:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},histnorm:jg.histnorm,histfunc:jg.histfunc,nbinsx:jg.nbinsx,xbins:Dxe(\"x\"),nbinsy:jg.nbinsy,ybins:Dxe(\"y\"),autobinx:jg.autobinx,autobiny:jg.autobiny,bingroup:z4({},jg.bingroup,{}),xbingroup:z4({},jg.bingroup,{}),ybingroup:z4({},jg.bingroup,{}),xgap:A8.xgap,ygap:A8.ygap,zsmooth:A8.zsmooth,xhoverformat:dG(\"x\"),yhoverformat:dG(\"y\"),zhoverformat:dG(\"z\",1),hovertemplate:fbt({},{keys:[\"z\"]}),hovertemplatefallback:Fxe(),texttemplate:hbt({arrayOk:!1,editType:\"plot\"},{keys:[\"z\"]}),texttemplatefallback:Fxe({editType:\"plot\"}),textfont:A8.textfont,showlegend:z4({},cbt.showlegend,{dflt:!1})},dbt(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var vG=ye((ccr,qxe)=>{\"use strict\";var vbt=qa(),Oxe=Dr();qxe.exports=function(t,r,n,i){var a=n(\"x\"),o=n(\"y\"),s=Oxe.minRowLength(a),l=Oxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=vbt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");u(t,r,[\"x\",\"y\"],i);var c=n(\"z\")||n(\"marker.color\");c&&n(\"histfunc\"),n(\"histnorm\"),n(\"autobinx\"),n(\"autobiny\")}});var Nxe=ye((fcr,Bxe)=>{\"use strict\";var pbt=Dr(),gbt=vG(),mbt=ZV(),ybt=td(),_bt=I4(),xbt=S8();Bxe.exports=function(t,r,n,i){function a(o,s){return pbt.coerce(t,r,xbt,o,s)}gbt(t,r,a,i),r.visible!==!1&&(mbt(t,r,a,i),ybt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),_bt(a,i),a(\"xhoverformat\"),a(\"yhoverformat\"))}});var Gxe=ye((hcr,Vxe)=>{\"use strict\";var bbt=x8(),Uxe=ho().hoverLabelText;Vxe.exports=function(t,r,n,i,a){var o=bbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Uxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Uxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var jxe=ye((dcr,Hxe)=>{\"use strict\";Hxe.exports={attributes:S8(),supplyDefaults:Nxe(),crossTraceDefaults:T8(),calc:v8(),plot:m8(),layerName:\"heatmaplayer\",colorbar:D_(),style:y8(),hoverPoints:Gxe(),eventData:hG(),moduleType:\"trace\",name:\"histogram2d\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"histogram\",\"showLegend\"],meta:{}}});var Xxe=ye((vcr,Wxe)=>{\"use strict\";Wxe.exports=jxe()});var M8=ye((pcr,Zxe)=>{\"use strict\";Zxe.exports={COMPARISON_OPS:[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],COMPARISON_OPS2:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"],CONSTRAINT_REDUCTION:{\"=\":\"=\",\"<\":\"<\",\"<=\":\"<\",\">\":\">\",\">=\":\">\",\"[]\":\"[]\",\"()\":\"[]\",\"[)\":\"[]\",\"(]\":\"[]\",\"][\":\"][\",\")(\":\"][\",\"](\":\"][\",\")[\":\"][\"}}});var O4=ye((gcr,$xe)=>{\"use strict\";var _h=FT(),E8=pf(),Kxe=df(),pG=Kxe.axisHoverFormat,wbt=Kxe.descriptionOnlyNumbers,Tbt=Tu(),Abt=Pd().dash,Sbt=ec(),NT=Ao().extendFlat,Jxe=M8(),Mbt=Jxe.COMPARISON_OPS2,Ebt=Jxe.INTERVAL_OPS,Yxe=E8.line;$xe.exports=NT({z:_h.z,x:_h.x,x0:_h.x0,dx:_h.dx,y:_h.y,y0:_h.y0,dy:_h.dy,xperiod:_h.xperiod,yperiod:_h.yperiod,xperiod0:E8.xperiod0,yperiod0:E8.yperiod0,xperiodalignment:_h.xperiodalignment,yperiodalignment:_h.yperiodalignment,text:_h.text,hovertext:_h.hovertext,transpose:_h.transpose,xtype:_h.xtype,ytype:_h.ytype,xhoverformat:pG(\"x\"),yhoverformat:pG(\"y\"),zhoverformat:pG(\"z\",1),hovertemplate:_h.hovertemplate,hovertemplatefallback:_h.hovertemplatefallback,texttemplate:NT({},_h.texttemplate,{}),texttemplatefallback:_h.texttemplatefallback,textfont:NT({},_h.textfont,{}),hoverongaps:_h.hoverongaps,connectgaps:NT({},_h.connectgaps,{}),fillcolor:{valType:\"color\",editType:\"calc\"},autocontour:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"contours.start\":void 0,\"contours.end\":void 0,\"contours.size\":void 0}},ncontours:{valType:\"integer\",dflt:15,min:1,editType:\"calc\"},contours:{type:{valType:\"enumerated\",values:[\"levels\",\"constraint\"],dflt:\"levels\",editType:\"calc\"},start:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},end:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},coloring:{valType:\"enumerated\",values:[\"fill\",\"heatmap\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:{valType:\"boolean\",dflt:!0,editType:\"plot\"},showlabels:{valType:\"boolean\",dflt:!1,editType:\"plot\"},labelfont:Sbt({editType:\"plot\",colorEditType:\"style\"}),labelformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:wbt(\"contour label\")},operation:{valType:\"enumerated\",values:[].concat(Mbt).concat(Ebt),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:NT({},Yxe.color,{editType:\"style+colorbars\"}),width:{valType:\"number\",min:0,editType:\"style+colorbars\"},dash:Abt,smoothing:NT({},Yxe.smoothing,{}),editType:\"plot\"},zorder:E8.zorder},Tbt(\"\",{cLetter:\"z\",autoColorDflt:!1,editTypeOverride:\"calc\"}))});var mG=ye((mcr,ebe)=>{\"use strict\";var wv=S8(),Bm=O4(),kbt=Tu(),gG=df().axisHoverFormat,Qxe=Ao().extendFlat;ebe.exports=Qxe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Bm.autocontour,ncontours:Bm.ncontours,contours:Bm.contours,line:{color:Bm.line.color,width:Qxe({},Bm.line.width,{dflt:.5}),dash:Bm.line.dash,smoothing:Bm.line.smoothing,editType:\"plot\"},xhoverformat:gG(\"x\"),yhoverformat:gG(\"y\"),zhoverformat:gG(\"z\",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Bm.texttemplate,texttemplatefallback:Bm.texttemplatefallback,textfont:Bm.textfont},kbt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var k8=ye((ycr,tbe)=>{\"use strict\";tbe.exports=function(t,r,n,i){var a=i(\"contours.start\"),o=i(\"contours.end\"),s=a===!1||o===!1,l=n(\"contours.size\"),u;s?u=r.autocontour=!0:u=n(\"autocontour\",!1),(u||!l)&&n(\"ncontours\")}});var yG=ye((_cr,rbe)=>{\"use strict\";var Cbt=Dr();rbe.exports=function(t,r,n,i){i||(i={});var a=t(\"contours.showlabels\");if(a){var o=r.font;Cbt.coerceFont(t,\"contours.labelfont\",o,{overrideDflt:{color:n}}),t(\"contours.labelformat\")}i.hasHover!==!1&&t(\"zhoverformat\")}});var C8=ye((xcr,ibe)=>{\"use strict\";var Lbt=td(),Pbt=yG();ibe.exports=function(t,r,n,i,a){var o=n(\"contours.coloring\"),s,l=\"\";o===\"fill\"&&(s=n(\"contours.showlines\")),s!==!1&&(o!==\"lines\"&&(l=n(\"line.color\",\"#000\")),n(\"line.width\",.5),n(\"line.dash\")),o!==\"none\"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Lbt(t,r,i,n,{prefix:\"\",cLetter:\"z\"})),n(\"line.smoothing\"),Pbt(n,i,l,a)}});var sbe=ye((bcr,obe)=>{\"use strict\";var nbe=Dr(),Ibt=vG(),Rbt=k8(),Dbt=C8(),Fbt=I4(),abe=mG();obe.exports=function(t,r,n,i){function a(s,l){return nbe.coerce(t,r,abe,s,l)}function o(s){return nbe.coerce2(t,r,abe,s)}Ibt(t,r,a,i),r.visible!==!1&&(Rbt(t,r,a,o),Dbt(t,r,a,i),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),r.contours&&r.contours.coloring===\"heatmap\"&&Fbt(a,i))}});var bG=ye((wcr,ube)=>{\"use strict\";var xG=ho(),_G=Dr();ube.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=_G.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=_G.aggNums(Math.max,null,r));var o=lbe(i,a,t.ncontours);n.size=o.dtick,n.start=xG.tickFirst(o),o.range.reverse(),n.end=xG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),_G.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!==\"constraint\"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=lbe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function lbe(e,t,r){var n={type:\"linear\",range:[e,t]};return xG.autoTicks(n,(t-e)/(r||15)),n}});var q4=ye((Tcr,cbe)=>{\"use strict\";cbe.exports=function(t){return t.end+t.size/1e6}});var wG=ye((Acr,hbe)=>{\"use strict\";var fbe=tc(),zbt=v8(),Obt=bG(),qbt=q4();hbe.exports=function(t,r){var n=zbt(t,r),i=n[0].z;Obt(r,i);var a=r.contours,o=fbe.extractOpts(r),s;if(a.coloring===\"heatmap\"&&o.auto&&r.autocontour===!1){var l=a.start,u=qbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return fbe.calc(t,r,{vals:s,cLetter:\"z\"}),n}});var B4=ye((Scr,dbe)=>{\"use strict\";dbe.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}}});var TG=ye((Mcr,vbe)=>{\"use strict\";var L8=B4();vbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;s<n-1;s++)for(u=[],s===0&&(u=u.concat(L8.BOTTOMSTART)),s===n-2&&(u=u.concat(L8.TOPSTART)),o=0;o<i-1;o++)for(l=u.slice(),o===0&&(l=l.concat(L8.LEFTSTART)),o===i-2&&(l=l.concat(L8.RIGHTSTART)),c=o+\",\"+s,f=[[r[s][o],r[s][o+1]],[r[s+1][o],r[s+1][o+1]]],v=0;v<t.length;v++)d=t[v],h=Bbt(d.level,f),h&&(d.crossings[c]=h,l.indexOf(h)!==-1&&(d.starts.push([o,s]),a&&l.indexOf(h,l.indexOf(h)+1)!==-1&&d.starts.push([o,s])))};function Bbt(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var AG=ye((Ecr,mbe)=>{\"use strict\";var P8=Dr(),UT=B4();mbe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o<t.length;o++){for(s=t[o],l=0;l<s.starts.length;l++)a=s.starts[l],pbe(s,a,\"edge\",r,n);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,a=Object.keys(s.crossings)[0].split(\",\").map(Number),pbe(s,a,void 0,r,n);i===1e4&&P8.log(\"Infinite loop in contour?\")}};function N4(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function Nbt(e,t){var r=e[2]-t[2],n=e[3]-t[3];return Math.sqrt(r*r+n*n)}function pbe(e,t,r,n,i){var a=t.join(\",\"),o=e.crossings[a],s=Ubt(o,r,t),l=[gbe(e,t,[-s[0],-s[1]])],u=e.z.length,c=e.z[0].length,f=t.slice(),h=s.slice(),d;for(d=0;d<1e4;d++){if(o>20?(o=UT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=UT.SADDLEREMAINDER[o]):delete e.crossings[a],s=UT.NEWDELTA[o],!s){P8.log(\"Found bad marching index:\",o,t,e.level);break}l.push(gbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(\",\"),N4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),_=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(_||r&&v)break;o=e.crossings[a]}d===1e4&&P8.log(\"Infinite loop in contour?\");var b=N4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,E=[],T=0,L,x,C,M,g,P,A,z,O,U,G;for(d=1;d<l.length;d++)A=Nbt(l[d],l[d-1]),p+=A,E.push(A);var Z=p/E.length*k;function j(re){return l[re%l.length]}for(d=l.length-2;d>=T;d--)if(L=E[d],L<Z){for(C=0,x=d-1;x>=T&&L+E[x]<Z;x--)L+=E[x];if(b&&d===l.length-2)for(C=0;C<x&&L+E[C]<Z;C++)L+=E[C];g=d-x+C+1,P=Math.floor((d+x+C+2)/2),!b&&d===l.length-2?M=l[l.length-1]:!b&&x===-1?M=l[0]:g%2?M=j(P):M=[(j(P)[0]+j(P+1)[0])/2,(j(P)[1]+j(P+1)[1])/2],l.splice(x+1,d-x+1,M),d=x+1,C&&(T=C),b&&(d===l.length-2?l[C]=l[l.length-1]:d===0&&(l[l.length-1]=l[0]))}for(l.splice(0,T),d=0;d<l.length;d++)l[d].length=2;if(!(l.length<2))if(b)l.pop(),e.paths.push(l);else{r||P8.log(\"Unclosed interior contour?\",e.level,f.join(\",\"),l.join(\"L\"));var N=!1;for(z=0;z<e.edgepaths.length;z++)if(U=e.edgepaths[z],!N&&N4(U[0],l[l.length-1],n,i)){l.pop(),N=!0;var H=!1;for(O=0;O<e.edgepaths.length;O++)if(G=e.edgepaths[O],N4(G[G.length-1],l[0],n,i)){H=!0,l.shift(),e.edgepaths.splice(z,1),O===z?e.paths.push(l.concat(G)):(O>z&&O--,e.edgepaths[O]=G.concat(l,U));break}H||(e.edgepaths[z]=l.concat(U))}for(z=0;z<e.edgepaths.length&&!N;z++)U=e.edgepaths[z],N4(U[U.length-1],l[0],n,i)&&(l.shift(),e.edgepaths[z]=U.concat(l),N=!0);N||e.edgepaths.push(l)}}function Ubt(e,t,r){var n=0,i=0;return e>20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:UT.BOTTOMSTART.indexOf(e)!==-1?i=1:UT.LEFTSTART.indexOf(e)!==-1?n=1:UT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function gbe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var bbe=ye((kcr,xbe)=>{\"use strict\";var SG=M8(),Vbt=Eo();xbe.exports={\"[]\":ybe(\"[]\"),\"][\":ybe(\"][\"),\">\":MG(\">\"),\"<\":MG(\"<\"),\"=\":MG(\"=\")};function _be(e,t){var r=Array.isArray(t),n;function i(a){return Vbt(a)?+a:null}return SG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):SG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:SG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function ybe(e){return function(t){t=_be(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function MG(e){return function(t){return t=_be(e,t),{start:t,end:1/0,size:1/0}}}});var EG=ye((Ccr,Tbe)=>{\"use strict\";var wbe=Dr(),Gbt=bbe(),Hbt=q4();Tbe.exports=function(t,r,n){for(var i=t.type===\"constraint\"?Gbt[t._operation](t.value):t,a=i.size,o=[],s=Hbt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c<s;c+=a)if(o.push(wbe.extendFlat({level:c,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},u)),o.length>1e3){wbe.warn(\"Too many contours, clipping at 1000\",t);break}return o}});var kG=ye((Lcr,Sbe)=>{\"use strict\";var VT=Dr();Sbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case\"=\":case\"<\":return e;case\">\":for(e.length!==1&&VT.warn(\"Contour data invalid for the specified inequality operation.\"),n=e[0],r=0;r<n.edgepaths.length;r++)n.edgepaths[r]=a(n.edgepaths[r]);for(r=0;r<n.paths.length;r++)n.paths[r]=a(n.paths[r]);for(r=0;r<n.starts.length;r++)n.starts[r]=a(n.starts[r]);return e;case\"][\":var s=a;a=o,o=s;case\"[]\":for(e.length!==2&&VT.warn(\"Contour data invalid for the specified inequality range operation.\"),n=Abe(e[0]),i=Abe(e[1]),r=0;r<n.edgepaths.length;r++)n.edgepaths[r]=a(n.edgepaths[r]);for(r=0;r<n.paths.length;r++)n.paths[r]=a(n.paths[r]);for(r=0;r<n.starts.length;r++)n.starts[r]=a(n.starts[r]);for(;i.edgepaths.length;)n.edgepaths.push(o(i.edgepaths.shift()));for(;i.paths.length;)n.paths.push(o(i.paths.shift()));for(;i.starts.length;)n.starts.push(o(i.starts.shift()));return[n]}};function Abe(e){return VT.extendFlat({},e,{edgepaths:VT.extendDeep([],e.edgepaths),paths:VT.extendDeep([],e.paths),starts:VT.extendDeep([],e.starts)})}});var CG=ye((Pcr,Mbe)=>{\"use strict\";Mbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case\"levels\":var a=Math.min(n[0][0],n[0][1]);for(i=0;i<e.length;i++){var o=e[i];o.prefixBoundary=!o.edgepaths.length&&(a>o.level||o.starts.length&&a===o.level)}break;case\"constraint\":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i<l;i++)c=Math.min(c,n[i][0]),c=Math.min(c,n[i][s-1]),u=Math.max(u,n[i][0]),u=Math.max(u,n[i][s-1]);for(i=1;i<s-1;i++)c=Math.min(c,n[0][i]),c=Math.min(c,n[l-1][i]),u=Math.max(u,n[0][i]),u=Math.max(u,n[l-1][i]);var f=t.value,h,d;switch(t._operation){case\">\":f>u&&(r.prefixBoundary=!0);break;case\"<\":(f<c||r.starts.length&&f===c)&&(r.prefixBoundary=!0);break;case\"[]\":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),(d<c||h>u||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case\"][\":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),h<c&&d>u&&(r.prefixBoundary=!0);break}break}}});var I8=ye(jv=>{\"use strict\";var V4=Oa(),Fd=Dr(),jy=So(),jbt=tc(),Cbe=Zl(),Ebe=ho(),kbe=xm(),Wbt=m8(),Lbe=TG(),Pbe=AG(),Xbt=EG(),Zbt=kG(),Ibe=CG(),U4=B4(),Nm=U4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Fd.makeTraceGroups(i,n,\"contour\").each(function(s){var l=V4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=Xbt(d,r,u),_=Fd.ensureSingle(l,\"g\",\"heatmapcoloring\"),b=[];d.coloring===\"heatmap\"&&(b=[s]),Wbt(t,r,b,_),Lbe(v),Pbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),E=o.c2p(h[0],!0),T=o.c2p(h[h.length-1],!0),L=[[p,T],[k,T],[k,E],[p,E]],x=v;d.type===\"constraint\"&&(x=Zbt(v,d._operation)),Ybt(l,L,d),Kbt(l,x,L,d),Jbt(l,v,t,u,d),Qbt(l,r,t,u,L)})};function Ybt(e,t,r){var n=Fd.ensureSingle(e,\"g\",\"contourbg\"),i=n.selectAll(\"path\").data(r.coloring===\"fill\"?[0]:[]);i.enter().append(\"path\"),i.exit().remove(),i.attr(\"d\",\"M\"+t.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}function Kbt(e,t,r,n){var i=n.coloring===\"fill\"||n.type===\"constraint\"&&n._operation!==\"=\",a=\"M\"+r.join(\"L\")+\"Z\";i&&Ibe(t,n);var o=Fd.ensureSingle(e,\"g\",\"contourfill\"),s=o.selectAll(\"path\").data(i?t:[]);s.enter().append(\"path\"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:\"\")+Rbe(l,r);u?V4.select(this).attr(\"d\",u).style(\"stroke\",\"none\"):V4.select(this).remove()})}function Rbe(e,t){var r=\"\",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function _(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=jy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,\"L\"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){Fd.log(\"Missing end?\",n,e);break}for(h(o)&&!_(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:_(o)&&(s=t[2]),c=0;c<e.edgepaths.length;c++){var b=e.edgepaths[c][0];Math.abs(o[0]-s[0])<.01?Math.abs(o[0]-b[0])<.01&&(b[1]-o[1])*(s[1]-b[1])>=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):Fd.log(\"endpt to newendpt is not vert. or horz.\",o,s,b)}if(o=s,u>=0)break;r+=\"L\"+s}if(u===e.edgepaths.length){Fd.log(\"unclosed perimeter path\");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+=\"Z\")}for(n=0;n<e.paths.length;n++)r+=jy.smoothclosed(e.paths[n],e.smoothing);return r}function Jbt(e,t,r,n,i){var a=r._context.staticPlot,o=Fd.ensureSingle(e,\"g\",\"contourlines\"),s=i.showlines!==!1,l=i.showlabels,u=s&&l,c=jv.createLines(o,s||l,t,a),f=jv.createLineClip(o,u,r,n.trace.uid),h=e.selectAll(\"g.contourlabels\").data(l?[0]:[]);if(h.exit().remove(),h.enter().append(\"g\").classed(\"contourlabels\",!0),l){var d=[],v=[];Fd.clearLocationCache();var _=jv.labelFormatter(r,n),b=jy.tester.append(\"text\").attr(\"data-notex\",1).call(jy.font,i.labelfont),p=t[0].xaxis,k=t[0].yaxis,E=p._length,T=k._length,L=p.range,x=k.range,C=Fd.aggNums(Math.min,null,n.x),M=Fd.aggNums(Math.max,null,n.x),g=Fd.aggNums(Math.min,null,n.y),P=Fd.aggNums(Math.max,null,n.y),A=Math.max(p.c2p(C,!0),0),z=Math.min(p.c2p(M,!0),E),O=Math.max(k.c2p(P,!0),0),U=Math.min(k.c2p(g,!0),T),G={};L[0]<L[1]?(G.left=A,G.right=z):(G.left=z,G.right=A),x[0]<x[1]?(G.top=O,G.bottom=U):(G.top=U,G.bottom=O),G.middle=(G.top+G.bottom)/2,G.center=(G.left+G.right)/2,d.push([[G.left,G.top],[G.right,G.top],[G.right,G.bottom],[G.left,G.bottom]]);var Z=Math.sqrt(E*E+T*T),j=U4.LABELDISTANCE*Z/Math.max(1,t.length/U4.LABELINCREASE);c.each(function(N){var H=jv.calcTextOpts(N.level,_,b,r);V4.select(this).selectAll(\"path\").each(function(){var re=this,oe=Fd.getVisibleSegment(re,G,H.height/2);if(oe&&!(oe.len<(H.width+H.height)*U4.LABELMIN))for(var _e=Math.min(Math.ceil(oe.len/j),U4.LABELMAX),Ce=0;Ce<_e;Ce++){var Le=jv.findBestTextLocation(re,oe,H,v,G);if(!Le)break;jv.addLabelData(Le,H,v,d)}})}),b.remove(),jv.drawLabels(h,v,r,f,u?d:null)}l&&!s&&c.remove()}jv.createLines=function(e,t,r,n){var i=r[0].smoothing,a=e.selectAll(\"g.contourlevel\").data(t?r:[]);if(a.exit().remove(),a.enter().append(\"g\").classed(\"contourlevel\",!0),t){var o=a.selectAll(\"path.openline\").data(function(l){return l.pedgepaths||l.edgepaths});o.exit().remove(),o.enter().append(\"path\").classed(\"openline\",!0),o.attr(\"d\",function(l){return jy.smoothopen(l,i)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",n?\"none\":\"non-scaling-stroke\");var s=a.selectAll(\"path.closedline\").data(function(l){return l.ppaths||l.paths});s.exit().remove(),s.enter().append(\"path\").classed(\"closedline\",!0),s.attr(\"d\",function(l){return jy.smoothclosed(l,i)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",n?\"none\":\"non-scaling-stroke\")}return a};jv.createLineClip=function(e,t,r,n){var i=r._fullLayout._clips,a=t?\"clipline\"+n:null,o=i.selectAll(\"#\"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append(\"clipPath\").classed(\"contourlineclip\",!0).attr(\"id\",a),jy.setClipUrl(e,a,r),o};jv.labelFormatter=function(e,t){var r=e._fullLayout,n=t.trace,i=n.contours,a={type:\"linear\",_id:\"ycontour\",showexponent:\"all\",exponentformat:\"B\"};if(i.labelformat)a.tickformat=i.labelformat,kbe(a,r);else{var o=jbt.extractOpts(n);if(o&&o.colorbar&&o.colorbar._axis)a=o.colorbar._axis;else{if(i.type===\"constraint\"){var s=i.value;Fd.isArrayOrTypedArray(s)?a.range=[s[0],s[s.length-1]]:a.range=[s,s]}else a.range=[i.start,i.end],a.nticks=(i.end-i.start)/i.size;a.range[0]===a.range[1]&&(a.range[1]+=a.range[0]||1),a.nticks||(a.nticks=1e3),kbe(a,r),Ebe.prepTicks(a),a._tmin=null,a._tmax=null}}return function(l){return Ebe.tickText(a,l).text}};jv.calcTextOpts=function(e,t,r,n){var i=t(e);r.text(i).call(Cbe.convertToTspans,n);var a=r.node(),o=jy.bBox(a,!0);return{text:i,width:o.width,height:o.height,fontSize:+a.style[\"font-size\"].replace(\"px\",\"\"),level:e,dy:(o.top+o.bottom)/2}};jv.findBestTextLocation=function(e,t,r,n,i){var a=r.width,o,s,l,u,c;t.isClosed?(s=t.len/Nm.INITIALSEARCHPOINTS,o=t.min+s/2,l=t.max):(s=(t.len-a)/(Nm.INITIALSEARCHPOINTS+1),o=t.min+s+a/2,l=t.max-(s+a)/2);for(var f=1/0,h=0;h<Nm.ITERATIONS;h++){for(var d=o;d<l;d+=s){var v=Fd.getTextLocation(e,t.total,d,a),_=$bt(v,r,n,i);_<f&&(f=_,c=v,u=d)}if(f>Nm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Nm.MAXCOST)return c};function $bt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Nm.EDGECOST*(1/(f-1)+1/(h-1));d+=Nm.ANGLECOST*l*l;for(var v=o-u,_=s-c,b=o+u,p=s+c,k=0;k<r.length;k++){var E=r[k],T=Math.cos(E.theta)*E.width/2,L=Math.sin(E.theta)*E.width/2,x=Fd.segmentDistance(v,_,b,p,E.x-T,E.y-L,E.x+T,E.y+L)*2/(t.height+E.height),C=E.level===t.level,M=C?Nm.SAMELEVELDISTANCE:1;if(x<=M)return 1/0;var g=Nm.NEIGHBORCOST*(C?Nm.SAMELEVELFACTOR:1);d+=g/(x-M)}return d}jv.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,u=e.theta,c=Math.sin(u),f=Math.cos(u),h=function(v,_){return[s+v*f-_*c,l+v*c+_*f]},d=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:u,level:t.level,width:a,height:o}),n.push(d)};jv.drawLabels=function(e,t,r,n,i){var a=e.selectAll(\"text\").data(t,function(u){return u.text+\",\"+u.x+\",\"+u.y+\",\"+u.theta});if(a.exit().remove(),a.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each(function(u){var c=u.x+Math.sin(u.theta)*u.dy,f=u.y-Math.cos(u.theta)*u.dy;V4.select(this).text(u.text).attr({x:c,y:f,transform:\"rotate(\"+180*u.theta/Math.PI+\" \"+c+\" \"+f+\")\"}).call(Cbe.convertToTspans,r)}),i){for(var o=\"\",s=0;s<i.length;s++)o+=\"M\"+i[s].join(\"L\")+\"Z\";var l=Fd.ensureSingle(n,\"path\",\"\");l.attr(\"d\",o)}};function Qbt(e,t,r,n,i){var a=n.trace,o=r._fullLayout._clips,s=\"clip\"+a.uid,l=o.selectAll(\"#\"+s).data(a.connectgaps?[]:[0]);if(l.enter().append(\"clipPath\").classed(\"contourclip\",!0).attr(\"id\",s),l.exit().remove(),a.connectgaps===!1){var u={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:e2t(n),smoothing:0};Lbe([u]),Pbe([u]),Ibe([u],{type:\"levels\"});var c=Fd.ensureSingle(l,\"path\",\"\");c.attr(\"d\",(u.prefixBoundary?\"M\"+i.join(\"L\")+\"Z\":\"\")+Rbe(u,i))}else s=null;jy.setClipUrl(e,s,r)}function e2t(e){var t=e.trace._emptypoints,r=[],n=e.z.length,i=e.z[0].length,a,o=[],s;for(a=0;a<i;a++)o.push(1);for(a=0;a<n;a++)r.push(o.slice());for(a=0;a<t.length;a++)s=t[a],r[s[0]][s[1]]=0;return e.zmask=r,r}});var PG=ye((Rcr,Dbe)=>{\"use strict\";var t2t=Oa(),LG=tc(),r2t=q4();Dbe.exports=function(t){var r=t.contours,n=r.start,i=r2t(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring===\"lines\"?0:1,l=LG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?LG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,_=l.min,b=l.max;if(r.coloring===\"heatmap\"){for(v=0;v<c;v++)d=u[v],f[v]=d[0]*(b-_)+_,h[v]=d[1];var p=t2t.extent([_,b,r.start,r.start+a*(o-1)]),k=p[_<b?0:1],E=p[_<b?1:0];k!==_&&(f.splice(0,0,k),h.splice(0,0,h[0])),E!==b&&(f.push(E),h.push(h[h.length-1]))}else{var T=t._input&&typeof t._input.zmin==\"number\"&&typeof t._input.zmax==\"number\";for(T&&(n<=_||i>=b)&&(n<=_&&(n=_),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;v<c;v++)d=u[v],f[v]=(d[0]*(o+s-1)-s/2)*a+n,h[v]=d[1];(T||t.autocontour)&&(f[0]>_&&(f.unshift(_),h.unshift(h[0])),f[f.length-1]<b&&(f.push(b),h.push(h[h.length-1])))}return LG.makeColorScaleFunc({domain:f,range:h},{noNumericCheck:!0})}});var D8=ye((Dcr,zbe)=>{\"use strict\";var R8=Oa(),Fbe=So(),i2t=y8(),n2t=PG();zbe.exports=function(t){var r=R8.select(t).selectAll(\"g.contour\");r.style(\"opacity\",function(n){return n[0].trace.opacity}),r.each(function(n){var i=R8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type===\"constraint\",f=!c&&o.coloring===\"lines\",h=!c&&o.coloring===\"fill\",d=f||h?n2t(a):null;i.selectAll(\"g.contourlevel\").each(function(b){R8.select(this).selectAll(\"path\").call(Fbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll(\"g.contourlabels text\").each(function(b){Fbe.font(R8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll(\"g.contourfill path\").style(\"fill\",a.fillcolor);else if(h){var _;i.selectAll(\"g.contourfill path\").style(\"fill\",function(b){return _===void 0&&(_=b.level),d(b.level+.5*l)}),_===void 0&&(_=u),i.selectAll(\"g.contourbg path\").style(\"fill\",d(_-.5*l))}}),i2t(t)}});var F8=ye((Fcr,qbe)=>{\"use strict\";var Obe=tc(),a2t=PG(),o2t=q4();function s2t(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=a2t(t,{isColorbar:!0});if(o===\"heatmap\"){var l=Obe.extractOpts(t);r._fillgradient=l.reversescale?Obe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o===\"fill\"&&(r._fillcolor=s);r._line={color:o===\"lines\"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:o2t(n),size:a}}qbe.exports={min:\"zmin\",max:\"zmax\",calc:s2t}});var IG=ye((zcr,Bbe)=>{\"use strict\";var z8=ka(),l2t=x8();Bbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=l2t(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type===\"constraint\"&&(l.fillcolor&&z8.opacity(l.fillcolor)?s.color=z8.addOpacity(l.fillcolor,1):l.contours.showlines&&z8.opacity(l.line.color)&&(s.color=z8.addOpacity(l.line.color,1)))}),o}});var Ube=ye((Ocr,Nbe)=>{\"use strict\";Nbe.exports={attributes:mG(),supplyDefaults:sbe(),crossTraceDefaults:T8(),calc:wG(),plot:I8().plot,layerName:\"contourlayer\",style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:\"trace\",name:\"histogram2dcontour\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"histogram\",\"showLegend\"],meta:{}}});var Gbe=ye((qcr,Vbe)=>{\"use strict\";Vbe.exports=Ube()});var RG=ye((Bcr,Ybe)=>{\"use strict\";var Hbe=Eo(),u2t=yG(),Xbe=ka(),jbe=Xbe.addOpacity,c2t=Xbe.opacity,Zbe=M8(),Wbe=Dr().isArrayOrTypedArray,f2t=Zbe.CONSTRAINT_REDUCTION,h2t=Zbe.COMPARISON_OPS2;Ybe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n(\"contours.operation\");if(s._operation=f2t[f],d2t(n,s),f===\"=\"?l=s.showlines=!0:(l=n(\"contours.showlines\"),c=n(\"fillcolor\",jbe((t.line||{}).color||a,.5))),l){var h=c&&c2t(c)?jbe(r.fillcolor,1):a;u=n(\"line.color\",h),n(\"line.width\",2),n(\"line.dash\")}n(\"line.smoothing\"),u2t(n,i,u,o)};function d2t(e,t){var r;h2t.indexOf(t.operation)===-1?(e(\"contours.value\",[0,1]),Wbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Hbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e(\"contours.value\",0),Hbe(t.value)||(Wbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var $be=ye((Ncr,Jbe)=>{\"use strict\";var DG=Dr(),v2t=n8(),p2t=Dg(),g2t=RG(),m2t=k8(),y2t=C8(),_2t=I4(),Kbe=O4();Jbe.exports=function(t,r,n,i){function a(u,c){return DG.coerce(t,r,Kbe,u,c)}function o(u){return DG.coerce2(t,r,Kbe,u)}var s=v2t(t,r,a,i);if(!s){r.visible=!1;return}p2t(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"text\"),a(\"hovertext\"),a(\"hoverongaps\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var l=a(\"contours.type\")===\"constraint\";a(\"connectgaps\",DG.isArray1D(r.z)),l?g2t(t,r,a,i,n):(m2t(t,r,a,o),y2t(t,r,a,i)),r.contours&&r.contours.coloring===\"heatmap\"&&_2t(a,i),a(\"zorder\")}});var e2e=ye((Ucr,Qbe)=>{\"use strict\";Qbe.exports={attributes:O4(),supplyDefaults:$be(),calc:wG(),plot:I8().plot,style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:\"trace\",name:\"contour\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"contour\",\"showLegend\"],meta:{}}});var r2e=ye((Vcr,t2e)=>{\"use strict\";t2e.exports=e2e()});var FG=ye((Gcr,o2e)=>{\"use strict\";var{hovertemplateAttrs:x2t,texttemplateAttrs:b2t,templatefallbackAttrs:i2e}=Ll(),w2t=Pg(),o0=pf(),T2t=Gl(),n2e=Tu(),A2t=Pd().dash,F_=Ao().extendFlat,X0=o0.marker,G4=o0.line,a2e=X0.line;o2e.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:F_({},o0.mode,{dflt:\"markers\"}),text:F_({},o0.text,{}),texttemplate:b2t({editType:\"plot\"},{keys:[\"a\",\"b\",\"c\",\"text\"]}),texttemplatefallback:i2e({editType:\"plot\"}),hovertext:F_({},o0.hovertext,{}),line:{color:G4.color,width:G4.width,dash:A2t,backoff:G4.backoff,shape:F_({},G4.shape,{values:[\"linear\",\"spline\"]}),smoothing:G4.smoothing,editType:\"calc\"},connectgaps:o0.connectgaps,cliponaxis:o0.cliponaxis,fill:F_({},o0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:w2t(),marker:F_({symbol:X0.symbol,opacity:X0.opacity,angle:X0.angle,angleref:X0.angleref,standoff:X0.standoff,maxdisplayed:X0.maxdisplayed,size:X0.size,sizeref:X0.sizeref,sizemin:X0.sizemin,sizemode:X0.sizemode,line:F_({width:a2e.width,dash:a2e.dash,editType:\"calc\"},n2e(\"marker.line\")),gradient:X0.gradient,editType:\"calc\"},n2e(\"marker\")),textfont:o0.textfont,textposition:o0.textposition,selected:o0.selected,unselected:o0.unselected,hoverinfo:F_({},T2t.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:o0.hoveron,hovertemplate:x2t(),hovertemplatefallback:i2e()}});var c2e=ye((Hcr,u2e)=>{\"use strict\";var s2e=Dr(),S2t=Lm(),GT=Ru(),M2t=$p(),E2t=D0(),l2e=sT(),k2t=F0(),C2t=Fg(),L2t=FG();u2e.exports=function(t,r,n,i){function a(h,d){return s2e.coerce(t,r,L2t,h,d)}var o=a(\"a\"),s=a(\"b\"),l=a(\"c\"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a(\"sum\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&(a(\"hovertemplate\"),a(\"hovertemplatefallback\"));var c=u<S2t.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"mode\",c),GT.hasMarkers(r)&&M2t(t,r,n,i,a,{gradient:!0}),GT.hasLines(r)&&(E2t(t,r,n,i,a,{backoff:!0}),l2e(t,r,a),a(\"connectgaps\")),GT.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),k2t(t,r,i,a));var f=[];(GT.hasMarkers(r)||GT.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),f.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(C2t(t,r,n,a),GT.hasLines(r)||l2e(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&f.push(\"fills\"),a(\"hoveron\",f.join(\"+\")||\"points\"),s2e.coerceSelectionMarkerOpacity(r,a)}});var h2e=ye((jcr,f2e)=>{\"use strict\";var zG=ho();f2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zG.tickText(a.aaxis,t.a,!0).text,i.bLabel=zG.tickText(a.baxis,t.b,!0).text,i.cLabel=zG.tickText(a.caxis,t.c,!0).text,i}});var g2e=ye((Wcr,p2e)=>{\"use strict\";var OG=Eo(),P2t=z0(),I2t=Rm(),R2t=O0(),D2t=q0().calcMarkerSize,d2e=[\"a\",\"b\",\"c\"],v2e={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};p2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l<d2e.length;l++)if(c=d2e[l],!o[c]){for(h=o[v2e[c][0]],d=o[v2e[c][1]],f=new Array(h.length),u=0;u<h.length;u++)f[u]=a-h[u]-d[u];o[c]=f}var v=r._length,_=new Array(v),b,p,k,E,T,L;for(l=0;l<v;l++)b=o.a[l],p=o.b[l],k=o.c[l],OG(b)&&OG(p)&&OG(k)?(b=+b,p=+p,k=+k,E=i/(b+p+k),E!==1&&(b*=E,p*=E,k*=E),L=b,T=k-p,_[l]={x:T,y:L,a:b,b:p,c:k},s&&(_[l].id=s[l])):_[l]={x:!1,y:!1};return D2t(r,v),P2t(t,r),I2t(_,r),R2t(_,r),_}});var y2e=ye((Xcr,m2e)=>{\"use strict\";var F2t=dT();m2e.exports=function(t,r,n){var i=r.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select(\"g.scatterlayer\"),u=0;u<n.length;u++){var c=n[u];c.length&&(c[0].trace._xA=a,c[0].trace._yA=o)}F2t(t,s,n,l)}});var x2e=ye((Zcr,_2e)=>{\"use strict\";var z2t=mT();_2e.exports=function(t,r,n,i){var a=z2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var _=h._module.formatLabels(f,h,v);o.aLabel=_.aLabel,o.bLabel=_.bLabel,o.cLabel=_.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(T,L){p.push(T._hovertitle+\": \"+L)}if(!h.hovertemplate){var E=b.split(\"+\");E.indexOf(\"all\")!==-1&&(E=[\"a\",\"b\",\"c\"]),E.indexOf(\"a\")!==-1&&k(d.aaxis,o.aLabel),E.indexOf(\"b\")!==-1&&k(d.baxis,o.bLabel),E.indexOf(\"c\")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join(\"<br>\"),o.hovertemplate=h.hovertemplate,a}});var w2e=ye((Ycr,b2e)=>{\"use strict\";b2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var R2e=ye((Kcr,I2e)=>{\"use strict\";var k2e=Oa(),O2t=fd(),qG=qa(),Wy=Dr(),Um=Wy.strTranslate,O8=Wy._,jT=ka(),q8=So(),H4=xm(),BG=Ao().extendFlat,q2t=Mc(),z_=ho(),T2e=yv(),A2e=vf(),C2e=Cg(),S2e=C2e.freeMode,B2t=C2e.rectMode,NG=zb(),N2t=Of().prepSelect,U2t=Of().selectOnClick,V2t=Of().clearOutline,G2t=Of().clearSelectionsCache,L2e=Rh();function P2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}I2e.exports=P2e;var Vm=P2e.prototype;Vm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){r._hasClipOnAxisFalse=!0;break}}r.updateLayers(n),r.adjustLayout(n,i),q2t.generalUpdatePerTraceModule(r.graphDiv,r,e,n),r.layers.plotbg.select(\"path\").call(jT.fill,n.bgcolor)};Vm.makeFramework=function(e){var t=this,r=t.graphDiv,n=e[t.id],i=t.clipId=\"clip\"+t.layoutId+t.id,a=t.clipIdRelative=\"clip-relative\"+t.layoutId+t.id;t.clipDef=Wy.ensureSingleById(e._clips,\"clipPath\",i,function(o){o.append(\"path\").attr(\"d\",\"M0,0Z\")}),t.clipDefRelative=Wy.ensureSingleById(e._clips,\"clipPath\",a,function(o){o.append(\"path\").attr(\"d\",\"M0,0Z\")}),t.plotContainer=Wy.ensureSingle(t.container,\"g\",t.id),t.updateLayers(n),q8.setClipUrl(t.layers.backplot,i,r),q8.setClipUrl(t.layers.grids,i,r)};Vm.updateFx=function(e){e._ternarylayer.selectAll(\"g.toplevel\").style(\"cursor\",e.dragmode===\"pan\"?\"move\":\"crosshair\")};Vm.updateLayers=function(e){var t=this,r=t.layers,n=[\"draglayer\",\"plotbg\",\"backplot\",\"grids\"];e.aaxis.layer===\"below traces\"&&n.push(\"aaxis\",\"aline\"),e.baxis.layer===\"below traces\"&&n.push(\"baxis\",\"bline\"),e.caxis.layer===\"below traces\"&&n.push(\"caxis\",\"cline\"),n.push(\"frontplot\"),e.aaxis.layer===\"above traces\"&&n.push(\"aaxis\",\"aline\"),e.baxis.layer===\"above traces\"&&n.push(\"baxis\",\"bline\"),e.caxis.layer===\"above traces\"&&n.push(\"caxis\",\"cline\");var i=t.plotContainer.selectAll(\"g.toplevel\").data(n,String),a=[\"agrid\",\"bgrid\",\"cgrid\"];i.enter().append(\"g\").attr(\"class\",function(o){return\"toplevel \"+o}).each(function(o){var s=k2e.select(this);r[o]=s,o===\"frontplot\"?s.append(\"g\").classed(\"scatterlayer\",!0):o===\"backplot\"?s.append(\"g\").classed(\"maplayer\",!0):o===\"plotbg\"?s.append(\"path\").attr(\"d\",\"M0,0Z\"):o===\"aline\"||o===\"bline\"||o===\"cline\"?s.append(\"path\"):o===\"grids\"&&a.forEach(function(l){r[l]=s.append(\"g\").classed(\"grid \"+l,!0)})}),i.order()};var HT=Math.sqrt(4/3);Vm.adjustLayout=function(e,t){var r=this,n=e.domain,i=(n.x[0]+n.x[1])/2,a=(n.y[0]+n.y[1])/2,o=n.x[1]-n.x[0],s=n.y[1]-n.y[0],l=o*t.w,u=s*t.h,c=e.sum,f=e.aaxis.min,h=e.baxis.min,d=e.caxis.min,v,_,b,p,k,E;l>HT*u?(p=u,b=p*HT):(b=l,p=b/HT),k=o*b/l,E=s*p/u,v=t.l+t.w*i-b/2,_=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=_,r.w=b,r.h=p,r.sum=c,r.xaxis={type:\"linear\",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:\"x\"},H4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:\"linear\",range:[f,c-h-d],domain:[a-E/2,a+E/2],_id:\"y\"},H4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var T=r.yaxis.domain[0],L=r.aaxis=BG({},e.aaxis,{range:[f,c-h-d],side:\"left\",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+E*HT],anchor:\"free\",position:0,_id:\"y\",_length:b});H4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=BG({},e.baxis,{range:[c-f-d,h],side:\"bottom\",domain:r.xaxis.domain,anchor:\"free\",position:0,_id:\"x\",_length:b});H4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=BG({},e.caxis,{range:[c-f-h,d],side:\"right\",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+E*HT],anchor:\"free\",position:0,_id:\"y\",_length:b});H4(C,r.graphDiv._fullLayout),C.setScale();var M=\"M\"+v+\",\"+(_+p)+\"h\"+b+\"l-\"+b/2+\",-\"+p+\"Z\";r.clipDef.select(\"path\").attr(\"d\",M),r.layers.plotbg.select(\"path\").attr(\"d\",M);var g=\"M0,\"+p+\"h\"+b+\"l-\"+b/2+\",-\"+p+\"Z\";r.clipDefRelative.select(\"path\").attr(\"d\",g);var P=Um(v,_);r.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",P),r.clipDefRelative.select(\"path\").attr(\"transform\",null);var A=Um(v-x._offset,_+p);r.layers.baxis.attr(\"transform\",A),r.layers.bgrid.attr(\"transform\",A);var z=Um(v+b/2,_)+\"rotate(30)\"+Um(0,-L._offset);r.layers.aaxis.attr(\"transform\",z),r.layers.agrid.attr(\"transform\",z);var O=Um(v+b/2,_)+\"rotate(-30)\"+Um(0,-C._offset);r.layers.caxis.attr(\"transform\",O),r.layers.cgrid.attr(\"transform\",O),r.drawAxes(!0),r.layers.aline.select(\"path\").attr(\"d\",L.showline?\"M\"+v+\",\"+(_+p)+\"l\"+b/2+\",-\"+p:\"M0,0\").call(jT.stroke,L.linecolor||\"#000\").style(\"stroke-width\",(L.linewidth||0)+\"px\"),r.layers.bline.select(\"path\").attr(\"d\",x.showline?\"M\"+v+\",\"+(_+p)+\"h\"+b:\"M0,0\").call(jT.stroke,x.linecolor||\"#000\").style(\"stroke-width\",(x.linewidth||0)+\"px\"),r.layers.cline.select(\"path\").attr(\"d\",C.showline?\"M\"+(v+b/2)+\",\"+_+\"l\"+b/2+\",\"+p:\"M0,0\").call(jT.stroke,C.linecolor||\"#000\").style(\"stroke-width\",(C.linewidth||0)+\"px\"),r.graphDiv._context.staticPlot||r.initInteractions(),q8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Vm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+\"title\",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks===\"outside\"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks===\"outside\"?o.ticklen:0)+3;i[\"a-title\"]=NG.draw(r,\"a\"+n,{propContainer:a,propName:t.id+\".aaxis.title.text\",placeholder:O8(r,\"Click to enter Component A title\"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,\"text-anchor\":\"middle\"}}),i[\"b-title\"]=NG.draw(r,\"b\"+n,{propContainer:o,propName:t.id+\".baxis.title.text\",placeholder:O8(r,\"Click to enter Component B title\"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,\"text-anchor\":\"middle\"}}),i[\"c-title\"]=NG.draw(r,\"c\"+n,{propContainer:s,propName:t.id+\".caxis.title.text\",placeholder:O8(r,\"Click to enter Component C title\"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,\"text-anchor\":\"middle\"}})}};Vm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+\"tickLayout\",u=H2t(e);t[l]!==u&&(o.selectAll(\".\"+a+\"tick\").remove(),t[l]=u),e.setScale();var c=z_.calcTicks(e),f=z_.clipEnds(e,c),h=z_.makeTransTickFn(e),d=z_.getTickSigns(e)[2],v=Wy.deg2rad(s),_=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,E=i===\"b\"?\"M0,\"+_+\"l\"+Math.sin(v)*b+\",\"+Math.cos(v)*b:\"M\"+_+\",0l\"+Math.cos(v)*b+\",\"+-Math.sin(v)*b,T={a:\"M0,0l\"+k+\",-\"+p/2,b:\"M0,0l-\"+p/2+\",-\"+k,c:\"M0,0l-\"+k+\",\"+p/2}[i];z_.drawTicks(r,e,{vals:e.ticks===\"inside\"?f:c,layer:o,path:E,transFn:h,crisp:!1}),z_.drawGrid(r,e,{vals:f,layer:t.layers[i+\"grid\"],path:T,transFn:h,crisp:!1}),z_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:z_.makeLabelFns(e,0,s)})};function H2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=L2e.MINZOOM/2+.87,j2t=\"m-0.87,.5h\"+yd+\"v3h-\"+(yd+5.2)+\"l\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l2.6,1.5l-\"+yd/2+\",\"+yd*.87+\"Z\",W2t=\"m0.87,.5h-\"+yd+\"v3h\"+(yd+5.2)+\"l-\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l-2.6,1.5l\"+yd/2+\",\"+yd*.87+\"Z\",X2t=\"m0,1l\"+yd/2+\",\"+yd*.87+\"l2.6,-1.5l-\"+(yd/2+2.6)+\",-\"+(yd*.87+4.5)+\"l-\"+(yd/2+2.6)+\",\"+(yd*.87+4.5)+\"l2.6,1.5l\"+yd/2+\",-\"+yd*.87+\"Z\",Z2t=\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\",M2e=!0;Vm.clearOutline=function(){G2t(this.dragOptions),V2t(this.dragOptions.gd)};Vm.initInteractions=function(){var e=this,t=e.layers.plotbg.select(\"path\").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(A,z,O){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var U=e.dragOptions.dragmode=r._fullLayout.dragmode;S2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U===\"zoom\"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(A,z,O)):U===\"pan\"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(B2t(U)||S2e(U))&&N2t(A,z,O,e.dragOptions,U)}};var o,s,l,u,c,f,h,d,v,_;function b(A){var z={};return z[e.id+\".aaxis.min\"]=A.a,z[e.id+\".baxis.min\"]=A.b,z[e.id+\".caxis.min\"]=A.c,z}function p(A,z){var O=r._fullLayout.clickmode;E2e(r),A===2&&(r.emit(\"plotly_doubleclick\",null),qG.call(\"_guiRelayout\",r,b({a:0,b:0,c:0}))),O.indexOf(\"select\")>-1&&A===1&&U2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),O.indexOf(\"event\")>-1&&A2e.click(r,z,e.id)}function k(A,z,O){var U=t.getBoundingClientRect();o=z-U.left,s=O-U.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=Wy.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=O2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h=\"M0,\"+e.h+\"L\"+e.w/2+\", 0L\"+e.w+\",\"+e.h+\"Z\",d=!1,v=n.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",Um(e.x0,e.y0)).style({fill:f>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",h),_=n.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",Um(e.x0,e.y0)).style({fill:jT.background,stroke:jT.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),e.clearOutline(r)}function E(A,z){return 1-z/e.h}function T(A,z){return 1-(A+(e.h-z)/Math.sqrt(3))/e.w}function L(A,z){return(A-(e.h-z)/Math.sqrt(3))/e.w}function x(A,z){var O=o+A*i,U=s+z*a,G=Math.max(0,Math.min(1,E(o,s),E(O,U))),Z=Math.max(0,Math.min(1,T(o,s),T(O,U))),j=Math.max(0,Math.min(1,L(o,s),L(O,U))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,re=(N+H)/2,oe=H-N,_e=(1-G)*e.h,Ce=_e-oe/HT;oe<L2e.MINZOOM?(c=l,v.attr(\"d\",h),_.attr(\"d\",\"M0,0Z\")):(c={a:l.a+G*u,b:l.b+Z*u,c:l.c+j*u},v.attr(\"d\",h+\"M\"+N+\",\"+_e+\"H\"+H+\"L\"+re+\",\"+Ce+\"L\"+N+\",\"+_e+\"Z\"),_.attr(\"d\",\"M\"+o+\",\"+s+Z2t+\"M\"+N+\",\"+_e+j2t+\"M\"+H+\",\"+_e+W2t+\"M\"+re+\",\"+Ce+X2t)),d||(v.transition().style(\"fill\",f>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),_.transition().style(\"opacity\",1).duration(200),d=!0),r.emit(\"plotly_relayouting\",b(c))}function C(){E2e(r),c!==l&&(qG.call(\"_guiRelayout\",r,b(c)),M2e&&r.data&&r._context.showTips&&(Wy.notifier(O8(r,\"Double-click to zoom back out\"),\"long\"),M2e=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(A,z){var O=A/e.xaxis._m,U=z/e.yaxis._m;c={a:l.a-U,b:l.b+(O+U)/2,c:l.c-(O-U)/2};var G=[c.a,c.b,c.c].sort(Wy.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,A=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Um(e.x0+A,e.y0+z);e.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",j);var N=Um(-A,-z);e.clipDefRelative.select(\"path\").attr(\"transform\",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(q8.hideOutsideRangePoints,e),r.emit(\"plotly_relayouting\",b(c))}function P(){qG.call(\"_guiRelayout\",r,b(c))}t.onmousemove=function(A){A2e.hover(r,A,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(A){r._dragging||T2e.unhover(r,A)},T2e.init(this.dragOptions)};function E2e(e){k2e.select(e).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}});var GG=ye((Jcr,D2e)=>{\"use strict\";var Y2t=Ih(),K2t=Cc().attributes,su=Rd(),J2t=mc().overrideAll,UG=Ao().extendFlat,VG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:UG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:UG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:UG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:\"number\",dflt:0,min:0}},B8=D2e.exports=J2t({domain:K2t({name:\"ternary\"}),bgcolor:{valType:\"color\",dflt:Y2t.background},sum:{valType:\"number\",dflt:1,min:0},aaxis:VG,baxis:VG,caxis:VG},\"plot\",\"from-root\");B8.uirevision={valType:\"any\",editType:\"none\"};B8.aaxis.uirevision=B8.baxis.uirevision=B8.caxis.uirevision={valType:\"any\",editType:\"none\"}});var O_=ye(($cr,F2e)=>{\"use strict\";var $2t=Dr(),Q2t=vl(),ewt=Cc().defaults;F2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||\"x\",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\\d+$/,\"\"),h,d;function v(k,E){return $2t.coerce(h,d,o,k,E)}for(var _=0;_<c;_++){var b=u[_];t[b]?h=t[b]:h=t[b]={},d=Q2t.newContainer(r,b,f),i.noUirevision||v(\"uirevision\",r.uirevision);var p={};p[l]=[_/c,(_+1)/c],ewt(d,r,v,p),i.id=b,s(h,d,v,i)}}});var B2e=ye((Qcr,q2e)=>{\"use strict\";var twt=ka(),rwt=vl(),N8=Dr(),iwt=O_(),nwt=s_(),awt=l_(),owt=F3(),swt=Lb(),lwt=u4(),O2e=GG(),z2e=[\"aaxis\",\"baxis\",\"caxis\"];q2e.exports=function(t,r,n){iwt(t,r,n,{type:\"ternary\",attributes:O2e,handleDefaults:uwt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function uwt(e,t,r,n){var i=r(\"bgcolor\"),a=r(\"sum\");n.bgColor=twt.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u<z2e.length;u++)o=z2e[u],s=e[o]||{},l=rwt.newContainer(t,o),l._name=o,cwt(s,l,n,t);var c=t.aaxis,f=t.baxis,h=t.caxis;c.min+f.min+h.min>=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function cwt(e,t,r,n){var i=O2e[t._name];function a(d,v){return N8.coerce(e,t,i,d,v)}a(\"uirevision\",n.uirevision),t.type=\"linear\";var o=a(\"color\"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c=\"Component \"+u,f=a(\"title.text\",c);t._hovertitle=f===c?f:u,N8.coerceFont(a,\"title.font\",r.font,{overrideDflt:{size:N8.bigFont(r.font.size),color:s}}),a(\"min\"),swt(e,t,a,\"linear\"),awt(e,t,a,\"linear\"),nwt(e,t,a,\"linear\",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),owt(e,t,a,{outerTicks:!0});var h=a(\"showticklabels\");h&&(N8.coerceFont(a,\"tickfont\",r.font,{overrideDflt:{color:s}}),a(\"tickangle\"),a(\"tickformat\")),lwt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a(\"hoverformat\"),a(\"layer\")}});var N2e=ye(Z0=>{\"use strict\";var fwt=R2e(),hwt=Id().getSubplotCalcData,dwt=Dr().counterRegex,WT=\"ternary\";Z0.name=WT;var vwt=Z0.attr=\"subplot\";Z0.idRoot=WT;Z0.idRegex=Z0.attrRegex=dwt(WT);var pwt=Z0.attributes={};pwt[vwt]={valType:\"subplotid\",dflt:\"ternary\",editType:\"calc\"};Z0.layoutAttributes=GG();Z0.supplyLayoutDefaults=B2e();Z0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[WT],a=0;a<i.length;a++){var o=i[a],s=hwt(n,WT,o),l=r[o]._subplot;l||(l=new fwt({id:o,graphDiv:t,container:r._ternarylayer.node()},r),r[o]._subplot=l),l.plot(s,r,t._promises)}};Z0.clean=function(e,t,r,n){for(var i=n._subplots[WT]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\"a-title\"].remove(),s.layers[\"b-title\"].remove(),s.layers[\"c-title\"].remove())}};Z0.updateFx=function(e){var t=e._fullLayout;t._ternarylayer.selectAll(\"g.toplevel\").style(\"cursor\",t.dragmode===\"pan\"?\"move\":\"crosshair\")}});var V2e=ye((tfr,U2e)=>{\"use strict\";U2e.exports={attributes:FG(),supplyDefaults:c2e(),colorbar:$d(),formatLabels:h2e(),calc:g2e(),plot:y2e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:x2e(),selectPoints:yT(),eventData:w2e(),moduleType:\"trace\",name:\"scatterternary\",basePlotModule:N2e(),categories:[\"ternary\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var H2e=ye((rfr,G2e)=>{\"use strict\";G2e.exports=V2e()});var HG=ye((ifr,W2e)=>{\"use strict\";var qh=k4(),XT=Ao().extendFlat,j2e=df().axisHoverFormat;W2e.exports={y:qh.y,x:qh.x,x0:qh.x0,y0:qh.y0,xhoverformat:j2e(\"x\"),yhoverformat:j2e(\"y\"),name:XT({},qh.name,{}),orientation:XT({},qh.orientation,{}),bandwidth:{valType:\"number\",min:0,editType:\"calc\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},scalemode:{valType:\"enumerated\",values:[\"width\",\"count\"],dflt:\"width\",editType:\"calc\"},spanmode:{valType:\"enumerated\",values:[\"soft\",\"hard\",\"manual\"],dflt:\"soft\",editType:\"calc\"},span:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:qh.fillcolor,points:XT({},qh.boxpoints,{}),jitter:XT({},qh.jitter,{}),pointpos:XT({},qh.pointpos,{}),width:XT({},qh.width,{}),marker:qh.marker,text:qh.text,hovertext:qh.hovertext,hovertemplate:qh.hovertemplate,hovertemplatefallback:qh.hovertemplatefallback,quartilemethod:qh.quartilemethod,box:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},width:{valType:\"number\",min:0,max:1,dflt:.25,editType:\"plot\"},fillcolor:{valType:\"color\",editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},editType:\"plot\"},meanline:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"plot\"},side:{valType:\"enumerated\",values:[\"both\",\"positive\",\"negative\"],dflt:\"both\",editType:\"calc\"},offsetgroup:qh.offsetgroup,alignmentgroup:qh.alignmentgroup,selected:qh.selected,unselected:qh.unselected,hoveron:{valType:\"flaglist\",flags:[\"violins\",\"points\",\"kde\"],dflt:\"violins+points+kde\",extras:[\"all\"],editType:\"style\"},zorder:qh.zorder}});var XG=ye((nfr,X2e)=>{\"use strict\";var jG=C4(),WG=Dr().extendFlat;X2e.exports={violinmode:WG({},jG.boxmode,{}),violingap:WG({},jG.boxgap,{}),violingroupgap:WG({},jG.boxgroupgap,{})}});var $2e=ye((afr,J2e)=>{\"use strict\";var Z2e=Dr(),gwt=ka(),Y2e=P4(),K2e=HG();J2e.exports=function(t,r,n,i){function a(L,x){return Z2e.coerce(t,r,K2e,L,x)}function o(L,x){return Z2e.coerce2(t,r,K2e,L,x)}if(Y2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a(\"bandwidth\"),a(\"side\");var s=a(\"width\");s||(a(\"scalegroup\",r.name),a(\"scalemode\"));var l=a(\"span\"),u;Array.isArray(l)&&(u=\"manual\"),a(\"spanmode\",u);var c=a(\"line.color\",(t.marker||{}).color||n),f=a(\"line.width\"),h=a(\"fillcolor\",gwt.addOpacity(r.line.color,.5));Y2e.handlePointsDefaults(t,r,a,{prefix:\"\"});var d=o(\"box.width\"),v=o(\"box.fillcolor\",h),_=o(\"box.line.color\",c),b=o(\"box.line.width\",f),p=a(\"box.visible\",!!(d||v||_||b));p||(r.box={visible:!1});var k=o(\"meanline.color\",c),E=o(\"meanline.width\",f),T=a(\"meanline.visible\",!!(k||E));T||(r.meanline={visible:!1}),a(\"quartilemethod\"),a(\"zorder\")}}});var ewe=ye((ofr,Q2e)=>{\"use strict\";var mwt=Dr(),ywt=XG(),_wt=$I();Q2e.exports=function(t,r,n){function i(a,o){return mwt.coerce(t,r,ywt,a,o)}_wt._supply(t,r,n,i,\"violin\")}});var U8=ye(g2=>{\"use strict\";var xwt=Dr(),bwt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};g2.makeKDE=function(e,t,r){var n=r.length,i=bwt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u<n;u++)l+=i((s-r[u])/a);return o*l}};g2.getPositionOnKdePath=function(e,t,r){var n,i;t.orientation===\"h\"?(n=\"y\",i=\"x\"):(n=\"x\",i=\"y\");var a=xwt.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),o=e.posCenterPx,s=a[n],l=t.side===\"both\"?2*o-s:o;return[s,l]};g2.getKdeValue=function(e,t,r){var n=e.pts.map(g2.extractVal),i=g2.makeKDE(e,t,n);return i(r)/e.posDensityScale};g2.extractVal=function(e){return e.v}});var iwe=ye((lfr,rwe)=>{\"use strict\";var ZG=Dr(),YG=ho(),wwt=NV(),twe=U8(),Twt=fs().BADNUM;rwe.exports=function(t,r){var n=wwt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=YG.getFromId(t,r[r.orientation===\"h\"?\"xaxis\":\"yaxis\"]),o=1/0,s=-1/0,l=0,u=0,c=0;c<n.length;c++){var f=n[c],h=f.pts.map(twe.extractVal),d=f.bandwidth=Swt(r,f,h),v=f.span=Mwt(r,f,a,d);if(f.min===f.max&&d===0)v=f.span=[f.min,f.max],f.density=[{v:1,t:v[0]}],f.bandwidth=d,l=Math.max(l,1);else{var _=v[1]-v[0],b=Math.ceil(_/(d/3)),p=_/b;if(!isFinite(p)||!isFinite(b))return ZG.error(\"Something went wrong with computing the violin span\"),n[0].t.empty=!0,n;var k=twe.makeKDE(f,r,h);f.density=new Array(b+1);for(var E=0;E<f.density.length;E++){var T=v[0]+E*p,L=k(T);f.density[E]={v:L,t:T},l=Math.max(l,L)}}u=Math.max(u,h.length),o=Math.min(o,v[0]),s=Math.max(s,v[1])}var x=YG.findExtremes(a,[o,s],{padded:!0});if(r._extremes[a._id]=x,r.width)n[0].t.maxKDE=l;else{var C=i._violinScaleGroupStats,M=r.scalegroup,g=C[M];g?(g.maxKDE=Math.max(g.maxKDE,l),g.maxCount=Math.max(g.maxCount,u)):C[M]={maxKDE:l,maxCount:u}}return n[0].t.labels.kde=ZG._(t,\"kde:\"),n};function Awt(e,t,r){var n=Math.min(t,r/1.349);return 1.059*n*Math.pow(e,-.2)}function Swt(e,t,r){var n=t.max-t.min;if(!n)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,n/1e4);var i=r.length,a=ZG.stdev(r,i-1,t.mean);return Math.max(Awt(i,a,t.q3-t.q1),n/100)}function Mwt(e,t,r,n){var i=e.spanmode,a=e.span||[],o=[t.min,t.max],s=[t.min-2*n,t.max+2*n],l;function u(f){var h=a[f],d=r.type===\"multicategory\"?r.r2c(h):r.d2c(h,0,e[t.valLetter+\"calendar\"]);return d===Twt?s[f]:d}i===\"soft\"?l=s:i===\"hard\"?l=o:l=[u(0),u(1)];var c={type:\"linear\",range:l};return YG.setConvert(c),c.cleanRange(),l}});var owe=ye((ufr,awe)=>{\"use strict\";var Ewt=e8().setPositionOffset,nwe=[\"v\",\"h\"];awe.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o<nwe.length;o++){for(var s=nwe[o],l=s===\"h\"?a:i,u=[],c=0;c<n.length;c++){var f=n[c],h=f[0].t,d=f[0].trace;d.visible===!0&&d.type===\"violin\"&&!h.empty&&d.orientation===s&&d.xaxis===i._id&&d.yaxis===a._id&&u.push(c)}Ewt(\"violin\",t,u,l)}}});var lwe=ye((cfr,swe)=>{\"use strict\";var KG=Oa(),JG=Dr(),kwt=So(),$G=t8(),Cwt=AU(),Lwt=U8();swe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=Cwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0,linearized:!0});return kwt.smoothopen(h[0],1)}JG.makeTraceGroups(i,n,\"trace violins\").each(function(c){var f=KG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var _=d.bPos,b=d.bdPos,p=r[d.valLetter+\"axis\"],k=r[d.posLetter+\"axis\"],E=v.side===\"both\",T=E||v.side===\"positive\",L=E||v.side===\"negative\",x=f.selectAll(\"path.violin\").data(JG.identity);x.enter().append(\"path\").style(\"vector-effect\",a?\"none\":\"non-scaling-stroke\").attr(\"class\",\"violin\"),x.exit().remove(),x.each(function(U){var G=KG.select(this),Z=U.density,j=Z.length,N=k.c2l(U.pos+_,!0),H=k.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode===\"count\"?oe.maxKDE/b*(oe.maxCount/U.pts.length):oe.maxKDE/b}var _e,Ce,Le,ge,ie,Se,Ee;if(T){for(Se=new Array(j),ge=0;ge<j;ge++)Ee=Se[ge]={},Ee[d.posLetter]=N+Z[ge].v/re,Ee[d.valLetter]=p.c2l(Z[ge].t,!0);_e=u(Se,v)}if(L){for(Se=new Array(j),ie=0,ge=j-1;ie<j;ie++,ge--)Ee=Se[ie]={},Ee[d.posLetter]=N-Z[ge].v/re,Ee[d.valLetter]=p.c2l(Z[ge].t,!0);Ce=u(Se,v)}if(E)Le=_e+\"L\"+Ce.slice(1)+\"Z\";else{var Ae=[H,p.c2p(Z[0].t)],Be=[H,p.c2p(Z[j-1].t)];v.orientation===\"h\"&&(Ae.reverse(),Be.reverse()),T?Le=\"M\"+Ae+\"L\"+_e.slice(1)+\"L\"+Be:Le=\"M\"+Be+\"L\"+Ce.slice(1)+\"L\"+Ae}G.attr(\"d\",Le),U.posCenterPx=H,U.posDensityScale=re*b,U.path=G.node(),U.pathLength=U.path.getTotalLength()/(E?2:1)});var C=v.box,M=C.width,g=(C.line||{}).width,P,A;E?(P=b*M,A=0):T?(P=[0,b*M/2],A=g*{x:1,y:-1}[d.posLetter]):(P=[b*M/2,0],A=g*{x:-1,y:1}[d.posLetter]),$G.plotBoxAndWhiskers(f,{pos:k,val:p},v,{bPos:_,bdPos:P,bPosPxOffset:A}),$G.plotBoxMean(f,{pos:k,val:p},v,{bPos:_,bdPos:P,bPosPxOffset:A});var z;!v.box.visible&&v.meanline.visible&&(z=JG.identity);var O=f.selectAll(\"path.meanline\").data(z||[]);O.enter().append(\"path\").attr(\"class\",\"meanline\").style(\"fill\",\"none\").style(\"vector-effect\",a?\"none\":\"non-scaling-stroke\"),O.exit().remove(),O.each(function(U){var G=p.c2p(U.mean,!0),Z=Lwt.getPositionOnKdePath(U,v,G);KG.select(this).attr(\"d\",v.orientation===\"h\"?\"M\"+G+\",\"+Z[0]+\"V\"+Z[1]:\"M\"+Z[0]+\",\"+G+\"H\"+Z[1])}),$G.plotPoints(f,{x:s,y:l},v,d)})}});var fwe=ye((ffr,cwe)=>{\"use strict\";var uwe=Oa(),ZT=ka(),Pwt=sp().stylePoints;cwe.exports=function(t){var r=uwe.select(t).selectAll(\"g.trace.violins\");r.style(\"opacity\",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=uwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll(\"path.violin\").style(\"stroke-width\",i.line.width+\"px\").call(ZT.stroke,i.line.color).call(ZT.fill,i.fillcolor),a.selectAll(\"path.box\").style(\"stroke-width\",s.width+\"px\").call(ZT.stroke,s.color).call(ZT.fill,o.fillcolor);var c={\"stroke-width\":u+\"px\",\"stroke-dasharray\":2*u+\"px,\"+u+\"px\"};a.selectAll(\"path.mean\").style(c).call(ZT.stroke,l.color),a.selectAll(\"path.meanline\").style(c).call(ZT.stroke,l.color),Pwt(a,i,t)})}});var pwe=ye((hfr,vwe)=>{\"use strict\";var Iwt=ka(),QG=Dr(),Rwt=ho(),hwe=jV(),dwe=U8();vwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf(\"violins\")!==-1,f=u.indexOf(\"kde\")!==-1,h=[],d,v;if(c||f){var _=hwe.hoverOnBoxes(t,r,n,i);if(f&&_.length>0){var b=t.xa,p=t.ya,k,E,T,L,x;l.orientation===\"h\"?(x=r,k=\"y\",T=p,E=\"x\",L=b):(x=n,k=\"x\",T=b,E=\"y\",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var M=QG.extendFlat({},t),g=L.c2p(x,!0),P=dwe.getKdeValue(C,l,x),A=dwe.getPositionOnKdePath(C,l,g),z=T._offset,O=T._length;M[k+\"0\"]=A[0],M[k+\"1\"]=A[1],M[E+\"0\"]=M[E+\"1\"]=g,M[E+\"Label\"]=E+\": \"+Rwt.hoverLabelText(L,x,l[E+\"hoverformat\"])+\", \"+s[0].t.labels.kde+\" \"+P.toFixed(3);for(var U=0,G=0;G<_.length;G++)if(_[G].attr===\"med\"){U=G;break}M.spikeDistance=_[U].spikeDistance;var Z=k+\"Spike\";M[Z]=_[U][Z],_[U].spikeDistance=void 0,_[U][Z]=void 0,M.hovertemplate=!1,h.push(M),v={},v[k+\"1\"]=QG.constrain(z+A[0],z,z+O),v[k+\"2\"]=QG.constrain(z+A[1],z,z+O),v[E+\"1\"]=v[E+\"2\"]=L._offset+g}}c&&(h=h.concat(_))}u.indexOf(\"points\")!==-1&&(d=hwe.hoverOnPoints(t,r,n));var j=o.selectAll(\".violinline-\"+l.uid).data(v?[0]:[]);return j.enter().append(\"line\").classed(\"violinline-\"+l.uid,!0).attr(\"stroke-width\",1.5),j.exit().remove(),j.attr(v).call(Iwt.stroke,t.color),i===\"closest\"?d?[d]:h:(d&&h.push(d),h)}});var mwe=ye((dfr,gwe)=>{\"use strict\";gwe.exports={attributes:HG(),layoutAttributes:XG(),supplyDefaults:$2e(),crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:ewe(),calc:iwe(),crossTraceCalc:owe(),plot:lwe(),style:fwe(),styleOnSelect:sp().styleOnSelect,hoverPoints:pwe(),selectPoints:WV(),moduleType:\"trace\",name:\"violin\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\",\"violinLayout\",\"zoomScale\"],meta:{}}});var _we=ye((vfr,ywe)=>{\"use strict\";ywe.exports=mwe()});var bwe=ye((pfr,xwe)=>{\"use strict\";xwe.exports={eventDataKeys:[\"percentInitial\",\"percentPrevious\",\"percentTotal\"]}});var tH=ye((gfr,Swe)=>{\"use strict\";var jc=zm(),eH=pf().line,Dwt=Gl(),wwe=df().axisHoverFormat,{hovertemplateAttrs:Fwt,texttemplateAttrs:zwt,templatefallbackAttrs:Twe}=Ll(),Awe=bwe(),Xy=Ao().extendFlat,Owt=ka();Swe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:wwe(\"x\"),yhoverformat:wwe(\"y\"),hovertext:jc.hovertext,hovertemplate:Fwt({},{keys:Awe.eventDataKeys}),hovertemplatefallback:Twe(),hoverinfo:Xy({},Dwt.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"percent initial\",\"percent previous\",\"percent total\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"percent initial\",\"percent previous\",\"percent total\",\"value\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:zwt({editType:\"plot\"},{keys:Awe.eventDataKeys.concat([\"label\",\"value\"])}),texttemplatefallback:Twe({editType:\"plot\"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Xy({},jc.insidetextanchor,{dflt:\"middle\"}),textangle:Xy({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Xy({},jc.orientation,{}),offset:Xy({},jc.offset,{arrayOk:!1}),width:Xy({},jc.width,{arrayOk:!1}),marker:qwt(),connector:{fillcolor:{valType:\"color\",editType:\"style\"},line:{color:Xy({},eH.color,{dflt:Owt.defaultLine}),width:Xy({},eH.width,{dflt:0,editType:\"plot\"}),dash:eH.dash,editType:\"style\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function qwt(){var e=Xy({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var rH=ye((mfr,Mwe)=>{\"use strict\";Mwe.exports={funnelmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},funnelgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},funnelgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}});var nH=ye((yfr,kwe)=>{\"use strict\";var V8=Dr(),Bwt=e2(),Nwt=i0().handleText,Uwt=oT(),Vwt=Dg(),Ewe=tH(),iH=ka();function Gwt(e,t,r,n){function i(f,h){return V8.coerce(e,t,Ewe,f,h)}var a=Uwt(e,t,n,i);if(!a){t.visible=!1;return}Vwt(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"orientation\",t.y&&!t.x?\"v\":\"h\"),i(\"offset\"),i(\"width\");var o=i(\"text\");i(\"hovertext\"),i(\"hovertemplate\"),i(\"hovertemplatefallback\");var s=i(\"textposition\");Nwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!==\"none\"&&!t.texttemplate&&i(\"textinfo\",V8.isArrayOrTypedArray(o)?\"text+value\":\"value\");var l=i(\"marker.color\",r);i(\"marker.line.color\",iH.defaultLine),i(\"marker.line.width\");var u=i(\"connector.visible\");if(u){i(\"connector.fillcolor\",Hwt(l));var c=i(\"connector.line.width\");c&&(i(\"connector.line.color\"),i(\"connector.line.dash\"))}i(\"zorder\")}function Hwt(e){var t=V8.isArrayOrTypedArray(e)?\"#000\":e;return iH.addOpacity(t,.5*iH.opacity(t))}function jwt(e,t){var r,n;function i(o){return V8.coerce(n._input,n,Ewe,o)}for(var a=0;a<e.length;a++)n=e[a],n.type===\"funnel\"&&(r=n._input,Bwt(r,n,t,i,t.funnelmode))}kwe.exports={supplyDefaults:Gwt,crossTraceDefaults:jwt}});var Lwe=ye((_fr,Cwe)=>{\"use strict\";var Wwt=Dr(),Xwt=rH();Cwe.exports=function(e,t,r){var n=!1;function i(s,l){return Wwt.coerce(e,t,Xwt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type===\"funnel\"){n=!0;break}}n&&(i(\"funnelmode\"),i(\"funnelgap\",.2),i(\"funnelgroupgap\"))}});var Iwe=ye((xfr,Pwe)=>{\"use strict\";var YT=Dr();Pwe.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;YT.mergeArray(r.text,t,\"tx\"),YT.mergeArray(r.hovertext,t,\"htx\");var i=r.marker;if(i){YT.mergeArray(i.opacity,t,\"mo\"),YT.mergeArray(i.color,t,\"mc\");var a=i.line;a&&(YT.mergeArray(a.color,t,\"mlc\"),YT.mergeArrayCastPositive(a.width,t,\"mlw\"))}}});var zwe=ye((bfr,Fwe)=>{\"use strict\";var Rwe=ho(),Dwe=zg(),Zwt=Iwe(),Ywt=O0(),j4=fs().BADNUM;Fwe.exports=function(t,r){var n=Rwe.getFromId(t,r.xaxis||\"x\"),i=Rwe.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c,f,h;r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\"),s=i.makeCalcdata(r,\"y\"),l=Dwe(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\"),s=n.makeCalcdata(r,\"x\"),l=Dwe(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f<d;f++){a[f]<0&&(a[f]=j4);var _=!1;a[f]!==j4&&f+1<d&&a[f+1]!==j4&&(_=!0),h=v[f]={p:o[f],s:a[f],cNext:_},r._base[f]=-.5*h.s,u&&(v[f].orig_p=s[f],v[f][c+\"End\"]=l.ends[f],v[f][c+\"Start\"]=l.starts[f]),r.ids&&(h.id=String(r.ids[f])),f===0&&(v[0].vTotal=0),v[0].vTotal+=aH(h.s),h.begR=aH(h.s)/aH(v[0].s)}var b;for(f=0;f<d;f++)h=v[f],h.s!==j4&&(h.sumR=h.s/v[0].vTotal,h.difR=b!==void 0?h.s/b:1,b=h.s);return Zwt(v,r),Ywt(v,r),v};function aH(e){return e===j4?0:e}});var Bwe=ye((wfr,qwe)=>{\"use strict\";var Owe=t2().setGroupPositions;qwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h],v=d.orientation===\"h\";d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type===\"funnel\"&&(f=a[h],v?c.push(f):u.push(f),l.push(f))}var _={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(Owe(t,o,s,u,_),Owe(t,s,o,c,_),h=0;h<l.length;h++){f=l[h];for(var b=0;b<f.length;b++)b+1<f.length&&(f[b].nextP0=f[b+1].p0,f[b].nextS0=f[b+1].s0,f[b].nextP1=f[b+1].p1,f[b].nextS1=f[b+1].s1)}}});var Gwe=ye((Tfr,Vwe)=>{\"use strict\";var G8=Oa(),B_=Dr(),Nwe=So(),q_=fs().BADNUM,Kwt=d2(),Jwt=bv().clearMinTextSize;Vwe.exports=function(t,r,n,i){var a=t._fullLayout;Jwt(\"funnel\",a),$wt(t,r,n,i),Qwt(t,r,n,i),Kwt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function $wt(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,\"g\",\"regions\");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation===\"h\",f=u.selectAll(\"g.region\").data(B_.identity);f.enter().append(\"g\").classed(\"region\",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Uwe(d,i,a,c),b=_[0],p=_[1],k=\"\";b[0]!==q_&&p[0]!==q_&&b[1]!==q_&&p[1]!==q_&&b[2]!==q_&&p[2]!==q_&&b[3]!==q_&&p[3]!==q_&&(c?k+=\"M\"+b[0]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[2]+\"H\"+b[3]+\"L\"+b[1]+\",\"+p[1]+\"Z\":k+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[3]+\"V\"+p[2]+\"L\"+b[1]+\",\"+p[0]+\"Z\"),k===\"\"&&(k=\"M0,0Z\"),B_.ensureSingle(G8.select(this),\"path\").attr(\"d\",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Qwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,\"g\",\"lines\");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation===\"h\",f=u.selectAll(\"g.line\").data(B_.identity);f.enter().append(\"g\").classed(\"line\",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Uwe(d,i,a,c),b=_[0],p=_[1],k=\"\";b[3]!==void 0&&p[3]!==void 0&&(c?(k+=\"M\"+b[0]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[2],k+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[3]+\",\"+p[2]):(k+=\"M\"+b[1]+\",\"+p[1]+\"L\"+b[2]+\",\"+p[3],k+=\"M\"+b[1]+\",\"+p[0]+\"L\"+b[2]+\",\"+p[2])),k===\"\"&&(k=\"M0,0Z\"),B_.ensureSingle(G8.select(this),\"path\").attr(\"d\",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Uwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Wwe=ye((Afr,jwe)=>{\"use strict\";var W4=Oa(),Hwe=So(),oH=ka(),e3t=X1().DESELECTDIM,t3t=V0(),r3t=bv().resizeText,i3t=t3t.styleTextPoints;function n3t(e,t,r){var n=r||W4.select(e).selectAll('g[class^=\"funnellayer\"]').selectAll(\"g.trace\");r3t(e,n,\"funnel\"),n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=W4.select(this),o=i[0].trace;a.selectAll(\".point > path\").each(function(s){if(!s.isBlank){var l=o.marker;W4.select(this).call(oH.fill,s.mc||l.color).call(oH.stroke,s.mlc||l.line.color).call(Hwe.dashLine,l.line.dash,s.mlw||l.line.width).style(\"opacity\",o.selectedpoints&&!s.selected?e3t:1)}}),i3t(a,o,e),a.selectAll(\".regions\").each(function(){W4.select(this).selectAll(\"path\").style(\"stroke-width\",0).call(oH.fill,o.connector.fillcolor)}),a.selectAll(\".lines\").each(function(){var s=o.connector.line;Hwe.lineGroupStyle(W4.select(this).selectAll(\"path\"),s.width,s.color,s.dash)})})}jwe.exports={style:n3t}});var Ywe=ye((Sfr,Zwe)=>{\"use strict\";var Xwe=ka().opacity,a3t=PT().hoverOnBars,sH=Dr().formatPercent;Zwe.exports=function(t,r,n,i,a){var o=a3t(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation===\"h\",c=o.index,f=s[c],h=u?\"x\":\"y\";o[h+\"LabelVal\"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=sH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=sH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=sH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!==\"none\"&&d!==\"skip\"){var _=d===\"all\",b=d.split(\"+\"),p=function(k){return _||b.indexOf(k)!==-1};p(\"percent initial\")&&v.push(o.percentInitialLabel+\" of initial\"),p(\"percent previous\")&&v.push(o.percentPreviousLabel+\" of previous\"),p(\"percent total\")&&v.push(o.percentTotalLabel+\" of total\")}return o.extraText=v.join(\"<br>\"),o.color=o3t(l,f),[o]}};function o3t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Xwe(n))return n;if(Xwe(i)&&a)return i}});var Jwe=ye((Mfr,Kwe)=>{\"use strict\";Kwe.exports=function(t,r){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"percentInitial\"in r&&(t.percentInitial=r.percentInitial),\"percentPrevious\"in r&&(t.percentPrevious=r.percentPrevious),\"percentTotal\"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var Qwe=ye((Efr,$we)=>{\"use strict\";$we.exports={attributes:tH(),layoutAttributes:rH(),supplyDefaults:nH().supplyDefaults,crossTraceDefaults:nH().crossTraceDefaults,supplyLayoutDefaults:Lwe(),calc:zwe(),crossTraceCalc:Bwe(),plot:Gwe(),style:Wwe().style,hoverPoints:Ywe(),eventData:Jwe(),selectPoints:IT(),moduleType:\"trace\",name:\"funnel\",basePlotModule:mh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}});var t3e=ye((kfr,e3e)=>{\"use strict\";e3e.exports=Qwe()});var i3e=ye((Cfr,r3e)=>{\"use strict\";r3e.exports={eventDataKeys:[\"initial\",\"delta\",\"final\"]}});var cH=ye((Lfr,s3e)=>{\"use strict\";var _c=zm(),lH=pf().line,s3t=Gl(),n3e=df().axisHoverFormat,{hovertemplateAttrs:l3t,texttemplateAttrs:u3t,templatefallbackAttrs:a3e}=Ll(),o3e=i3e(),KT=Ao().extendFlat,c3t=ka();function uH(e){return{marker:{color:KT({},_c.marker.color,{arrayOk:!1,editType:\"style\"}),line:{color:KT({},_c.marker.line.color,{arrayOk:!1,editType:\"style\"}),width:KT({},_c.marker.line.width,{arrayOk:!1,editType:\"style\"}),editType:\"style\"},editType:\"style\"},editType:\"style\"}}s3e.exports={measure:{valType:\"data_array\",dflt:[],editType:\"calc\"},base:{valType:\"number\",dflt:null,arrayOk:!1,editType:\"calc\"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:n3e(\"x\"),yhoverformat:n3e(\"y\"),hovertext:_c.hovertext,hovertemplate:l3t({},{keys:o3e.eventDataKeys}),hovertemplatefallback:a3e(),hoverinfo:KT({},s3t.hoverinfo,{flags:[\"name\",\"x\",\"y\",\"text\",\"initial\",\"delta\",\"final\"]}),textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"initial\",\"delta\",\"final\"],extras:[\"none\"],editType:\"plot\",arrayOk:!1},texttemplate:u3t({editType:\"plot\"},{keys:o3e.eventDataKeys.concat([\"label\"])}),texttemplatefallback:a3e({editType:\"plot\"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:uH(\"increasing\"),decreasing:uH(\"decreasing\"),totals:uH(\"intermediate sums and total\"),connector:{line:{color:KT({},lH.color,{dflt:c3t.defaultLine}),width:KT({},lH.width,{editType:\"plot\"}),dash:lH.dash,editType:\"plot\"},mode:{valType:\"enumerated\",values:[\"spanning\",\"between\"],dflt:\"between\",editType:\"plot\"},visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var fH=ye((Pfr,l3e)=>{\"use strict\";l3e.exports={waterfallmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"group\",editType:\"calc\"},waterfallgap:{valType:\"number\",min:0,max:1,editType:\"calc\"},waterfallgroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}});var JT=ye((Ifr,u3e)=>{\"use strict\";u3e.exports={INCREASING:{COLOR:\"#3D9970\",SYMBOL:\"\\u25B2\"},DECREASING:{COLOR:\"#FF4136\",SYMBOL:\"\\u25BC\"}}});var dH=ye((Rfr,d3e)=>{\"use strict\";var c3e=Dr(),f3t=e2(),h3t=i0().handleText,d3t=oT(),v3t=Dg(),f3e=cH(),p3t=ka(),h3e=JT(),g3t=h3e.INCREASING.COLOR,m3t=h3e.DECREASING.COLOR,y3t=\"#4499FF\";function hH(e,t,r){e(t+\".marker.color\",r),e(t+\".marker.line.color\",p3t.defaultLine),e(t+\".marker.line.width\")}function _3t(e,t,r,n){function i(u,c){return c3e.coerce(e,t,f3e,u,c)}var a=d3t(e,t,n,i);if(!a){t.visible=!1;return}v3t(e,t,n,i),i(\"xhoverformat\"),i(\"yhoverformat\"),i(\"measure\"),i(\"orientation\",t.x&&!t.y?\"h\":\"v\"),i(\"base\"),i(\"offset\"),i(\"width\"),i(\"text\"),i(\"hovertext\"),i(\"hovertemplate\"),i(\"hovertemplatefallback\");var o=i(\"textposition\");h3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!==\"none\"&&(i(\"texttemplate\"),i(\"texttemplatefallback\"),t.texttemplate||i(\"textinfo\")),hH(i,\"increasing\",g3t),hH(i,\"decreasing\",m3t),hH(i,\"totals\",y3t);var s=i(\"connector.visible\");if(s){i(\"connector.mode\");var l=i(\"connector.line.width\");l&&(i(\"connector.line.color\"),i(\"connector.line.dash\"))}i(\"zorder\")}function x3t(e,t){var r,n;function i(o){return c3e.coerce(n._input,n,f3e,o)}if(t.waterfallmode===\"group\")for(var a=0;a<e.length;a++)n=e[a],r=n._input,f3t(r,n,t,i,t.waterfallmode)}d3e.exports={supplyDefaults:_3t,crossTraceDefaults:x3t}});var p3e=ye((Dfr,v3e)=>{\"use strict\";var b3t=Dr(),w3t=fH();v3e.exports=function(e,t,r){var n=!1;function i(s,l){return b3t.coerce(e,t,w3t,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type===\"waterfall\"){n=!0;break}}n&&(i(\"waterfallmode\"),i(\"waterfallgap\",.2),i(\"waterfallgroupgap\"))}});var b3e=ye((Ffr,x3e)=>{\"use strict\";var g3e=ho(),m3e=zg(),y3e=Dr().mergeArray,T3t=O0(),_3e=fs().BADNUM;function vH(e){return e===\"a\"||e===\"absolute\"}function pH(e){return e===\"t\"||e===\"total\"}x3e.exports=function(t,r){var n=g3e.getFromId(t,r.xaxis||\"x\"),i=g3e.getFromId(t,r.yaxis||\"y\"),a,o,s,l,u,c;r.orientation===\"h\"?(a=n.makeCalcdata(r,\"x\"),s=i.makeCalcdata(r,\"y\"),l=m3e(r,i,\"y\",s),u=!!r.yperiodalignment,c=\"y\"):(a=i.makeCalcdata(r,\"y\"),s=n.makeCalcdata(r,\"x\"),l=m3e(r,n,\"x\",s),u=!!r.xperiodalignment,c=\"x\"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,_=!1,b=0;b<f;b++){var p=a[b]||0,k=!1;(a[b]!==_3e||pH(r.measure[b])||vH(r.measure[b]))&&b+1<f&&(a[b+1]!==_3e||pH(r.measure[b+1])||vH(r.measure[b+1]))&&(k=!0);var E=h[b]={i:b,p:o[b],s:p,rawS:p,cNext:k};vH(r.measure[b])?(d=E.s,E.isSum=!0,E.dir=\"totals\",E.s=d):pH(r.measure[b])?(E.isSum=!0,E.dir=\"totals\",E.s=d):(E.isSum=!1,E.dir=E.rawS<0?\"decreasing\":\"increasing\",v=E.s,E.s=d+v,d+=v),E.dir===\"totals\"&&(_=!0),u&&(h[b].orig_p=s[b],h[b][c+\"End\"]=l.ends[b],h[b][c+\"Start\"]=l.starts[b]),r.ids&&(E.id=String(r.ids[b])),E.v=(r.base||0)+d}return h.length&&(h[0].hasTotals=_),y3e(r.text,h,\"tx\"),y3e(r.hovertext,h,\"htx\"),T3t(h,r),h}});var A3e=ye((zfr,T3e)=>{\"use strict\";var w3e=t2().setGroupPositions;T3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h];d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type===\"waterfall\"&&(f=a[h],d.orientation===\"h\"?c.push(f):u.push(f),l.push(f))}var v={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(w3e(t,o,s,u,v),w3e(t,s,o,c,v),h=0;h<l.length;h++){f=l[h];for(var _=0;_<f.length;_++){var b=f[_];b.isSum===!1&&(b.s0+=_===0?0:f[_-1].s),_+1<f.length&&(f[_].nextP0=f[_+1].p0,f[_].nextS0=f[_+1].s0)}}}});var E3e=ye((Ofr,M3e)=>{\"use strict\";var S3e=Oa(),H8=Dr(),A3t=So(),$T=fs().BADNUM,S3t=d2(),M3t=bv().clearMinTextSize;M3e.exports=function(t,r,n,i){var a=t._fullLayout;M3t(\"waterfall\",a),S3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),E3t(t,r,n,i)};function E3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;H8.makeTraceGroups(n,r,\"trace bars\").each(function(o){var s=S3e.select(this),l=o[0].trace,u=H8.ensureSingle(s,\"g\",\"lines\");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation===\"h\",f=l.connector.mode,h=u.selectAll(\"g.line\").data(H8.identity);h.enter().append(\"g\").classed(\"line\",!0),h.exit().remove();var d=h.size();h.each(function(v,_){if(!(_!==d-1&&!v.cNext)){var b=k3t(v,i,a,c),p=b[0],k=b[1],E=\"\";p[0]!==$T&&k[0]!==$T&&p[1]!==$T&&k[1]!==$T&&(f===\"spanning\"&&!v.isSum&&_>0&&(c?E+=\"M\"+p[0]+\",\"+k[1]+\"V\"+k[0]:E+=\"M\"+p[1]+\",\"+k[0]+\"H\"+p[0]),f!==\"between\"&&(v.isSum||_<d-1)&&(c?E+=\"M\"+p[1]+\",\"+k[0]+\"V\"+k[1]:E+=\"M\"+p[0]+\",\"+k[1]+\"H\"+p[1]),p[2]!==$T&&k[2]!==$T&&(c?E+=\"M\"+p[1]+\",\"+k[1]+\"V\"+k[2]:E+=\"M\"+p[1]+\",\"+k[1]+\"H\"+p[2])),E===\"\"&&(E=\"M0,0Z\"),H8.ensureSingle(S3e.select(this),\"path\").attr(\"d\",E).call(A3t.setClipUrl,t.layerClipId,e)}})})}function k3t(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n?[i,a]:[a,i]}});var P3e=ye((qfr,L3e)=>{\"use strict\";var j8=Oa(),k3e=So(),C3e=ka(),C3t=X1().DESELECTDIM,L3t=V0(),P3t=bv().resizeText,I3t=L3t.styleTextPoints;function R3t(e,t,r){var n=r||j8.select(e).selectAll('g[class^=\"waterfalllayer\"]').selectAll(\"g.trace\");P3t(e,n,\"waterfall\"),n.style(\"opacity\",function(i){return i[0].trace.opacity}),n.each(function(i){var a=j8.select(this),o=i[0].trace;a.selectAll(\".point > path\").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;j8.select(this).call(C3e.fill,l.color).call(C3e.stroke,l.line.color).call(k3e.dashLine,l.line.dash,l.line.width).style(\"opacity\",o.selectedpoints&&!s.selected?C3t:1)}}),I3t(a,o,e),a.selectAll(\".lines\").each(function(){var s=o.connector.line;k3e.lineGroupStyle(j8.select(this).selectAll(\"path\"),s.width,s.color,s.dash)})})}L3e.exports={style:R3t}});var z3e=ye((Bfr,F3e)=>{\"use strict\";var D3t=ho().hoverLabelText,I3e=ka().opacity,F3t=PT().hoverOnBars,R3e=JT(),D3e={increasing:R3e.INCREASING.SYMBOL,decreasing:R3e.DECREASING.SYMBOL};F3e.exports=function(t,r,n,i,a){var o=F3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation===\"h\",c=u?\"x\":\"y\",f=u?t.xa:t.ya;function h(x){return D3t(f,x,l[c+\"hoverformat\"])}var d=o.index,v=s[d],_=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-_,o.delta=_,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=_<0?\"(\"+b+\")\":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!==\"none\"&&p!==\"skip\"){var E=p===\"all\",T=p.split(\"+\"),L=function(x){return E||T.indexOf(x)!==-1};v.isSum||(L(\"final\")&&(u?!L(\"x\"):!L(\"y\"))&&k.push(o.finalLabel),L(\"delta\")&&(_<0?k.push(o.deltaLabel+\" \"+D3e.decreasing):k.push(o.deltaLabel+\" \"+D3e.increasing)),L(\"initial\")&&k.push(\"Initial: \"+o.initialLabel))}return k.length&&(o.extraText=k.join(\"<br>\")),o.color=z3t(l,v),[o]};function z3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(I3e(n))return n;if(I3e(i)&&a)return i}});var q3e=ye((Nfr,O3e)=>{\"use strict\";O3e.exports=function(t,r){return t.x=\"xVal\"in r?r.xVal:r.x,t.y=\"yVal\"in r?r.yVal:r.y,\"initial\"in r&&(t.initial=r.initial),\"delta\"in r&&(t.delta=r.delta),\"final\"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var N3e=ye((Ufr,B3e)=>{\"use strict\";B3e.exports={attributes:cH(),layoutAttributes:fH(),supplyDefaults:dH().supplyDefaults,crossTraceDefaults:dH().crossTraceDefaults,supplyLayoutDefaults:p3e(),calc:b3e(),crossTraceCalc:A3e(),plot:E3e(),style:P3e().style,hoverPoints:z3e(),eventData:q3e(),selectPoints:IT(),moduleType:\"trace\",name:\"waterfall\",basePlotModule:mh(),categories:[\"bar-like\",\"cartesian\",\"svg\",\"oriented\",\"showLegend\",\"zoomScale\"],meta:{}}});var V3e=ye((Vfr,U3e)=>{\"use strict\";U3e.exports=N3e()});var QT=ye((Gfr,G3e)=>{\"use strict\";G3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:[\"\",\"\",\"\"]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},rgba256:{colormodel:\"rgba\",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:[\"\",\"\",\"\",\"\"]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+\"%\",t[2]=t[2]+\"%\",t},suffix:[\"\\xB0\",\"%\",\"%\"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+\"%\",t[2]=t[2]+\"%\",t},suffix:[\"\\xB0\",\"%\",\"%\",\"\"]}}}});var gH=ye((Hfr,j3e)=>{\"use strict\";var O3t=Gl(),q3t=pf().zorder,{hovertemplateAttrs:B3t,templatefallbackAttrs:N3t}=Ll(),H3e=Ao().extendFlat,U3t=QT().colormodel,Z4=[\"rgb\",\"rgba\",\"rgba256\",\"hsl\",\"hsla\"],V3t=[],G3t=[];for(eA=0;eA<Z4.length;eA++)X4=U3t[Z4[eA]],V3t.push(\"For the `\"+Z4[eA]+\"` colormodel, it is [\"+(X4.zminDflt||X4.min).join(\", \")+\"].\"),G3t.push(\"For the `\"+Z4[eA]+\"` colormodel, it is [\"+(X4.zmaxDflt||X4.max).join(\", \")+\"].\");var X4,eA;j3e.exports=H3e({source:{valType:\"string\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},colormodel:{valType:\"enumerated\",values:Z4,editType:\"calc\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",!1],dflt:!1,editType:\"plot\"},zmin:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},zmax:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",dflt:1,editType:\"calc\",description:\"Set the pixel's horizontal size.\"},dy:{valType:\"number\",dflt:1,editType:\"calc\",description:\"Set the pixel's vertical size\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"data_array\",editType:\"plot\"},hoverinfo:H3e({},O3t.hoverinfo,{flags:[\"x\",\"y\",\"z\",\"color\",\"name\",\"text\"],dflt:\"x+y+z+text+name\"}),hovertemplate:B3t({},{keys:[\"z\",\"color\",\"colormodel\"]}),hovertemplatefallback:N3t(),zorder:q3t})});var Z3e=ye((jfr,X3e)=>{\"use strict\";var H3t=Dr(),j3t=gH(),W3e=QT(),W3t=Oy().IMAGE_URL_PREFIX;X3e.exports=function(t,r){function n(o,s){return H3t.coerce(t,r,j3t,o,s)}n(\"source\"),r.source&&!r.source.match(W3t)&&delete r.source,r._hasSource=!!r.source;var i=n(\"z\");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n(\"x0\"),n(\"y0\"),n(\"dx\"),n(\"dy\");var a;r._hasZ?(n(\"colormodel\",\"rgb\"),a=W3e.colormodel[r.colormodel],n(\"zmin\",a.zminDflt||a.min),n(\"zmax\",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel=\"rgba256\",a=W3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n(\"zsmooth\"),n(\"text\"),n(\"hovertext\"),n(\"hovertemplate\"),n(\"hovertemplatefallback\"),r._length=null,n(\"zorder\")}});var Zy=ye((Wfr,mH)=>{typeof Object.create==\"function\"?mH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:mH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var yH=ye((Xfr,Y3e)=>{Y3e.exports=Ab().EventEmitter});var $3e=ye(W8=>{\"use strict\";W8.byteLength=Z3t;W8.toByteArray=K3t;W8.fromByteArray=Q3t;var Gm=[],Y0=[],X3t=typeof Uint8Array!=\"undefined\"?Uint8Array:Array,_H=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";for(m2=0,K3e=_H.length;m2<K3e;++m2)Gm[m2]=_H[m2],Y0[_H.charCodeAt(m2)]=m2;var m2,K3e;Y0[45]=62;Y0[95]=63;function J3e(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Z3t(e){var t=J3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Y3t(e,t,r){return(t+r)*3/4-r}function K3t(e){var t,r=J3e(e),n=r[0],i=r[1],a=new X3t(Y3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l<s;l+=4)t=Y0[e.charCodeAt(l)]<<18|Y0[e.charCodeAt(l+1)]<<12|Y0[e.charCodeAt(l+2)]<<6|Y0[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Y0[e.charCodeAt(l)]<<2|Y0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Y0[e.charCodeAt(l)]<<10|Y0[e.charCodeAt(l+1)]<<4|Y0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function J3t(e){return Gm[e>>18&63]+Gm[e>>12&63]+Gm[e>>6&63]+Gm[e&63]}function $3t(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(J3t(n));return i.join(\"\")}function Q3t(e){for(var t,r=e.length,n=r%3,i=[],a=16383,o=0,s=r-n;o<s;o+=a)i.push($3t(e,o,o+a>s?s:o+a));return n===1?(t=e[r-1],i.push(Gm[t>>2]+Gm[t<<4&63]+\"==\")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Gm[t>>10]+Gm[t>>4&63]+Gm[t<<2&63]+\"=\")),i.join(\"\")}});var Q3e=ye(xH=>{xH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};xH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<<u)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=_*128}});var _2=ye(nA=>{\"use strict\";var bH=$3e(),rA=Q3e(),eTe=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;nA.Buffer=ea;nA.SlowBuffer=aTt;nA.INSPECT_MAX_BYTES=50;var X8=2147483647;nA.kMaxLength=X8;ea.TYPED_ARRAY_SUPPORT=eTt();!ea.TYPED_ARRAY_SUPPORT&&typeof console!=\"undefined\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function eTt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(ea.prototype,\"parent\",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.buffer}});Object.defineProperty(ea.prototype,\"offset\",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.byteOffset}});function Yy(e){if(e>X8)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ea.prototype),t}function ea(e,t,r){if(typeof e==\"number\"){if(typeof t==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return SH(e)}return nTe(e,t,r)}ea.poolSize=8192;function nTe(e,t,r){if(typeof e==\"string\")return rTt(e,t);if(ArrayBuffer.isView(e))return iTt(e);if(e==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(Hm(e,ArrayBuffer)||e&&Hm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!=\"undefined\"&&(Hm(e,SharedArrayBuffer)||e&&Hm(e.buffer,SharedArrayBuffer)))return TH(e,t,r);if(typeof e==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ea.from(n,t,r);let i=nTt(e);if(i)return i;if(typeof Symbol!=\"undefined\"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==\"function\")return ea.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}ea.from=function(e,t,r){return nTe(e,t,r)};Object.setPrototypeOf(ea.prototype,Uint8Array.prototype);Object.setPrototypeOf(ea,Uint8Array);function aTe(e){if(typeof e!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function tTt(e,t,r){return aTe(e),e<=0?Yy(e):t!==void 0?typeof r==\"string\"?Yy(e).fill(t,r):Yy(e).fill(t):Yy(e)}ea.alloc=function(e,t,r){return tTt(e,t,r)};function SH(e){return aTe(e),Yy(e<0?0:MH(e)|0)}ea.allocUnsafe=function(e){return SH(e)};ea.allocUnsafeSlow=function(e){return SH(e)};function rTt(e,t){if((typeof t!=\"string\"||t===\"\")&&(t=\"utf8\"),!ea.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);let r=oTe(e,t)|0,n=Yy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function wH(e){let t=e.length<0?0:MH(e.length)|0,r=Yy(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function iTt(e){if(Hm(e,Uint8Array)){let t=new Uint8Array(e);return TH(t.buffer,t.byteOffset,t.byteLength)}return wH(e)}function TH(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,ea.prototype),n}function nTt(e){if(ea.isBuffer(e)){let t=MH(e.length)|0,r=Yy(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!=\"number\"||kH(e.length)?Yy(0):wH(e);if(e.type===\"Buffer\"&&Array.isArray(e.data))return wH(e.data)}function MH(e){if(e>=X8)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+X8.toString(16)+\" bytes\");return e|0}function aTt(e){return+e!=e&&(e=0),ea.alloc(+e)}ea.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ea.prototype};ea.compare=function(t,r){if(Hm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),Hm(r,Uint8Array)&&(r=ea.from(r,r.offset,r.byteLength)),!ea.isBuffer(t)||!ea.isBuffer(r))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);a<o;++a)if(t[a]!==r[a]){n=t[a],i=r[a];break}return n<i?-1:i<n?1:0};ea.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}};ea.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(t.length===0)return ea.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=ea.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let o=t[n];if(Hm(o,Uint8Array))a+o.length>i.length?(ea.isBuffer(o)||(o=ea.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ea.isBuffer(o))o.copy(i,a);else throw new TypeError('\"list\" argument must be an Array of Buffers');a+=o.length}return i};function oTe(e,t){if(ea.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Hm(e,ArrayBuffer))return e.byteLength;if(typeof e!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return AH(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return r*2;case\"hex\":return r>>>1;case\"base64\":return pTe(e).length;default:if(i)return n?-1:AH(e).length;t=(\"\"+t).toLowerCase(),i=!0}}ea.byteLength=oTe;function oTt(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return gTt(this,t,r);case\"utf8\":case\"utf-8\":return lTe(this,t,r);case\"ascii\":return vTt(this,t,r);case\"latin1\":case\"binary\":return pTt(this,t,r);case\"base64\":return hTt(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return mTt(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}ea.prototype._isBuffer=!0;function y2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ea.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let r=0;r<t;r+=2)y2(this,r,r+1);return this};ea.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let r=0;r<t;r+=4)y2(this,r,r+3),y2(this,r+1,r+2);return this};ea.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let r=0;r<t;r+=8)y2(this,r,r+7),y2(this,r+1,r+6),y2(this,r+2,r+5),y2(this,r+3,r+4);return this};ea.prototype.toString=function(){let t=this.length;return t===0?\"\":arguments.length===0?lTe(this,0,t):oTt.apply(this,arguments)};ea.prototype.toLocaleString=ea.prototype.toString;ea.prototype.equals=function(t){if(!ea.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t?!0:ea.compare(this,t)===0};ea.prototype.inspect=function(){let t=\"\",r=nA.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(t+=\" ... \"),\"<Buffer \"+t+\">\"};eTe&&(ea.prototype[eTe]=ea.prototype.inspect);ea.prototype.compare=function(t,r,n,i,a){if(Hm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),!ea.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError(\"out of range index\");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0};function sTe(e,t,r,n,i){if(e.length===0)return-1;if(typeof r==\"string\"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,kH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t==\"string\"&&(t=ea.from(t,n)),ea.isBuffer(t))return t.length===0?-1:tTe(e,t,r,n,i);if(typeof t==\"number\")return t=t&255,typeof Uint8Array.prototype.indexOf==\"function\"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):tTe(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function tTe(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n===\"ucs2\"||n===\"ucs-2\"||n===\"utf16le\"||n===\"utf-16le\")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;u<o;u++)if(l(e,u)===l(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===s)return c*a}else c!==-1&&(u-=u-c),c=-1}else for(r+s>o&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;f<s;f++)if(l(e,u+f)!==l(t,f)){c=!1;break}if(c)return u}return-1}ea.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};ea.prototype.indexOf=function(t,r,n){return sTe(this,t,r,n,!0)};ea.prototype.lastIndexOf=function(t,r,n){return sTe(this,t,r,n,!1)};function sTt(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o<n;++o){let s=parseInt(t.substr(o*2,2),16);if(kH(s))return o;e[r+o]=s}return o}function lTt(e,t,r,n){return Z8(AH(t,e.length-r),e,r,n)}function uTt(e,t,r,n){return Z8(bTt(t),e,r,n)}function cTt(e,t,r,n){return Z8(pTe(t),e,r,n)}function fTt(e,t,r,n){return Z8(wTt(t,e.length-r),e,r,n)}ea.prototype.write=function(t,r,n,i){if(r===void 0)i=\"utf8\",n=this.length,r=0;else if(n===void 0&&typeof r==\"string\")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i=\"utf8\")):(i=n,n=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");let o=!1;for(;;)switch(i){case\"hex\":return sTt(this,t,r,n);case\"utf8\":case\"utf-8\":return lTt(this,t,r,n);case\"ascii\":case\"latin1\":case\"binary\":return uTt(this,t,r,n);case\"base64\":return cTt(this,t,r,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return fTt(this,t,r,n);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0}};ea.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function hTt(e,t,r){return t===0&&r===e.length?bH.fromByteArray(e):bH.fromByteArray(e.slice(t,r))}function lTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return dTt(n)}var rTe=4096;function dTt(e){let t=e.length;if(t<=rTe)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=rTe));return r}function vTt(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function pTt(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function gTt(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i=\"\";for(let a=t;a<r;++a)i+=TTt[e[a]];return i}function mTt(e,t,r){let n=e.slice(t,r),i=\"\";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}ea.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,ea.prototype),i};function ev(e,t,r){if(e%1!==0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}ea.prototype.readUintLE=ea.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return i};ea.prototype.readUintBE=ea.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ea.prototype.readUint8=ea.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ea.prototype.readUint16LE=ea.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ea.prototype.readUint16BE=ea.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ea.prototype.readUint32LE=ea.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ea.prototype.readUint32BE=ea.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ea.prototype.readBigUInt64LE=N_(function(t){t=t>>>0,iA(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});ea.prototype.readBigUInt64BE=N_(function(t){t=t>>>0,iA(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});ea.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};ea.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ea.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ea.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ea.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ea.prototype.readBigInt64LE=N_(function(t){t=t>>>0,iA(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});ea.prototype.readBigInt64BE=N_(function(t){t=t>>>0,iA(t,\"offset\");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});ea.prototype.readFloatLE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),rA.read(this,t,!0,23,4)};ea.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),rA.read(this,t,!1,23,4)};ea.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),rA.read(this,t,!0,52,8)};ea.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),rA.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ea.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}ea.prototype.writeUintLE=ea.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o<n&&(a*=256);)this[r+o]=t/a&255;return r+n};ea.prototype.writeUintBE=ea.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ea.prototype.writeUint8=ea.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ea.prototype.writeUint16LE=ea.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeUint16BE=ea.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeUint32LE=ea.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ea.prototype.writeUint32BE=ea.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function uTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function cTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ea.prototype.writeBigUInt64LE=N_(function(t,r=0){return uTe(this,t,r,BigInt(0),BigInt(\"0xffffffffffffffff\"))});ea.prototype.writeBigUInt64BE=N_(function(t,r=0){return cTe(this,t,r,BigInt(0),BigInt(\"0xffffffffffffffff\"))});ea.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a<n&&(o*=256);)t<0&&s===0&&this[r+a-1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ea.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ea.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ea.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ea.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ea.prototype.writeBigInt64LE=N_(function(t,r=0){return uTe(this,t,r,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});ea.prototype.writeBigInt64BE=N_(function(t,r=0){return cTe(this,t,r,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function fTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function hTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),rA.write(e,t,r,n,23,4),r+4}ea.prototype.writeFloatLE=function(t,r,n){return hTe(this,t,r,!0,n)};ea.prototype.writeFloatBE=function(t,r,n){return hTe(this,t,r,!1,n)};function dTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),rA.write(e,t,r,n,52,8),r+8}ea.prototype.writeDoubleLE=function(t,r,n){return dTe(this,t,r,!0,n)};ea.prototype.writeDoubleBE=function(t,r,n){return dTe(this,t,r,!1,n)};ea.prototype.copy=function(t,r,n,i){if(!ea.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let a=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin==\"function\"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),a};ea.prototype.fill=function(t,r,n,i){if(typeof t==\"string\"){if(typeof r==\"string\"?(i=r,r=0,n=this.length):typeof n==\"string\"&&(i=n,n=this.length),i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!ea.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i);if(t.length===1){let o=t.charCodeAt(0);(i===\"utf8\"&&o<128||i===\"latin1\")&&(t=o)}}else typeof t==\"number\"?t=t&255:typeof t==\"boolean\"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError(\"Out of range index\");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t==\"number\")for(a=r;a<n;++a)this[a]=t;else{let o=ea.isBuffer(t)?t:ea.from(t,i),s=o.length;if(s===0)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(a=0;a<n-r;++a)this[a+r]=o[a%s]}return this};var tA={};function EH(e,t,r){tA[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}EH(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"},RangeError);EH(\"ERR_INVALID_ARG_TYPE\",function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`},TypeError);EH(\"ERR_OUT_OF_RANGE\",function(e,t,r){let n=`The value of \"${e}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=iTe(String(r)):typeof r==\"bigint\"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=iTe(i)),i+=\"n\"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function iTe(e){let t=\"\",r=e.length,n=e[0]===\"-\"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function yTt(e,t,r){iA(t,\"offset\"),(e[t]===void 0||e[t+r]===void 0)&&Y4(t,e.length-(r+1))}function vTe(e,t,r,n,i,a){if(e>r||e<t){let o=typeof t==\"bigint\"?\"n\":\"\",s;throw a>3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new tA.ERR_OUT_OF_RANGE(\"value\",s,e)}yTt(n,i,a)}function iA(e,t){if(typeof e!=\"number\")throw new tA.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function Y4(e,t,r){throw Math.floor(e)!==e?(iA(e,r),new tA.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e)):t<0?new tA.ERR_BUFFER_OUT_OF_BOUNDS:new tA.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}var _Tt=/[^+/0-9A-Za-z-_]/g;function xTt(e){if(e=e.split(\"=\")[0],e=e.trim().replace(_Tt,\"\"),e.length<2)return\"\";for(;e.length%4!==0;)e=e+\"=\";return e}function AH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error(\"Invalid code point\")}return a}function bTt(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function wTt(e,t){let r,n,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function pTe(e){return bH.toByteArray(xTt(e))}function Z8(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Hm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function kH(e){return e!==e}var TTt=function(){let e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function N_(e){return typeof BigInt==\"undefined\"?ATt:e}function ATt(){throw new Error(\"BigInt not supported\")}});var Y8=ye(($fr,gTe)=>{\"use strict\";gTe.exports=function(){if(typeof Symbol!=\"function\"||typeof Object.getOwnPropertySymbols!=\"function\")return!1;if(typeof Symbol.iterator==\"symbol\")return!0;var t={},r=Symbol(\"test\"),n=Object(r);if(typeof r==\"string\"||Object.prototype.toString.call(r)!==\"[object Symbol]\"||Object.prototype.toString.call(n)!==\"[object Symbol]\")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys==\"function\"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames==\"function\"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor==\"function\"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var K4=ye((Qfr,mTe)=>{\"use strict\";var STt=Y8();mTe.exports=function(){return STt()&&!!Symbol.toStringTag}});var CH=ye((ehr,yTe)=>{\"use strict\";yTe.exports=Object});var xTe=ye((thr,_Te)=>{\"use strict\";_Te.exports=Error});var wTe=ye((rhr,bTe)=>{\"use strict\";bTe.exports=EvalError});var ATe=ye((ihr,TTe)=>{\"use strict\";TTe.exports=RangeError});var MTe=ye((nhr,STe)=>{\"use strict\";STe.exports=ReferenceError});var LH=ye((ahr,ETe)=>{\"use strict\";ETe.exports=SyntaxError});var aA=ye((ohr,kTe)=>{\"use strict\";kTe.exports=TypeError});var LTe=ye((shr,CTe)=>{\"use strict\";CTe.exports=URIError});var ITe=ye((lhr,PTe)=>{\"use strict\";PTe.exports=Math.abs});var DTe=ye((uhr,RTe)=>{\"use strict\";RTe.exports=Math.floor});var zTe=ye((chr,FTe)=>{\"use strict\";FTe.exports=Math.max});var qTe=ye((fhr,OTe)=>{\"use strict\";OTe.exports=Math.min});var NTe=ye((hhr,BTe)=>{\"use strict\";BTe.exports=Math.pow});var VTe=ye((dhr,UTe)=>{\"use strict\";UTe.exports=Math.round});var HTe=ye((vhr,GTe)=>{\"use strict\";GTe.exports=Number.isNaN||function(t){return t!==t}});var WTe=ye((phr,jTe)=>{\"use strict\";var MTt=HTe();jTe.exports=function(t){return MTt(t)||t===0?t:t<0?-1:1}});var ZTe=ye((ghr,XTe)=>{\"use strict\";XTe.exports=Object.getOwnPropertyDescriptor});var x2=ye((mhr,YTe)=>{\"use strict\";var K8=ZTe();if(K8)try{K8([],\"length\")}catch(e){K8=null}YTe.exports=K8});var J4=ye((yhr,KTe)=>{\"use strict\";var J8=Object.defineProperty||!1;if(J8)try{J8({},\"a\",{value:1})}catch(e){J8=!1}KTe.exports=J8});var QTe=ye((_hr,$Te)=>{\"use strict\";var JTe=typeof Symbol!=\"undefined\"&&Symbol,ETt=Y8();$Te.exports=function(){return typeof JTe!=\"function\"||typeof Symbol!=\"function\"||typeof JTe(\"foo\")!=\"symbol\"||typeof Symbol(\"bar\")!=\"symbol\"?!1:ETt()}});var PH=ye((xhr,eAe)=>{\"use strict\";eAe.exports=typeof Reflect!=\"undefined\"&&Reflect.getPrototypeOf||null});var IH=ye((bhr,tAe)=>{\"use strict\";var kTt=CH();tAe.exports=kTt.getPrototypeOf||null});var nAe=ye((whr,iAe)=>{\"use strict\";var CTt=\"Function.prototype.bind called on incompatible \",LTt=Object.prototype.toString,PTt=Math.max,ITt=\"[object Function]\",rAe=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},RTt=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},DTt=function(e,t){for(var r=\"\",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};iAe.exports=function(t){var r=this;if(typeof r!=\"function\"||LTt.apply(r)!==ITt)throw new TypeError(CTt+r);for(var n=RTt(arguments,1),i,a=function(){if(this instanceof i){var c=r.apply(this,rAe(n,arguments));return Object(c)===c?c:this}return r.apply(t,rAe(n,arguments))},o=PTt(0,r.length-n.length),s=[],l=0;l<o;l++)s[l]=\"$\"+l;if(i=Function(\"binder\",\"return function (\"+DTt(s,\",\")+\"){ return binder.apply(this,arguments); }\")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var oA=ye((Thr,aAe)=>{\"use strict\";var FTt=nAe();aAe.exports=Function.prototype.bind||FTt});var $8=ye((Ahr,oAe)=>{\"use strict\";oAe.exports=Function.prototype.call});var RH=ye((Shr,sAe)=>{\"use strict\";sAe.exports=Function.prototype.apply});var uAe=ye((Mhr,lAe)=>{\"use strict\";lAe.exports=typeof Reflect!=\"undefined\"&&Reflect&&Reflect.apply});var fAe=ye((Ehr,cAe)=>{\"use strict\";var zTt=oA(),OTt=RH(),qTt=$8(),BTt=uAe();cAe.exports=BTt||zTt.call(qTt,OTt)});var dAe=ye((khr,hAe)=>{\"use strict\";var NTt=oA(),UTt=aA(),VTt=$8(),GTt=fAe();hAe.exports=function(t){if(t.length<1||typeof t[0]!=\"function\")throw new UTt(\"a function is required\");return GTt(NTt,VTt,t)}});var _Ae=ye((Chr,yAe)=>{\"use strict\";var HTt=dAe(),vAe=x2(),gAe;try{gAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=\"object\"||!(\"code\"in e)||e.code!==\"ERR_PROTO_ACCESS\")throw e}var DH=!!gAe&&vAe&&vAe(Object.prototype,\"__proto__\"),mAe=Object,pAe=mAe.getPrototypeOf;yAe.exports=DH&&typeof DH.get==\"function\"?HTt([DH.get]):typeof pAe==\"function\"?function(t){return pAe(t==null?t:mAe(t))}:!1});var AAe=ye((Lhr,TAe)=>{\"use strict\";var xAe=PH(),bAe=IH(),wAe=_Ae();TAe.exports=xAe?function(t){return xAe(t)}:bAe?function(t){if(!t||typeof t!=\"object\"&&typeof t!=\"function\")throw new TypeError(\"getProto: not an object\");return bAe(t)}:wAe?function(t){return wAe(t)}:null});var MAe=ye((Phr,SAe)=>{\"use strict\";var jTt=Function.prototype.call,WTt=Object.prototype.hasOwnProperty,XTt=oA();SAe.exports=XTt.call(jTt,WTt)});var tR=ye((Ihr,IAe)=>{\"use strict\";var lu,ZTt=CH(),YTt=xTe(),KTt=wTe(),JTt=ATe(),$Tt=MTe(),cA=LH(),uA=aA(),QTt=LTe(),eAt=ITe(),tAt=DTe(),rAt=zTe(),iAt=qTe(),nAt=NTe(),aAt=VTe(),oAt=WTe(),LAe=Function,FH=function(e){try{return LAe('\"use strict\"; return ('+e+\").constructor;\")()}catch(t){}},$4=x2(),sAt=J4(),zH=function(){throw new uA},lAt=$4?function(){try{return arguments.callee,zH}catch(e){try{return $4(arguments,\"callee\").get}catch(t){return zH}}}():zH,sA=QTe()(),tv=AAe(),uAt=IH(),cAt=PH(),PAe=RH(),Q4=$8(),lA={},fAt=typeof Uint8Array==\"undefined\"||!tv?lu:tv(Uint8Array),b2={__proto__:null,\"%AggregateError%\":typeof AggregateError==\"undefined\"?lu:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":typeof ArrayBuffer==\"undefined\"?lu:ArrayBuffer,\"%ArrayIteratorPrototype%\":sA&&tv?tv([][Symbol.iterator]()):lu,\"%AsyncFromSyncIteratorPrototype%\":lu,\"%AsyncFunction%\":lA,\"%AsyncGenerator%\":lA,\"%AsyncGeneratorFunction%\":lA,\"%AsyncIteratorPrototype%\":lA,\"%Atomics%\":typeof Atomics==\"undefined\"?lu:Atomics,\"%BigInt%\":typeof BigInt==\"undefined\"?lu:BigInt,\"%BigInt64Array%\":typeof BigInt64Array==\"undefined\"?lu:BigInt64Array,\"%BigUint64Array%\":typeof BigUint64Array==\"undefined\"?lu:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":typeof DataView==\"undefined\"?lu:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":YTt,\"%eval%\":eval,\"%EvalError%\":KTt,\"%Float16Array%\":typeof Float16Array==\"undefined\"?lu:Float16Array,\"%Float32Array%\":typeof Float32Array==\"undefined\"?lu:Float32Array,\"%Float64Array%\":typeof Float64Array==\"undefined\"?lu:Float64Array,\"%FinalizationRegistry%\":typeof FinalizationRegistry==\"undefined\"?lu:FinalizationRegistry,\"%Function%\":LAe,\"%GeneratorFunction%\":lA,\"%Int8Array%\":typeof Int8Array==\"undefined\"?lu:Int8Array,\"%Int16Array%\":typeof Int16Array==\"undefined\"?lu:Int16Array,\"%Int32Array%\":typeof Int32Array==\"undefined\"?lu:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":sA&&tv?tv(tv([][Symbol.iterator]())):lu,\"%JSON%\":typeof JSON==\"object\"?JSON:lu,\"%Map%\":typeof Map==\"undefined\"?lu:Map,\"%MapIteratorPrototype%\":typeof Map==\"undefined\"||!sA||!tv?lu:tv(new Map()[Symbol.iterator]()),\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":ZTt,\"%Object.getOwnPropertyDescriptor%\":$4,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":typeof Promise==\"undefined\"?lu:Promise,\"%Proxy%\":typeof Proxy==\"undefined\"?lu:Proxy,\"%RangeError%\":JTt,\"%ReferenceError%\":$Tt,\"%Reflect%\":typeof Reflect==\"undefined\"?lu:Reflect,\"%RegExp%\":RegExp,\"%Set%\":typeof Set==\"undefined\"?lu:Set,\"%SetIteratorPrototype%\":typeof Set==\"undefined\"||!sA||!tv?lu:tv(new Set()[Symbol.iterator]()),\"%SharedArrayBuffer%\":typeof SharedArrayBuffer==\"undefined\"?lu:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":sA&&tv?tv(\"\"[Symbol.iterator]()):lu,\"%Symbol%\":sA?Symbol:lu,\"%SyntaxError%\":cA,\"%ThrowTypeError%\":lAt,\"%TypedArray%\":fAt,\"%TypeError%\":uA,\"%Uint8Array%\":typeof Uint8Array==\"undefined\"?lu:Uint8Array,\"%Uint8ClampedArray%\":typeof Uint8ClampedArray==\"undefined\"?lu:Uint8ClampedArray,\"%Uint16Array%\":typeof Uint16Array==\"undefined\"?lu:Uint16Array,\"%Uint32Array%\":typeof Uint32Array==\"undefined\"?lu:Uint32Array,\"%URIError%\":QTt,\"%WeakMap%\":typeof WeakMap==\"undefined\"?lu:WeakMap,\"%WeakRef%\":typeof WeakRef==\"undefined\"?lu:WeakRef,\"%WeakSet%\":typeof WeakSet==\"undefined\"?lu:WeakSet,\"%Function.prototype.call%\":Q4,\"%Function.prototype.apply%\":PAe,\"%Object.defineProperty%\":sAt,\"%Object.getPrototypeOf%\":uAt,\"%Math.abs%\":eAt,\"%Math.floor%\":tAt,\"%Math.max%\":rAt,\"%Math.min%\":iAt,\"%Math.pow%\":nAt,\"%Math.round%\":aAt,\"%Math.sign%\":oAt,\"%Reflect.getPrototypeOf%\":cAt};if(tv)try{null.error}catch(e){EAe=tv(tv(e)),b2[\"%Error.prototype%\"]=EAe}var EAe,hAt=function e(t){var r;if(t===\"%AsyncFunction%\")r=FH(\"async function () {}\");else if(t===\"%GeneratorFunction%\")r=FH(\"function* () {}\");else if(t===\"%AsyncGeneratorFunction%\")r=FH(\"async function* () {}\");else if(t===\"%AsyncGenerator%\"){var n=e(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(t===\"%AsyncIteratorPrototype%\"){var i=e(\"%AsyncGenerator%\");i&&tv&&(r=tv(i.prototype))}return b2[t]=r,r},kAe={__proto__:null,\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},eE=oA(),Q8=MAe(),dAt=eE.call(Q4,Array.prototype.concat),vAt=eE.call(PAe,Array.prototype.splice),CAe=eE.call(Q4,String.prototype.replace),eR=eE.call(Q4,String.prototype.slice),pAt=eE.call(Q4,RegExp.prototype.exec),gAt=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,mAt=/\\\\(\\\\)?/g,yAt=function(t){var r=eR(t,0,1),n=eR(t,-1);if(r===\"%\"&&n!==\"%\")throw new cA(\"invalid intrinsic syntax, expected closing `%`\");if(n===\"%\"&&r!==\"%\")throw new cA(\"invalid intrinsic syntax, expected opening `%`\");var i=[];return CAe(t,gAt,function(a,o,s,l){i[i.length]=s?CAe(l,mAt,\"$1\"):o||a}),i},_At=function(t,r){var n=t,i;if(Q8(kAe,n)&&(i=kAe[n],n=\"%\"+i[0]+\"%\"),Q8(b2,n)){var a=b2[n];if(a===lA&&(a=hAt(n)),typeof a==\"undefined\"&&!r)throw new uA(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:i,name:n,value:a}}throw new cA(\"intrinsic \"+t+\" does not exist!\")};IAe.exports=function(t,r){if(typeof t!=\"string\"||t.length===0)throw new uA(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&typeof r!=\"boolean\")throw new uA('\"allowMissing\" argument must be a boolean');if(pAt(/^%?[^%]*%?$/,t)===null)throw new cA(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var n=yAt(t),i=n.length>0?n[0]:\"\",a=_At(\"%\"+i+\"%\",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],vAt(n,dAt([0,1],u)));for(var c=1,f=!0;c<n.length;c+=1){var h=n[c],d=eR(h,0,1),v=eR(h,-1);if((d==='\"'||d===\"'\"||d===\"`\"||v==='\"'||v===\"'\"||v===\"`\")&&d!==v)throw new cA(\"property names with quotes must have matching quotes\");if((h===\"constructor\"||!f)&&(l=!0),i+=\".\"+h,o=\"%\"+i+\"%\",Q8(b2,o))s=b2[o];else if(s!=null){if(!(h in s)){if(!r)throw new uA(\"base intrinsic for \"+t+\" exists, but the property is not available.\");return}if($4&&c+1>=n.length){var _=$4(s,h);f=!!_,f&&\"get\"in _&&!(\"originalValue\"in _.get)?s=_.get:s=s[h]}else f=Q8(s,h),s=s[h];f&&!l&&(b2[o]=s)}}return s}});var zAe=ye((Rhr,FAe)=>{\"use strict\";var RAe=J4(),xAt=LH(),fA=aA(),DAe=x2();FAe.exports=function(t,r,n){if(!t||typeof t!=\"object\"&&typeof t!=\"function\")throw new fA(\"`obj` must be an object or a function`\");if(typeof r!=\"string\"&&typeof r!=\"symbol\")throw new fA(\"`property` must be a string or a symbol`\");if(arguments.length>3&&typeof arguments[3]!=\"boolean\"&&arguments[3]!==null)throw new fA(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&typeof arguments[4]!=\"boolean\"&&arguments[4]!==null)throw new fA(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&typeof arguments[5]!=\"boolean\"&&arguments[5]!==null)throw new fA(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&typeof arguments[6]!=\"boolean\")throw new fA(\"`loose`, if provided, must be a boolean\");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!DAe&&DAe(t,r);if(RAe)RAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new xAt(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\")}});var qH=ye((Dhr,qAe)=>{\"use strict\";var OH=J4(),OAe=function(){return!!OH};OAe.hasArrayLengthDefineBug=function(){if(!OH)return null;try{return OH([],\"length\",{value:1}).length!==1}catch(t){return!0}};qAe.exports=OAe});var GAe=ye((Fhr,VAe)=>{\"use strict\";var bAt=tR(),BAe=zAe(),wAt=qH()(),NAe=x2(),UAe=aA(),TAt=bAt(\"%Math.floor%\");VAe.exports=function(t,r){if(typeof t!=\"function\")throw new UAe(\"`fn` is not a function\");if(typeof r!=\"number\"||r<0||r>4294967295||TAt(r)!==r)throw new UAe(\"`length` must be a positive 32-bit integer\");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if(\"length\"in t&&NAe){var o=NAe(t,\"length\");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(wAt?BAe(t,\"length\",r,!0,!0):BAe(t,\"length\",r)),t}});var tE=ye((zhr,rR)=>{\"use strict\";var BH=oA(),iR=tR(),AAt=GAe(),SAt=aA(),WAe=iR(\"%Function.prototype.apply%\"),XAe=iR(\"%Function.prototype.call%\"),ZAe=iR(\"%Reflect.apply%\",!0)||BH.call(XAe,WAe),HAe=J4(),MAt=iR(\"%Math.max%\");rR.exports=function(t){if(typeof t!=\"function\")throw new SAt(\"a function is required\");var r=ZAe(BH,XAe,arguments);return AAt(r,1+MAt(0,t.length-(arguments.length-1)),!0)};var jAe=function(){return ZAe(BH,WAe,arguments)};HAe?HAe(rR.exports,\"apply\",{value:jAe}):rR.exports.apply=jAe});var hA=ye((Ohr,JAe)=>{\"use strict\";var YAe=tR(),KAe=tE(),EAt=KAe(YAe(\"String.prototype.indexOf\"));JAe.exports=function(t,r){var n=YAe(t,!!r);return typeof n==\"function\"&&EAt(t,\".prototype.\")>-1?KAe(n):n}});var e5e=ye((qhr,QAe)=>{\"use strict\";var kAt=K4()(),CAt=hA(),NH=CAt(\"Object.prototype.toString\"),nR=function(t){return kAt&&t&&typeof t==\"object\"&&Symbol.toStringTag in t?!1:NH(t)===\"[object Arguments]\"},$Ae=function(t){return nR(t)?!0:t!==null&&typeof t==\"object\"&&typeof t.length==\"number\"&&t.length>=0&&NH(t)!==\"[object Array]\"&&NH(t.callee)===\"[object Function]\"},LAt=function(){return nR(arguments)}();nR.isLegacyArguments=$Ae;QAe.exports=LAt?nR:$Ae});var i5e=ye((Bhr,r5e)=>{\"use strict\";var PAt=Object.prototype.toString,IAt=Function.prototype.toString,RAt=/^\\s*(?:function)?\\*/,t5e=K4()(),UH=Object.getPrototypeOf,DAt=function(){if(!t5e)return!1;try{return Function(\"return function*() {}\")()}catch(e){}},VH;r5e.exports=function(t){if(typeof t!=\"function\")return!1;if(RAt.test(IAt.call(t)))return!0;if(!t5e){var r=PAt.call(t);return r===\"[object GeneratorFunction]\"}if(!UH)return!1;if(typeof VH==\"undefined\"){var n=DAt();VH=n?UH(n):!1}return UH(t)===VH}});var s5e=ye((Nhr,o5e)=>{\"use strict\";var a5e=Function.prototype.toString,dA=typeof Reflect==\"object\"&&Reflect!==null&&Reflect.apply,HH,aR;if(typeof dA==\"function\"&&typeof Object.defineProperty==\"function\")try{HH=Object.defineProperty({},\"length\",{get:function(){throw aR}}),aR={},dA(function(){throw 42},null,HH)}catch(e){e!==aR&&(dA=null)}else dA=null;var FAt=/^\\s*class\\b/,jH=function(t){try{var r=a5e.call(t);return FAt.test(r)}catch(n){return!1}},GH=function(t){try{return jH(t)?!1:(a5e.call(t),!0)}catch(r){return!1}},oR=Object.prototype.toString,zAt=\"[object Object]\",OAt=\"[object Function]\",qAt=\"[object GeneratorFunction]\",BAt=\"[object HTMLAllCollection]\",NAt=\"[object HTML document.all class]\",UAt=\"[object HTMLCollection]\",VAt=typeof Symbol==\"function\"&&!!Symbol.toStringTag,GAt=!(0 in[,]),WH=function(){return!1};typeof document==\"object\"&&(n5e=document.all,oR.call(n5e)===oR.call(document.all)&&(WH=function(t){if((GAt||!t)&&(typeof t==\"undefined\"||typeof t==\"object\"))try{var r=oR.call(t);return(r===BAt||r===NAt||r===UAt||r===zAt)&&t(\"\")==null}catch(n){}return!1}));var n5e;o5e.exports=dA?function(t){if(WH(t))return!0;if(!t||typeof t!=\"function\"&&typeof t!=\"object\")return!1;try{dA(t,null,HH)}catch(r){if(r!==aR)return!1}return!jH(t)&&GH(t)}:function(t){if(WH(t))return!0;if(!t||typeof t!=\"function\"&&typeof t!=\"object\")return!1;if(VAt)return GH(t);if(jH(t))return!1;var r=oR.call(t);return r!==OAt&&r!==qAt&&!/^\\[object HTML/.test(r)?!1:GH(t)}});var XH=ye((Uhr,u5e)=>{\"use strict\";var HAt=s5e(),jAt=Object.prototype.toString,l5e=Object.prototype.hasOwnProperty,WAt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)l5e.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},XAt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},ZAt=function(t,r,n){for(var i in t)l5e.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},YAt=function(t,r,n){if(!HAt(r))throw new TypeError(\"iterator must be a function\");var i;arguments.length>=3&&(i=n),jAt.call(t)===\"[object Array]\"?WAt(t,r,i):typeof t==\"string\"?XAt(t,r,i):ZAt(t,r,i)};u5e.exports=YAt});var YH=ye((Vhr,c5e)=>{\"use strict\";var ZH=[\"BigInt64Array\",\"BigUint64Array\",\"Float32Array\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\"],KAt=typeof globalThis==\"undefined\"?window:globalThis;c5e.exports=function(){for(var t=[],r=0;r<ZH.length;r++)typeof KAt[ZH[r]]==\"function\"&&(t[t.length]=ZH[r]);return t}});var p5e=ye((Ghr,v5e)=>{\"use strict\";var lR=XH(),JAt=YH(),f5e=tE(),$H=hA(),sR=x2(),$At=$H(\"Object.prototype.toString\"),d5e=K4()(),h5e=typeof globalThis==\"undefined\"?window:globalThis,JH=JAt(),QH=$H(\"String.prototype.slice\"),KH=Object.getPrototypeOf,QAt=$H(\"Array.prototype.indexOf\",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},uR={__proto__:null};d5e&&sR&&KH?lR(JH,function(e){var t=new h5e[e];if(Symbol.toStringTag in t){var r=KH(t),n=sR(r,Symbol.toStringTag);if(!n){var i=KH(r);n=sR(i,Symbol.toStringTag)}uR[\"$\"+e]=f5e(n.get)}}):lR(JH,function(e){var t=new h5e[e],r=t.slice||t.set;r&&(uR[\"$\"+e]=f5e(r))});var e5t=function(t){var r=!1;return lR(uR,function(n,i){if(!r)try{\"$\"+n(t)===i&&(r=QH(i,1))}catch(a){}}),r},t5t=function(t){var r=!1;return lR(uR,function(n,i){if(!r)try{n(t),r=QH(i,1)}catch(a){}}),r};v5e.exports=function(t){if(!t||typeof t!=\"object\")return!1;if(!d5e){var r=QH($At(t),8,-1);return QAt(JH,r)>-1?r:r!==\"Object\"?!1:t5t(t)}return sR?e5t(t):null}});var b5e=ye((Hhr,x5e)=>{\"use strict\";var g5e=XH(),r5t=YH(),tj=hA(),i5t=tj(\"Object.prototype.toString\"),m5e=K4()(),cR=x2(),n5t=typeof globalThis==\"undefined\"?window:globalThis,y5e=r5t(),a5t=tj(\"Array.prototype.indexOf\",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},o5t=tj(\"String.prototype.slice\"),_5e={},ej=Object.getPrototypeOf;m5e&&cR&&ej&&g5e(y5e,function(e){var t=new n5t[e];if(Symbol.toStringTag in t){var r=ej(t),n=cR(r,Symbol.toStringTag);if(!n){var i=ej(r);n=cR(i,Symbol.toStringTag)}_5e[e]=n.get}});var s5t=function(t){var r=!1;return g5e(_5e,function(n,i){if(!r)try{r=n.call(t)===i}catch(a){}}),r};x5e.exports=function(t){if(!t||typeof t!=\"object\")return!1;if(!m5e||!(Symbol.toStringTag in t)){var r=o5t(i5t(t),8,-1);return a5t(y5e,r)>-1}return cR?s5t(t):!1}});var nj=ye(uu=>{\"use strict\";var l5t=e5e(),u5t=i5e(),Wg=p5e(),w5e=b5e();function vA(e){return e.call.bind(e)}var T5e=typeof BigInt!=\"undefined\",A5e=typeof Symbol!=\"undefined\",K0=vA(Object.prototype.toString),c5t=vA(Number.prototype.valueOf),f5t=vA(String.prototype.valueOf),h5t=vA(Boolean.prototype.valueOf);T5e&&(S5e=vA(BigInt.prototype.valueOf));var S5e;A5e&&(M5e=vA(Symbol.prototype.valueOf));var M5e;function iE(e,t){if(typeof e!=\"object\")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=l5t;uu.isGeneratorFunction=u5t;uu.isTypedArray=w5e;function d5t(e){return typeof Promise!=\"undefined\"&&e instanceof Promise||e!==null&&typeof e==\"object\"&&typeof e.then==\"function\"&&typeof e.catch==\"function\"}uu.isPromise=d5t;function v5t(e){return typeof ArrayBuffer!=\"undefined\"&&ArrayBuffer.isView?ArrayBuffer.isView(e):w5e(e)||k5e(e)}uu.isArrayBufferView=v5t;function p5t(e){return Wg(e)===\"Uint8Array\"}uu.isUint8Array=p5t;function g5t(e){return Wg(e)===\"Uint8ClampedArray\"}uu.isUint8ClampedArray=g5t;function m5t(e){return Wg(e)===\"Uint16Array\"}uu.isUint16Array=m5t;function y5t(e){return Wg(e)===\"Uint32Array\"}uu.isUint32Array=y5t;function _5t(e){return Wg(e)===\"Int8Array\"}uu.isInt8Array=_5t;function x5t(e){return Wg(e)===\"Int16Array\"}uu.isInt16Array=x5t;function b5t(e){return Wg(e)===\"Int32Array\"}uu.isInt32Array=b5t;function w5t(e){return Wg(e)===\"Float32Array\"}uu.isFloat32Array=w5t;function T5t(e){return Wg(e)===\"Float64Array\"}uu.isFloat64Array=T5t;function A5t(e){return Wg(e)===\"BigInt64Array\"}uu.isBigInt64Array=A5t;function S5t(e){return Wg(e)===\"BigUint64Array\"}uu.isBigUint64Array=S5t;function fR(e){return K0(e)===\"[object Map]\"}fR.working=typeof Map!=\"undefined\"&&fR(new Map);function M5t(e){return typeof Map==\"undefined\"?!1:fR.working?fR(e):e instanceof Map}uu.isMap=M5t;function hR(e){return K0(e)===\"[object Set]\"}hR.working=typeof Set!=\"undefined\"&&hR(new Set);function E5t(e){return typeof Set==\"undefined\"?!1:hR.working?hR(e):e instanceof Set}uu.isSet=E5t;function dR(e){return K0(e)===\"[object WeakMap]\"}dR.working=typeof WeakMap!=\"undefined\"&&dR(new WeakMap);function k5t(e){return typeof WeakMap==\"undefined\"?!1:dR.working?dR(e):e instanceof WeakMap}uu.isWeakMap=k5t;function ij(e){return K0(e)===\"[object WeakSet]\"}ij.working=typeof WeakSet!=\"undefined\"&&ij(new WeakSet);function C5t(e){return ij(e)}uu.isWeakSet=C5t;function vR(e){return K0(e)===\"[object ArrayBuffer]\"}vR.working=typeof ArrayBuffer!=\"undefined\"&&vR(new ArrayBuffer);function E5e(e){return typeof ArrayBuffer==\"undefined\"?!1:vR.working?vR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=E5e;function pR(e){return K0(e)===\"[object DataView]\"}pR.working=typeof ArrayBuffer!=\"undefined\"&&typeof DataView!=\"undefined\"&&pR(new DataView(new ArrayBuffer(1),0,1));function k5e(e){return typeof DataView==\"undefined\"?!1:pR.working?pR(e):e instanceof DataView}uu.isDataView=k5e;var rj=typeof SharedArrayBuffer!=\"undefined\"?SharedArrayBuffer:void 0;function rE(e){return K0(e)===\"[object SharedArrayBuffer]\"}function C5e(e){return typeof rj==\"undefined\"?!1:(typeof rE.working==\"undefined\"&&(rE.working=rE(new rj)),rE.working?rE(e):e instanceof rj)}uu.isSharedArrayBuffer=C5e;function L5t(e){return K0(e)===\"[object AsyncFunction]\"}uu.isAsyncFunction=L5t;function P5t(e){return K0(e)===\"[object Map Iterator]\"}uu.isMapIterator=P5t;function I5t(e){return K0(e)===\"[object Set Iterator]\"}uu.isSetIterator=I5t;function R5t(e){return K0(e)===\"[object Generator]\"}uu.isGeneratorObject=R5t;function D5t(e){return K0(e)===\"[object WebAssembly.Module]\"}uu.isWebAssemblyCompiledModule=D5t;function L5e(e){return iE(e,c5t)}uu.isNumberObject=L5e;function P5e(e){return iE(e,f5t)}uu.isStringObject=P5e;function I5e(e){return iE(e,h5t)}uu.isBooleanObject=I5e;function R5e(e){return T5e&&iE(e,S5e)}uu.isBigIntObject=R5e;function D5e(e){return A5e&&iE(e,M5e)}uu.isSymbolObject=D5e;function F5t(e){return L5e(e)||P5e(e)||I5e(e)||R5e(e)||D5e(e)}uu.isBoxedPrimitive=F5t;function z5t(e){return typeof Uint8Array!=\"undefined\"&&(E5e(e)||C5e(e))}uu.isAnyArrayBuffer=z5t;[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+\" is not supported in userland\")}})})});var aj=ye((Whr,F5e)=>{F5e.exports=function(t){return t&&typeof t==\"object\"&&typeof t.copy==\"function\"&&typeof t.fill==\"function\"&&typeof t.readUInt8==\"function\"}});var fj=ye(cu=>{var z5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},O5t=/%[sdj%]/g;cu.format=function(e){if(!wR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(U_(arguments[r]));return t.join(\" \")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(O5t,function(s){if(s===\"%%\")return\"%\";if(r>=i)return s;switch(s){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(l){return\"[Circular]\"}default:return s}}),o=n[r];r<i;o=n[++r])bR(o)||!pA(o)?a+=\" \"+o:a+=\" \"+U_(o);return a};cu.deprecate=function(e,t){if(typeof process!=\"undefined\"&&process.noDeprecation===!0)return e;if(typeof process==\"undefined\")return function(){return cu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var gR={},O5e=/^$/;mR=\"false\",mR=mR.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),O5e=new RegExp(\"^\"+mR+\"$\",\"i\");var mR;cu.debuglog=function(e){if(e=e.toUpperCase(),!gR[e])if(O5e.test(e)){var t=process.pid;gR[e]=function(){var r=cu.format.apply(cu,arguments);console.error(\"%s %d: %s\",e,t,r)}}else gR[e]=function(){};return gR[e]};function U_(e,t){var r={seen:[],stylize:B5t};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),uj(t)?r.showHidden=t:t&&cu._extend(r,t),T2(r.showHidden)&&(r.showHidden=!1),T2(r.depth)&&(r.depth=2),T2(r.colors)&&(r.colors=!1),T2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=q5t),_R(r,e,r.depth)}cu.inspect=U_;U_.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]};U_.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"};function q5t(e,t){var r=U_.styles[t];return r?\"\\x1B[\"+U_.colors[r][0]+\"m\"+e+\"\\x1B[\"+U_.colors[r][1]+\"m\":e}function B5t(e,t){return e}function N5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function _R(e,t,r){if(e.customInspect&&t&&yR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return wR(n)||(n=_R(e,n,r)),n}var i=U5t(e,t);if(i)return i;var a=Object.keys(t),o=N5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),aE(t)&&(a.indexOf(\"message\")>=0||a.indexOf(\"description\")>=0))return oj(t);if(a.length===0){if(yR(t)){var s=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+s+\"]\",\"special\")}if(nE(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(xR(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(aE(t))return oj(t)}var l=\"\",u=!1,c=[\"{\",\"}\"];if(q5e(t)&&(u=!0,c=[\"[\",\"]\"]),yR(t)){var f=t.name?\": \"+t.name:\"\";l=\" [Function\"+f+\"]\"}if(nE(t)&&(l=\" \"+RegExp.prototype.toString.call(t)),xR(t)&&(l=\" \"+Date.prototype.toUTCString.call(t)),aE(t)&&(l=\" \"+oj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return nE(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(t);var h;return u?h=V5t(e,t,r,o,a):h=a.map(function(d){return lj(e,t,r,o,d,u)}),e.seen.pop(),G5t(h,l,c)}function U5t(e,t){if(T2(t))return e.stylize(\"undefined\",\"undefined\");if(wR(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}if(B5e(t))return e.stylize(\"\"+t,\"number\");if(uj(t))return e.stylize(\"\"+t,\"boolean\");if(bR(t))return e.stylize(\"null\",\"null\")}function oj(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function V5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)N5e(t,String(o))?a.push(lj(e,t,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(l){l.match(/^\\d+$/)||a.push(lj(e,t,r,n,l,!0))}),a}function lj(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize(\"[Getter/Setter]\",\"special\"):s=e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),N5e(n,i)||(o=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)<0?(bR(r)?s=_R(e,l.value,null):s=_R(e,l.value,r-1),s.indexOf(`\n",
       "`)>-1&&(a?s=s.split(`\n",
       "`).map(function(u){return\"  \"+u}).join(`\n",
       "`).slice(2):s=`\n",
       "`+s.split(`\n",
       "`).map(function(u){return\"   \"+u}).join(`\n",
       "`))):s=e.stylize(\"[Circular]\",\"special\")),T2(o)){if(a&&i.match(/^\\d+$/))return s;o=JSON.stringify(\"\"+i),o.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.slice(1,-1),o=e.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=e.stylize(o,\"string\"))}return o+\": \"+s}function G5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`\n",
       "`)>=0&&n++,a+o.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?r[0]+(t===\"\"?\"\":t+`\n",
       " `)+\" \"+e.join(`,\n",
       "  `)+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}cu.types=nj();function q5e(e){return Array.isArray(e)}cu.isArray=q5e;function uj(e){return typeof e==\"boolean\"}cu.isBoolean=uj;function bR(e){return e===null}cu.isNull=bR;function H5t(e){return e==null}cu.isNullOrUndefined=H5t;function B5e(e){return typeof e==\"number\"}cu.isNumber=B5e;function wR(e){return typeof e==\"string\"}cu.isString=wR;function j5t(e){return typeof e==\"symbol\"}cu.isSymbol=j5t;function T2(e){return e===void 0}cu.isUndefined=T2;function nE(e){return pA(e)&&cj(e)===\"[object RegExp]\"}cu.isRegExp=nE;cu.types.isRegExp=nE;function pA(e){return typeof e==\"object\"&&e!==null}cu.isObject=pA;function xR(e){return pA(e)&&cj(e)===\"[object Date]\"}cu.isDate=xR;cu.types.isDate=xR;function aE(e){return pA(e)&&(cj(e)===\"[object Error]\"||e instanceof Error)}cu.isError=aE;cu.types.isNativeError=aE;function yR(e){return typeof e==\"function\"}cu.isFunction=yR;function W5t(e){return e===null||typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"||typeof e==\"symbol\"||typeof e==\"undefined\"}cu.isPrimitive=W5t;cu.isBuffer=aj();function cj(e){return Object.prototype.toString.call(e)}function sj(e){return e<10?\"0\"+e.toString(10):e.toString(10)}var X5t=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function Z5t(){var e=new Date,t=[sj(e.getHours()),sj(e.getMinutes()),sj(e.getSeconds())].join(\":\");return[e.getDate(),X5t[e.getMonth()],t].join(\" \")}cu.log=function(){console.log(\"%s - %s\",Z5t(),cu.format.apply(cu,arguments))};cu.inherits=Zy();cu._extend=function(e,t){if(!t||!pA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function N5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var w2=typeof Symbol!=\"undefined\"?Symbol(\"util.promisify.custom\"):void 0;cu.promisify=function(t){if(typeof t!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');if(w2&&t[w2]){var r=t[w2];if(typeof r!=\"function\")throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(r,w2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),w2&&Object.defineProperty(r,w2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,z5e(t))};cu.promisify.custom=w2;function Y5t(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}function K5t(e){if(typeof e!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');function t(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!=\"function\")throw new TypeError(\"The last argument must be of type Function\");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(Y5t.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,z5e(e)),t}cu.callbackify=K5t});var H5e=ye((Zhr,G5e)=>{\"use strict\";function U5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function J5t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U5e(Object(r),!0).forEach(function(n){$5t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U5e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $5t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q5t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function V5e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eSt(e,t,r){return t&&V5e(e.prototype,t),r&&V5e(e,r),e}var tSt=_2(),TR=tSt.Buffer,rSt=fj(),hj=rSt.inspect,iSt=hj&&hj.custom||\"inspect\";function nSt(e,t,r){TR.prototype.copy.call(e,t,r)}G5e.exports=function(){function e(){Q5t(this,e),this.head=null,this.tail=null,this.length=0}return eSt(e,[{key:\"push\",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:\"unshift\",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:\"shift\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(r){if(this.length===0)return\"\";for(var n=this.head,i=\"\"+n.data;n=n.next;)i+=r+n.data;return i}},{key:\"concat\",value:function(r){if(this.length===0)return TR.alloc(0);for(var n=TR.allocUnsafe(r>>>0),i=this.head,a=0;i;)nSt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:\"consume\",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:\"_getBuffer\",value:function(r){var n=TR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:iSt,value:function(r,n){return hj(this,J5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var vj=ye((Yhr,W5e)=>{\"use strict\";function aSt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(dj,this,e)):process.nextTick(dj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(AR,r):(r._writableState.errorEmitted=!0,process.nextTick(j5e,r,a)):process.nextTick(j5e,r,a):t?(process.nextTick(AR,r),t(a)):process.nextTick(AR,r)}),this)}function j5e(e,t){dj(e,t),AR(e)}function AR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(\"close\")}function oSt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function dj(e,t){e.emit(\"error\",t)}function sSt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit(\"error\",t)}W5e.exports={destroy:aSt,undestroy:oSt,errorOrDestroy:sSt}});var A2=ye((Khr,Y5e)=>{\"use strict\";function lSt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Z5e={};function J0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t==\"string\"?t:t(a,o,s)}var i=function(a){lSt(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,Z5e[e]=i}function X5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:r===2?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}else return\"of \".concat(t,\" \").concat(String(e))}function uSt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function cSt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fSt(e,t,r){return typeof r!=\"number\"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}J0(\"ERR_INVALID_OPT_VALUE\",function(e,t){return'The value \"'+t+'\" is invalid for option \"'+e+'\"'},TypeError);J0(\"ERR_INVALID_ARG_TYPE\",function(e,t,r){var n;typeof t==\"string\"&&uSt(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\";var i;if(cSt(e,\" argument\"))i=\"The \".concat(e,\" \").concat(n,\" \").concat(X5e(t,\"type\"));else{var a=fSt(e,\".\")?\"property\":\"argument\";i='The \"'.concat(e,'\" ').concat(a,\" \").concat(n,\" \").concat(X5e(t,\"type\"))}return i+=\". Received type \".concat(typeof r),i},TypeError);J0(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\");J0(\"ERR_METHOD_NOT_IMPLEMENTED\",function(e){return\"The \"+e+\" method is not implemented\"});J0(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\");J0(\"ERR_STREAM_DESTROYED\",function(e){return\"Cannot call \"+e+\" after a stream was destroyed\"});J0(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\");J0(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\");J0(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\");J0(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);J0(\"ERR_UNKNOWN_ENCODING\",function(e){return\"Unknown encoding: \"+e},TypeError);J0(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\");Y5e.exports.codes=Z5e});var pj=ye((Jhr,K5e)=>{\"use strict\";var hSt=A2().codes.ERR_INVALID_OPT_VALUE;function dSt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function vSt(e,t,r,n){var i=dSt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:\"highWaterMark\";throw new hSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}K5e.exports={getHighWaterMark:vSt}});var $5e=ye(($hr,J5e)=>{J5e.exports=pSt;function pSt(e,t){if(gj(\"noDeprecation\"))return e;var r=!1;function n(){if(!r){if(gj(\"throwDeprecation\"))throw new Error(t);gj(\"traceDeprecation\")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function gj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()===\"true\"}});var _j=ye((Qhr,nSe)=>{\"use strict\";nSe.exports=Bh;function eSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){VSt(t,e)}}var gA;Bh.WritableState=sE;var gSt={deprecate:$5e()},tSe=yH(),MR=_2().Buffer,mSt=window.Uint8Array||function(){};function ySt(e){return MR.from(e)}function _St(e){return MR.isBuffer(e)||e instanceof mSt}var yj=vj(),xSt=pj(),bSt=xSt.getHighWaterMark,V_=A2().codes,wSt=V_.ERR_INVALID_ARG_TYPE,TSt=V_.ERR_METHOD_NOT_IMPLEMENTED,ASt=V_.ERR_MULTIPLE_CALLBACK,SSt=V_.ERR_STREAM_CANNOT_PIPE,MSt=V_.ERR_STREAM_DESTROYED,ESt=V_.ERR_STREAM_NULL_VALUES,kSt=V_.ERR_STREAM_WRITE_AFTER_END,CSt=V_.ERR_UNKNOWN_ENCODING,mA=yj.errorOrDestroy;Zy()(Bh,tSe);function LSt(){}function sE(e,t,r){gA=gA||S2(),e=e||{},typeof r!=\"boolean\"&&(r=t instanceof gA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=bSt(this,e,\"writableHighWaterMark\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){OSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new eSe(this)}sE.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(sE.prototype,\"buffer\",{get:gSt.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(e){}})();var SR;typeof Symbol==\"function\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\"function\"?(SR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Bh,Symbol.hasInstance,{value:function(t){return SR.call(this,t)?!0:this!==Bh?!1:t&&t._writableState instanceof sE}})):SR=function(t){return t instanceof this};function Bh(e){gA=gA||S2();var t=this instanceof gA;if(!t&&!SR.call(Bh,this))return new Bh(e);this._writableState=new sE(e,this,t),this.writable=!0,e&&(typeof e.write==\"function\"&&(this._write=e.write),typeof e.writev==\"function\"&&(this._writev=e.writev),typeof e.destroy==\"function\"&&(this._destroy=e.destroy),typeof e.final==\"function\"&&(this._final=e.final)),tSe.call(this)}Bh.prototype.pipe=function(){mA(this,new SSt)};function PSt(e,t){var r=new kSt;mA(e,r),process.nextTick(t,r)}function ISt(e,t,r,n){var i;return r===null?i=new ESt:typeof r!=\"string\"&&!t.objectMode&&(i=new wSt(\"chunk\",[\"string\",\"Buffer\"],r)),i?(mA(e,i),process.nextTick(n,i),!1):!0}Bh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&_St(e);return a&&!MR.isBuffer(e)&&(e=ySt(e)),typeof t==\"function\"&&(r=t,t=null),a?t=\"buffer\":t||(t=n.defaultEncoding),typeof r!=\"function\"&&(r=LSt),n.ending?PSt(this,r):(a||ISt(this,n,e,r))&&(n.pendingcb++,i=DSt(this,n,a,e,t,r)),i};Bh.prototype.cork=function(){this._writableState.corked++};Bh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&rSe(this,e))};Bh.prototype.setDefaultEncoding=function(t){if(typeof t==\"string\"&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new CSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Bh.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function RSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==\"string\"&&(t=MR.from(t,r)),t}Object.defineProperty(Bh.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function DSt(e,t,r,n,i,a){if(!r){var o=RSt(t,n,i);n!==o&&(r=!0,i=\"buffer\",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else mj(e,t,!1,s,n,i,a);return l}function mj(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new MSt(\"write\")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function FSt(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(oE,e,t),e._writableState.errorEmitted=!0,mA(e,n)):(i(n),e._writableState.errorEmitted=!0,mA(e,n),oE(e,t))}function zSt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function OSt(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!=\"function\")throw new ASt;if(zSt(r),t)FSt(e,r,n,t,i);else{var a=iSe(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&rSe(e,r),n?process.nextTick(Q5e,e,r,a,i):Q5e(e,r,a,i)}}function Q5e(e,t,r,n){r||qSt(e,t),t.pendingcb--,n(),oE(e,t)}function qSt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit(\"drain\"))}function rSe(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,mj(e,t,!0,t.length,i,\"\",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new eSe(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=t.objectMode?1:l.length;if(mj(e,t,!1,f,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Bh.prototype._write=function(e,t,r){r(new TSt(\"_write()\"))};Bh.prototype._writev=null;Bh.prototype.end=function(e,t,r){var n=this._writableState;return typeof e==\"function\"?(r=e,e=null,t=null):typeof t==\"function\"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||USt(this,n,r),this};Object.defineProperty(Bh.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function iSe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function BSt(e,t){e._final(function(r){t.pendingcb--,r&&mA(e,r),t.prefinished=!0,e.emit(\"prefinish\"),oE(e,t)})}function NSt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final==\"function\"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(BSt,e,t)):(t.prefinished=!0,e.emit(\"prefinish\")))}function oE(e,t){var r=iSe(t);if(r&&(NSt(e,t),t.pendingcb===0&&(t.finished=!0,e.emit(\"finish\"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function USt(e,t,r){t.ending=!0,oE(e,t),r&&(t.finished?process.nextTick(r):e.once(\"finish\",r)),t.ended=!0,e.writable=!1}function VSt(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Bh.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Bh.prototype.destroy=yj.destroy;Bh.prototype._undestroy=yj.undestroy;Bh.prototype._destroy=function(e,t){t(e)}});var S2=ye((edr,oSe)=>{\"use strict\";var GSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};oSe.exports=jm;var aSe=wj(),bj=_j();Zy()(jm,aSe);for(xj=GSt(bj.prototype),ER=0;ER<xj.length;ER++)kR=xj[ER],jm.prototype[kR]||(jm.prototype[kR]=bj.prototype[kR]);var xj,kR,ER;function jm(e){if(!(this instanceof jm))return new jm(e);aSe.call(this,e),bj.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\"end\",HSt)))}Object.defineProperty(jm.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(jm.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(jm.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function HSt(){this._writableState.ended||process.nextTick(jSt,this)}function jSt(e){e.end()}Object.defineProperty(jm.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var uSe=ye((Tj,lSe)=>{var CR=_2(),Wm=CR.Buffer;function sSe(e,t){for(var r in e)t[r]=e[r]}Wm.from&&Wm.alloc&&Wm.allocUnsafe&&Wm.allocUnsafeSlow?lSe.exports=CR:(sSe(CR,Tj),Tj.Buffer=M2);function M2(e,t,r){return Wm(e,t,r)}M2.prototype=Object.create(Wm.prototype);sSe(Wm,M2);M2.from=function(e,t,r){if(typeof e==\"number\")throw new TypeError(\"Argument must not be a number\");return Wm(e,t,r)};M2.alloc=function(e,t,r){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");var n=Wm(e);return t!==void 0?typeof r==\"string\"?n.fill(t,r):n.fill(t):n.fill(0),n};M2.allocUnsafe=function(e){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");return Wm(e)};M2.allocUnsafeSlow=function(e){if(typeof e!=\"number\")throw new TypeError(\"Argument must be a number\");return CR.SlowBuffer(e)}});var Mj=ye(fSe=>{\"use strict\";var Sj=uSe().Buffer,cSe=Sj.isEncoding||function(e){switch(e=\"\"+e,e&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function WSt(e){if(!e)return\"utf8\";for(var t;;)switch(e){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return e;default:if(t)return;e=(\"\"+e).toLowerCase(),t=!0}}function XSt(e){var t=WSt(e);if(typeof t!=\"string\"&&(Sj.isEncoding===cSe||!cSe(e)))throw new Error(\"Unknown encoding: \"+e);return t||e}fSe.StringDecoder=lE;function lE(e){this.encoding=XSt(e);var t;switch(this.encoding){case\"utf16le\":this.text=QSt,this.end=eMt,t=4;break;case\"utf8\":this.fillLast=KSt,t=4;break;case\"base64\":this.text=tMt,this.end=rMt,t=3;break;default:this.write=iMt,this.end=nMt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sj.allocUnsafe(t)}lE.prototype.write=function(e){if(e.length===0)return\"\";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||\"\"};lE.prototype.end=$St;lE.prototype.text=JSt;lE.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Aj(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function ZSt(e,t,r){var n=t.length-1;if(n<r)return 0;var i=Aj(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=Aj(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=Aj(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function YSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,\"\\uFFFD\";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,\"\\uFFFD\";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,\"\\uFFFD\"}}function KSt(e){var t=this.lastTotal-this.lastNeed,r=YSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function JSt(e,t){var r=ZSt(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)}function $St(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"\\uFFFD\":t}function QSt(e,t){if((e.length-t)%2===0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function eMt(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function tMt(e,t){var r=(e.length-t)%3;return r===0?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function rMt(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function iMt(e){return e.toString(this.encoding)}function nMt(e){return e&&e.length?this.write(e):\"\"}});var LR=ye((rdr,vSe)=>{\"use strict\";var hSe=A2().codes.ERR_STREAM_PREMATURE_CLOSE;function aMt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function oMt(){}function sMt(e){return e.setHeader&&typeof e.abort==\"function\"}function dSe(e,t,r){if(typeof t==\"function\")return dSe(e,null,t);t||(t={}),r=aMt(r||oMt);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,i||r.call(e)},c=function(v){r.call(e,v)},f=function(){var v;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(v=new hSe),r.call(e,v);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(v=new hSe),r.call(e,v)},h=function(){e.req.on(\"finish\",s)};return sMt(e)?(e.on(\"complete\",s),e.on(\"abort\",f),e.req?h():e.on(\"request\",h)):i&&!e._writableState&&(e.on(\"end\",a),e.on(\"close\",a)),e.on(\"end\",u),e.on(\"finish\",s),t.error!==!1&&e.on(\"error\",c),e.on(\"close\",f),function(){e.removeListener(\"complete\",s),e.removeListener(\"abort\",f),e.removeListener(\"request\",h),e.req&&e.req.removeListener(\"finish\",s),e.removeListener(\"end\",a),e.removeListener(\"close\",a),e.removeListener(\"finish\",s),e.removeListener(\"end\",u),e.removeListener(\"error\",c),e.removeListener(\"close\",f)}}vSe.exports=dSe});var gSe=ye((idr,pSe)=>{\"use strict\";var PR;function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lMt=LR(),H_=Symbol(\"lastResolve\"),E2=Symbol(\"lastReject\"),uE=Symbol(\"error\"),IR=Symbol(\"ended\"),k2=Symbol(\"lastPromise\"),Ej=Symbol(\"handlePromise\"),C2=Symbol(\"stream\");function j_(e,t){return{value:e,done:t}}function uMt(e){var t=e[H_];if(t!==null){var r=e[C2].read();r!==null&&(e[k2]=null,e[H_]=null,e[E2]=null,t(j_(r,!1)))}}function cMt(e){process.nextTick(uMt,e)}function fMt(e,t){return function(r,n){e.then(function(){if(t[IR]){r(j_(void 0,!0));return}t[Ej](r,n)},n)}}var hMt=Object.getPrototypeOf(function(){}),dMt=Object.setPrototypeOf((PR={get stream(){return this[C2]},next:function(){var t=this,r=this[uE];if(r!==null)return Promise.reject(r);if(this[IR])return Promise.resolve(j_(void 0,!0));if(this[C2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[uE]?s(t[uE]):o(j_(void 0,!0))})});var n=this[k2],i;if(n)i=new Promise(fMt(n,this));else{var a=this[C2].read();if(a!==null)return Promise.resolve(j_(a,!1));i=new Promise(this[Ej])}return this[k2]=i,i}},G_(PR,Symbol.asyncIterator,function(){return this}),G_(PR,\"return\",function(){var t=this;return new Promise(function(r,n){t[C2].destroy(null,function(i){if(i){n(i);return}r(j_(void 0,!0))})})}),PR),hMt),vMt=function(t){var r,n=Object.create(dMt,(r={},G_(r,C2,{value:t,writable:!0}),G_(r,H_,{value:null,writable:!0}),G_(r,E2,{value:null,writable:!0}),G_(r,uE,{value:null,writable:!0}),G_(r,IR,{value:t._readableState.endEmitted,writable:!0}),G_(r,Ej,{value:function(a,o){var s=n[C2].read();s?(n[k2]=null,n[H_]=null,n[E2]=null,a(j_(s,!1))):(n[H_]=a,n[E2]=o)},writable:!0}),r));return n[k2]=null,lMt(t,function(i){if(i&&i.code!==\"ERR_STREAM_PREMATURE_CLOSE\"){var a=n[E2];a!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,a(i)),n[uE]=i;return}var o=n[H_];o!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,o(j_(void 0,!0))),n[IR]=!0}),t.on(\"readable\",cMt.bind(null,n)),n};pSe.exports=vMt});var ySe=ye((ndr,mSe)=>{mSe.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}});var wj=ye((odr,kSe)=>{\"use strict\";kSe.exports=Bu;var yA;Bu.ReadableState=wSe;var adr=Ab().EventEmitter,bSe=function(t,r){return t.listeners(r).length},fE=yH(),RR=_2().Buffer,pMt=window.Uint8Array||function(){};function gMt(e){return RR.from(e)}function mMt(e){return RR.isBuffer(e)||e instanceof pMt}var kj=fj(),nu;kj&&kj.debuglog?nu=kj.debuglog(\"stream\"):nu=function(){};var yMt=H5e(),Fj=vj(),_Mt=pj(),xMt=_Mt.getHighWaterMark,DR=A2().codes,bMt=DR.ERR_INVALID_ARG_TYPE,wMt=DR.ERR_STREAM_PUSH_AFTER_EOF,TMt=DR.ERR_METHOD_NOT_IMPLEMENTED,AMt=DR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_A,Cj,Lj;Zy()(Bu,fE);var cE=Fj.errorOrDestroy,Pj=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function SMt(e,t,r){if(typeof e.prependListener==\"function\")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function wSe(e,t,r){yA=yA||S2(),e=e||{},typeof r!=\"boolean\"&&(r=t instanceof yA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=xMt(this,e,\"readableHighWaterMark\",r),this.buffer=new yMt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(_A||(_A=Mj().StringDecoder),this.decoder=new _A(e.encoding),this.encoding=e.encoding)}function Bu(e){if(yA=yA||S2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof yA;this._readableState=new wSe(e,this,t),this.readable=!0,e&&(typeof e.read==\"function\"&&(this._read=e.read),typeof e.destroy==\"function\"&&(this._destroy=e.destroy)),fE.call(this)}Object.defineProperty(Bu.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=Fj.destroy;Bu.prototype._undestroy=Fj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e==\"string\"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=RR.from(e,t),t=\"\"),n=!0),TSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return TSe(this,e,null,!0,!1)};function TSe(e,t,r,n,i){nu(\"readableAddChunk\",t);var a=e._readableState;if(t===null)a.reading=!1,kMt(e,a);else{var o;if(i||(o=MMt(a,t)),o)cE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!=\"string\"&&!a.objectMode&&Object.getPrototypeOf(t)!==RR.prototype&&(t=gMt(t)),n)a.endEmitted?cE(e,new AMt):Ij(e,a,t,!0);else if(a.ended)cE(e,new wMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ij(e,a,t,!1):Dj(e,a)):Ij(e,a,t,!1)}else n||(a.reading=!1,Dj(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function Ij(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit(\"data\",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&FR(e)),Dj(e,t)}function MMt(e,t){var r;return!mMt(t)&&typeof t!=\"string\"&&t!==void 0&&!e.objectMode&&(r=new bMt(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],t)),r}Bu.prototype.isPaused=function(){return this._readableState.flowing===!1};Bu.prototype.setEncoding=function(e){_A||(_A=Mj().StringDecoder);var t=new _A(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n=\"\";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==\"\"&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var _Se=1073741824;function EMt(e){return e>=_Se?e=_Se:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function xSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=EMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu(\"read\",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu(\"read: emitReadable\",t.length,t.ended),t.length===0&&t.ended?Rj(this):FR(this),null;if(e=xSe(e,t),e===0&&t.ended)return t.length===0&&Rj(this),null;var n=t.needReadable;nu(\"need readable\",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,nu(\"length less than watermark\",n)),t.ended||t.reading?(n=!1,nu(\"reading or ended\",n)):n&&(nu(\"do read\"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=xSe(r,t)));var i;return e>0?i=MSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Rj(this)),i!==null&&this.emit(\"data\",i),i};function kMt(e,t){if(nu(\"onEofChunk\"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?FR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ASe(e)))}}function FR(e){var t=e._readableState;nu(\"emitReadable\",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu(\"emitReadable\",t.flowing),t.emittedReadable=!0,process.nextTick(ASe,e))}function ASe(e){var t=e._readableState;nu(\"emitReadable_\",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(\"readable\"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zj(e)}function Dj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(CMt,e,t))}function CMt(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(nu(\"maybeReadMore read 0\"),e.read(0),r===t.length)break}t.readingMore=!1}Bu.prototype._read=function(e){cE(this,new TMt(\"_read()\"))};Bu.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,nu(\"pipe count=%d opts=%j\",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:_;n.endEmitted?process.nextTick(a):r.once(\"end\",a),e.on(\"unpipe\",o);function o(b,p){nu(\"onunpipe\"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,c())}function s(){nu(\"onend\"),e.end()}var l=LMt(r);e.on(\"drain\",l);var u=!1;function c(){nu(\"cleanup\"),e.removeListener(\"close\",d),e.removeListener(\"finish\",v),e.removeListener(\"drain\",l),e.removeListener(\"error\",h),e.removeListener(\"unpipe\",o),r.removeListener(\"end\",s),r.removeListener(\"end\",_),r.removeListener(\"data\",f),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on(\"data\",f);function f(b){nu(\"ondata\");var p=e.write(b);nu(\"dest.write\",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&ESe(n.pipes,e)!==-1)&&!u&&(nu(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu(\"onerror\",b),_(),e.removeListener(\"error\",h),bSe(e,\"error\")===0&&cE(e,b)}SMt(e,\"error\",h);function d(){e.removeListener(\"finish\",v),_()}e.once(\"close\",d);function v(){nu(\"onfinish\"),e.removeListener(\"close\",d),_()}e.once(\"finish\",v);function _(){nu(\"unpipe\"),r.unpipe(e)}return e.emit(\"pipe\",r),n.flowing||(nu(\"pipe resume\"),r.resume()),e};function LMt(e){return function(){var r=e._readableState;nu(\"pipeOnDrain\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bSe(e,\"data\")&&(r.flowing=!0,zj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var o=ESe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this,r),this)};Bu.prototype.on=function(e,t){var r=fE.prototype.on.call(this,e,t),n=this._readableState;return e===\"data\"?(n.readableListening=this.listenerCount(\"readable\")>0,n.flowing!==!1&&this.resume()):e===\"readable\"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu(\"on readable\",n.length,n.reading),n.length?FR(this):n.reading||process.nextTick(PMt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=fE.prototype.removeListener.call(this,e,t);return e===\"readable\"&&process.nextTick(SSe,this),r};Bu.prototype.removeAllListeners=function(e){var t=fE.prototype.removeAllListeners.apply(this,arguments);return(e===\"readable\"||e===void 0)&&process.nextTick(SSe,this),t};function SSe(e){var t=e._readableState;t.readableListening=e.listenerCount(\"readable\")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(\"data\")>0&&e.resume()}function PMt(e){nu(\"readable nexttick read 0\"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu(\"resume\"),e.flowing=!e.readableListening,IMt(this,e)),e.paused=!1,this};function IMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(RMt,e,t))}function RMt(e,t){nu(\"resume\",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(\"resume\"),zj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(nu(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this};function zj(e){var t=e._readableState;for(nu(\"flow\",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on(\"end\",function(){if(nu(\"wrapped end\"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on(\"data\",function(o){if(nu(\"wrapped data\"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]==\"function\"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<Pj.length;a++)e.on(Pj[a],this.emit.bind(this,Pj[a]));return this._read=function(o){nu(\"wrapped _read\",o),n&&(n=!1,e.resume())},this};typeof Symbol==\"function\"&&(Bu.prototype[Symbol.asyncIterator]=function(){return Cj===void 0&&(Cj=gSe()),Cj(this)});Object.defineProperty(Bu.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Bu.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Bu.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});Bu._fromList=MSe;Object.defineProperty(Bu.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}});function MSe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(\"\"):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Rj(e){var t=e._readableState;nu(\"endReadable\",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(DMt,t,e))}function DMt(e,t){if(nu(\"endReadableNT\",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol==\"function\"&&(Bu.from=function(e,t){return Lj===void 0&&(Lj=ySe()),Lj(Bu,e,t)});function ESe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Oj=ye((sdr,LSe)=>{\"use strict\";LSe.exports=Ky;var zR=A2().codes,FMt=zR.ERR_METHOD_NOT_IMPLEMENTED,zMt=zR.ERR_MULTIPLE_CALLBACK,OMt=zR.ERR_TRANSFORM_ALREADY_TRANSFORMING,qMt=zR.ERR_TRANSFORM_WITH_LENGTH_0,OR=S2();Zy()(Ky,OR);function BMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit(\"error\",new zMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ky(e){if(!(this instanceof Ky))return new Ky(e);OR.call(this,e),this._transformState={afterTransform:BMt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform==\"function\"&&(this._transform=e.transform),typeof e.flush==\"function\"&&(this._flush=e.flush)),this.on(\"prefinish\",NMt)}function NMt(){var e=this;typeof this._flush==\"function\"&&!this._readableState.destroyed?this._flush(function(t,r){CSe(e,t,r)}):CSe(this,null,null)}Ky.prototype.push=function(e,t){return this._transformState.needTransform=!1,OR.prototype.push.call(this,e,t)};Ky.prototype._transform=function(e,t,r){r(new FMt(\"_transform()\"))};Ky.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ky.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Ky.prototype._destroy=function(e,t){OR.prototype._destroy.call(this,e,function(r){t(r)})};function CSe(e,t,r){if(t)return e.emit(\"error\",t);if(r!=null&&e.push(r),e._writableState.length)throw new qMt;if(e._transformState.transforming)throw new OMt;return e.push(null)}});var RSe=ye((ldr,ISe)=>{\"use strict\";ISe.exports=hE;var PSe=Oj();Zy()(hE,PSe);function hE(e){if(!(this instanceof hE))return new hE(e);PSe.call(this,e)}hE.prototype._transform=function(e,t,r){r(null,e)}});var qSe=ye((udr,OSe)=>{\"use strict\";var qj;function UMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var zSe=A2().codes,VMt=zSe.ERR_MISSING_ARGS,GMt=zSe.ERR_STREAM_DESTROYED;function DSe(e){if(e)throw e}function HMt(e){return e.setHeader&&typeof e.abort==\"function\"}function jMt(e,t,r,n){n=UMt(n);var i=!1;e.on(\"close\",function(){i=!0}),qj===void 0&&(qj=LR()),qj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,HMt(e))return e.abort();if(typeof e.destroy==\"function\")return e.destroy();n(o||new GMt(\"pipe\"))}}}function FSe(e){e()}function WMt(e,t){return e.pipe(t)}function XMt(e){return!e.length||typeof e[e.length-1]!=\"function\"?DSe:e.pop()}function ZMt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=XMt(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new VMt(\"streams\");var i,a=t.map(function(o,s){var l=s<t.length-1,u=s>0;return jMt(o,l,u,function(c){i||(i=c),c&&a.forEach(FSe),!l&&(a.forEach(FSe),n(i))})});return t.reduce(WMt)}OSe.exports=ZMt});var NSe=ye((cdr,BSe)=>{BSe.exports=$0;var Bj=Ab().EventEmitter,YMt=Zy();YMt($0,Bj);$0.Readable=wj();$0.Writable=_j();$0.Duplex=S2();$0.Transform=Oj();$0.PassThrough=RSe();$0.finished=LR();$0.pipeline=qSe();$0.Stream=$0;function $0(){Bj.call(this)}$0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on(\"data\",n);function i(){r.readable&&r.resume&&r.resume()}e.on(\"drain\",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on(\"end\",o),r.on(\"close\",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy==\"function\"&&e.destroy())}function l(c){if(u(),Bj.listenerCount(this,\"error\")===0)throw c}r.on(\"error\",l),e.on(\"error\",l);function u(){r.removeListener(\"data\",n),e.removeListener(\"drain\",i),r.removeListener(\"end\",o),r.removeListener(\"close\",s),r.removeListener(\"error\",l),e.removeListener(\"error\",l),r.removeListener(\"end\",u),r.removeListener(\"close\",u),e.removeListener(\"close\",u)}return r.on(\"end\",u),r.on(\"close\",u),e.on(\"close\",u),e.emit(\"pipe\",r),e}});var bA=ye(fu=>{var USe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},KMt=/%[sdj%]/g;fu.format=function(e){if(!HR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(W_(arguments[r]));return t.join(\" \")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(KMt,function(s){if(s===\"%%\")return\"%\";if(r>=i)return s;switch(s){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(l){return\"[Circular]\"}default:return s}}),o=n[r];r<i;o=n[++r])GR(o)||!xA(o)?a+=\" \"+o:a+=\" \"+W_(o);return a};fu.deprecate=function(e,t){if(typeof process!=\"undefined\"&&process.noDeprecation===!0)return e;if(typeof process==\"undefined\")return function(){return fu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var qR={},VSe=/^$/;BR=\"false\",BR=BR.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),VSe=new RegExp(\"^\"+BR+\"$\",\"i\");var BR;fu.debuglog=function(e){if(e=e.toUpperCase(),!qR[e])if(VSe.test(e)){var t=process.pid;qR[e]=function(){var r=fu.format.apply(fu,arguments);console.error(\"%s %d: %s\",e,t,r)}}else qR[e]=function(){};return qR[e]};function W_(e,t){var r={seen:[],stylize:$Mt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Gj(t)?r.showHidden=t:t&&fu._extend(r,t),P2(r.showHidden)&&(r.showHidden=!1),P2(r.depth)&&(r.depth=2),P2(r.colors)&&(r.colors=!1),P2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=JMt),UR(r,e,r.depth)}fu.inspect=W_;W_.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]};W_.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"};function JMt(e,t){var r=W_.styles[t];return r?\"\\x1B[\"+W_.colors[r][0]+\"m\"+e+\"\\x1B[\"+W_.colors[r][1]+\"m\":e}function $Mt(e,t){return e}function QMt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function UR(e,t,r){if(e.customInspect&&t&&NR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return HR(n)||(n=UR(e,n,r)),n}var i=e4t(e,t);if(i)return i;var a=Object.keys(t),o=QMt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),vE(t)&&(a.indexOf(\"message\")>=0||a.indexOf(\"description\")>=0))return Nj(t);if(a.length===0){if(NR(t)){var s=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+s+\"]\",\"special\")}if(dE(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(VR(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(vE(t))return Nj(t)}var l=\"\",u=!1,c=[\"{\",\"}\"];if(GSe(t)&&(u=!0,c=[\"[\",\"]\"]),NR(t)){var f=t.name?\": \"+t.name:\"\";l=\" [Function\"+f+\"]\"}if(dE(t)&&(l=\" \"+RegExp.prototype.toString.call(t)),VR(t)&&(l=\" \"+Date.prototype.toUTCString.call(t)),vE(t)&&(l=\" \"+Nj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return dE(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(t);var h;return u?h=t4t(e,t,r,o,a):h=a.map(function(d){return Vj(e,t,r,o,d,u)}),e.seen.pop(),r4t(h,l,c)}function e4t(e,t){if(P2(t))return e.stylize(\"undefined\",\"undefined\");if(HR(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}if(HSe(t))return e.stylize(\"\"+t,\"number\");if(Gj(t))return e.stylize(\"\"+t,\"boolean\");if(GR(t))return e.stylize(\"null\",\"null\")}function Nj(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function t4t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)jSe(t,String(o))?a.push(Vj(e,t,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(l){l.match(/^\\d+$/)||a.push(Vj(e,t,r,n,l,!0))}),a}function Vj(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize(\"[Getter/Setter]\",\"special\"):s=e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),jSe(n,i)||(o=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)<0?(GR(r)?s=UR(e,l.value,null):s=UR(e,l.value,r-1),s.indexOf(`\n",
       "`)>-1&&(a?s=s.split(`\n",
       "`).map(function(u){return\"  \"+u}).join(`\n",
       "`).slice(2):s=`\n",
       "`+s.split(`\n",
       "`).map(function(u){return\"   \"+u}).join(`\n",
       "`))):s=e.stylize(\"[Circular]\",\"special\")),P2(o)){if(a&&i.match(/^\\d+$/))return s;o=JSON.stringify(\"\"+i),o.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.slice(1,-1),o=e.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=e.stylize(o,\"string\"))}return o+\": \"+s}function r4t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`\n",
       "`)>=0&&n++,a+o.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?r[0]+(t===\"\"?\"\":t+`\n",
       " `)+\" \"+e.join(`,\n",
       "  `)+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}fu.types=nj();function GSe(e){return Array.isArray(e)}fu.isArray=GSe;function Gj(e){return typeof e==\"boolean\"}fu.isBoolean=Gj;function GR(e){return e===null}fu.isNull=GR;function i4t(e){return e==null}fu.isNullOrUndefined=i4t;function HSe(e){return typeof e==\"number\"}fu.isNumber=HSe;function HR(e){return typeof e==\"string\"}fu.isString=HR;function n4t(e){return typeof e==\"symbol\"}fu.isSymbol=n4t;function P2(e){return e===void 0}fu.isUndefined=P2;function dE(e){return xA(e)&&Hj(e)===\"[object RegExp]\"}fu.isRegExp=dE;fu.types.isRegExp=dE;function xA(e){return typeof e==\"object\"&&e!==null}fu.isObject=xA;function VR(e){return xA(e)&&Hj(e)===\"[object Date]\"}fu.isDate=VR;fu.types.isDate=VR;function vE(e){return xA(e)&&(Hj(e)===\"[object Error]\"||e instanceof Error)}fu.isError=vE;fu.types.isNativeError=vE;function NR(e){return typeof e==\"function\"}fu.isFunction=NR;function a4t(e){return e===null||typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"||typeof e==\"symbol\"||typeof e==\"undefined\"}fu.isPrimitive=a4t;fu.isBuffer=aj();function Hj(e){return Object.prototype.toString.call(e)}function Uj(e){return e<10?\"0\"+e.toString(10):e.toString(10)}var o4t=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function s4t(){var e=new Date,t=[Uj(e.getHours()),Uj(e.getMinutes()),Uj(e.getSeconds())].join(\":\");return[e.getDate(),o4t[e.getMonth()],t].join(\" \")}fu.log=function(){console.log(\"%s - %s\",s4t(),fu.format.apply(fu,arguments))};fu.inherits=Zy();fu._extend=function(e,t){if(!t||!xA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function jSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var L2=typeof Symbol!=\"undefined\"?Symbol(\"util.promisify.custom\"):void 0;fu.promisify=function(t){if(typeof t!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');if(L2&&t[L2]){var r=t[L2];if(typeof r!=\"function\")throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),L2&&Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,USe(t))};fu.promisify.custom=L2;function l4t(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}function u4t(e){if(typeof e!=\"function\")throw new TypeError('The \"original\" argument must be of type Function');function t(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(typeof i!=\"function\")throw new TypeError(\"The last argument must be of type Function\");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(l4t.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,USe(e)),t}fu.callbackify=u4t});var Xj=ye((hdr,YSe)=>{\"use strict\";function X_(e){\"@babel/helpers - typeof\";return X_=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},X_(e)}function WSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,f4t(n.key),n)}}function c4t(e,t,r){return t&&WSe(e.prototype,t),r&&WSe(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function f4t(e){var t=h4t(e,\"string\");return X_(t)===\"symbol\"?t:String(t)}function h4t(e,t){if(X_(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(X_(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function d4t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function v4t(e,t){if(typeof t!=\"function\"&&t!==null)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&Wj(e,t)}function Wj(e,t){return Wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wj(e,t)}function p4t(e){var t=y4t();return function(){var n=jR(e),i;if(t){var a=jR(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return g4t(this,i)}}function g4t(e,t){if(t&&(X_(t)===\"object\"||typeof t==\"function\"))return t;if(t!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return m4t(e)}function m4t(e){if(e===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function y4t(){if(typeof Reflect==\"undefined\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function jR(e){return jR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jR(e)}var ZSe={},wA,jj;function pE(e,t,r){r||(r=Error);function n(a,o,s){return typeof t==\"string\"?t:t(a,o,s)}var i=function(a){v4t(s,a);var o=p4t(s);function s(l,u,c){var f;return d4t(this,s),f=o.call(this,n(l,u,c)),f.code=e,f}return c4t(s)}(r);ZSe[e]=i}function XSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:r===2?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}else return\"of \".concat(t,\" \").concat(String(e))}function _4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function x4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function b4t(e,t,r){return typeof r!=\"number\"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}pE(\"ERR_AMBIGUOUS_ARGUMENT\",'The \"%s\" argument is ambiguous. %s',TypeError);pE(\"ERR_INVALID_ARG_TYPE\",function(e,t,r){wA===void 0&&(wA=gE()),wA(typeof e==\"string\",\"'name' must be a string\");var n;typeof t==\"string\"&&_4t(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\";var i;if(x4t(e,\" argument\"))i=\"The \".concat(e,\" \").concat(n,\" \").concat(XSe(t,\"type\"));else{var a=b4t(e,\".\")?\"property\":\"argument\";i='The \"'.concat(e,'\" ').concat(a,\" \").concat(n,\" \").concat(XSe(t,\"type\"))}return i+=\". Received type \".concat(X_(r)),i},TypeError);pE(\"ERR_INVALID_ARG_VALUE\",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:\"is invalid\";jj===void 0&&(jj=bA());var n=jj.inspect(t);return n.length>128&&(n=\"\".concat(n.slice(0,128),\"...\")),\"The argument '\".concat(e,\"' \").concat(r,\". Received \").concat(n)},TypeError,RangeError);pE(\"ERR_INVALID_RETURN_VALUE\",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n=\"instance of \".concat(r.constructor.name):n=\"type \".concat(X_(r)),\"Expected \".concat(e,' to be returned from the \"').concat(t,'\"')+\" function but got \".concat(n,\".\")},TypeError);pE(\"ERR_MISSING_ARGS\",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];wA===void 0&&(wA=gE()),wA(t.length>0,\"At least one arg needs to be specified\");var n=\"The \",i=t.length;switch(t=t.map(function(a){return'\"'.concat(a,'\"')}),i){case 1:n+=\"\".concat(t[0],\" argument\");break;case 2:n+=\"\".concat(t[0],\" and \").concat(t[1],\" arguments\");break;default:n+=t.slice(0,i-1).join(\", \"),n+=\", and \".concat(t[i-1],\" arguments\");break}return\"\".concat(n,\" must be specified\")},TypeError);YSe.exports.codes=ZSe});var aMe=ye((ddr,nMe)=>{\"use strict\";function KSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JSe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KSe(Object(r),!0).forEach(function(n){w4t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KSe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w4t(e,t,r){return t=tMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T4t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function $Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,tMe(n.key),n)}}function A4t(e,t,r){return t&&$Se(e.prototype,t),r&&$Se(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function tMe(e){var t=S4t(e,\"string\");return Dp(t)===\"symbol\"?t:String(t)}function S4t(e,t){if(Dp(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(Dp(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function M4t(e,t){if(typeof t!=\"function\"&&t!==null)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&xE(e,t)}function E4t(e){var t=iMe();return function(){var n=bE(e),i;if(t){var a=bE(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return rMe(this,i)}}function rMe(e,t){if(t&&(Dp(t)===\"object\"||typeof t==\"function\"))return t;if(t!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return Zj(e)}function Zj(e){if(e===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function Yj(e){var t=typeof Map==\"function\"?new Map:void 0;return Yj=function(n){if(n===null||!k4t(n))return n;if(typeof n!=\"function\")throw new TypeError(\"Super expression must either be null or a function\");if(typeof t!=\"undefined\"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return WR(n,arguments,bE(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),xE(i,n)},Yj(e)}function WR(e,t,r){return iMe()?WR=Reflect.construct.bind():WR=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&xE(u,o.prototype),u},WR.apply(null,arguments)}function iMe(){if(typeof Reflect==\"undefined\"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==\"function\")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function k4t(e){return Function.toString.call(e).indexOf(\"[native code]\")!==-1}function xE(e,t){return xE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xE(e,t)}function bE(e){return bE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bE(e)}function Dp(e){\"@babel/helpers - typeof\";return Dp=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Dp(e)}var C4t=bA(),Kj=C4t.inspect,L4t=Xj(),P4t=L4t.codes.ERR_INVALID_ARG_TYPE;function QSe(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function I4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return\"\";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Xg=\"\",mE=\"\",yE=\"\",Tv=\"\",I2={deepStrictEqual:\"Expected values to be strictly deep-equal:\",strictEqual:\"Expected values to be strictly equal:\",strictEqualObject:'Expected \"actual\" to be reference-equal to \"expected\":',deepEqual:\"Expected values to be loosely deep-equal:\",equal:\"Expected values to be loosely equal:\",notDeepStrictEqual:'Expected \"actual\" not to be strictly deep-equal to:',notStrictEqual:'Expected \"actual\" to be strictly unequal to:',notStrictEqualObject:'Expected \"actual\" not to be reference-equal to \"expected\":',notDeepEqual:'Expected \"actual\" not to be loosely deep-equal to:',notEqual:'Expected \"actual\" to be loosely unequal to:',notIdentical:\"Values identical but not reference-equal:\"},R4t=10;function eMe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,\"message\",{value:e.message}),r}function _E(e){return Kj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D4t(e,t,r){var n=\"\",i=\"\",a=0,o=\"\",s=!1,l=_E(e),u=l.split(`\n",
       "`),c=_E(t).split(`\n",
       "`),f=0,h=\"\";if(r===\"strictEqual\"&&Dp(e)===\"object\"&&Dp(t)===\"object\"&&e!==null&&t!==null&&(r=\"strictEqualObject\"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=R4t){if((Dp(e)!==\"object\"||e===null)&&(Dp(t)!==\"object\"||t===null)&&(e!==0||t!==0))return\"\".concat(I2[r],`\n",
       "\n",
       "`)+\"\".concat(u[0],\" !== \").concat(c[0],`\n",
       "`)}else if(r!==\"strictEqualObject\"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d<v){for(;u[0][f]===c[0][f];)f++;f>2&&(h=`\n",
       "  `.concat(I4t(\" \",f),\"^\"),f=0)}}}for(var _=u[u.length-1],b=c[c.length-1];_===b&&(f++<2?o=`\n",
       "  `.concat(_).concat(o):n=_,u.pop(),c.pop(),!(u.length===0||c.length===0));)_=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(`\n",
       "`);if(k.length>30)for(k[26]=\"\".concat(Xg,\"...\").concat(Tv);k.length>27;)k.pop();return\"\".concat(I2.notIdentical,`\n",
       "\n",
       "`).concat(k.join(`\n",
       "`),`\n",
       "`)}f>3&&(o=`\n",
       "`.concat(Xg,\"...\").concat(Tv).concat(o),s=!0),n!==\"\"&&(o=`\n",
       "  `.concat(n).concat(o),n=\"\");var E=0,T=I2[r]+`\n",
       "`.concat(mE,\"+ actual\").concat(Tv,\" \").concat(yE,\"- expected\").concat(Tv),L=\" \".concat(Xg,\"...\").concat(Tv,\" Lines skipped\");for(f=0;f<p;f++){var x=f-a;if(u.length<f+1)x>1&&f>2&&(x>4?(i+=`\n",
       "`.concat(Xg,\"...\").concat(Tv),s=!0):x>3&&(i+=`\n",
       "  `.concat(c[f-2]),E++),i+=`\n",
       "  `.concat(c[f-1]),E++),a=f,n+=`\n",
       "`.concat(yE,\"-\").concat(Tv,\" \").concat(c[f]),E++;else if(c.length<f+1)x>1&&f>2&&(x>4?(i+=`\n",
       "`.concat(Xg,\"...\").concat(Tv),s=!0):x>3&&(i+=`\n",
       "  `.concat(u[f-2]),E++),i+=`\n",
       "  `.concat(u[f-1]),E++),a=f,i+=`\n",
       "`.concat(mE,\"+\").concat(Tv,\" \").concat(u[f]),E++;else{var C=c[f],M=u[f],g=M!==C&&(!QSe(M,\",\")||M.slice(0,-1)!==C);g&&QSe(C,\",\")&&C.slice(0,-1)===M&&(g=!1,M+=\",\"),g?(x>1&&f>2&&(x>4?(i+=`\n",
       "`.concat(Xg,\"...\").concat(Tv),s=!0):x>3&&(i+=`\n",
       "  `.concat(u[f-2]),E++),i+=`\n",
       "  `.concat(u[f-1]),E++),a=f,i+=`\n",
       "`.concat(mE,\"+\").concat(Tv,\" \").concat(M),n+=`\n",
       "`.concat(yE,\"-\").concat(Tv,\" \").concat(C),E+=2):(i+=n,n=\"\",(x===1||f===0)&&(i+=`\n",
       "  `.concat(M),E++))}if(E>20&&f<p-2)return\"\".concat(T).concat(L,`\n",
       "`).concat(i,`\n",
       "`).concat(Xg,\"...\").concat(Tv).concat(n,`\n",
       "`)+\"\".concat(Xg,\"...\").concat(Tv)}return\"\".concat(T).concat(s?L:\"\",`\n",
       "`).concat(i).concat(n).concat(o).concat(h)}var F4t=function(e,t){M4t(n,e);var r=E4t(n);function n(i){var a;if(T4t(this,n),Dp(i)!==\"object\"||i===null)throw new P4t(\"options\",\"Object\",i);var o=i.message,s=i.operator,l=i.stackStartFn,u=i.actual,c=i.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)a=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(Xg=\"\\x1B[34m\",mE=\"\\x1B[32m\",Tv=\"\\x1B[39m\",yE=\"\\x1B[31m\"):(Xg=\"\",mE=\"\",Tv=\"\",yE=\"\")),Dp(u)===\"object\"&&u!==null&&Dp(c)===\"object\"&&c!==null&&\"stack\"in u&&u instanceof Error&&\"stack\"in c&&c instanceof Error&&(u=eMe(u),c=eMe(c)),s===\"deepStrictEqual\"||s===\"strictEqual\")a=r.call(this,D4t(u,c,s));else if(s===\"notDeepStrictEqual\"||s===\"notStrictEqual\"){var h=I2[s],d=_E(u).split(`\n",
       "`);if(s===\"notStrictEqual\"&&Dp(u)===\"object\"&&u!==null&&(h=I2.notStrictEqualObject),d.length>30)for(d[26]=\"\".concat(Xg,\"...\").concat(Tv);d.length>27;)d.pop();d.length===1?a=r.call(this,\"\".concat(h,\" \").concat(d[0])):a=r.call(this,\"\".concat(h,`\n",
       "\n",
       "`).concat(d.join(`\n",
       "`),`\n",
       "`))}else{var v=_E(u),_=\"\",b=I2[s];s===\"notDeepEqual\"||s===\"notEqual\"?(v=\"\".concat(I2[s],`\n",
       "\n",
       "`).concat(v),v.length>1024&&(v=\"\".concat(v.slice(0,1021),\"...\"))):(_=\"\".concat(_E(c)),v.length>512&&(v=\"\".concat(v.slice(0,509),\"...\")),_.length>512&&(_=\"\".concat(_.slice(0,509),\"...\")),s===\"deepEqual\"||s===\"equal\"?v=\"\".concat(b,`\n",
       "\n",
       "`).concat(v,`\n",
       "\n",
       "should equal\n",
       "\n",
       "`):_=\" \".concat(s,\" \").concat(_)),a=r.call(this,\"\".concat(v).concat(_))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Zj(a),\"name\",{value:\"AssertionError [ERR_ASSERTION]\",enumerable:!1,writable:!0,configurable:!0}),a.code=\"ERR_ASSERTION\",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Zj(a),l),a.stack,a.name=\"AssertionError\",rMe(a)}return A4t(n,[{key:\"toString\",value:function(){return\"\".concat(this.name,\" [\").concat(this.code,\"]: \").concat(this.message)}},{key:t,value:function(a,o){return Kj(this,JSe(JSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Yj(Error),Kj.custom);nMe.exports=F4t});var Jj=ye((vdr,sMe)=>{\"use strict\";var oMe=Object.prototype.toString;sMe.exports=function(t){var r=oMe.call(t),n=r===\"[object Arguments]\";return n||(n=r!==\"[object Array]\"&&t!==null&&typeof t==\"object\"&&typeof t.length==\"number\"&&t.length>=0&&oMe.call(t.callee)===\"[object Function]\"),n}});var gMe=ye((pdr,pMe)=>{\"use strict\";var vMe;Object.keys||(wE=Object.prototype.hasOwnProperty,$j=Object.prototype.toString,lMe=Jj(),Qj=Object.prototype.propertyIsEnumerable,uMe=!Qj.call({toString:null},\"toString\"),cMe=Qj.call(function(){},\"prototype\"),TE=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],XR=function(e){var t=e.constructor;return t&&t.prototype===e},fMe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hMe=function(){if(typeof window==\"undefined\")return!1;for(var e in window)try{if(!fMe[\"$\"+e]&&wE.call(window,e)&&window[e]!==null&&typeof window[e]==\"object\")try{XR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),dMe=function(e){if(typeof window==\"undefined\"||!hMe)return XR(e);try{return XR(e)}catch(t){return!1}},vMe=function(t){var r=t!==null&&typeof t==\"object\",n=$j.call(t)===\"[object Function]\",i=lMe(t),a=r&&$j.call(t)===\"[object String]\",o=[];if(!r&&!n&&!i)throw new TypeError(\"Object.keys called on a non-object\");var s=cMe&&n;if(a&&t.length>0&&!wE.call(t,0))for(var l=0;l<t.length;++l)o.push(String(l));if(i&&t.length>0)for(var u=0;u<t.length;++u)o.push(String(u));else for(var c in t)!(s&&c===\"prototype\")&&wE.call(t,c)&&o.push(String(c));if(uMe)for(var f=dMe(t),h=0;h<TE.length;++h)!(f&&TE[h]===\"constructor\")&&wE.call(t,TE[h])&&o.push(TE[h]);return o});var wE,$j,lMe,Qj,uMe,cMe,TE,XR,fMe,hMe,dMe;pMe.exports=vMe});var eW=ye((gdr,_Me)=>{\"use strict\";var z4t=Array.prototype.slice,O4t=Jj(),mMe=Object.keys,ZR=mMe?function(t){return mMe(t)}:gMe(),yMe=Object.keys;ZR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return O4t(n)?yMe(z4t.call(n)):yMe(n)})}else Object.keys=ZR;return Object.keys||ZR};_Me.exports=ZR});var SMe=ye((mdr,AMe)=>{\"use strict\";var q4t=eW(),wMe=Y8()(),TMe=hA(),xMe=Object,B4t=TMe(\"Array.prototype.push\"),bMe=TMe(\"Object.prototype.propertyIsEnumerable\"),N4t=wMe?Object.getOwnPropertySymbols:null;AMe.exports=function(t,r){if(t==null)throw new TypeError(\"target must be an object\");var n=xMe(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=xMe(arguments[i]),o=q4t(a),s=wMe&&(Object.getOwnPropertySymbols||N4t);if(s)for(var l=s(a),u=0;u<l.length;++u){var c=l[u];bMe(a,c)&&B4t(o,c)}for(var f=0;f<o.length;++f){var h=o[f];if(bMe(a,h)){var d=a[h];n[h]=d}}}return n}});var EMe=ye((ydr,MMe)=>{\"use strict\";var tW=SMe(),U4t=function(){if(!Object.assign)return!1;for(var e=\"abcdefghijklmnopqrst\",t=e.split(\"\"),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a=\"\";for(var o in i)a+=o;return e!==a},V4t=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,\"xy\")}catch(t){return e[1]===\"y\"}return!1};MMe.exports=function(){return!Object.assign||U4t()||V4t()?tW:Object.assign}});var rW=ye((_dr,CMe)=>{\"use strict\";var kMe=function(e){return e!==e};CMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kMe(t)&&kMe(r))}});var YR=ye((xdr,LMe)=>{\"use strict\";var G4t=rW();LMe.exports=function(){return typeof Object.is==\"function\"?Object.is:G4t}});var AE=ye((bdr,DMe)=>{\"use strict\";var H4t=eW(),j4t=typeof Symbol==\"function\"&&typeof Symbol(\"foo\")==\"symbol\",W4t=Object.prototype.toString,X4t=Array.prototype.concat,PMe=Object.defineProperty,Z4t=function(e){return typeof e==\"function\"&&W4t.call(e)===\"[object Function]\"},Y4t=qH()(),IMe=PMe&&Y4t,K4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!Z4t(n)||!n())return}IMe?PMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},RMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=H4t(t);j4t&&(n=X4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)K4t(e,n[i],t[n[i]],r[n[i]])};RMe.supportsDescriptors=!!IMe;DMe.exports=RMe});var zMe=ye((wdr,FMe)=>{\"use strict\";var J4t=YR(),$4t=AE();FMe.exports=function(){var t=J4t();return $4t(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var NMe=ye((Tdr,BMe)=>{\"use strict\";var Q4t=AE(),eEt=tE(),tEt=rW(),OMe=YR(),rEt=zMe(),qMe=eEt(OMe(),Object);Q4t(qMe,{getPolyfill:OMe,implementation:tEt,shim:rEt});BMe.exports=qMe});var iW=ye((Adr,UMe)=>{\"use strict\";UMe.exports=function(t){return t!==t}});var nW=ye((Sdr,VMe)=>{\"use strict\";var iEt=iW();VMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN(\"a\")?Number.isNaN:iEt}});var HMe=ye((Mdr,GMe)=>{\"use strict\";var nEt=AE(),aEt=nW();GMe.exports=function(){var t=aEt();return nEt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var ZMe=ye((Edr,XMe)=>{\"use strict\";var oEt=tE(),sEt=AE(),lEt=iW(),jMe=nW(),uEt=HMe(),WMe=oEt(jMe(),Number);sEt(WMe,{getPolyfill:jMe,implementation:lEt,shim:uEt});XMe.exports=WMe});var v4e=ye((kdr,d4e)=>{\"use strict\";function YMe(e,t){return dEt(e)||hEt(e,t)||fEt(e,t)||cEt()}function cEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fEt(e,t){if(e){if(typeof e==\"string\")return KMe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===\"Object\"&&e.constructor&&(r=e.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(e);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KMe(e,t)}}function KMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hEt(e,t){var r=e==null?null:typeof Symbol!=\"undefined\"&&e[Symbol.iterator]||e[\"@@iterator\"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function dEt(e){if(Array.isArray(e))return e}function Q0(e){\"@babel/helpers - typeof\";return Q0=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Q0(e)}var vEt=/a/g.flags!==void 0,rD=function(t){var r=[];return t.forEach(function(n){return r.push(n)}),r},JMe=function(t){var r=[];return t.forEach(function(n,i){return r.push([i,n])}),r},l4e=Object.is?Object.is:NMe(),eD=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},aW=Number.isNaN?Number.isNaN:ZMe();function sW(e){return e.call.bind(e)}var ME=sW(Object.prototype.hasOwnProperty),tD=sW(Object.prototype.propertyIsEnumerable),$Me=sW(Object.prototype.toString),lp=bA().types,pEt=lp.isAnyArrayBuffer,gEt=lp.isArrayBufferView,QMe=lp.isDate,KR=lp.isMap,e4e=lp.isRegExp,JR=lp.isSet,mEt=lp.isNativeError,yEt=lp.isBoxedPrimitive,t4e=lp.isNumberObject,r4e=lp.isStringObject,i4e=lp.isBooleanObject,n4e=lp.isBigIntObject,_Et=lp.isSymbolObject,xEt=lp.isFloat32Array,bEt=lp.isFloat64Array;function wEt(e){if(e.length===0||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return e.length===10&&e>=Math.pow(2,32)}function $R(e){return Object.keys(e).filter(wEt).concat(eD(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function u4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}var QR=void 0,TEt=!0,AEt=!1,oW=0,lW=1,c4e=2,f4e=3;function SEt(e,t){return vEt?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function MEt(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}function EEt(e,t){return e.byteLength!==t.byteLength?!1:u4e(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function kEt(e,t){return e.byteLength===t.byteLength&&u4e(new Uint8Array(e),new Uint8Array(t))===0}function CEt(e,t){return t4e(e)?t4e(t)&&l4e(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):r4e(e)?r4e(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):i4e(e)?i4e(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):n4e(e)?n4e(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):_Et(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function eg(e,t,r,n){if(e===t)return e!==0?!0:r?l4e(e,t):!0;if(r){if(Q0(e)!==\"object\")return typeof e==\"number\"&&aW(e)&&aW(t);if(Q0(t)!==\"object\"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(e===null||Q0(e)!==\"object\")return t===null||Q0(t)!==\"object\"?e==t:!1;if(t===null||Q0(t)!==\"object\")return!1}var i=$Me(e),a=$Me(t);if(i!==a)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=$R(e,QR),s=$R(t,QR);return o.length!==s.length?!1:SE(e,t,r,n,lW,o)}if(i===\"[object Object]\"&&(!KR(e)&&KR(t)||!JR(e)&&JR(t)))return!1;if(QMe(e)){if(!QMe(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(e4e(e)){if(!e4e(t)||!SEt(e,t))return!1}else if(mEt(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(gEt(e)){if(!r&&(xEt(e)||bEt(e))){if(!MEt(e,t))return!1}else if(!EEt(e,t))return!1;var l=$R(e,QR),u=$R(t,QR);return l.length!==u.length?!1:SE(e,t,r,n,oW,l)}else{if(JR(e))return!JR(t)||e.size!==t.size?!1:SE(e,t,r,n,c4e);if(KR(e))return!KR(t)||e.size!==t.size?!1:SE(e,t,r,n,f4e);if(pEt(e)){if(!kEt(e,t))return!1}else if(yEt(e)&&!CEt(e,t))return!1}return SE(e,t,r,n,oW)}function a4e(e,t){return t.filter(function(r){return tD(e,r)})}function SE(e,t,r,n,i,a){if(arguments.length===5){a=Object.keys(e);var o=Object.keys(t);if(a.length!==o.length)return!1}for(var s=0;s<a.length;s++)if(!ME(t,a[s]))return!1;if(r&&arguments.length===5){var l=eD(e);if(l.length!==0){var u=0;for(s=0;s<l.length;s++){var c=l[s];if(tD(e,c)){if(!tD(t,c))return!1;a.push(c),u++}else if(tD(t,c))return!1}var f=eD(t);if(l.length!==f.length&&a4e(t,f).length!==u)return!1}else{var h=eD(t);if(h.length!==0&&a4e(t,h).length!==0)return!1}}if(a.length===0&&(i===oW||i===lW&&e.length===0||e.size===0))return!0;if(n===void 0)n={val1:new Map,val2:new Map,position:0};else{var d=n.val1.get(e);if(d!==void 0){var v=n.val2.get(t);if(v!==void 0)return d===v}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var _=DEt(e,t,r,a,n,i);return n.val1.delete(e),n.val2.delete(t),_}function o4e(e,t,r,n){for(var i=rD(e),a=0;a<i.length;a++){var o=i[a];if(eg(t,o,r,n))return e.delete(o),!0}return!1}function h4e(e){switch(Q0(e)){case\"undefined\":return null;case\"object\":return;case\"symbol\":return!1;case\"string\":e=+e;case\"number\":if(aW(e))return!1}return!0}function LEt(e,t,r){var n=h4e(r);return n!=null?n:t.has(n)&&!e.has(n)}function PEt(e,t,r,n,i){var a=h4e(r);if(a!=null)return a;var o=t.get(a);return o===void 0&&!t.has(a)||!eg(n,o,!1,i)?!1:!e.has(a)&&eg(n,o,!1,i)}function IEt(e,t,r,n){for(var i=null,a=rD(e),o=0;o<a.length;o++){var s=a[o];if(Q0(s)===\"object\"&&s!==null)i===null&&(i=new Set),i.add(s);else if(!t.has(s)){if(r||!LEt(e,t,s))return!1;i===null&&(i=new Set),i.add(s)}}if(i!==null){for(var l=rD(t),u=0;u<l.length;u++){var c=l[u];if(Q0(c)===\"object\"&&c!==null){if(!o4e(i,c,r,n))return!1}else if(!r&&!e.has(c)&&!o4e(i,c,r,n))return!1}return i.size===0}return!0}function s4e(e,t,r,n,i,a){for(var o=rD(e),s=0;s<o.length;s++){var l=o[s];if(eg(r,l,i,a)&&eg(n,t.get(l),i,a))return e.delete(l),!0}return!1}function REt(e,t,r,n){for(var i=null,a=JMe(e),o=0;o<a.length;o++){var s=YMe(a[o],2),l=s[0],u=s[1];if(Q0(l)===\"object\"&&l!==null)i===null&&(i=new Set),i.add(l);else{var c=t.get(l);if(c===void 0&&!t.has(l)||!eg(u,c,r,n)){if(r||!PEt(e,t,l,u,n))return!1;i===null&&(i=new Set),i.add(l)}}}if(i!==null){for(var f=JMe(t),h=0;h<f.length;h++){var d=YMe(f[h],2),v=d[0],_=d[1];if(Q0(v)===\"object\"&&v!==null){if(!s4e(i,e,v,_,r,n))return!1}else if(!r&&(!e.has(v)||!eg(e.get(v),_,!1,n))&&!s4e(i,e,v,_,!1,n))return!1}return i.size===0}return!0}function DEt(e,t,r,n,i,a){var o=0;if(a===c4e){if(!IEt(e,t,r,i))return!1}else if(a===f4e){if(!REt(e,t,r,i))return!1}else if(a===lW)for(;o<e.length;o++)if(ME(e,o)){if(!ME(t,o)||!eg(e[o],t[o],r,i))return!1}else{if(ME(t,o))return!1;for(var s=Object.keys(e);o<s.length;o++){var l=s[o];if(!ME(t,l)||!eg(e[l],t[l],r,i))return!1}return s.length===Object.keys(t).length}for(o=0;o<n.length;o++){var u=n[o];if(!eg(e[u],t[u],r,i))return!1}return!0}function FEt(e,t){return eg(e,t,AEt)}function zEt(e,t){return eg(e,t,TEt)}d4e.exports={isDeepEqual:FEt,isDeepStrictEqual:zEt}});var gE=ye((Cdr,I4e)=>{\"use strict\";function Zg(e){\"@babel/helpers - typeof\";return Zg=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Zg(e)}function p4e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,qEt(n.key),n)}}function OEt(e,t,r){return t&&p4e(e.prototype,t),r&&p4e(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function qEt(e){var t=BEt(e,\"string\");return Zg(t)===\"symbol\"?t:String(t)}function BEt(e,t){if(Zg(e)!==\"object\"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||\"default\");if(Zg(n)!==\"object\")return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function NEt(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var UEt=Xj(),EE=UEt.codes,g4e=EE.ERR_AMBIGUOUS_ARGUMENT,TA=EE.ERR_INVALID_ARG_TYPE,VEt=EE.ERR_INVALID_ARG_VALUE,GEt=EE.ERR_INVALID_RETURN_VALUE,Y_=EE.ERR_MISSING_ARGS,K_=aMe(),HEt=bA(),iD=HEt.inspect,x4e=bA().types,jEt=x4e.isPromise,nD=x4e.isRegExp,WEt=EMe()(),b4e=YR()(),aD=hA()(\"RegExp.prototype.test\"),Z_,oD;function kE(){var e=v4e();Z_=e.isDeepEqual,oD=e.isDeepStrictEqual}var m4e=!1,Ef=I4e.exports=uW,sD={};function Yg(e){throw e.message instanceof Error?e.message:new K_(e)}function w4e(e,t,r,n,i){var a=arguments.length,o;if(a===0)o=\"Failed\";else if(a===1)r=e,e=void 0;else{if(m4e===!1){m4e=!0;var s=process.emitWarning?process.emitWarning:console.warn.bind(console);s(\"assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.\",\"DeprecationWarning\",\"DEP0094\")}a===2&&(n=\"!=\")}if(r instanceof Error)throw r;var l={actual:e,expected:t,operator:n===void 0?\"fail\":n,stackStartFn:i||w4e};r!==void 0&&(l.message=r);var u=new K_(l);throw o&&(u.message=o,u.generatedMessage=!0),u}Ef.fail=w4e;Ef.AssertionError=K_;function T4e(e,t,r,n){if(!r){var i=!1;if(t===0)i=!0,n=\"No value argument passed to `assert.ok()`\";else if(n instanceof Error)throw n;var a=new K_({actual:r,expected:!0,message:n,operator:\"==\",stackStartFn:e});throw a.generatedMessage=i,a}}function uW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T4e.apply(void 0,[uW,t.length].concat(t))}Ef.ok=uW;Ef.equal=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");t!=r&&Yg({actual:t,expected:r,message:n,operator:\"==\",stackStartFn:e})};Ef.notEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");t==r&&Yg({actual:t,expected:r,message:n,operator:\"!=\",stackStartFn:e})};Ef.deepEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");Z_===void 0&&kE(),Z_(t,r)||Yg({actual:t,expected:r,message:n,operator:\"deepEqual\",stackStartFn:e})};Ef.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");Z_===void 0&&kE(),Z_(t,r)&&Yg({actual:t,expected:r,message:n,operator:\"notDeepEqual\",stackStartFn:e})};Ef.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");Z_===void 0&&kE(),oD(t,r)||Yg({actual:t,expected:r,message:n,operator:\"deepStrictEqual\",stackStartFn:e})};Ef.notDeepStrictEqual=A4e;function A4e(e,t,r){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");Z_===void 0&&kE(),oD(e,t)&&Yg({actual:e,expected:t,message:r,operator:\"notDeepStrictEqual\",stackStartFn:A4e})}Ef.strictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");b4e(t,r)||Yg({actual:t,expected:r,message:n,operator:\"strictEqual\",stackStartFn:e})};Ef.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_(\"actual\",\"expected\");b4e(t,r)&&Yg({actual:t,expected:r,message:n,operator:\"notStrictEqual\",stackStartFn:e})};var y4e=OEt(function e(t,r,n){var i=this;NEt(this,e),r.forEach(function(a){a in t&&(n!==void 0&&typeof n[a]==\"string\"&&nD(t[a])&&aD(t[a],n[a])?i[a]=n[a]:i[a]=t[a])})});function XEt(e,t,r,n,i,a){if(!(r in e)||!oD(e[r],t[r])){if(!n){var o=new y4e(e,i),s=new y4e(t,i,e),l=new K_({actual:o,expected:s,operator:\"deepStrictEqual\",stackStartFn:a});throw l.actual=e,l.expected=t,l.operator=a.name,l}Yg({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}function S4e(e,t,r,n){if(typeof t!=\"function\"){if(nD(t))return aD(t,e);if(arguments.length===2)throw new TA(\"expected\",[\"Function\",\"RegExp\"],t);if(Zg(e)!==\"object\"||e===null){var i=new K_({actual:e,expected:t,message:r,operator:\"deepStrictEqual\",stackStartFn:n});throw i.operator=n.name,i}var a=Object.keys(t);if(t instanceof Error)a.push(\"name\",\"message\");else if(a.length===0)throw new VEt(\"error\",t,\"may not be an empty object\");return Z_===void 0&&kE(),a.forEach(function(o){typeof e[o]==\"string\"&&nD(t[o])&&aD(t[o],e[o])||XEt(e,t,o,r,a,n)}),!0}return t.prototype!==void 0&&e instanceof t?!0:Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function M4e(e){if(typeof e!=\"function\")throw new TA(\"fn\",\"Function\",e);try{e()}catch(t){return t}return sD}function _4e(e){return jEt(e)||e!==null&&Zg(e)===\"object\"&&typeof e.then==\"function\"&&typeof e.catch==\"function\"}function E4e(e){return Promise.resolve().then(function(){var t;if(typeof e==\"function\"){if(t=e(),!_4e(t))throw new GEt(\"instance of Promise\",\"promiseFn\",t)}else if(_4e(e))t=e;else throw new TA(\"promiseFn\",[\"Function\",\"Promise\"],e);return Promise.resolve().then(function(){return t}).then(function(){return sD}).catch(function(r){return r})})}function k4e(e,t,r,n){if(typeof r==\"string\"){if(arguments.length===4)throw new TA(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(Zg(t)===\"object\"&&t!==null){if(t.message===r)throw new g4e(\"error/message\",'The error message \"'.concat(t.message,'\" is identical to the message.'))}else if(t===r)throw new g4e(\"error/message\",'The error \"'.concat(t,'\" is identical to the message.'));n=r,r=void 0}else if(r!=null&&Zg(r)!==\"object\"&&typeof r!=\"function\")throw new TA(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(t===sD){var i=\"\";r&&r.name&&(i+=\" (\".concat(r.name,\")\")),i+=n?\": \".concat(n):\".\";var a=e.name===\"rejects\"?\"rejection\":\"exception\";Yg({actual:void 0,expected:r,operator:e.name,message:\"Missing expected \".concat(a).concat(i),stackStartFn:e})}if(r&&!S4e(t,r,n,e))throw t}function C4e(e,t,r,n){if(t!==sD){if(typeof r==\"string\"&&(n=r,r=void 0),!r||S4e(t,r)){var i=n?\": \".concat(n):\".\",a=e.name===\"doesNotReject\"?\"rejection\":\"exception\";Yg({actual:t,expected:r,operator:e.name,message:\"Got unwanted \".concat(a).concat(i,`\n",
       "`)+'Actual message: \"'.concat(t&&t.message,'\"'),stackStartFn:e})}throw t}}Ef.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];k4e.apply(void 0,[e,M4e(t)].concat(n))};Ef.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return E4e(t).then(function(a){return k4e.apply(void 0,[e,a].concat(n))})};Ef.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];C4e.apply(void 0,[e,M4e(t)].concat(n))};Ef.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return E4e(t).then(function(a){return C4e.apply(void 0,[e,a].concat(n))})};Ef.ifError=function e(t){if(t!=null){var r=\"ifError got unwanted exception: \";Zg(t)===\"object\"&&typeof t.message==\"string\"?t.message.length===0&&t.constructor?r+=t.constructor.name:r+=t.message:r+=iD(t);var n=new K_({actual:t,expected:null,operator:\"ifError\",message:r,stackStartFn:e}),i=t.stack;if(typeof i==\"string\"){var a=i.split(`\n",
       "`);a.shift();for(var o=n.stack.split(`\n",
       "`),s=0;s<a.length;s++){var l=o.indexOf(a[s]);if(l!==-1){o=o.slice(0,l);break}}n.stack=\"\".concat(o.join(`\n",
       "`),`\n",
       "`).concat(a.join(`\n",
       "`))}throw n}};function L4e(e,t,r,n,i){if(!nD(t))throw new TA(\"regexp\",\"RegExp\",t);var a=i===\"match\";if(typeof e!=\"string\"||aD(t,e)!==a){if(r instanceof Error)throw r;var o=!r;r=r||(typeof e!=\"string\"?'The \"string\" argument must be of type string. Received type '+\"\".concat(Zg(e),\" (\").concat(iD(e),\")\"):(a?\"The input did not match the regular expression \":\"The input was expected to not match the regular expression \")+\"\".concat(iD(t),`. Input:\n",
       "\n",
       "`).concat(iD(e),`\n",
       "`));var s=new K_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}Ef.match=function e(t,r,n){L4e(t,r,n,e,\"match\")};Ef.doesNotMatch=function e(t,r,n){L4e(t,r,n,e,\"doesNotMatch\")};function P4e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T4e.apply(void 0,[P4e,t.length].concat(t))}Ef.strict=WEt(P4e,Ef,{equal:Ef.strictEqual,deepEqual:Ef.deepStrictEqual,notEqual:Ef.notStrictEqual,notDeepEqual:Ef.notDeepStrictEqual});Ef.strict.strict=Ef.strict});var D4e=ye((Ldr,R4e)=>{var CE=1e3,LE=CE*60,PE=LE*60,IE=PE*24,ZEt=IE*365.25;R4e.exports=function(e,t){t=t||{};var r=typeof e;if(r===\"string\"&&e.length>0)return YEt(e);if(r===\"number\"&&isNaN(e)===!1)return t.long?JEt(e):KEt(e);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(e))};function YEt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||\"ms\").toLowerCase();switch(n){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*ZEt;case\"days\":case\"day\":case\"d\":return r*IE;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*PE;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*LE;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*CE;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function KEt(e){return e>=IE?Math.round(e/IE)+\"d\":e>=PE?Math.round(e/PE)+\"h\":e>=LE?Math.round(e/LE)+\"m\":e>=CE?Math.round(e/CE)+\"s\":e+\"ms\"}function JEt(e){return lD(e,IE,\"day\")||lD(e,PE,\"hour\")||lD(e,LE,\"minute\")||lD(e,CE,\"second\")||e+\" ms\"}function lD(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+\" \"+r:Math.ceil(e/t)+\" \"+r+\"s\"}});var z4e=ye((Lc,F4e)=>{Lc=F4e.exports=fW.debug=fW.default=fW;Lc.coerce=rkt;Lc.disable=ekt;Lc.enable=QEt;Lc.enabled=tkt;Lc.humanize=D4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var cW;function $Et(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function fW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(cW||n);r.diff=i,r.prev=cW,r.curr=n,cW=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=Lc.coerce(a[0]),typeof a[0]!=\"string\"&&a.unshift(\"%O\");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(u,c){if(u===\"%%\")return u;s++;var f=Lc.formatters[c];if(typeof f==\"function\"){var h=a[s];u=f.call(r,h),a.splice(s,1),s--}return u}),Lc.formatArgs.call(r,a);var l=t.log||Lc.log||console.log.bind(console);l.apply(r,a)}}return t.namespace=e,t.enabled=Lc.enabled(e),t.useColors=Lc.useColors(),t.color=$Et(e),typeof Lc.init==\"function\"&&Lc.init(t),t}function QEt(e){Lc.save(e),Lc.names=[],Lc.skips=[];for(var t=(typeof e==\"string\"?e:\"\").split(/[\\s,]+/),r=t.length,n=0;n<r;n++)t[n]&&(e=t[n].replace(/\\*/g,\".*?\"),e[0]===\"-\"?Lc.skips.push(new RegExp(\"^\"+e.substr(1)+\"$\")):Lc.names.push(new RegExp(\"^\"+e+\"$\")))}function ekt(){Lc.enable(\"\")}function tkt(e){var t,r;for(t=0,r=Lc.skips.length;t<r;t++)if(Lc.skips[t].test(e))return!1;for(t=0,r=Lc.names.length;t<r;t++)if(Lc.names[t].test(e))return!0;return!1}function rkt(e){return e instanceof Error?e.stack||e.message:e}});var B4e=ye((up,q4e)=>{up=q4e.exports=z4e();up.log=akt;up.formatArgs=nkt;up.save=okt;up.load=O4e;up.useColors=ikt;up.storage=typeof chrome!=\"undefined\"&&typeof chrome.storage!=\"undefined\"?chrome.storage.local:skt();up.colors=[\"lightseagreen\",\"forestgreen\",\"goldenrod\",\"dodgerblue\",\"darkorchid\",\"crimson\"];function ikt(){return typeof window!=\"undefined\"&&window.process&&window.process.type===\"renderer\"?!0:typeof document!=\"undefined\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=\"undefined\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=\"undefined\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=\"undefined\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}up.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}};function nkt(e){var t=this.useColors;if(e[0]=(t?\"%c\":\"\")+this.namespace+(t?\" %c\":\" \")+e[0]+(t?\"%c \":\" \")+\"+\"+up.humanize(this.diff),!!t){var r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!==\"%%\"&&(n++,a===\"%c\"&&(i=n))}),e.splice(i,0,r)}}function akt(){return typeof console==\"object\"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function okt(e){try{e==null?up.storage.removeItem(\"debug\"):up.storage.debug=e}catch(t){}}function O4e(){var e;try{e=up.storage.debug}catch(t){}return!e&&typeof process!=\"undefined\"&&\"env\"in process&&(e=process.env.DEBUG),e}up.enable(O4e());function skt(){try{return window.localStorage}catch(e){}}});var X4e=ye((Pdr,W4e)=>{var AA=gE(),J_=B4e()(\"stream-parser\");W4e.exports=ukt;var U4e=-1,uD=0,lkt=1,V4e=2;function ukt(e){var t=e&&typeof e._transform==\"function\",r=e&&typeof e._write==\"function\";if(!t&&!r)throw new Error(\"must pass a Writable or Transform stream in\");J_(\"extending Parser into stream\"),e._bytes=ckt,e._skipBytes=fkt,t&&(e._passthrough=hkt),t?e._transform=vkt:e._write=dkt}function RE(e){J_(\"initializing parser stream\"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=U4e,e._parserCallback=null,typeof e.push==\"function\"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function ckt(e,t){AA(!this._parserCallback,'there is already a \"callback\" set!'),AA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got \"'+e+'\"'),this._parserInit||RE(this),J_(\"buffering %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=uD}function fkt(e,t){AA(!this._parserCallback,'there is already a \"callback\" set!'),AA(e>0,'can only skip > 0 bytes, got \"'+e+'\"'),this._parserInit||RE(this),J_(\"skipping %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=lkt}function hkt(e,t){AA(!this._parserCallback,'There is already a \"callback\" set!'),AA(e>0,'can only pass through > 0 bytes, got \"'+e+'\"'),this._parserInit||RE(this),J_(\"passing through %o bytes\",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=V4e}function dkt(e,t,r){this._parserInit||RE(this),J_(\"write(%o bytes)\",e.length),typeof t==\"function\"&&(r=t),H4e(this,e,null,r)}function vkt(e,t,r){this._parserInit||RE(this),J_(\"transform(%o bytes)\",e.length),typeof t!=\"function\"&&(t=this._parserOutput),H4e(this,e,t,r)}function G4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error(\"got data but not currently parsing anything\")):t.length<=e._parserBytesLeft?function(){return N4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return N4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return G4e(e,t.slice(i.length),r,n)}})}}function N4e(e,t,r,n){if(e._parserBytesLeft-=t.length,J_(\"%o bytes left for stream piece\",e._parserBytesLeft),e._parserState===uD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===V4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===uD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==uD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=U4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(j4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var H4e=j4e(G4e);function j4e(e){return function(){for(var t=e.apply(this,arguments);typeof t==\"function\";)t=t();return t}}});var rc=ye(Jy=>{\"use strict\";var Z4e=NSe().Transform,pkt=X4e();function DE(){Z4e.call(this,{readableObjectMode:!0})}DE.prototype=Object.create(Z4e.prototype);DE.prototype.constructor=DE;pkt(DE.prototype);Jy.ParserStream=DE;Jy.sliceEq=function(e,t,r){for(var n=t,i=0;i<r.length;)if(e[n++]!==r[i++])return!1;return!0};Jy.str2arr=function(e,t){var r=[],n=0;if(t&&t===\"hex\")for(;n<e.length;)r.push(parseInt(e.slice(n,n+2),16)),n+=2;else for(;n<e.length;n++)r.push(e.charCodeAt(n)&255);return r};Jy.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};Jy.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8};Jy.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]*16777216};Jy.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|e[t]*16777216};function cD(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}cD.prototype=Object.create(Error.prototype);cD.prototype.constructor=cD;Jy.ProbeError=cD});var Y4e=ye((Rdr,fD)=>{\"use strict\";var SA=rc().readUInt16BE,dW=rc().readUInt32BE;function FE(e,t){if(e.length<4+t)return null;var r=dW(e,t);return e.length<r+t||r<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+r),end:t+r}}fD.exports.unbox=FE;function gkt(e,t){for(var r=0;;){var n=FE(e,r);if(!n)break;switch(n.boxtype){case\"ispe\":t.sizes.push({width:dW(n.data,4),height:dW(n.data,8)});break;case\"irot\":t.transforms.push({type:\"irot\",value:n.data[0]&3});break;case\"imir\":t.transforms.push({type:\"imir\",value:n.data[0]&1});break}r=n.end}}function hW(e,t,r){for(var n=0,i=0;i<r;i++)n=n*256+(e[t+i]||0);return n}function mkt(e,t){for(var r=e[4]>>4&15,n=e[4]&15,i=e[5]>>4&15,a=SA(e,6),o=8,s=0;s<a;s++){var l=SA(e,o);o+=2;var u=SA(e,o);o+=2;var c=hW(e,o,i);o+=i;var f=SA(e,o);if(o+=2,u===0&&f===1){var h=hW(e,o,r),d=hW(e,o+r,n);t.item_loc[l]={length:d,offset:h+c}}o+=f*(r+n)}}function ykt(e,t){for(var r=SA(e,4),n=6,i=0;i<r;i++){var a=FE(e,n);if(!a)break;if(a.boxtype===\"infe\"){for(var o=SA(a.data,4),s=\"\",l=8;l<a.data.length&&a.data[l];l++)s+=String.fromCharCode(a.data[l]);t.item_inf[s]=o}n=a.end}}function _kt(e,t){for(var r=0;;){var n=FE(e,r);if(!n)break;n.boxtype===\"ipco\"&&gkt(n.data,t),r=n.end}}function xkt(e,t){for(var r=4;;){var n=FE(e,r);if(!n)break;n.boxtype===\"iprp\"&&_kt(n.data,t),n.boxtype===\"iloc\"&&mkt(n.data,t),n.boxtype===\"iinf\"&&ykt(n.data,t),r=n.end}}function bkt(e){var t=e.reduce(function(i,a){return i.width>a.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}fD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(xkt(e,t),!!t.sizes.length){var r=bkt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type===\"imir\"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type===\"irot\")for(var l=0;l<a.value;l++)n=o[n]});var i=null;return t.item_inf.Exif&&(i=t.item_loc[t.item_inf.Exif]),{width:r.width,height:r.height,orientation:t.transforms.length?n:null,variants:t.sizes,exif_location:i}}};fD.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),r={};r[t]=!0;for(var n=8;n<e.length;n+=4)r[String.fromCharCode.apply(null,e.slice(n,n+4))]=!0;if(!(!r.mif1&&!r.msf1&&!r.miaf))return t===\"avif\"||t===\"avis\"||t===\"avio\"?{type:\"avif\",mime:\"image/avif\"}:t===\"heic\"||t===\"heix\"?{type:\"heic\",mime:\"image/heic\"}:t===\"hevc\"||t===\"hevx\"?{type:\"heic\",mime:\"image/heic-sequence\"}:r.avif||r.avis?{type:\"avif\",mime:\"image/avif\"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:\"heif\",mime:\"image/heif-sequence\"}:{type:\"heif\",mime:\"image/heif\"}:{type:\"avif\",mime:\"image/avif\"}}});var dD=ye((Ddr,vW)=>{\"use strict\";function hD(e,t){var r=new Error(e);return r.code=t,r}function wkt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function $y(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!==\"II*\\0\"&&n!==\"MM\\0*\")throw hD(\"invalid TIFF signature\",\"EBADDATA\");this.big_endian=n[0]===\"M\"}$y.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};$y.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw hD(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};$y.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw hD(\"unexpected EOF\",\"EBADDATA\");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};$y.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};$y.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};$y.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};$y.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;i<n;i++){var a=this.read_uint16(t),o=this.read_uint16(t+2),s=this.read_uint32(t+4),l=this.exif_format_length(o),u=s*l,c=u<=4?t+8:this.read_uint32(t+8),f=!1;if(c+u>this.input.length)throw hD(\"unexpected EOF\",\"EBADDATA\");for(var h=[],d=c,v=0;v<s;v++,d+=l){var _=this.exif_format_read(o,d);if(_===null){h=null;break}h.push(_)}Array.isArray(h)&&o===2&&(h=wkt(String.fromCharCode.apply(null,h)),h&&h[h.length-1]===\"\\0\"&&(h=h.slice(0,-1))),this.is_subifd_link(e,a)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};vW.exports.ExifParser=$y;vW.exports.get_orientation=function(e){var t=0;try{return new $y(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var J4e=ye((Fdr,K4e)=>{\"use strict\";var Tkt=rc().str2arr,Akt=rc().sliceEq,Skt=rc().readUInt32BE,vD=Y4e(),Mkt=dD(),Ekt=Tkt(\"ftyp\");K4e.exports=function(e){if(Akt(e,4,Ekt)){var t=vD.unbox(e,0);if(t){var r=vD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=vD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype===\"mdat\")return;if(a.boxtype===\"meta\"){n=a.data;break}}if(n){var o=vD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:\"px\",hUnits:\"px\"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=Skt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=Mkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var eEe=ye((zdr,Q4e)=>{\"use strict\";var kkt=rc().str2arr,Ckt=rc().sliceEq,$4e=rc().readUInt16LE,Lkt=kkt(\"BM\");Q4e.exports=function(e){if(!(e.length<26)&&Ckt(e,0,Lkt))return{width:$4e(e,18),height:$4e(e,22),type:\"bmp\",mime:\"image/bmp\",wUnits:\"px\",hUnits:\"px\"}}});var aEe=ye((Odr,nEe)=>{\"use strict\";var iEe=rc().str2arr,tEe=rc().sliceEq,rEe=rc().readUInt16LE,Pkt=iEe(\"GIF87a\"),Ikt=iEe(\"GIF89a\");nEe.exports=function(e){if(!(e.length<10)&&!(!tEe(e,0,Pkt)&&!tEe(e,0,Ikt)))return{width:rEe(e,6),height:rEe(e,8),type:\"gif\",mime:\"image/gif\",wUnits:\"px\",hUnits:\"px\"}}});var lEe=ye((qdr,sEe)=>{\"use strict\";var pW=rc().readUInt16LE,Rkt=0,Dkt=1,oEe=16;sEe.exports=function(e){var t=pW(e,0),r=pW(e,2),n=pW(e,4);if(!(t!==Rkt||r!==Dkt||!n)){for(var i=[],a={width:0,height:0},o=0;o<n;o++){var s=e[6+oEe*o]||256,l=e[6+oEe*o+1]||256,u={width:s,height:l};i.push(u),(s>a.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:\"ico\",mime:\"image/x-icon\",wUnits:\"px\",hUnits:\"px\"}}}});var cEe=ye((Bdr,uEe)=>{\"use strict\";var gW=rc().readUInt16BE,Fkt=rc().str2arr,zkt=rc().sliceEq,Okt=dD(),qkt=Fkt(\"Exif\\0\\0\");uEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=gW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&zkt(e,t,qkt)&&(i=Okt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t<n)return;var a={width:gW(e,t+3),height:gW(e,t+1),type:\"jpg\",mime:\"image/jpeg\",wUnits:\"px\",hUnits:\"px\"};return i>0&&(a.orientation=i),a}t+=n}}});var pEe=ye((Ndr,vEe)=>{\"use strict\";var dEe=rc().str2arr,fEe=rc().sliceEq,hEe=rc().readUInt32BE,Bkt=dEe(`\\x89PNG\\r\n",
       "\u001a\n",
       "`),Nkt=dEe(\"IHDR\");vEe.exports=function(e){if(!(e.length<24)&&fEe(e,0,Bkt)&&fEe(e,12,Nkt))return{width:hEe(e,16),height:hEe(e,20),type:\"png\",mime:\"image/png\",wUnits:\"px\",hUnits:\"px\"}}});var yEe=ye((Udr,mEe)=>{\"use strict\";var Ukt=rc().str2arr,Vkt=rc().sliceEq,gEe=rc().readUInt32BE,Gkt=Ukt(\"8BPS\\0\u0001\");mEe.exports=function(e){if(!(e.length<22)&&Vkt(e,0,Gkt))return{width:gEe(e,18),height:gEe(e,14),type:\"psd\",mime:\"image/vnd.adobe.photoshop\",wUnits:\"px\",hUnits:\"px\"}}});var bEe=ye((Vdr,xEe)=>{\"use strict\";function Hkt(e){return e===32||e===9||e===13||e===10}function MA(e){return typeof e==\"number\"&&isFinite(e)&&e>0}function jkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t<r&&Hkt(e[t]);)t++;return t===r?!1:e[t]===60}var Wkt=/<[-_.:a-zA-Z0-9][^>]*>/,Xkt=/^<([-_.:a-zA-Z0-9]+:)?svg\\s/,Zkt=/[^-]\\bwidth=\"([^%]+?)\"|[^-]\\bwidth='([^%]+?)'/,Ykt=/\\bheight=\"([^%]+?)\"|\\bheight='([^%]+?)'/,Kkt=/\\bview[bB]ox=\"(.+?)\"|\\bview[bB]ox='(.+?)'/,_Ee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Jkt(e){var t=e.match(Zkt),r=e.match(Ykt),n=e.match(Kkt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Xm(e){return _Ee.test(e)?e.match(_Ee)[0]:\"px\"}xEe.exports=function(e){if(jkt(e)){for(var t=\"\",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var n=(t.match(Wkt)||[\"\"])[0];if(Xkt.test(n)){var i=Jkt(n),a=parseFloat(i.width),o=parseFloat(i.height);if(i.width&&i.height)return!MA(a)||!MA(o)?void 0:{width:a,height:o,type:\"svg\",mime:\"image/svg+xml\",wUnits:Xm(i.width),hUnits:Xm(i.height)};var s=(i.viewbox||\"\").split(\" \"),l={width:s[2],height:s[3]},u=parseFloat(l.width),c=parseFloat(l.height);if(!(!MA(u)||!MA(c))&&Xm(l.width)===Xm(l.height)){var f=u/c;return i.width?MA(a)?{width:a,height:a/f,type:\"svg\",mime:\"image/svg+xml\",wUnits:Xm(i.width),hUnits:Xm(i.width)}:void 0:i.height?MA(o)?{width:o*f,height:o,type:\"svg\",mime:\"image/svg+xml\",wUnits:Xm(i.height),hUnits:Xm(i.height)}:void 0:{width:u,height:c,type:\"svg\",mime:\"image/svg+xml\",wUnits:Xm(l.width),hUnits:Xm(l.height)}}}}}});var MEe=ye((Gdr,SEe)=>{\"use strict\";var AEe=rc().str2arr,wEe=rc().sliceEq,$kt=rc().readUInt16LE,Qkt=rc().readUInt16BE,eCt=rc().readUInt32LE,tCt=rc().readUInt32BE,rCt=AEe(\"II*\\0\"),iCt=AEe(\"MM\\0*\");function pD(e,t,r){return r?Qkt(e,t):$kt(e,t)}function mW(e,t,r){return r?tCt(e,t):eCt(e,t)}function TEe(e,t,r){var n=pD(e,t+2,r),i=mW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?pD(e,t+8,r):mW(e,t+8,r)}SEe.exports=function(e){if(!(e.length<8)&&!(!wEe(e,0,rCt)&&!wEe(e,0,iCt))){var t=e[0]===77,r=mW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=pD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n<i))){var a,o,s,l;for(a=0;a<i;a+=12)l=pD(e,n+a,t),l===256?o=TEe(e,n+a,t):l===257&&(s=TEe(e,n+a,t));if(o&&s)return{width:o,height:s,type:\"tiff\",mime:\"image/tiff\",wUnits:\"px\",hUnits:\"px\"}}}}}}});var PEe=ye((Hdr,LEe)=>{\"use strict\";var CEe=rc().str2arr,EEe=rc().sliceEq,kEe=rc().readUInt16LE,yW=rc().readUInt32LE,nCt=dD(),aCt=CEe(\"RIFF\"),oCt=CEe(\"WEBP\");function sCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:kEe(e,t+6)&16383,height:kEe(e,t+8)&16383,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}function lCt(e,t){if(e[t]===47){var r=yW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}}function uCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<t|e[t+8]<<8|e[t+7])+1,type:\"webp\",mime:\"image/webp\",wUnits:\"px\",hUnits:\"px\"}}LEe.exports=function(e){if(!(e.length<16)&&!(!EEe(e,0,aCt)&&!EEe(e,8,oCt))){var t=12,r=null,n=0,i=yW(e,4)+8;if(!(i>e.length)){for(;t+8<i;){if(e[t]===0){t++;continue}var a=String.fromCharCode.apply(null,e.slice(t,t+4)),o=yW(e,t+4);a===\"VP8 \"&&o>=10?r=r||sCt(e,t+8):a===\"VP8L\"&&o>=9?r=r||lCt(e,t+8):a===\"VP8X\"&&o>=10?r=r||uCt(e,t+8):a===\"EXIF\"&&(n=nCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var REe=ye((jdr,IEe)=>{\"use strict\";IEe.exports={avif:J4e(),bmp:eEe(),gif:aEe(),ico:lEe(),jpeg:cEe(),png:pEe(),psd:yEe(),svg:bEe(),tiff:MEe(),webp:PEe()}});var DEe=ye((Wdr,xW)=>{\"use strict\";var _W=REe();function cCt(e){for(var t=Object.keys(_W),r=0;r<t.length;r++){var n=_W[t[r]](e);if(n)return n}return null}xW.exports=function(t){return cCt(t)};xW.exports.parsers=_W});var zEe=ye(FEe=>{\"use strict\";var fCt=DEe(),hCt=Oy().IMAGE_URL_PREFIX,dCt=_2().Buffer;FEe.getImageSize=function(e){var t=e.replace(hCt,\"\"),r=new dCt(t,\"base64\");return fCt(r)}});var BEe=ye((Zdr,qEe)=>{\"use strict\";var OEe=Dr(),vCt=QT(),pCt=Eo(),gD=ho(),gCt=Dr().maxRowLength,mCt=zEe().getImageSize;qEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=gCt(r.z);else if(r._hasSource){var a=mCt(r.source);n=a.height,i=a.width}var o=gD.getFromId(t,r.xaxis||\"x\"),s=gD.getFromId(t,r.yaxis||\"y\"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type===\"log\")for(c=0;c<i;c++)f.push(l+c*r.dx);if(s&&s.type===\"log\")for(c=0;c<n;c++)h.push(u+c*r.dy);r._extremes[o._id]=gD.findExtremes(o,f),r._extremes[s._id]=gD.findExtremes(s,h),r._scaler=xCt(r);var d={x0:l,y0:u,z:r.z,w:i,h:n};return[d]};function yCt(e,t,r,n){return function(i){return OEe.constrain((i-e)*t,r,n)}}function _Ct(e,t){return function(r){return OEe.constrain(r,e,t)}}function xCt(e){var t=vCt.colormodel[e.colormodel],r=t.colormodel||e.colormodel,n=r.length;e._sArray=[];for(var i=0;i<n;i++)t.min[i]!==e.zmin[i]||t.max[i]!==e.zmax[i]?e._sArray.push(yCt(e.zmin[i],(t.max[i]-t.min[i])/(e.zmax[i]-e.zmin[i]),t.min[i],t.max[i])):e._sArray.push(_Ct(t.min[i],t.max[i]));return function(a){for(var o=a.slice(0,n),s=0;s<n;s++){var l=o[s];if(!pCt(l))return!1;o[s]=e._sArray[s](l)}return o}}});var VEe=ye((Ydr,UEe)=>{\"use strict\";var bCt=Oa(),R2=Dr(),NEe=R2.strTranslate,wCt=Wp(),TCt=QT(),ACt=oG(),SCt=g8().STYLE;UEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&ACt();R2.makeTraceGroups(i,n,\"im\").each(function(l){var u=bCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth===\"fast\"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type===\"linear\"&&o.type===\"linear\";f._realImage=h;var d=c.z,v=c.x0,_=c.y0,b=c.w,p=c.h,k=f.dx,E=f.dy,T,L,x,C,M,g;for(g=0;T===void 0&&g<b;)T=a.c2p(v+g*k),g++;for(g=b;L===void 0&&g>0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g<p;)C=o.c2p(_+g*E),g++;for(g=p;M===void 0&&g>0;)M=o.c2p(_+g*E),g--;if(L<T&&(x=L,L=T,T=x),M<C&&(x=C,C=M,M=x),!h){var P=.5;T=Math.max(-P*a._length,T),L=Math.min((1+P)*a._length,L),C=Math.max(-P*o._length,C),M=Math.min((1+P)*o._length,M)}var A=Math.round(L-T),z=Math.round(M-C),O=A<=0||z<=0;if(O){var U=u.selectAll(\"image\").data([]);U.exit().remove();return}function G(ge){var ie=document.createElement(\"canvas\");ie.width=A,ie.height=z;var Se=ie.getContext(\"2d\",{willReadFrequently:!0}),Ee=function(ot){return R2.constrain(Math.round(a.c2p(v+ot*k)-T),0,A)},Ae=function(ot){return R2.constrain(Math.round(o.c2p(_+ot*E)-C),0,z)},Be=TCt.colormodel[f.colormodel],Pe=Be.colormodel||f.colormodel,me=Be.fmt,De;for(g=0;g<c.w;g++){var ce=Ee(g),je=Ee(g+1);if(!(je===ce||isNaN(je)||isNaN(ce)))for(var lt=0;lt<c.h;lt++){var pt=Ae(lt),Vt=Ae(lt+1);Vt===pt||isNaN(Vt)||isNaN(pt)||!ge(g,lt)||(De=f._scaler(ge(g,lt)),De?Se.fillStyle=Pe+\"(\"+me(De).join(\",\")+\")\":Se.fillStyle=\"rgba(0,0,0,0)\",Se.fillRect(ce,pt,je-ce,Vt-pt))}}return ie}var Z=u.selectAll(\"image\").data([l]);Z.enter().append(\"svg:image\").attr({xmlns:wCt.svg,preserveAspectRatio:\"none\"}),Z.exit().remove();var j=f.zsmooth===!1?SCt:\"\";if(h){var N=R2.simpleMap(a.range,a.r2l),H=R2.simpleMap(o.range,o.r2l),re=N[1]<N[0],oe=H[1]>H[0];if(re||oe){var _e=T+A/2,Ce=C+z/2;j+=\"transform:\"+NEe(_e+\"px\",Ce+\"px\")+\"scale(\"+(re?-1:1)+\",\"+(oe?-1:1)+\")\"+NEe(-_e+\"px\",-Ce+\"px\")+\";\"}}Z.attr(\"style\",j);var Le=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)ge();else{var ie=document.createElement(\"canvas\");ie.width=b,ie.height=p;var Se=ie.getContext(\"2d\",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Se.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute(\"src\",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=G(function(Ae,Be){var Pe=d[Be][Ae];return R2.isTypedArray(Pe)&&(Pe=Array.from(Pe)),Pe}),ge=ie.toDataURL(\"image/png\");else if(f._hasSource)if(h)ge=f.source;else{var Se=f._canvas.el.getContext(\"2d\",{willReadFrequently:!0}),Ee=Se.getImageData(0,0,b,p).data;ie=G(function(Ae,Be){var Pe=4*(Be*b+Ae);return[Ee[Pe],Ee[Pe+1],Ee[Pe+2],Ee[Pe+3]]}),ge=ie.toDataURL(\"image/png\")}Z.attr({\"xlink:href\":ge,height:z,width:A,x:T,y:C})});t._promises.push(Le)})}});var HEe=ye((Kdr,GEe)=>{\"use strict\";var MCt=Oa();GEe.exports=function(t){MCt.select(t).selectAll(\".im image\").style(\"opacity\",function(r){return r[0].trace.opacity})}});var ZEe=ye((Jdr,XEe)=>{\"use strict\";var jEe=vf(),WEe=Dr(),mD=WEe.isArrayOrTypedArray,ECt=QT();XEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(jEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||jEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext(\"2d\",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split(\"+\");d.indexOf(\"all\")!==-1&&(d=[\"color\"]),d.indexOf(\"color\")!==-1&&(h=!0)}var v=ECt.colormodel[a.colormodel],_=v.colormodel||a.colormodel,b=_.length,p=a._scaler(c),k=v.suffix,E=[];(a.hovertemplate||h)&&(E.push(\"[\"+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(\", \")),b===4&&E.push(\", \"+p[3]+k[3]),E.push(\"]\"),E=E.join(\"\"),t.extraText=_.toUpperCase()+\": \"+E);var T;mD(a.hovertext)&&mD(a.hovertext[u])?T=a.hovertext[u][l]:mD(a.text)&&mD(a.text[u])&&(T=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,M=\"[\"+c.slice(0,a.colormodel.length).join(\", \")+\"]\";return[WEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:M,text:T,hovertemplateLabels:{zLabel:M,colorLabel:E,\"color[0]Label\":p[0]+k[0],\"color[1]Label\":p[1]+k[1],\"color[2]Label\":p[2]+k[2],\"color[3]Label\":p[3]+k[3]}})]}}}});var KEe=ye(($dr,YEe)=>{\"use strict\";YEe.exports=function(t,r){return\"xVal\"in r&&(t.x=r.xVal),\"yVal\"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var $Ee=ye((Qdr,JEe)=>{\"use strict\";JEe.exports={attributes:gH(),supplyDefaults:Z3e(),calc:BEe(),plot:VEe(),style:HEe(),hoverPoints:ZEe(),eventData:KEe(),moduleType:\"trace\",name:\"image\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"2dMap\",\"noSortingByValue\"],animatable:!1,meta:{}}});var eke=ye((evr,QEe)=>{\"use strict\";QEe.exports=$Ee()});var F2=ye((tvr,rke)=>{\"use strict\";var bW=Gl(),kCt=Cc().attributes,CCt=ec(),LCt=Ih(),{hovertemplateAttrs:PCt,texttemplateAttrs:ICt,templatefallbackAttrs:tke}=Ll(),D2=Ao().extendFlat,RCt=Pd().pattern,yD=CCt({editType:\"plot\",arrayOk:!0,colorEditType:\"plot\"});rke.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:LCt.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},pattern:RCt,editType:\"calc\"},text:{valType:\"data_array\",editType:\"plot\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:D2({},bW.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:PCt({},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),hovertemplatefallback:tke(),texttemplate:ICt({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"percent\",\"text\"]}),texttemplatefallback:tke({editType:\"plot\"}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"plot\"},textfont:D2({},yD,{}),insidetextorientation:{valType:\"enumerated\",values:[\"horizontal\",\"radial\",\"tangential\",\"auto\"],dflt:\"auto\",editType:\"plot\"},insidetextfont:D2({},yD,{}),outsidetextfont:D2({},yD,{}),automargin:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:D2({},bW.showlegend,{arrayOk:!0}),legend:D2({},bW.legend,{arrayOk:!0}),title:{text:{valType:\"string\",dflt:\"\",editType:\"plot\"},font:D2({},yD,{}),position:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle center\",\"bottom left\",\"bottom center\",\"bottom right\"],editType:\"plot\"},editType:\"plot\"},domain:kCt({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"}}});var z2=ye((rvr,ake)=>{\"use strict\";var DCt=Eo(),zE=Dr(),FCt=F2(),zCt=Cc().defaults,OCt=i0().handleText,qCt=Dr().coercePattern;function ike(e,t){var r=zE.isArrayOrTypedArray(e),n=zE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o<i;o++){var s=t[o];if(DCt(s)&&s>0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function nke(e,t,r,n,i){var a=n(\"marker.line.width\");a&&n(\"marker.line.color\",i?void 0:r.paper_bgcolor);var o=n(\"marker.colors\");qCt(n,\"marker.pattern\",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function BCt(e,t,r,n){function i(k,E){return zE.coerce(e,t,FCt,k,E)}var a=i(\"labels\"),o=i(\"values\"),s=ike(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i(\"label0\"),i(\"dlabel\")),!l){t.visible=!1;return}t._length=l,nke(e,t,n,i,!0),i(\"scalegroup\");var u=i(\"text\"),c=i(\"texttemplate\");i(\"texttemplatefallback\");var f;if(c||(f=i(\"textinfo\",zE.isArrayOrTypedArray(u)?\"text+percent\":\"percent\")),i(\"hovertext\"),i(\"hovertemplate\"),i(\"hovertemplatefallback\"),c||f&&f!==\"none\"){var h=i(\"textposition\");OCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h===\"auto\",v=d||h===\"outside\";v&&i(\"automargin\"),(h===\"inside\"||h===\"auto\"||Array.isArray(h))&&i(\"insidetextorientation\")}else f===\"none\"&&i(\"textposition\",\"none\");zCt(t,n,i);var _=i(\"hole\"),b=i(\"title.text\");if(b){var p=i(\"title.position\",_?\"middle center\":\"top center\");!_&&p===\"middle center\"&&(t.title.position=\"top center\"),zE.coerceFont(i,\"title.font\",n.font)}i(\"sort\"),i(\"direction\"),i(\"rotation\"),i(\"pull\")}ake.exports={handleLabelsAndValues:ike,handleMarkerDefaults:nke,supplyDefaults:BCt}});var _D=ye((ivr,oke)=>{\"use strict\";oke.exports={hiddenlabels:{valType:\"data_array\",editType:\"calc\"},piecolorway:{valType:\"colorlist\",editType:\"calc\"},extendpiecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var lke=ye((nvr,ske)=>{\"use strict\";var NCt=Dr(),UCt=_D();ske.exports=function(t,r){function n(i,a){return NCt.coerce(t,r,UCt,i,a)}n(\"hiddenlabels\"),n(\"piecolorway\",r.colorway),n(\"extendpiecolors\")}});var EA=ye((avr,fke)=>{\"use strict\";var VCt=Eo(),wW=fd(),GCt=ka(),HCt={};function jCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c<l;c++)a[c]=String(t.label0+c*t.dlabel);var h={},d=uke(n[\"_\"+t.type+\"colormap\"]),v=0,_=!1;for(c=0;c<l;c++){var b,p,k;if(u){if(b=s[c],!VCt(b))continue;b=+b}else b=1;p=a[c],(p===void 0||p===\"\")&&(p=c),p=String(p);var E=h[p];E===void 0?(h[p]=r.length,k=i.indexOf(p)!==-1,k||(v+=b),r.push({v:b,label:p,color:d(o[c],p),i:c,pts:[c],hidden:k})):(_=!0,f=r[E],f.v+=b,f.pts.push(c),f.hidden||(v+=b),f.color===!1&&o[c]&&(f.color=d(o[c],p)))}r=r.filter(function(L){return L.v>=0});var T=t.type===\"funnelarea\"?_:t.sort;return T&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function uke(e){return function(r,n){return!r||(r=wW(r),!r.isValid())?!1:(r=GCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function WCt(e,t){var r=(t||{}).type;r||(r=\"pie\");var n=e._fullLayout,i=e.calcdata,a=n[r+\"colorway\"],o=n[\"_\"+r+\"colormap\"];n[\"extend\"+r+\"colors\"]&&(a=cke(a,HCt));for(var s=0,l=0;l<i.length;l++){var u=i[l],c=u[0].trace.type;if(c===r)for(var f=0;f<u.length;f++){var h=u[f];h.color===!1&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=a[s%a.length],s++))}}}function cke(e,t){var r,n=JSON.stringify(e),i=t[n];if(!i){for(i=e.slice(),r=0;r<e.length;r++)i.push(wW(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(wW(e[r]).darken(20).toHexString());t[n]=i}return i}fke.exports={calc:jCt,crossTraceCalc:WCt,makePullColorFn:uke,generateExtendedColors:cke}});var dke=ye((ovr,hke)=>{\"use strict\";var XCt=ip().appendArrayMultiPointValues;hke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),XCt(n,r,t.pts),r.type===\"funnelarea\"&&(delete n.v,delete n.i),n}});var TD=ye((svr,Dke)=>{\"use strict\";var Fp=Oa(),ZCt=Mc(),xD=vf(),_ke=ka(),Qy=So(),rv=Dr(),YCt=rv.strScale,vke=rv.strTranslate,TW=Zl(),xke=bv(),KCt=xke.recordMinTextSize,JCt=xke.clearMinTextSize,bke=A_().TEXTPAD,ns=g_(),bD=dke(),pke=Dr().isValidTextValue;function $Ct(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;JCt(\"pie\",n),Ake(t,e),Pke(t,i);var a=rv.makeTraceGroups(n._pielayer,t,\"trace\").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;s6t(o),s.attr(\"stroke-linejoin\",\"round\"),s.each(function(){var c=Fp.select(this).selectAll(\"g.slice\").data(o);c.enter().append(\"g\").classed(\"slice\",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(T,L){if(T.hidden){Fp.select(this).selectAll(\"path,g\").remove();return}T.pointNumber=T.i,T.curveNumber=u.index,f[T.pxmid[1]<0?0:1][T.pxmid[0]<0?0:1].push(T);var x=l.cx,C=l.cy,M=Fp.select(this),g=M.selectAll(\"path.surface\").data([T]);if(g.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":r?\"none\":\"all\"}),M.call(wke,e,o),u.pull){var P=+ns.castOption(u.pull,T.pts)||0;P>0&&(x+=P*T.pxmid[0],C+=P*T.pxmid[1])}T.cxFinal=x,T.cyFinal=C;function A(N,H,re,oe){var _e=oe*(H[0]-N[0]),Ce=oe*(H[1]-N[1]);return\"a\"+oe*l.r+\",\"+oe*l.r+\" 0 \"+T.largeArc+(re?\" 1 \":\" 0 \")+_e+\",\"+Ce}var z=u.hole;if(T.v===l.vTotal){var O=\"M\"+(x+T.px0[0])+\",\"+(C+T.px0[1])+A(T.px0,T.pxmid,!0,1)+A(T.pxmid,T.px0,!0,1)+\"Z\";z?g.attr(\"d\",\"M\"+(x+z*T.px0[0])+\",\"+(C+z*T.px0[1])+A(T.px0,T.pxmid,!1,z)+A(T.pxmid,T.px0,!1,z)+\"Z\"+O):g.attr(\"d\",O)}else{var U=A(T.px0,T.px1,!0,1);if(z){var G=1-z;g.attr(\"d\",\"M\"+(x+z*T.px1[0])+\",\"+(C+z*T.px1[1])+A(T.px1,T.px0,!1,z)+\"l\"+G*T.px0[0]+\",\"+G*T.px0[1]+U+\"Z\")}else g.attr(\"d\",\"M\"+x+\",\"+C+\"l\"+T.px0[0]+\",\"+T.px0[1]+U+\"Z\")}Ike(e,T,l);var Z=ns.castOption(u.textposition,T.pts),j=M.selectAll(\"g.slicetext\").data(T.text&&Z!==\"none\"?[0]:[]);j.enter().append(\"g\").classed(\"slicetext\",!0),j.exit().remove(),j.each(function(){var N=rv.ensureSingle(Fp.select(this),\"text\",\"\",function(ie){ie.attr(\"data-notex\",1)}),H=rv.ensureUniformFontSize(e,Z===\"outside\"?e6t(u,T,n.font):Tke(u,T,n.font));N.text(T.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(Qy.font,H).call(TW.convertToTspans,e);var re=Qy.bBox(N.node()),oe;if(Z===\"outside\")oe=yke(re,T);else if(oe=Ske(re,T,l),Z===\"auto\"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Qy.font,_e),re=Qy.bBox(N.node()),oe=yke(re,T)}var Ce=oe.textPosAngle,Le=Ce===void 0?T.pxmid:wD(l.r,Ce);if(oe.targetX=x+Le[0]*oe.rCenter+(oe.x||0),oe.targetY=C+Le[1]*oe.rCenter+(oe.y||0),Rke(oe,re),oe.outside){var ge=oe.targetY;T.yLabelMin=ge-re.height/2,T.yLabelMid=ge,T.yLabelMax=ge+re.height/2,T.labelExtraX=0,T.labelExtraY=0,h=!0}oe.fontSize=H.size,KCt(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Fp.select(this).selectAll(\"g.titletext\").data(u.title.text?[0]:[]);if(d.enter().append(\"g\").classed(\"titletext\",!0),d.exit().remove(),d.each(function(){var T=rv.ensureSingle(Fp.select(this),\"text\",\"\",function(C){C.attr(\"data-notex\",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),T.text(L).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(Qy.font,u.title.font).call(TW.convertToTspans,e);var x;u.title.position===\"middle center\"?x=i6t(l):x=Cke(l,i),T.attr(\"transform\",vke(x.x,x.y)+YCt(Math.min(1,x.scale))+vke(x.tx,x.ty))}),h&&a6t(f,u),QCt(c,u),h&&u.automargin){var v=Qy.bBox(s.node()),_=u.domain,b=i.w*(_.x[1]-_.x[0]),p=i.h*(_.y[1]-_.y[0]),k=(.5*b-l.r)/i.w,E=(.5*p-l.r)/i.h;ZCt.autoMargin(e,\"pie.\"+u.uid+\".automargin\",{xl:_.x[0]-k,xr:_.x[1]+k,yb:_.y[0]-E,yt:_.y[1]+E,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll(\"tspan\").each(function(){var o=Fp.select(this);o.attr(\"dy\")&&o.attr(\"dy\",o.attr(\"dy\"))})},0)}function QCt(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select(\"path.textline\").remove();return}var i=n.select(\"g.slicetext text\");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s=\"M\"+a+\",\"+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+=\"l\"+c*r.pxmid[0]/r.pxmid[1]+\",\"+c+\"H\"+(a+r.labelExtraX+l):s+=\"l\"+r.labelExtraX+\",\"+u+\"v\"+(c-u)+\"h\"+l}else s+=\"V\"+(r.yLabelMid+r.labelExtraY)+\"h\"+l;rv.ensureSingle(n,\"path\",\"textline\").call(_ke.stroke,t.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,t.outsidetextfont.size/8),d:s,fill:\"none\"})})}function wke(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type===\"funnelarea\";\"_hasHoverLabel\"in o||(o._hasHoverLabel=!1),\"_hasHoverEvent\"in o||(o._hasHoverEvent=!1),e.on(\"mouseover\",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=xD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f===\"all\"&&(f=\"label+text+value+percent+name\"),c.hovertemplate||f!==\"none\"&&f!==\"skip\"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),_=u.separators,b=[];if(f&&f.indexOf(\"label\")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf(\"text\")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,_),f&&f.indexOf(\"value\")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,_),f&&f.indexOf(\"percent\")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,E=k.font,T=[];xD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join(\"<br>\"),name:c.hovertemplate||f.indexOf(\"name\")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?\"left\":\"right\",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(E.family,l.pts),fontSize:ns.castOption(E.size,l.pts),fontColor:ns.castOption(E.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[bD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:T}),l.bbox=T[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit(\"plotly_hover\",{points:[bD(l,c)],event:Fp.event})}}),e.on(\"mouseout\",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit(\"plotly_unhover\",{points:[bD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(xD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on(\"click\",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[bD(l,c)],xD.click(t,Fp.event))})}function e6t(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Tke(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||_ke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Ake(e,t){for(var r,n,i=0;i<e.length;i++)if(r=e[i][0],n=r.trace,n.title.text){var a=n.title.text;n._meta&&(a=rv.templateString(a,n._meta));var o=Qy.tester.append(\"text\").attr(\"data-notex\",1).text(a).call(Qy.font,n.title.font).call(TW.convertToTspans,t),s=Qy.bBox(o.node(),!0);r.titleBox={width:s.width,height:s.height},o.remove()}}function Ske(e,t,r){var n=r.r||t.rpx1,i=t.rInscribed,a=t.startangle===t.stopangle;if(a)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=t.ring,s=o===1&&Math.abs(t.startangle-t.stopangle)===Math.PI*2,l=t.halfangle,u=t.midangle,c=r.trace.insidetextorientation,f=c===\"horizontal\",h=c===\"tangential\",d=c===\"radial\",v=c===\"auto\",_=[],b;if(!v){var p=function(M,g){if(t6t(t,M)){var P=Math.abs(M-t.startangle),A=Math.abs(M-t.stopangle),z=P<A?P:A;g===\"tan\"?b=mke(e,n,o,z,0):b=gke(e,n,o,z,Math.PI/2),b.textPosAngle=M,_.push(b)}},k;if(f||h){for(k=4;k>=-4;k-=2)p(Math.PI*k,\"tan\");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),\"tan\")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),\"rad\");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),\"rad\")}}if(s||v||f){var E=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/E,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;_.push(b)}(v||d)&&(b=gke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b)),(v||h)&&(b=mke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b));for(var T=0,L=0,x=0;x<_.length;x++){var C=_[x].scale;if(L<C&&(L=C,T=x),!v&&L>=1)break}return _[T]}function t6t(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}function gke(e,t,r,n,i){t=Math.max(0,t-2*bke);var a=e.width/e.height,o=kke(a,n,t,r);return{scale:o*2/e.height,rCenter:Mke(a,o/t),rotate:Eke(i)}}function mke(e,t,r,n,i){t=Math.max(0,t-2*bke);var a=e.height/e.width,o=kke(a,n,t,r);return{scale:o*2/e.width,rCenter:Mke(a,o/t),rotate:Eke(i+Math.PI/2)}}function Mke(e,t){return Math.cos(t)-e*t}function Eke(e){return(180/Math.PI*e+720)%180-90}function kke(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function r6t(e,t){return e.v===t.vTotal&&!t.trace.hole?1:Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2)}function yke(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function i6t(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function Cke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Lke(a),a.title.position.indexOf(\"top\")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf(\"bottom\")!==-1&&(o.y+=(1+i)*e.r);var l=n6t(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf(\"left\")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf(\"center\")!==-1?u*=2:a.title.position.indexOf(\"right\")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=AW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function n6t(e,t){return e/(t===void 0?1:t)}function AW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Lke(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;r<e.pull.length;r++)e.pull[r]>t&&(t=e.pull[r]);return t}function a6t(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function _(E,T){return E.pxmid[1]-T.pxmid[1]}function b(E,T){return T.pxmid[1]-E.pxmid[1]}function p(E,T){T||(T={});var L=T.labelExtraY+(n?T.yLabelMax:T.yLabelMin),x=n?E.yLabelMin:E.yLabelMax,C=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),g=L-x,P,A,z,O,U,G;if(g*l>0&&(E.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(A=0;A<f.length;A++)z=f[A],!(z===E||(ns.castOption(t.pull,E.pts)||0)>=(ns.castOption(t.pull,z.pts)||0))&&((E.pxmid[1]-z.pxmid[1])*l>0?(O=z.cyFinal+o(z.px0[1],z.px1[1]),g=O-x-E.labelExtraY,g*l>0&&(E.labelExtraY+=g)):(C+E.labelExtraY-M)*l>0&&(P=3*s*Math.abs(A-f.indexOf(E)),U=z.cxFinal+a(z.px0[0],z.px1[0]),G=U+P-(E.cxFinal+E.pxmid[0])-E.labelExtraX,G*s>0&&(E.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?_:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h<u.length;h++)u[h].yLabelMid!==void 0&&d.push(u[h]);for(v=!1,h=0;n&&h<c.length;h++)if(c[h].yLabelMid!==void 0){v=c[h];break}for(h=0;h<d.length;h++){var k=h&&d[h-1];v&&!h&&(k=v),p(d[h],k)}}}function Pke(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n][0],a=i.trace,o=a.domain,s=t.w*(o.x[1]-o.x[0]),l=t.h*(o.y[1]-o.y[0]);a.title.text&&a.title.position!==\"middle center\"&&(l-=AW(i,t));var u=s/2,c=l/2;a.type===\"funnelarea\"&&!a.scalegroup&&(c/=a.aspectratio),i.r=Math.min(u,c)/(1+Lke(a)),i.cx=t.l+t.w*(a.domain.x[1]+a.domain.x[0])/2,i.cy=t.t+t.h*(1-a.domain.y[0])-l/2,a.title.text&&a.title.position.indexOf(\"bottom\")!==-1&&(i.cy-=AW(i,t)),a.scalegroup&&r.indexOf(a.scalegroup)===-1&&r.push(a.scalegroup)}o6t(e,r)}function o6t(e,t){for(var r,n,i,a=0;a<t.length;a++){var o=1/0,s=t[a];for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var l;if(i.type===\"pie\")l=r.r*r.r;else if(i.type===\"funnelarea\"){var u,c;i.aspectratio>1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var f=o*r.vTotal;i.type===\"funnelarea\"&&(f/=(1+i.baseratio)/2,f/=i.aspectratio),r.r=Math.sqrt(f)}}}function s6t(e){var t=e[0],r=t.r,n=t.trace,i=ns.getRotationAngle(n.rotation),a=2*Math.PI/t.vTotal,o=\"px0\",s=\"px1\",l,u,c;if(n.direction===\"counterclockwise\"){for(l=0;l<e.length&&e[l].hidden;l++);if(l===e.length)return;i+=a*e[l].v,a*=-1,o=\"px1\",s=\"px0\"}for(c=wD(r,i),l=0;l<e.length;l++)u=e[l],!u.hidden&&(u[o]=c,u.startangle=i,i+=a*u.v/2,u.pxmid=wD(r,i),u.midangle=i,i+=a*u.v/2,c=wD(r,i),u.stopangle=i,u[s]=c,u.largeArc=u.v>t.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=r6t(u,t))}function wD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Ike(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!==\"none\"){var s=o.split(\"+\"),l=function(T){return s.indexOf(T)!==-1},u=l(\"label\"),c=l(\"text\"),f=l(\"value\"),h=l(\"percent\"),d=n.separators,v;if(v=u?[t.label]:[],c){var _=ns.getFirstFilled(i.text,t.pts);pke(_)&&v.push(_)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join(\"<br>\")}function b(T){return{label:T.label,value:T.v,valueLabel:ns.formatPieValue(T.v,n.separators),percent:T.v/r.vTotal,percentLabel:ns.formatPiePercent(T.v/r.vTotal,n.separators),color:T.color,text:T.text,customdata:rv.castOption(i,T.i,\"customdata\")}}if(a){var p=rv.castOption(i,t.i,\"texttemplate\");if(!p)t.text=\"\";else{var k=b(t),E=ns.getFirstFilled(i.text,t.pts);(pke(E)||E===\"\")&&(k.text=E),t.text=rv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Rke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}Dke.exports={plot:$Ct,formatSliceLabel:Ike,transformInsideText:Ske,determineInsideTextFont:Tke,positionTitleOutside:Cke,prerenderTitles:Ake,layoutAreas:Pke,attachFxHandlers:wke,computeTransform:Rke}});var Oke=ye((lvr,zke)=>{\"use strict\";var Fke=Oa(),l6t=X3(),u6t=bv().resizeText;zke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(\".trace\");u6t(t,r,\"pie\"),r.each(function(n){var i=n[0],a=i.trace,o=Fke.select(this);o.style({opacity:a.opacity}),o.selectAll(\"path.surface\").each(function(s){Fke.select(this).call(l6t,s,a,t)})})}});var Bke=ye(kA=>{\"use strict\";var qke=Mc();kA.name=\"pie\";kA.plot=function(e,t,r,n){qke.plotBasePlot(kA.name,e,t,r,n)};kA.clean=function(e,t,r,n){qke.cleanBasePlot(kA.name,e,t,r,n)}});var Uke=ye((cvr,Nke)=>{\"use strict\";Nke.exports={attributes:F2(),supplyDefaults:z2().supplyDefaults,supplyLayoutDefaults:lke(),layoutAttributes:_D(),calc:EA().calc,crossTraceCalc:EA().crossTraceCalc,plot:TD().plot,style:Oke(),styleOne:X3(),moduleType:\"trace\",name:\"pie\",basePlotModule:Bke(),categories:[\"pie-like\",\"pie\",\"showLegend\"],meta:{}}});var Gke=ye((fvr,Vke)=>{\"use strict\";Vke.exports=Uke()});var jke=ye(CA=>{\"use strict\";var Hke=Mc();CA.name=\"sunburst\";CA.plot=function(e,t,r,n){Hke.plotBasePlot(CA.name,e,t,r,n)};CA.clean=function(e,t,r,n){Hke.cleanBasePlot(CA.name,e,t,r,n)}});var SW=ye((dvr,Wke)=>{\"use strict\";Wke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"linear\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"]}});var qE=ye((vvr,Yke)=>{\"use strict\";var c6t=Gl(),{hovertemplateAttrs:f6t,texttemplateAttrs:h6t,templatefallbackAttrs:Xke}=Ll(),d6t=Tu(),v6t=Cc().attributes,e1=F2(),Zke=SW(),OE=Ao().extendFlat,p6t=Pd().pattern;Yke.exports={labels:{valType:\"data_array\",editType:\"calc\"},parents:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},branchvalues:{valType:\"enumerated\",values:[\"remainder\",\"total\"],dflt:\"remainder\",editType:\"calc\"},count:{valType:\"flaglist\",flags:[\"branches\",\"leaves\"],dflt:\"leaves\",editType:\"calc\"},level:{valType:\"any\",editType:\"plot\",anim:!0},maxdepth:{valType:\"integer\",editType:\"plot\",dflt:-1},marker:OE({colors:{valType:\"data_array\",editType:\"calc\"},line:{color:OE({},e1.marker.line.color,{dflt:null}),width:OE({},e1.marker.line.width,{dflt:1}),editType:\"calc\"},pattern:p6t,editType:\"calc\"},d6t(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:{opacity:{valType:\"number\",editType:\"style\",min:0,max:1},editType:\"plot\"},text:e1.text,textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],extras:[\"none\"],editType:\"plot\"},texttemplate:h6t({editType:\"plot\"},{keys:Zke.eventDataKeys.concat([\"label\",\"value\"])}),texttemplatefallback:Xke({editType:\"plot\"}),hovertext:e1.hovertext,hoverinfo:OE({},c6t.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"name\",\"current path\",\"percent root\",\"percent entry\",\"percent parent\"],dflt:\"label+text+value+name\"}),hovertemplate:f6t({},{keys:Zke.eventDataKeys}),hovertemplatefallback:Xke(),textfont:e1.textfont,insidetextorientation:e1.insidetextorientation,insidetextfont:e1.insidetextfont,outsidetextfont:OE({},e1.outsidetextfont,{}),rotation:{valType:\"angle\",dflt:0,editType:\"plot\"},sort:e1.sort,root:{color:{valType:\"color\",editType:\"calc\",dflt:\"rgba(0,0,0,0)\"},editType:\"calc\"},domain:v6t({name:\"sunburst\",trace:!0,editType:\"calc\"})}});var MW=ye((pvr,Kke)=>{\"use strict\";Kke.exports={sunburstcolorway:{valType:\"colorlist\",editType:\"calc\"},extendsunburstcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var eCe=ye((gvr,Qke)=>{\"use strict\";var Jke=Dr(),g6t=qE(),m6t=Cc().defaults,y6t=i0().handleText,_6t=z2().handleMarkerDefaults,$ke=tc(),x6t=$ke.hasColorscale,b6t=$ke.handleDefaults;Qke.exports=function(t,r,n,i){function a(h,d){return Jke.coerce(t,r,g6t,h,d)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\"),_6t(t,r,i,a);var u=r._hasColorscale=x6t(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;u&&b6t(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),a(\"leaf.opacity\",u?1:.7);var c=a(\"text\");a(\"texttemplate\"),a(\"texttemplatefallback\"),r.texttemplate||a(\"textinfo\",Jke.isArrayOrTypedArray(c)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var f=\"auto\";y6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"insidetextorientation\"),a(\"sort\"),a(\"rotation\"),a(\"root.color\"),m6t(r,i,a),r._length=null}});var rCe=ye((mvr,tCe)=>{\"use strict\";var w6t=Dr(),T6t=MW();tCe.exports=function(t,r){function n(i,a){return w6t.coerce(t,r,T6t,i,a)}n(\"sunburstcolorway\",r.colorway),n(\"extendsunburstcolors\")}});var BE=ye((AD,iCe)=>{(function(e,t){typeof AD==\"object\"&&typeof iCe!=\"undefined\"?t(AD):(e=e||self,t(e.d3=e.d3||{}))})(AD,function(e){\"use strict\";function t(We,tt){return We.parent===tt.parent?1:2}function r(We){return We.reduce(n,0)/We.length}function n(We,tt){return We+tt.x}function i(We){return 1+We.reduce(a,0)}function a(We,tt){return Math.max(We,tt.y)}function o(We){for(var tt;tt=We.children;)We=tt[0];return We}function s(We){for(var tt;tt=We.children;)We=tt[tt.length-1];return We}function l(){var We=t,tt=1,xt=1,Ie=!1;function xe(ke){var vt,ir=0;ke.eachAfter(function($r){var di=$r.children;di?($r.x=r(di),$r.y=i(di)):($r.x=vt?ir+=We($r,vt):0,$r.y=0,vt=$r)});var ar=o(ke),vr=s(ke),ii=ar.x-We(ar,vr)/2,pi=vr.x+We(vr,ar)/2;return ke.eachAfter(Ie?function($r){$r.x=($r.x-ke.x)*tt,$r.y=(ke.y-$r.y)*xt}:function($r){$r.x=($r.x-ii)/(pi-ii)*tt,$r.y=(1-(ke.y?$r.y/ke.y:1))*xt})}return xe.separation=function(ke){return arguments.length?(We=ke,xe):We},xe.size=function(ke){return arguments.length?(Ie=!1,tt=+ke[0],xt=+ke[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(ke){return arguments.length?(Ie=!0,tt=+ke[0],xt=+ke[1],xe):Ie?[tt,xt]:null},xe}function u(We){var tt=0,xt=We.children,Ie=xt&&xt.length;if(!Ie)tt=1;else for(;--Ie>=0;)tt+=xt[Ie].value;We.value=tt}function c(){return this.eachAfter(u)}function f(We){var tt=this,xt,Ie=[tt],xe,ke,vt;do for(xt=Ie.reverse(),Ie=[];tt=xt.pop();)if(We(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke<vt;++ke)Ie.push(xe[ke]);while(Ie.length);return this}function h(We){for(var tt=this,xt=[tt],Ie,xe;tt=xt.pop();)if(We(tt),Ie=tt.children,Ie)for(xe=Ie.length-1;xe>=0;--xe)xt.push(Ie[xe]);return this}function d(We){for(var tt=this,xt=[tt],Ie=[],xe,ke,vt;tt=xt.pop();)if(Ie.push(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke<vt;++ke)xt.push(xe[ke]);for(;tt=Ie.pop();)We(tt);return this}function v(We){return this.eachAfter(function(tt){for(var xt=+We(tt.data)||0,Ie=tt.children,xe=Ie&&Ie.length;--xe>=0;)xt+=Ie[xe].value;tt.value=xt})}function _(We){return this.eachBefore(function(tt){tt.children&&tt.children.sort(We)})}function b(We){for(var tt=this,xt=p(tt,We),Ie=[tt];tt!==xt;)tt=tt.parent,Ie.push(tt);for(var xe=Ie.length;We!==xt;)Ie.splice(xe,0,We),We=We.parent;return Ie}function p(We,tt){if(We===tt)return We;var xt=We.ancestors(),Ie=tt.ancestors(),xe=null;for(We=xt.pop(),tt=Ie.pop();We===tt;)xe=We,We=xt.pop(),tt=Ie.pop();return xe}function k(){for(var We=this,tt=[We];We=We.parent;)tt.push(We);return tt}function E(){var We=[];return this.each(function(tt){We.push(tt)}),We}function T(){var We=[];return this.eachBefore(function(tt){tt.children||We.push(tt)}),We}function L(){var We=this,tt=[];return We.each(function(xt){xt!==We&&tt.push({source:xt.parent,target:xt})}),tt}function x(We,tt){var xt=new A(We),Ie=+We.value&&(xt.value=We.value),xe,ke=[xt],vt,ir,ar,vr;for(tt==null&&(tt=M);xe=ke.pop();)if(Ie&&(xe.value=+xe.data.value),(ir=tt(xe.data))&&(vr=ir.length))for(xe.children=new Array(vr),ar=vr-1;ar>=0;--ar)ke.push(vt=xe.children[ar]=new A(ir[ar])),vt.parent=xe,vt.depth=xe.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function M(We){return We.children}function g(We){We.data=We.data.data}function P(We){var tt=0;do We.height=tt;while((We=We.parent)&&We.height<++tt)}function A(We){this.data=We,this.depth=this.height=0,this.parent=null}A.prototype=x.prototype={constructor:A,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:_,path:b,ancestors:k,descendants:E,leaves:T,links:L,copy:C};var z=Array.prototype.slice;function O(We){for(var tt=We.length,xt,Ie;tt;)Ie=Math.random()*tt--|0,xt=We[tt],We[tt]=We[Ie],We[Ie]=xt;return We}function U(We){for(var tt=0,xt=(We=O(z.call(We))).length,Ie=[],xe,ke;tt<xt;)xe=We[tt],ke&&j(ke,xe)?++tt:(ke=H(Ie=G(Ie,xe)),tt=0);return ke}function G(We,tt){var xt,Ie;if(N(tt,We))return[tt];for(xt=0;xt<We.length;++xt)if(Z(tt,We[xt])&&N(oe(We[xt],tt),We))return[We[xt],tt];for(xt=0;xt<We.length-1;++xt)for(Ie=xt+1;Ie<We.length;++Ie)if(Z(oe(We[xt],We[Ie]),tt)&&Z(oe(We[xt],tt),We[Ie])&&Z(oe(We[Ie],tt),We[xt])&&N(_e(We[xt],We[Ie],tt),We))return[We[xt],We[Ie],tt];throw new Error}function Z(We,tt){var xt=We.r-tt.r,Ie=tt.x-We.x,xe=tt.y-We.y;return xt<0||xt*xt<Ie*Ie+xe*xe}function j(We,tt){var xt=We.r-tt.r+1e-6,Ie=tt.x-We.x,xe=tt.y-We.y;return xt>0&&xt*xt>Ie*Ie+xe*xe}function N(We,tt){for(var xt=0;xt<tt.length;++xt)if(!j(We,tt[xt]))return!1;return!0}function H(We){switch(We.length){case 1:return re(We[0]);case 2:return oe(We[0],We[1]);case 3:return _e(We[0],We[1],We[2])}}function re(We){return{x:We.x,y:We.y,r:We.r}}function oe(We,tt){var xt=We.x,Ie=We.y,xe=We.r,ke=tt.x,vt=tt.y,ir=tt.r,ar=ke-xt,vr=vt-Ie,ii=ir-xe,pi=Math.sqrt(ar*ar+vr*vr);return{x:(xt+ke+ar/pi*ii)/2,y:(Ie+vt+vr/pi*ii)/2,r:(pi+xe+ir)/2}}function _e(We,tt,xt){var Ie=We.x,xe=We.y,ke=We.r,vt=tt.x,ir=tt.y,ar=tt.r,vr=xt.x,ii=xt.y,pi=xt.r,$r=Ie-vt,di=Ie-vr,ji=xe-ir,In=xe-ii,wi=ar-ke,On=pi-ke,qn=Ie*Ie+xe*xe-ke*ke,Fn=qn-vt*vt-ir*ir+ar*ar,ra=qn-vr*vr-ii*ii+pi*pi,la=di*ji-$r*In,Ut=(ji*ra-In*Fn)/(la*2)-Ie,wt=(In*wi-ji*On)/la,rr=(di*Fn-$r*ra)/(la*2)-xe,nr=($r*On-di*wi)/la,Er=wt*wt+nr*nr-1,Xr=2*(ke+Ut*wt+rr*nr),ri=Ut*Ut+rr*rr-ke*ke,Qr=-(Er?(Xr+Math.sqrt(Xr*Xr-4*Er*ri))/(2*Er):ri/Xr);return{x:Ie+Ut+wt*Qr,y:xe+rr+nr*Qr,r:Qr}}function Ce(We,tt,xt){var Ie=We.x-tt.x,xe,ke,vt=We.y-tt.y,ir,ar,vr=Ie*Ie+vt*vt;vr?(ke=tt.r+xt.r,ke*=ke,ar=We.r+xt.r,ar*=ar,ke>ar?(xe=(vr+ar-ke)/(2*vr),ir=Math.sqrt(Math.max(0,ar/vr-xe*xe)),xt.x=We.x-xe*Ie-ir*vt,xt.y=We.y-xe*vt+ir*Ie):(xe=(vr+ke-ar)/(2*vr),ir=Math.sqrt(Math.max(0,ke/vr-xe*xe)),xt.x=tt.x+xe*Ie-ir*vt,xt.y=tt.y+xe*vt+ir*Ie)):(xt.x=tt.x+xt.r,xt.y=tt.y)}function Le(We,tt){var xt=We.r+tt.r-1e-6,Ie=tt.x-We.x,xe=tt.y-We.y;return xt>0&&xt*xt>Ie*Ie+xe*xe}function ge(We){var tt=We._,xt=We.next._,Ie=tt.r+xt.r,xe=(tt.x*xt.r+xt.x*tt.r)/Ie,ke=(tt.y*xt.r+xt.y*tt.r)/Ie;return xe*xe+ke*ke}function ie(We){this._=We,this.next=null,this.previous=null}function Se(We){if(!(xe=We.length))return 0;var tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi;if(tt=We[0],tt.x=0,tt.y=0,!(xe>1))return tt.r;if(xt=We[1],tt.x=-xt.r,xt.x=tt.r,xt.y=0,!(xe>2))return tt.r+xt.r;Ce(xt,tt,Ie=We[2]),tt=new ie(tt),xt=new ie(xt),Ie=new ie(Ie),tt.next=Ie.previous=xt,xt.next=tt.previous=Ie,Ie.next=xt.previous=tt;e:for(ir=3;ir<xe;++ir){Ce(tt._,xt._,Ie=We[ir]),Ie=new ie(Ie),ar=xt.next,vr=tt.previous,ii=xt._.r,pi=tt._.r;do if(ii<=pi){if(Le(ar._,Ie._)){xt=ar,tt.next=xt,xt.previous=tt,--ir;continue e}ii+=ar._.r,ar=ar.next}else{if(Le(vr._,Ie._)){tt=vr,tt.next=xt,xt.previous=tt,--ir;continue e}pi+=vr._.r,vr=vr.previous}while(ar!==vr.next);for(Ie.previous=tt,Ie.next=xt,tt.next=xt.previous=xt=Ie,ke=ge(tt);(Ie=Ie.next)!==xt;)(vt=ge(Ie))<ke&&(tt=Ie,ke=vt);xt=tt.next}for(tt=[xt._],Ie=xt;(Ie=Ie.next)!==xt;)tt.push(Ie._);for(Ie=U(tt),ir=0;ir<xe;++ir)tt=We[ir],tt.x-=Ie.x,tt.y-=Ie.y;return Ie.r}function Ee(We){return Se(We),We}function Ae(We){return We==null?null:Be(We)}function Be(We){if(typeof We!=\"function\")throw new Error;return We}function Pe(){return 0}function me(We){return function(){return We}}function De(We){return Math.sqrt(We.value)}function ce(){var We=null,tt=1,xt=1,Ie=Pe;function xe(ke){return ke.x=tt/2,ke.y=xt/2,We?ke.eachBefore(je(We)).eachAfter(lt(Ie,.5)).eachBefore(pt(1)):ke.eachBefore(je(De)).eachAfter(lt(Pe,1)).eachAfter(lt(Ie,ke.r/Math.min(tt,xt))).eachBefore(pt(Math.min(tt,xt)/(2*ke.r))),ke}return xe.radius=function(ke){return arguments.length?(We=Ae(ke),xe):We},xe.size=function(ke){return arguments.length?(tt=+ke[0],xt=+ke[1],xe):[tt,xt]},xe.padding=function(ke){return arguments.length?(Ie=typeof ke==\"function\"?ke:me(+ke),xe):Ie},xe}function je(We){return function(tt){tt.children||(tt.r=Math.max(0,+We(tt)||0))}}function lt(We,tt){return function(xt){if(Ie=xt.children){var Ie,xe,ke=Ie.length,vt=We(xt)*tt||0,ir;if(vt)for(xe=0;xe<ke;++xe)Ie[xe].r+=vt;if(ir=Se(Ie),vt)for(xe=0;xe<ke;++xe)Ie[xe].r-=vt;xt.r=ir+vt}}}function pt(We){return function(tt){var xt=tt.parent;tt.r*=We,xt&&(tt.x=xt.x+We*tt.x,tt.y=xt.y+We*tt.y)}}function Vt(We){We.x0=Math.round(We.x0),We.y0=Math.round(We.y0),We.x1=Math.round(We.x1),We.y1=Math.round(We.y1)}function ot(We,tt,xt,Ie,xe){for(var ke=We.children,vt,ir=-1,ar=ke.length,vr=We.value&&(Ie-tt)/We.value;++ir<ar;)vt=ke[ir],vt.y0=xt,vt.y1=xe,vt.x0=tt,vt.x1=tt+=vt.value*vr}function ut(){var We=1,tt=1,xt=0,Ie=!1;function xe(vt){var ir=vt.height+1;return vt.x0=vt.y0=xt,vt.x1=We,vt.y1=tt/ir,vt.eachBefore(ke(tt,ir)),Ie&&vt.eachBefore(Vt),vt}function ke(vt,ir){return function(ar){ar.children&&ot(ar,ar.x0,vt*(ar.depth+1)/ir,ar.x1,vt*(ar.depth+2)/ir);var vr=ar.x0,ii=ar.y0,pi=ar.x1-xt,$r=ar.y1-xt;pi<vr&&(vr=pi=(vr+pi)/2),$r<ii&&(ii=$r=(ii+$r)/2),ar.x0=vr,ar.y0=ii,ar.x1=pi,ar.y1=$r}}return xe.round=function(vt){return arguments.length?(Ie=!!vt,xe):Ie},xe.size=function(vt){return arguments.length?(We=+vt[0],tt=+vt[1],xe):[We,tt]},xe.padding=function(vt){return arguments.length?(xt=+vt,xe):xt},xe}var Wt=\"$\",Nt={depth:-1},$t={};function sr(We){return We.id}function Tr(We){return We.parentId}function fr(){var We=sr,tt=Tr;function xt(Ie){var xe,ke,vt=Ie.length,ir,ar,vr,ii=new Array(vt),pi,$r,di={};for(ke=0;ke<vt;++ke)xe=Ie[ke],vr=ii[ke]=new A(xe),(pi=We(xe,ke,Ie))!=null&&(pi+=\"\")&&($r=Wt+(vr.id=pi),di[$r]=$r in di?$t:vr);for(ke=0;ke<vt;++ke)if(vr=ii[ke],pi=tt(Ie[ke],ke,Ie),pi==null||!(pi+=\"\")){if(ir)throw new Error(\"multiple roots\");ir=vr}else{if(ar=di[Wt+pi],!ar)throw new Error(\"missing: \"+pi);if(ar===$t)throw new Error(\"ambiguous: \"+pi);ar.children?ar.children.push(vr):ar.children=[vr],vr.parent=ar}if(!ir)throw new Error(\"no root\");if(ir.parent=Nt,ir.eachBefore(function(ji){ji.depth=ji.parent.depth+1,--vt}).eachBefore(P),ir.parent=null,vt>0)throw new Error(\"cycle\");return ir}return xt.id=function(Ie){return arguments.length?(We=Be(Ie),xt):We},xt.parentId=function(Ie){return arguments.length?(tt=Be(Ie),xt):tt},xt}function $e(We,tt){return We.parent===tt.parent?1:2}function St(We){var tt=We.children;return tt?tt[0]:We.t}function Qt(We){var tt=We.children;return tt?tt[tt.length-1]:We.t}function Gt(We,tt,xt){var Ie=xt/(tt.i-We.i);tt.c-=Ie,tt.s+=xt,We.c+=Ie,tt.z+=xt,tt.m+=xt}function _t(We){for(var tt=0,xt=0,Ie=We.children,xe=Ie.length,ke;--xe>=0;)ke=Ie[xe],ke.z+=tt,ke.m+=tt,tt+=ke.s+(xt+=ke.c)}function It(We,tt,xt){return We.a.parent===tt.parent?We.a:xt}function mt(We,tt){this._=We,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=tt}mt.prototype=Object.create(A.prototype);function er(We){for(var tt=new mt(We,0),xt,Ie=[tt],xe,ke,vt,ir;xt=Ie.pop();)if(ke=xt._.children)for(xt.children=new Array(ir=ke.length),vt=ir-1;vt>=0;--vt)Ie.push(xe=xt.children[vt]=new mt(ke[vt],vt)),xe.parent=xt;return(tt.parent=new mt(null,0)).children=[tt],tt}function lr(){var We=$e,tt=1,xt=1,Ie=null;function xe(vr){var ii=er(vr);if(ii.eachAfter(ke),ii.parent.m=-ii.z,ii.eachBefore(vt),Ie)vr.eachBefore(ar);else{var pi=vr,$r=vr,di=vr;vr.eachBefore(function(qn){qn.x<pi.x&&(pi=qn),qn.x>$r.x&&($r=qn),qn.depth>di.depth&&(di=qn)});var ji=pi===$r?1:We(pi,$r)/2,In=ji-pi.x,wi=tt/($r.x+ji+In),On=xt/(di.depth||1);vr.eachBefore(function(qn){qn.x=(qn.x+In)*wi,qn.y=qn.depth*On})}return vr}function ke(vr){var ii=vr.children,pi=vr.parent.children,$r=vr.i?pi[vr.i-1]:null;if(ii){_t(vr);var di=(ii[0].z+ii[ii.length-1].z)/2;$r?(vr.z=$r.z+We(vr._,$r._),vr.m=vr.z-di):vr.z=di}else $r&&(vr.z=$r.z+We(vr._,$r._));vr.parent.A=ir(vr,$r,vr.parent.A||pi[0])}function vt(vr){vr._.x=vr.z+vr.parent.m,vr.m+=vr.parent.m}function ir(vr,ii,pi){if(ii){for(var $r=vr,di=vr,ji=ii,In=$r.parent.children[0],wi=$r.m,On=di.m,qn=ji.m,Fn=In.m,ra;ji=Qt(ji),$r=St($r),ji&&$r;)In=St(In),di=Qt(di),di.a=vr,ra=ji.z+qn-$r.z-wi+We(ji._,$r._),ra>0&&(Gt(It(ji,vr,pi),vr,ra),wi+=ra,On+=ra),qn+=ji.m,wi+=$r.m,Fn+=In.m,On+=di.m;ji&&!Qt(di)&&(di.t=ji,di.m+=qn-On),$r&&!St(In)&&(In.t=$r,In.m+=wi-Fn,pi=vr)}return pi}function ar(vr){vr.x*=tt,vr.y=vr.depth*xt}return xe.separation=function(vr){return arguments.length?(We=vr,xe):We},xe.size=function(vr){return arguments.length?(Ie=!1,tt=+vr[0],xt=+vr[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(vr){return arguments.length?(Ie=!0,tt=+vr[0],xt=+vr[1],xe):Ie?[tt,xt]:null},xe}function wr(We,tt,xt,Ie,xe){for(var ke=We.children,vt,ir=-1,ar=ke.length,vr=We.value&&(xe-xt)/We.value;++ir<ar;)vt=ke[ir],vt.x0=tt,vt.x1=Ie,vt.y0=xt,vt.y1=xt+=vt.value*vr}var Lr=(1+Math.sqrt(5))/2;function ti(We,tt,xt,Ie,xe,ke){for(var vt=[],ir=tt.children,ar,vr,ii=0,pi=0,$r=ir.length,di,ji,In=tt.value,wi,On,qn,Fn,ra,la,Ut;ii<$r;){di=xe-xt,ji=ke-Ie;do wi=ir[pi++].value;while(!wi&&pi<$r);for(On=qn=wi,la=Math.max(ji/di,di/ji)/(In*We),Ut=wi*wi*la,ra=Math.max(qn/Ut,Ut/On);pi<$r;++pi){if(wi+=vr=ir[pi].value,vr<On&&(On=vr),vr>qn&&(qn=vr),Ut=wi*wi*la,Fn=Math.max(qn/Ut,Ut/On),Fn>ra){wi-=vr;break}ra=Fn}vt.push(ar={value:wi,dice:di<ji,children:ir.slice(ii,pi)}),ar.dice?ot(ar,xt,Ie,xe,In?Ie+=ji*wi/In:ke):wr(ar,xt,Ie,In?xt+=di*wi/In:xe,ke),In-=wi,ii=pi}return vt}var Br=function We(tt){function xt(Ie,xe,ke,vt,ir){ti(tt,Ie,xe,ke,vt,ir)}return xt.ratio=function(Ie){return We((Ie=+Ie)>1?Ie:1)},xt}(Lr);function Vr(){var We=Br,tt=!1,xt=1,Ie=1,xe=[0],ke=Pe,vt=Pe,ir=Pe,ar=Pe,vr=Pe;function ii($r){return $r.x0=$r.y0=0,$r.x1=xt,$r.y1=Ie,$r.eachBefore(pi),xe=[0],tt&&$r.eachBefore(Vt),$r}function pi($r){var di=xe[$r.depth],ji=$r.x0+di,In=$r.y0+di,wi=$r.x1-di,On=$r.y1-di;wi<ji&&(ji=wi=(ji+wi)/2),On<In&&(In=On=(In+On)/2),$r.x0=ji,$r.y0=In,$r.x1=wi,$r.y1=On,$r.children&&(di=xe[$r.depth+1]=ke($r)/2,ji+=vr($r)-di,In+=vt($r)-di,wi-=ir($r)-di,On-=ar($r)-di,wi<ji&&(ji=wi=(ji+wi)/2),On<In&&(In=On=(In+On)/2),We($r,ji,In,wi,On))}return ii.round=function($r){return arguments.length?(tt=!!$r,ii):tt},ii.size=function($r){return arguments.length?(xt=+$r[0],Ie=+$r[1],ii):[xt,Ie]},ii.tile=function($r){return arguments.length?(We=Be($r),ii):We},ii.padding=function($r){return arguments.length?ii.paddingInner($r).paddingOuter($r):ii.paddingInner()},ii.paddingInner=function($r){return arguments.length?(ke=typeof $r==\"function\"?$r:me(+$r),ii):ke},ii.paddingOuter=function($r){return arguments.length?ii.paddingTop($r).paddingRight($r).paddingBottom($r).paddingLeft($r):ii.paddingTop()},ii.paddingTop=function($r){return arguments.length?(vt=typeof $r==\"function\"?$r:me(+$r),ii):vt},ii.paddingRight=function($r){return arguments.length?(ir=typeof $r==\"function\"?$r:me(+$r),ii):ir},ii.paddingBottom=function($r){return arguments.length?(ar=typeof $r==\"function\"?$r:me(+$r),ii):ar},ii.paddingLeft=function($r){return arguments.length?(vr=typeof $r==\"function\"?$r:me(+$r),ii):vr},ii}function dt(We,tt,xt,Ie,xe){var ke=We.children,vt,ir=ke.length,ar,vr=new Array(ir+1);for(vr[0]=ar=vt=0;vt<ir;++vt)vr[vt+1]=ar+=ke[vt].value;ii(0,ir,We.value,tt,xt,Ie,xe);function ii(pi,$r,di,ji,In,wi,On){if(pi>=$r-1){var qn=ke[pi];qn.x0=ji,qn.y0=In,qn.x1=wi,qn.y1=On;return}for(var Fn=vr[pi],ra=di/2+Fn,la=pi+1,Ut=$r-1;la<Ut;){var wt=la+Ut>>>1;vr[wt]<ra?la=wt+1:Ut=wt}ra-vr[la-1]<vr[la]-ra&&pi+1<la&&--la;var rr=vr[la]-Fn,nr=di-rr;if(wi-ji>On-In){var Er=(ji*nr+wi*rr)/di;ii(pi,la,rr,ji,In,Er,On),ii(la,$r,nr,Er,In,wi,On)}else{var Xr=(In*nr+On*rr)/di;ii(pi,la,rr,ji,In,wi,Xr),ii(la,$r,nr,ji,Xr,wi,On)}}}function Ge(We,tt,xt,Ie,xe){(We.depth&1?wr:ot)(We,tt,xt,Ie,xe)}var Je=function We(tt){function xt(Ie,xe,ke,vt,ir){if((ar=Ie._squarify)&&ar.ratio===tt)for(var ar,vr,ii,pi,$r=-1,di,ji=ar.length,In=Ie.value;++$r<ji;){for(vr=ar[$r],ii=vr.children,pi=vr.value=0,di=ii.length;pi<di;++pi)vr.value+=ii[pi].value;vr.dice?ot(vr,xe,ke,vt,ke+=(ir-ke)*vr.value/In):wr(vr,xe,ke,xe+=(vt-xe)*vr.value/In,ir),In-=vr.value}else Ie._squarify=ar=ti(tt,Ie,xe,ke,vt,ir),ar.ratio=tt}return xt.ratio=function(Ie){return We((Ie=+Ie)>1?Ie:1)},xt}(Lr);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=U,e.packSiblings=Ee,e.partition=ut,e.stratify=fr,e.tree=lr,e.treemap=Vr,e.treemapBinary=dt,e.treemapDice=ot,e.treemapResquarify=Je,e.treemapSlice=wr,e.treemapSliceDice=Ge,e.treemapSquarify=Br,Object.defineProperty(e,\"__esModule\",{value:!0})})});var UE=ye(NE=>{\"use strict\";var nCe=BE(),A6t=Eo(),LA=Dr(),S6t=tc().makeColorScaleFuncFromTrace,M6t=EA().makePullColorFn,E6t=EA().generateExtendedColors,k6t=tc().calc,C6t=fs().ALMOST_EQUAL,L6t={},P6t={},I6t={};NE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=LA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=LA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j==\"number\"},v=function(j){return!l||A6t(s[j])&&s[j]>=0},_,b,p;i?(_=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(_=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(_=Math.min(_,s.length));for(var k=0;k<_;k++)if(b(k)){var E=p(k),T=d(o[k])?String(o[k]):\"\",L={i:k,id:E,pid:T,label:d(a[k])?String(a[k]):\"\"};l&&(L.v=+s[k]),u.push(L),h(T,E)}if(c[\"\"]){if(c[\"\"].length>1){for(var M=LA.randstr(),g=0;g<u.length;g++)u[g].pid===\"\"&&(u[g].pid=M);u.unshift({hasMultipleRoots:!0,id:M,pid:\"\",label:\"\"})}}else{var x=[],C;for(C in c)f[C]||x.push(C);if(x.length===1)C=x[0],u.unshift({hasImpliedRoot:!0,id:C,pid:\"\",label:C});else return LA.warn([\"Multiple implied roots, cannot build\",t.type,\"hierarchy of\",t.name+\".\",\"These roots include:\",x.join(\", \")].join(\" \"))}var P;try{P=nCe.stratify().id(function(j){return j.id}).parentId(function(j){return j.pid})(u)}catch(j){return LA.warn([\"Failed to build\",t.type,\"hierarchy of\",t.name+\".\",\"Error:\",j.message].join(\" \"))}var A=nCe.hierarchy(P),z=!1;if(l)switch(t.branchvalues){case\"remainder\":A.sum(function(j){return j.data.v});break;case\"total\":A.each(function(j){var N=j.data.data,H=N.v;if(j.children){var re=j.children.reduce(function(oe,_e){return oe+_e.data.data.v},0);if((N.hasImpliedRoot||N.hasMultipleRoots)&&(H=re),H<re*C6t)return z=!0,LA.warn([\"Total value for node\",j.data.data.id,\"of\",t.name,\"is smaller than the sum of its children.\",`\n",
       "parent value =`,H,`\n",
       "children sum =`,re].join(\" \"))}j.value=H});break}else aCe(A,t,{branches:t.count.indexOf(\"branches\")!==-1,leaves:t.count.indexOf(\"leaves\")!==-1});if(!z){t.sort&&A.sort(function(j,N){return N.value-j.value});var O,U,G=t.marker.colors||[],Z=!!G.length;return t._hasColorscale?(Z||(G=l?t.values:t._values),k6t(e,t,{vals:G,containerStr:\"marker\",cLetter:\"c\"}),U=S6t(t.marker)):O=M6t(r[\"_\"+t.type+\"colormap\"]),A.each(function(j){var N=j.data.data;N.color=t._hasColorscale?U(G[N.i]):O(G[N.i],N.id)}),u[0].hierarchy=A,u}};NE._runCrossTraceCalc=function(e,t){var r=t._fullLayout,n=t.calcdata,i=r[e+\"colorway\"],a=r[\"_\"+e+\"colormap\"];r[\"extend\"+e+\"colors\"]&&(i=E6t(i,e===\"icicle\"?I6t:e===\"treemap\"?P6t:L6t));var o=0,s;function l(h){var d=h.data.data,v=d.id;d.color===!1&&(a[v]?d.color=a[v]:h.parent?h.parent.parent?d.color=h.parent.data.data.color:(a[v]=d.color=i[o%i.length],o++):d.color=s)}for(var u=0;u<n.length;u++){var c=n[u],f=c[0];f.trace.type===e&&f.hierarchy&&(s=f.trace.root.color,f.hierarchy.each(l))}};NE.crossTraceCalc=function(e){return NE._runCrossTraceCalc(\"sunburst\",e)};function aCe(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o<a;o++)n+=aCe(i[o],t,r);r.branches&&n++}else r.leaves&&n++;return e.value=e.data.data.value=n,t._values||(t._values=[]),t._values[e.data.data.i]=n,n}});function t1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $_(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var SD=gu(()=>{});function Ym(){}function sCe(){return this.rgb().formatHex()}function N6t(){return this.rgb().formatHex8()}function U6t(){return vCe(this).formatHsl()}function lCe(){return this.rgb().formatRgb()}function ex(e){var t,r;return e=(e+\"\").trim().toLowerCase(),(t=R6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?MD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?MD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=D6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=F6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=z6t.exec(e))?MD(t[1],t[2],t[3],t[4]):(t=O6t.exec(e))?MD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=q6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,1):(t=B6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,t[4]):oCe.hasOwnProperty(e)?uCe(oCe[e]):e===\"transparent\"?new _d(NaN,NaN,NaN,0):null}function uCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function MD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function GE(e){return e instanceof Ym||(e=ex(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function IA(e,t,r,n){return arguments.length===1?GE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function cCe(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}`}function V6t(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}${O2((isNaN(this.opacity)?1:this.opacity)*255)}`}function fCe(){let e=kD(this.opacity);return`${e===1?\"rgb(\":\"rgba(\"}${q2(this.r)}, ${q2(this.g)}, ${q2(this.b)}${e===1?\")\":`, ${e})`}`}function kD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function q2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function O2(e){return e=q2(e),(e<16?\"0\":\"\")+e.toString(16)}function hCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kg(e,t,r,n)}function vCe(e){if(e instanceof Kg)return new Kg(e.h,e.s,e.l,e.opacity);if(e instanceof Ym||(e=ex(e)),!e)return new Kg;if(e instanceof Kg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Kg(o,s,l,e.opacity)}function HE(e,t,r,n){return arguments.length===1?vCe(e):new Kg(e,t,r,n==null?1:n)}function Kg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function dCe(e){return e=(e||0)%360,e<0?e+360:e}function ED(e){return Math.max(0,Math.min(1,e||0))}function EW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Q_,B2,PA,VE,Zm,R6t,D6t,F6t,z6t,O6t,q6t,B6t,oCe,CD=gu(()=>{SD();Q_=.7,B2=1/Q_,PA=\"\\\\s*([+-]?\\\\d+)\\\\s*\",VE=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",Zm=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",R6t=/^#([0-9a-f]{3,8})$/,D6t=new RegExp(`^rgb\\\\(${PA},${PA},${PA}\\\\)$`),F6t=new RegExp(`^rgb\\\\(${Zm},${Zm},${Zm}\\\\)$`),z6t=new RegExp(`^rgba\\\\(${PA},${PA},${PA},${VE}\\\\)$`),O6t=new RegExp(`^rgba\\\\(${Zm},${Zm},${Zm},${VE}\\\\)$`),q6t=new RegExp(`^hsl\\\\(${VE},${Zm},${Zm}\\\\)$`),B6t=new RegExp(`^hsla\\\\(${VE},${Zm},${Zm},${VE}\\\\)$`),oCe={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};t1(Ym,ex,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sCe,formatHex:sCe,formatHex8:N6t,formatHsl:U6t,formatRgb:lCe,toString:lCe});t1(_d,IA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(q2(this.r),q2(this.g),q2(this.b),kD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cCe,formatHex:cCe,formatHex8:V6t,formatRgb:fCe,toString:fCe}));t1(Kg,HE,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new Kg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new Kg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(EW(e>=240?e-240:e+120,i,n),EW(e,i,n),EW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Kg(dCe(this.h),ED(this.s),ED(this.l),kD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=kD(this.opacity);return`${e===1?\"hsl(\":\"hsla(\"}${dCe(this.h)}, ${ED(this.s)*100}%, ${ED(this.l)*100}%${e===1?\")\":`, ${e})`}`}}))});var LD,PD,kW=gu(()=>{LD=Math.PI/180,PD=180/Math.PI});function xCe(e){if(e instanceof Km)return new Km(e.l,e.a,e.b,e.opacity);if(e instanceof r1)return bCe(e);e instanceof _d||(e=GE(e));var t=IW(e.r),r=IW(e.g),n=IW(e.b),i=CW((.2225045*t+.7168786*r+.0606169*n)/gCe),a,o;return t===r&&r===n?a=o=i:(a=CW((.4360747*t+.3850649*r+.1430804*n)/pCe),o=CW((.0139322*t+.0971045*r+.7141733*n)/mCe)),new Km(116*i-16,500*(a-i),200*(i-o),e.opacity)}function DA(e,t,r,n){return arguments.length===1?xCe(e):new Km(e,t,r,n==null?1:n)}function Km(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function CW(e){return e>G6t?Math.pow(e,1/3):e/_Ce+yCe}function LW(e){return e>RA?e*e*e:_Ce*(e-yCe)}function PW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function H6t(e){if(e instanceof r1)return new r1(e.h,e.c,e.l,e.opacity);if(e instanceof Km||(e=xCe(e)),e.a===0&&e.b===0)return new r1(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*PD;return new r1(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function jE(e,t,r,n){return arguments.length===1?H6t(e):new r1(e,t,r,n==null?1:n)}function r1(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function bCe(e){if(isNaN(e.h))return new Km(e.l,0,0,e.opacity);var t=e.h*LD;return new Km(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var ID,pCe,gCe,mCe,yCe,RA,_Ce,G6t,wCe=gu(()=>{SD();CD();kW();ID=18,pCe=.96422,gCe=1,mCe=.82521,yCe=4/29,RA=6/29,_Ce=3*RA*RA,G6t=RA*RA*RA;t1(Km,DA,$_(Ym,{brighter(e){return new Km(this.l+ID*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Km(this.l-ID*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=pCe*LW(t),e=gCe*LW(e),r=mCe*LW(r),new _d(PW(3.1338561*t-1.6168667*e-.4906146*r),PW(-.9787684*t+1.9161415*e+.033454*r),PW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));t1(r1,jE,$_(Ym,{brighter(e){return new r1(this.h,this.c,this.l+ID*(e==null?1:e),this.opacity)},darker(e){return new r1(this.h,this.c,this.l-ID*(e==null?1:e),this.opacity)},rgb(){return bCe(this).rgb()}}))});function j6t(e){if(e instanceof N2)return new N2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=GE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(SCe*n+TCe*t-ACe*r)/(SCe+TCe-ACe),a=n-i,o=(WE*(r-i)-DW*a)/RD,s=Math.sqrt(o*o+a*a)/(WE*i*(1-i)),l=s?Math.atan2(o,a)*PD-120:NaN;return new N2(l<0?l+360:l,s,i,e.opacity)}function FA(e,t,r,n){return arguments.length===1?j6t(e):new N2(e,t,r,n==null?1:n)}function N2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var MCe,RW,DW,RD,WE,TCe,ACe,SCe,ECe=gu(()=>{SD();CD();kW();MCe=-.14861,RW=1.78277,DW=-.29227,RD=-.90649,WE=1.97294,TCe=WE*RD,ACe=WE*RW,SCe=RW*DW-RD*MCe;t1(N2,FA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new N2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new N2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*LD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(MCe*n+RW*i)),255*(t+r*(DW*n+RD*i)),255*(t+r*(WE*n)),this.opacity)}}))});var U2=gu(()=>{CD();wCe();ECe()});function FW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function DD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n<t-1?e[n+2]:2*a-i;return FW((r-n/t)*t,o,i,a,s)}}var FD=gu(()=>{});function zD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return FW((r-n/t)*t,i,a,o,s)}}var zW=gu(()=>{FD()});var zA,OW=gu(()=>{zA=e=>()=>e});function kCe(e,t){return function(r){return e+r*t}}function W6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tx(e,t){var r=t-e;return r?kCe(e,r>180||r<-180?r-360*Math.round(r/360):r):zA(isNaN(e)?t:e)}function CCe(e){return(e=+e)==1?$f:function(t,r){return r-t?W6t(t,r,e):zA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?kCe(e,r):zA(isNaN(e)?t:e)}var V2=gu(()=>{OW()});function LCe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o<r;++o)s=IA(t[o]),n[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return n=e(n),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=a(l),s+\"\"}}}var XE,PCe,ICe,qW=gu(()=>{U2();FD();zW();V2();XE=function e(t){var r=CCe(t);function n(i,a){var o=r((i=IA(i)).r,(a=IA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+\"\"}}return n.gamma=e,n}(1);PCe=LCe(DD),ICe=LCe(zD)});function OA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function OD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var qD=gu(()=>{});function RCe(e,t){return(OD(t)?OA:BW)(e,t)}function BW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=rx(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}var NW=gu(()=>{ZE();qD()});function BD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var UW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var YE=gu(()=>{});function ND(e,t){var r={},n={},i;(e===null||typeof e!=\"object\")&&(e={}),(t===null||typeof t!=\"object\")&&(t={});for(i in t)i in e?r[i]=rx(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var VW=gu(()=>{ZE()});function X6t(e){return function(){return e}}function Z6t(e){return function(t){return e(t)+\"\"}}function UD(e,t){var r=HW.lastIndex=GW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+\"\",t=t+\"\";(n=HW.exec(e))&&(i=GW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=GW.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?Z6t(l[0].x):X6t(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join(\"\")})}var HW,GW,jW=gu(()=>{YE();HW=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,GW=new RegExp(HW.source,\"g\")});function rx(e,t){var r=typeof t,n;return t==null||r===\"boolean\"?zA(t):(r===\"number\"?zp:r===\"string\"?(n=ex(t))?(t=n,XE):UD:t instanceof ex?XE:t instanceof Date?BD:OD(t)?OA:Array.isArray(t)?BW:typeof t.valueOf!=\"function\"&&typeof t.toString!=\"function\"||isNaN(t)?ND:zp)(e,t)}var ZE=gu(()=>{U2();qW();NW();UW();YE();VW();jW();OW();qD()});function DCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var FCe=gu(()=>{});function zCe(e,t){var r=tx(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var OCe=gu(()=>{V2()});function qCe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var BCe=gu(()=>{});function WW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*NCe,skewX:Math.atan(l)*NCe,scaleX:o,scaleY:s}}var NCe,VD,UCe=gu(()=>{NCe=180/Math.PI,VD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function VCe(e){let t=new(typeof DOMMatrix==\"function\"?DOMMatrix:WebKitCSSMatrix)(e+\"\");return t.isIdentity?VD:WW(t.a,t.b,t.c,t.d,t.e,t.f)}function GCe(e){return e==null?VD:(GD||(GD=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),GD.setAttribute(\"transform\",e),(e=GD.transform.baseVal.consolidate())?(e=e.matrix,WW(e.a,e.b,e.c,e.d,e.e,e.f)):VD)}var GD,HCe=gu(()=>{UCe()});function jCe(e,t,r,n){function i(u){return u.length?u.pop()+\" \":\"\"}function a(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push(\"translate(\",null,t,null,r);v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f||h)&&d.push(\"translate(\"+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+\"rotate(\",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+\"rotate(\"+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+\"skewX(\",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+\"skewX(\"+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push(i(d)+\"scale(\",null,\",\",null,\")\");v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+\"scale(\"+f+\",\"+h+\")\")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,_=h.length,b;++v<_;)f[(b=h[v]).i]=b.x(d);return f.join(\"\")}}}var WCe,XCe,ZCe=gu(()=>{YE();HCe();WCe=jCe(VCe,\"px, \",\"px)\",\"deg)\"),XCe=jCe(GCe,\", \",\")\",\")\")});function YCe(e){return((e=Math.exp(e))+1/e)/2}function K6t(e){return((e=Math.exp(e))-1/e)/2}function J6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var Y6t,KCe,JCe=gu(()=>{Y6t=1e-12;KCe=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,_=d*d+v*v,b,p;if(_<Y6t)p=Math.log(h/u)/t,b=function(C){return[s+C*d,l+C*v,u*Math.exp(t*C*p)]};else{var k=Math.sqrt(_),E=(h*h-u*u+n*_)/(2*u*r*k),T=(h*h-u*u-n*_)/(2*h*r*k),L=Math.log(Math.sqrt(E*E+1)-E),x=Math.log(Math.sqrt(T*T+1)-T);p=(x-L)/t,b=function(C){var M=C*p,g=YCe(L),P=u/(r*k)*(g*J6t(t*M+L)-K6t(L));return[s+P*d,l+P*v,u*g/YCe(t*M+L)]}}return b.duration=p*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},i}(Math.SQRT2,2,4)});function $Ce(e){return function(t,r){var n=e((t=HE(t)).h,(r=HE(r)).h),i=$f(t.s,r.s),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+\"\"}}}var QCe,e6e,t6e=gu(()=>{U2();V2();QCe=$Ce(tx),e6e=$Ce($f)});function XW(e,t){var r=$f((e=DA(e)).l,(t=DA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+\"\"}}var r6e=gu(()=>{U2();V2()});function i6e(e){return function(t,r){var n=e((t=jE(t)).h,(r=jE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+\"\"}}}var n6e,a6e,o6e=gu(()=>{U2();V2();n6e=i6e(tx),a6e=i6e($f)});function s6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=FA(i)).h,(a=FA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+\"\"}}return n.gamma=t,n}(1)}var l6e,u6e,c6e=gu(()=>{U2();V2();l6e=s6e(tx),u6e=s6e($f)});function ZW(e,t){t===void 0&&(t=e,e=rx);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}var f6e=gu(()=>{ZE()});function h6e(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var d6e=gu(()=>{});var G2={};mee(G2,{interpolate:()=>rx,interpolateArray:()=>RCe,interpolateBasis:()=>DD,interpolateBasisClosed:()=>zD,interpolateCubehelix:()=>l6e,interpolateCubehelixLong:()=>u6e,interpolateDate:()=>BD,interpolateDiscrete:()=>DCe,interpolateHcl:()=>n6e,interpolateHclLong:()=>a6e,interpolateHsl:()=>QCe,interpolateHslLong:()=>e6e,interpolateHue:()=>zCe,interpolateLab:()=>XW,interpolateNumber:()=>zp,interpolateNumberArray:()=>OA,interpolateObject:()=>ND,interpolateRgb:()=>XE,interpolateRgbBasis:()=>PCe,interpolateRgbBasisClosed:()=>ICe,interpolateRound:()=>qCe,interpolateString:()=>UD,interpolateTransformCss:()=>WCe,interpolateTransformSvg:()=>XCe,interpolateZoom:()=>KCe,piecewise:()=>ZW,quantize:()=>h6e});var H2=gu(()=>{ZE();NW();FD();zW();UW();FCe();OCe();YE();qD();VW();BCe();jW();ZCe();JCe();qW();t6e();r6e();o6e();c6e();f6e();d6e()});var HD=ye((s0r,v6e)=>{\"use strict\";var $6t=So(),Q6t=ka();v6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),$6t.pointStyle(t,n,i,r)}else Q6t.fill(t,l)}});var YW=ye((l0r,_6e)=>{\"use strict\";var p6e=Oa(),g6e=ka(),m6e=Dr(),eLt=bv().resizeText,tLt=HD();function rLt(e){var t=e._fullLayout._sunburstlayer.selectAll(\".trace\");eLt(e,t,\"sunburst\"),t.each(function(r){var n=p6e.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){p6e.select(this).call(y6e,o,a,e)})})}function y6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=m6e.castOption(r,o,\"marker.line.color\")||g6e.defaultLine,l=m6e.castOption(r,o,\"marker.line.width\")||0;e.call(tLt,t,r,n).style(\"stroke-width\",l).call(g6e.stroke,s).style(\"opacity\",a?r.leaf.opacity:null)}_6e.exports={style:rLt,styleOne:y6e}});var i1=ye(Bs=>{\"use strict\";var j2=Dr(),iLt=ka(),nLt=Eg(),x6e=g_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a<i.length;a++){var o=i[a];if(Bs.getPtId(o)===t)return r=n.copy()}}),r||e};Bs.isEntry=function(e){return!e.parent};Bs.isLeaf=function(e){return!e.children};Bs.getPtId=function(e){return e.data.data.id};Bs.getPtLabel=function(e){return e.data.data.label};Bs.getValue=function(e){return e.value};Bs.isHierarchyRoot=function(e){return b6e(e)===\"\"};Bs.setSliceCursor=function(e,t,r){var n=r.isTransitioning;if(!n){var i=e.datum();n=r.hideOnRoot&&Bs.isHierarchyRoot(i)||r.hideOnLeaves&&Bs.isLeaf(i)}nLt(e,n?null:\"pointer\")};function aLt(e,t,r){return{color:Bs.getOutsideTextFontKey(\"color\",e,t,r),family:Bs.getOutsideTextFontKey(\"family\",e,t,r),size:Bs.getOutsideTextFontKey(\"size\",e,t,r),weight:Bs.getOutsideTextFontKey(\"weight\",e,t,r),style:Bs.getOutsideTextFontKey(\"style\",e,t,r),variant:Bs.getOutsideTextFontKey(\"variant\",e,t,r),textcase:Bs.getOutsideTextFontKey(\"textcase\",e,t,r),lineposition:Bs.getOutsideTextFontKey(\"lineposition\",e,t,r),shadow:Bs.getOutsideTextFontKey(\"shadow\",e,t,r)}}function oLt(e,t,r,n){var i=(n||{}).onPathbar,a=t.data.data,o=a.i,s=j2.castOption(e,o,(i?\"pathbar.textfont\":\"insidetextfont\")+\".color\");return!s&&e._input.textfont&&(s=j2.castOption(e._input,o,\"textfont.color\")),{color:s||iLt.contrast(a.color),family:Bs.getInsideTextFontKey(\"family\",e,t,r,n),size:Bs.getInsideTextFontKey(\"size\",e,t,r,n),weight:Bs.getInsideTextFontKey(\"weight\",e,t,r,n),style:Bs.getInsideTextFontKey(\"style\",e,t,r,n),variant:Bs.getInsideTextFontKey(\"variant\",e,t,r,n),textcase:Bs.getInsideTextFontKey(\"textcase\",e,t,r,n),lineposition:Bs.getInsideTextFontKey(\"lineposition\",e,t,r,n),shadow:Bs.getInsideTextFontKey(\"shadow\",e,t,r,n)}}Bs.getInsideTextFontKey=function(e,t,r,n,i){var a=(i||{}).onPathbar,o=a?\"pathbar.textfont\":\"insidetextfont\",s=r.data.data.i;return j2.castOption(t,s,o+\".\"+e)||j2.castOption(t,s,\"textfont.\"+e)||n.size};Bs.getOutsideTextFontKey=function(e,t,r,n){var i=r.data.data.i;return j2.castOption(t,i,\"outsidetextfont.\"+e)||j2.castOption(t,i,\"textfont.\"+e)||n.size};Bs.isOutsideText=function(e,t){return!e._hasColorscale&&Bs.isHierarchyRoot(t)};Bs.determineTextFont=function(e,t,r,n){return Bs.isOutsideText(e,t)?aLt(e,t,r):oLt(e,t,r,n)};Bs.hasTransition=function(e){return!!(e&&e.duration>0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function b6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,b6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,\"label\").join(\"/\")+\"/\"};Bs.formatValue=x6e.formatPieValue;Bs.formatPercent=function(e,t){var r=j2.formatPercent(e,0);return r===\"0%\"&&(r=x6e.formatPiePercent(e,t)),r}});var $E=ye((c0r,A6e)=>{\"use strict\";var qA=Oa(),w6e=qa(),sLt=ip().appendArrayPointValue,KE=vf(),T6e=Dr(),lLt=k3(),id=i1(),uLt=g_(),cLt=uLt.formatPieValue;A6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type===\"sunburst\",c=s.type===\"treemap\"||s.type===\"icicle\";\"_hasHoverLabel\"in s||(s._hasHoverLabel=!1),\"_hasHoverEvent\"in s||(s._hasHoverEvent=!1);var f=function(v){var _=n._fullLayout;if(!(n._dragging||_.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,E=id.isHierarchyRoot(v),T=id.getParent(l,v),L=id.getValue(v),x=function(Ce){return T6e.castOption(b,k,Ce)},C=x(\"hovertemplate\"),M=KE.castHoverinfo(b,_,k),g=_.separators,P;if(C||M&&M!==\"none\"&&M!==\"skip\"){var A,z;u&&(A=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(A=v._hoverX,z=v._hoverY);var O={},U=[],G=[],Z=function(Ce){return U.indexOf(Ce)!==-1};M&&(U=M===\"all\"?b._module.attributes.hoverinfo.flags:M.split(\"+\")),O.label=p.label,Z(\"label\")&&O.label&&G.push(O.label),p.hasOwnProperty(\"v\")&&(O.value=p.v,O.valueLabel=cLt(O.value,g),Z(\"value\")&&G.push(O.valueLabel)),O.currentPath=v.currentPath=id.getPath(v.data),Z(\"current path\")&&!E&&G.push(O.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};O.percentParent=v.percentParent=L/id.getValue(T),O.parent=v.parentString=id.getPtLabel(T),Z(\"percent parent\")&&(j=id.formatPercent(O.percentParent,g)+\" of \"+O.parent,H()),O.percentEntry=v.percentEntry=L/id.getValue(r),O.entry=v.entry=id.getPtLabel(r),Z(\"percent entry\")&&!E&&!v.onPathbar&&(j=id.formatPercent(O.percentEntry,g)+\" of \"+O.entry,H()),O.percentRoot=v.percentRoot=L/id.getValue(l),O.root=v.root=id.getPtLabel(l),Z(\"percent root\")&&!E&&(j=id.formatPercent(O.percentRoot,g)+\" of \"+O.root,H()),O.text=x(\"hovertext\")||x(\"text\"),Z(\"text\")&&(j=O.text,T6e.isValidTextValue(j)&&G.push(j)),P=[JE(v,b,a.eventDataKeys)];var re={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join(\"<br>\"),name:C||Z(\"name\")?b.name:void 0,color:x(\"hoverlabel.bgcolor\")||p.color,borderColor:x(\"hoverlabel.bordercolor\"),fontFamily:x(\"hoverlabel.font.family\"),fontSize:x(\"hoverlabel.font.size\"),fontColor:x(\"hoverlabel.font.color\"),fontWeight:x(\"hoverlabel.font.weight\"),fontStyle:x(\"hoverlabel.font.style\"),fontVariant:x(\"hoverlabel.font.variant\"),nameLength:x(\"hoverlabel.namelength\"),textAlign:x(\"hoverlabel.align\"),hovertemplate:C,hovertemplateLabels:O,eventData:P};u&&(re.x0=A-v.rInscribed*v.rpx1,re.x1=A+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?\"left\":\"right\"),c&&(re.x=A,re.idealAlign=A<0?\"left\":\"right\");var oe=[];KE.loneHover(re,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select(\"path.surface\");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit(\"plotly_hover\",{points:P||[JE(v,b,a.eventDataKeys)],event:qA.event})}},h=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=qA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=qA.event,n.emit(\"plotly_unhover\",{points:[JE(p,b,a.eventDataKeys)],event:qA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(KE.loneUnhover(_._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select(\"path.surface\");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=u&&(id.isHierarchyRoot(v)||id.isLeaf(v)),k=id.getPtId(v),E=id.isEntry(v)?id.findEntryWithChild(l,k):id.findEntryWithLevel(l,k),T=id.getPtId(E),L={points:[JE(v,b,a.eventDataKeys)],event:qA.event};p||(L.nextLevel=T);var x=lLt.triggerHandler(n,\"plotly_\"+s.type+\"click\",L);if(x!==!1&&_.hovermode&&(n._hoverdata=[JE(v,b,a.eventDataKeys)],KE.click(n,qA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){w6e.call(\"_storeDirectGUIEdit\",b,_._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:T}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:\"immediate\",fromcurrent:!0};KE.loneUnhover(_._hoverlayer.node()),w6e.call(\"animate\",n,C,M)}};t.on(\"mouseover\",f),t.on(\"mouseout\",h),t.on(\"click\",d)};function JE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a<r.length;a++){var o=r[a];o in e&&(i[o]=e[o])}return\"parentString\"in e&&!id.isHierarchyRoot(e)&&(i.parent=e.parentString),sLt(i,t,n.i),i}});var WD=ye(jD=>{\"use strict\";var QE=Oa(),fLt=BE(),Jg=(H2(),pb(G2)).interpolate,S6e=So(),Av=Dr(),hLt=Zl(),C6e=bv(),M6e=C6e.recordMinTextSize,dLt=C6e.clearMinTextSize,L6e=TD(),vLt=g_().getRotationAngle,pLt=L6e.computeTransform,gLt=L6e.transformInsideText,mLt=YW().styleOne,yLt=V0().resizeText,_Lt=$E(),KW=SW(),Rl=i1();jD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(dLt(\"sunburst\",i),o=a.selectAll(\"g.trace.sunburst\").data(t,function(f){return f[0].trace.uid}),o.enter().append(\"g\").classed(\"trace\",!0).classed(\"sunburst\",!0).attr(\"stroke-linejoin\",\"round\"),o.order(),u){n&&(s=n());var c=QE.transition().duration(r.duration).ease(r.easing).each(\"end\",function(){s&&s()}).each(\"interrupt\",function(){s&&s()});c.each(function(){a.selectAll(\"g.trace\").each(function(f){E6e(e,f,this,r)})})}else o.each(function(f){E6e(e,f,this,r)}),i.uniformtext.mode&&yLt(e,i._sunburstlayer.selectAll(\".trace\"),\"sunburst\");l&&o.exit().remove()};function E6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=QE.select(r),l=s.selectAll(\"g.slice\"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,_=c.domain,b=v.w*(_.x[1]-_.x[0]),p=v.h*(_.y[1]-_.y[0]),k=.5*Math.min(b,p),E=u.cx=v.l+v.w*(_.x[1]+_.x[0])/2,T=u.cy=v.t+v.h*(1-_.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(ge){x[Rl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&Rl.isEntry(ge)&&(L=ge)});var C=xLt(h).descendants(),M=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,g=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var A=vLt(c.rotation);A&&C.forEach(function(ge){ge.x0+=A,ge.x1+=A});var z=Math.min(M,d),O=function(ge){return(ge-g)/z*k},U=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},G=function(ge){return Av.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,E,T)},Z=function(ge){return E+k6e(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},j=function(ge){return T+k6e(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append(\"g\").classed(\"slice\",!0),o?l.exit().transition().each(function(){var ge=QE.select(this),ie=ge.select(\"path.surface\");ie.transition().attrTween(\"d\",function(Ee){var Ae=oe(Ee);return function(Be){return G(Ae(Be))}});var Se=ge.select(\"g.slicetext\");Se.attr(\"opacity\",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(ge){N===null&&Rl.getPtId(ge)===H&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each(\"end\",function(){var ge=QE.select(this);Rl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=QE.select(this),Se=Av.ensureSingle(ie,\"path\",\"surface\",function(De){De.style(\"pointer-events\",i?\"none\":\"all\")});ge.rpx0=O(ge.y0),ge.rpx1=O(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=U(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(Av.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=bLt(ge,c),o?Se.transition().attrTween(\"d\",function(De){var ce=_e(De);return function(je){return G(ce(je))}}):Se.attr(\"d\",G),ie.call(_Lt,h,e,t,{eventDataKeys:KW.eventDataKeys,transitionTime:KW.CLICK_TRANSITION_TIME,transitionEasing:KW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(mLt,ge,c,e);var Ee=Av.ensureSingle(ie,\"g\",\"slicetext\"),Ae=Av.ensureSingle(Ee,\"text\",\"\",function(De){De.attr(\"data-notex\",1)}),Be=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,ge,a.font));Ae.text(jD.formatSliceLabel(ge,h,c,t,a)).classed(\"slicetext\",!0).attr(\"text-anchor\",\"middle\").call(S6e.font,Be).call(hLt.convertToTspans,e);var Pe=S6e.bBox(Ae.node());ge.transform=gLt(Pe,ge,u),ge.transform.targetX=Z(ge),ge.transform.targetY=j(ge);var me=function(De,ce){var je=De.transform;return pLt(je,ce),je.fontSize=Be.size,M6e(c.type,je,a),Av.getTextTransform(je)};o?Ae.transition().attrTween(\"transform\",function(De){var ce=Ce(De);return function(je){return me(ce(je),Pe)}}):Ae.attr(\"transform\",me(ge,Pe))});function oe(ge){var ie=Rl.getPtId(ge),Se=x[ie],Ee=x[Rl.getPtId(h)],Ae;if(Ee){var Be=(ge.x1>Ee.x1?2*Math.PI:0)+A;Ae=ge.rpx1<Ee.rpx1?{x0:ge.x0,x1:ge.x1,rpx0:0,rpx1:0}:{x0:Be,x1:Be,rpx0:ge.rpx0,rpx1:ge.rpx1}}else{var Pe,me=Rl.getPtId(ge.parent);l.each(function(pt){if(Rl.getPtId(pt)===me)return Pe=pt});var De=Pe.children,ce;De.forEach(function(pt,Vt){if(Rl.getPtId(pt)===ie)return ce=Vt});var je=De.length,lt=Jg(Pe.x0,Pe.x1);Ae={rpx0:k,rpx1:k,x0:lt(ce/je),x1:lt((ce+1)/je)}}return Jg(Se,Ae)}function _e(ge){var ie=x[Rl.getPtId(ge)],Se,Ee={x0:ge.x0,x1:ge.x1,rpx0:ge.rpx0,rpx1:ge.rpx1};if(ie)Se=ie;else if(L)if(ge.parent)if(N){var Ae=(ge.x1>N?2*Math.PI:0)+A;Se={x0:Ae,x1:Ae}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Le(ge));else Se={rpx0:0,rpx1:0};else Se={x0:A,x1:A};return Jg(Se,Ee)}function Ce(ge){var ie=x[Rl.getPtId(ge)],Se,Ee=ge.transform;if(ie)Se=ie;else if(Se={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var Ae=ge.x1>N?2*Math.PI:0;Se.x0=Se.x1=Ae}else Av.extendFlat(Se,Le(ge));else Se.x0=Se.x1=A;else Se.x0=Se.x1=A;var Be=Jg(Se.transform.textPosAngle,ge.transform.textPosAngle),Pe=Jg(Se.rpx1,ge.rpx1),me=Jg(Se.x0,ge.x0),De=Jg(Se.x1,ge.x1),ce=Jg(Se.transform.scale,Ee.scale),je=Jg(Se.transform.rotate,Ee.rotate),lt=Ee.rCenter===0?3:Se.transform.rCenter===0?1/3:1,pt=Jg(Se.transform.rCenter,Ee.rCenter),Vt=function(ot){return pt(Math.pow(ot,lt))};return function(ot){var ut=Pe(ot),Wt=me(ot),Nt=De(ot),$t=Vt(ot),sr=U(ut,(Wt+Nt)/2),Tr=Be(ot),fr={pxmid:sr,rpx1:ut,transform:{textPosAngle:Tr,rCenter:$t,x:Ee.x,y:Ee.y}};return M6e(c.type,Ee,a),{transform:{targetX:Z(fr),targetY:j(fr),scale:ce(ot),rotate:je(ot),rCenter:$t}}}}function Le(ge){var ie=ge.parent,Se=x[Rl.getPtId(ie)],Ee={};if(Se){var Ae=ie.children,Be=Ae.indexOf(ge),Pe=Ae.length,me=Jg(Se.x0,Se.x1);Ee.x0=me(Be/Pe),Ee.x1=me(Be/Pe)}else Ee.x0=Ee.x1=0;return Ee}}function xLt(e){return fLt.partition().size([2*Math.PI,e.height+1])(e)}jD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o===\"none\"))return\"\";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split(\"+\"),_=function(g){return v.indexOf(g)!==-1},b=[],p;if(_(\"label\")&&u.label&&b.push(u.label),u.hasOwnProperty(\"v\")&&_(\"value\")&&b.push(Rl.formatValue(u.v,s)),!f){_(\"current path\")&&b.push(Rl.getPath(e.data));var k=0;_(\"percent parent\")&&k++,_(\"percent entry\")&&k++,_(\"percent root\")&&k++;var E=k>1;if(k){var T,L=function(g){p=Rl.formatPercent(T,s),E&&(p+=\" of \"+g),b.push(p)};_(\"percent parent\")&&!f&&(T=d/Rl.getValue(h),L(\"parent\")),_(\"percent entry\")&&(T=d/Rl.getValue(t),L(\"entry\")),_(\"percent root\")&&(T=d/Rl.getValue(c),L(\"root\"))}}return _(\"text\")&&(p=Av.castOption(r,u.i,\"text\"),Av.isValidTextValue(p)&&b.push(p)),b.join(\"<br>\")}var x=Av.castOption(r,u.i,\"texttemplate\");if(!x)return\"\";var C={};u.label&&(C.label=u.label),u.hasOwnProperty(\"v\")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty(\"color\")&&(C.color=u.color);var M=Av.castOption(r,u.i,\"text\");return(Av.isValidTextValue(M)||M===\"\")&&(C.text=M),C.customdata=Av.castOption(r,u.i,\"customdata\"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function bLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function k6e(e){return wLt(e.rpx1,e.transform.textPosAngle)}function wLt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var I6e=ye((h0r,P6e)=>{\"use strict\";P6e.exports={moduleType:\"trace\",name:\"sunburst\",basePlotModule:jke(),categories:[],animatable:!0,attributes:qE(),layoutAttributes:MW(),supplyDefaults:eCe(),supplyLayoutDefaults:rCe(),calc:UE().calc,crossTraceCalc:UE().crossTraceCalc,plot:WD().plot,style:YW().style,colorbar:$d(),meta:{}}});var D6e=ye((d0r,R6e)=>{\"use strict\";R6e.exports=I6e()});var z6e=ye(BA=>{\"use strict\";var F6e=Mc();BA.name=\"treemap\";BA.plot=function(e,t,r,n){F6e.plotBasePlot(BA.name,e,t,r,n)};BA.clean=function(e,t,r,n){F6e.cleanBasePlot(BA.name,e,t,r,n)}});var W2=ye((p0r,O6e)=>{\"use strict\";O6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:\"poly\",eventDataKeys:[\"currentPath\",\"root\",\"entry\",\"percentRoot\",\"percentEntry\",\"percentParent\"],gapWithPathbar:1}});var XD=ye((g0r,N6e)=>{\"use strict\";var{hovertemplateAttrs:TLt,texttemplateAttrs:ALt,templatefallbackAttrs:q6e}=Ll(),SLt=Tu(),MLt=Cc().attributes,X2=F2(),tg=qE(),B6e=W2(),JW=Ao().extendFlat,ELt=Pd().pattern;N6e.exports={labels:tg.labels,parents:tg.parents,values:tg.values,branchvalues:tg.branchvalues,count:tg.count,level:tg.level,maxdepth:tg.maxdepth,tiling:{packing:{valType:\"enumerated\",values:[\"squarify\",\"binary\",\"dice\",\"slice\",\"slice-dice\",\"dice-slice\"],dflt:\"squarify\",editType:\"plot\"},squarifyratio:{valType:\"number\",min:1,dflt:1,editType:\"plot\"},flip:{valType:\"flaglist\",flags:[\"x\",\"y\"],dflt:\"\",editType:\"plot\"},pad:{valType:\"number\",min:0,dflt:3,editType:\"plot\"},editType:\"calc\"},marker:JW({pad:{t:{valType:\"number\",min:0,editType:\"plot\"},l:{valType:\"number\",min:0,editType:\"plot\"},r:{valType:\"number\",min:0,editType:\"plot\"},b:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\"},colors:tg.marker.colors,pattern:ELt,depthfade:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],editType:\"style\"},line:tg.marker.line,cornerradius:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},SLt(\"marker\",{colorAttr:\"colors\",anim:!1})),pathbar:{visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},edgeshape:{valType:\"enumerated\",values:[\">\",\"<\",\"|\",\"/\",\"\\\\\"],dflt:\">\",editType:\"plot\"},thickness:{valType:\"number\",min:12,editType:\"plot\"},textfont:JW({},X2.textfont,{}),editType:\"calc\"},text:X2.text,textinfo:tg.textinfo,texttemplate:ALt({editType:\"plot\"},{keys:B6e.eventDataKeys.concat([\"label\",\"value\"])}),texttemplatefallback:q6e({editType:\"plot\"}),hovertext:X2.hovertext,hoverinfo:tg.hoverinfo,hovertemplate:TLt({},{keys:B6e.eventDataKeys}),hovertemplatefallback:q6e(),textfont:X2.textfont,insidetextfont:X2.insidetextfont,outsidetextfont:JW({},X2.outsidetextfont,{}),textposition:{valType:\"enumerated\",values:[\"top left\",\"top center\",\"top right\",\"middle left\",\"middle center\",\"middle right\",\"bottom left\",\"bottom center\",\"bottom right\"],dflt:\"top left\",editType:\"plot\"},sort:X2.sort,root:tg.root,domain:MLt({name:\"treemap\",trace:!0,editType:\"calc\"})}});var $W=ye((m0r,U6e)=>{\"use strict\";U6e.exports={treemapcolorway:{valType:\"colorlist\",editType:\"calc\"},extendtreemapcolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var j6e=ye((y0r,H6e)=>{\"use strict\";var V6e=Dr(),kLt=XD(),CLt=ka(),LLt=Cc().defaults,PLt=i0().handleText,ILt=A_().TEXTPAD,RLt=z2().handleMarkerDefaults,G6e=tc(),DLt=G6e.hasColorscale,FLt=G6e.handleDefaults;H6e.exports=function(t,r,n,i){function a(b,p){return V6e.coerce(t,r,kLt,b,p)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\");var u=a(\"tiling.packing\");u===\"squarify\"&&a(\"tiling.squarifyratio\"),a(\"tiling.flip\"),a(\"tiling.pad\");var c=a(\"text\");a(\"texttemplate\"),a(\"texttemplatefallback\"),r.texttemplate||a(\"textinfo\",V6e.isArrayOrTypedArray(c)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var f=a(\"pathbar.visible\"),h=\"auto\";PLt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"textposition\");var d=r.textposition.indexOf(\"bottom\")!==-1;RLt(t,r,i,a);var v=r._hasColorscale=DLt(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;v?FLt(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}):a(\"marker.depthfade\",!(r.marker.colors||[]).length);var _=r.textfont.size*2;a(\"marker.pad.t\",d?_/4:_),a(\"marker.pad.l\",_/4),a(\"marker.pad.r\",_/4),a(\"marker.pad.b\",d?_:_/4),a(\"marker.cornerradius\"),r._hovered={marker:{line:{width:2,color:CLt.contrast(i.paper_bgcolor)}}},f&&(a(\"pathbar.thickness\",r.pathbar.textfont.size+2*ILt),a(\"pathbar.side\"),a(\"pathbar.edgeshape\")),a(\"sort\"),a(\"root.color\"),LLt(r,i,a),r._length=null}});var X6e=ye((_0r,W6e)=>{\"use strict\";var zLt=Dr(),OLt=$W();W6e.exports=function(t,r){function n(i,a){return zLt.coerce(t,r,OLt,i,a)}n(\"treemapcolorway\",r.colorway),n(\"extendtreemapcolors\")}});var eX=ye(QW=>{\"use strict\";var Z6e=UE();QW.calc=function(e,t){return Z6e.calc(e,t)};QW.crossTraceCalc=function(e){return Z6e._runCrossTraceCalc(\"treemap\",e)}});var tX=ye((b0r,Y6e)=>{\"use strict\";Y6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o<a.length;o++)e(a[o],r,n)}});var rX=ye((w0r,K6e)=>{\"use strict\";var NA=BE(),qLt=tX();K6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing===\"dice-slice\",s=n.pad[a?\"bottom\":\"top\"],l=n.pad[i?\"right\":\"left\"],u=n.pad[i?\"left\":\"right\"],c=n.pad[a?\"top\":\"bottom\"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=NA.treemap().tile(BLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&qLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function BLt(e,t){switch(e){case\"squarify\":return NA.treemapSquarify.ratio(t);case\"binary\":return NA.treemapBinary;case\"dice\":return NA.treemapDice;case\"slice\":return NA.treemapSlice;default:return NA.treemapSliceDice}}});var ZD=ye((T0r,eLe)=>{\"use strict\";var J6e=Oa(),UA=ka(),$6e=Dr(),iX=i1(),NLt=bv().resizeText,ULt=HD();function VLt(e){var t=e._fullLayout._treemaplayer.selectAll(\".trace\");NLt(e,t,\"treemap\"),t.each(function(r){var n=J6e.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){J6e.select(this).call(Q6e,o,a,e,{hovered:!1})})})}function Q6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=iX.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l=\"rgba(0,0,0,0)\",u=0;else if(l=$6e.castOption(r,s,\"marker.line.color\")||UA.defaultLine,u=$6e.castOption(r,s,\"marker.line.width\")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=UA.combine(UA.addOpacity(r._backgroundColor,.75),c),_;if(d===!0){var b=iX.getMaxDepth(r);isFinite(b)?iX.isLeaf(t)?_=0:_=r._maxVisibleLayers-(t.data.depth-r._entryDepth):_=t.data.height+1}else _=t.data.depth-r._entryDepth,r._atRootLevel||_++;if(_>0)for(var p=0;p<_;p++){var k=.5*p/_;c=UA.combine(UA.addOpacity(v,k),c)}}}e.call(ULt,t,r,n,c).style(\"stroke-width\",u).call(UA.stroke,l).style(\"opacity\",h)}eLe.exports={style:VLt,styleOne:Q6e}});var aLe=ye((A0r,nLe)=>{\"use strict\";var tLe=Oa(),YD=Dr(),rLe=So(),GLt=Zl(),HLt=rX(),iLe=ZD().styleOne,nX=W2(),VA=i1(),jLt=$E(),aX=!0;nLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,_=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,M=s/x._entryDepth,g=VA.listPath(n.data,\"id\"),P=HLt(C.copy(),[s,l],{packing:\"dice\",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var O=g.indexOf(z.data.id);return O===-1?!1:(z.x0=M*O,z.x1=M*(O+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,VA.getPtId),i.enter().append(\"g\").classed(\"pathbar\",!0),_(i,aX,k,[s,l],f),i.order();var A=i;v&&(A=A.transition().each(\"end\",function(){var z=tLe.select(this);VA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var O=tLe.select(this),U=YD.ensureSingle(O,\"path\",\"surface\",function(N){N.style(\"pointer-events\",E?\"none\":\"all\")});v?U.transition().attrTween(\"d\",function(N){var H=b(N,aX,k,[s,l]);return function(re){return f(H(re))}}):U.attr(\"d\",f),O.call(jLt,n,t,r,{styleOne:iLe,eventDataKeys:nX.eventDataKeys,transitionTime:nX.CLICK_TRANSITION_TIME,transitionEasing:nX.CLICK_TRANSITION_EASING}).call(VA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(iLe,z,x,t,{hovered:!1}),z._text=(VA.getPtLabel(z)||\"\").split(\"<br>\").join(\" \")||\"\";var G=YD.ensureSingle(O,\"g\",\"slicetext\"),Z=YD.ensureSingle(G,\"text\",\"\",function(N){N.attr(\"data-notex\",1)}),j=YD.ensureUniformFontSize(t,VA.determineTextFont(x,z,T.font,{onPathbar:!0}));Z.text(z._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",\"start\").call(rLe.font,j).call(GLt.convertToTspans,t),z.textBB=rLe.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween(\"transform\",function(N){var H=p(N,aX,k,[s,l]);return function(re){return d(H(re))}}):Z.attr(\"transform\",d(z))})}});var uLe=ye((S0r,lLe)=>{\"use strict\";var oLe=Oa(),oX=(H2(),pb(G2)).interpolate,ix=i1(),ek=Dr(),sLe=A_().TEXTPAD,WLt=d2(),XLt=WLt.toMoveInsideBar,ZLt=bv(),sX=ZLt.recordMinTextSize,YLt=W2(),KLt=aLe();function Z2(e){return ix.isHierarchyRoot(e)?\"\":ix.getPtId(e)}lLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u===\"icicle\",f=s.hierarchy,h=ix.findEntryWithLevel(f,l.level),d=oLe.select(n),v=d.selectAll(\"g.pathbar\"),_=d.selectAll(\"g.slice\");if(!h){v.remove(),_.remove();return}var b=ix.isHierarchyRoot(h),p=!o.uniformtext.mode&&ix.hasTransition(i),k=ix.getMaxDepth(l),E=function($e){return $e.data.depth-h.data.depth<k},T=o._size,L=l.domain,x=T.w*(L.x[1]-L.x[0]),C=T.h*(L.y[1]-L.y[0]),M=x,g=l.pathbar.thickness,P=l.marker.line.width+YLt.gapWithPathbar,A=l.pathbar.visible?l.pathbar.side.indexOf(\"bottom\")>-1?C+P:-(g+P):0,z={x0:M,x1:M,y0:A,y1:A+g},O=function($e,St,Qt){var Gt=l.tiling.pad,_t=function(lr){return lr-Gt<=St.x0},It=function(lr){return lr+Gt>=St.x1},mt=function(lr){return lr-Gt<=St.y0},er=function(lr){return lr+Gt>=St.y1};return $e.x0===St.x0&&$e.x1===St.x1&&$e.y0===St.y0&&$e.y1===St.y1?{x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1}:{x0:_t($e.x0-Gt)?0:It($e.x0-Gt)?Qt[0]:$e.x0,x1:_t($e.x1+Gt)?0:It($e.x1+Gt)?Qt[0]:$e.x1,y0:mt($e.y0-Gt)?0:er($e.y0-Gt)?Qt[1]:$e.y0,y1:mt($e.y1+Gt)?0:er($e.y1+Gt)?Qt[1]:$e.y1}},U=null,G={},Z={},j=null,N=function($e,St){return St?G[Z2($e)]:Z[Z2($e)]},H=function($e,St,Qt,Gt){if(St)return G[Z2(f)]||z;var _t=Z[l.level]||Qt;return E($e)?O($e,_t,Gt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-x/2+T.l+T.w*(L.x[1]+L.x[0])/2,oe=-C/2+T.t+T.h*(1-(L.y[1]+L.y[0])/2),_e=function($e){return re+$e},Ce=function($e){return oe+$e},Le=Ce(0),ge=_e(0),ie=function($e){return ge+$e},Se=function($e){return Le+$e};function Ee($e,St){return $e+\",\"+St}var Ae=ie(0),Be=function($e){$e.x=Math.max(Ae,$e.x)},Pe=l.pathbar.edgeshape,me=function($e){var St=ie(Math.max(Math.min($e.x0,$e.x0),0)),Qt=ie(Math.min(Math.max($e.x1,$e.x1),M)),Gt=Se($e.y0),_t=Se($e.y1),It=g/2,mt={},er={};mt.x=St,er.x=Qt,mt.y=er.y=(Gt+_t)/2;var lr={x:St,y:Gt},wr={x:Qt,y:Gt},Lr={x:Qt,y:_t},ti={x:St,y:_t};return Pe===\">\"?(lr.x-=It,wr.x-=It,Lr.x-=It,ti.x-=It):Pe===\"/\"?(Lr.x-=It,ti.x-=It,mt.x-=It/2,er.x-=It/2):Pe===\"\\\\\"?(lr.x-=It,wr.x-=It,mt.x-=It/2,er.x-=It/2):Pe===\"<\"&&(mt.x-=It,er.x-=It),Be(lr),Be(ti),Be(mt),Be(wr),Be(Lr),Be(er),\"M\"+Ee(lr.x,lr.y)+\"L\"+Ee(wr.x,wr.y)+\"L\"+Ee(er.x,er.y)+\"L\"+Ee(Lr.x,Lr.y)+\"L\"+Ee(ti.x,ti.y)+\"L\"+Ee(mt.x,mt.y)+\"Z\"},De=l[c?\"tiling\":\"marker\"].pad,ce=function($e){return l.textposition.indexOf($e)!==-1},je=ce(\"top\"),lt=ce(\"left\"),pt=ce(\"right\"),Vt=ce(\"bottom\"),ot=function($e){var St=_e($e.x0),Qt=_e($e.x1),Gt=Ce($e.y0),_t=Ce($e.y1),It=Qt-St,mt=_t-Gt;if(!It||!mt)return\"\";var er=l.marker.cornerradius||0,lr=Math.min(er,It/2,mt/2);lr&&$e.data&&$e.data.data&&$e.data.data.label&&(je&&(lr=Math.min(lr,De.t)),lt&&(lr=Math.min(lr,De.l)),pt&&(lr=Math.min(lr,De.r)),Vt&&(lr=Math.min(lr,De.b)));var wr=function(Lr,ti){return lr?\"a\"+Ee(lr,lr)+\" 0 0 1 \"+Ee(Lr,ti):\"\"};return\"M\"+Ee(St,Gt+lr)+wr(lr,-lr)+\"L\"+Ee(Qt-lr,Gt)+wr(lr,lr)+\"L\"+Ee(Qt,_t-lr)+wr(-lr,lr)+\"L\"+Ee(St+lr,_t)+wr(-lr,-lr)+\"Z\"},ut=function($e,St){var Qt=$e.x0,Gt=$e.x1,_t=$e.y0,It=$e.y1,mt=$e.textBB,er=je||St.isHeader&&!Vt,lr=er?\"start\":Vt?\"end\":\"middle\",wr=ce(\"right\"),Lr=ce(\"left\")||St.onPathbar,ti=Lr?-1:wr?1:0;if(St.isHeader){if(Qt+=(c?De:De.l)-sLe,Gt-=(c?De:De.r)-sLe,Qt>=Gt){var Br=(Qt+Gt)/2;Qt=Br,Gt=Br}var Vr;Vt?(Vr=It-(c?De:De.b),_t<Vr&&Vr<It&&(_t=Vr)):(Vr=_t+(c?De:De.t),_t<Vr&&Vr<It&&(It=Vr))}var dt=XLt(Qt,Gt,_t,It,mt,{isHorizontal:!1,constrained:!0,angle:0,anchor:lr,leftToRight:ti});return dt.fontSize=St.fontSize,dt.targetX=_e(dt.targetX),dt.targetY=Ce(dt.targetY),isNaN(dt.targetX)||isNaN(dt.targetY)?{}:(Qt!==Gt&&_t!==It&&sX(l.type,dt,o),{scale:dt.scale,rotate:dt.rotate,textX:dt.textX,textY:dt.textY,anchorX:dt.anchorX,anchorY:dt.anchorY,targetX:dt.targetX,targetY:dt.targetY})},Wt=function($e,St){for(var Qt,Gt=0,_t=$e;!Qt&&Gt<k;)Gt++,_t=_t.parent,_t?Qt=N(_t,St):Gt=k;return Qt||{}},Nt=function($e,St,Qt,Gt){var _t=N($e,St),It;if(St)It=z;else{var mt=N(h,St);mt?It=O($e,mt,Gt):It={}}return oX(_t,It)},$t=function($e,St,Qt,Gt,_t){var It=N($e,St),mt;if(It)mt=It;else if(St)mt=z;else if(U)if($e.parent){var er=j||Qt;er&&!St?mt=O($e,er,Gt):(mt={},ek.extendFlat(mt,Wt($e,St)))}else mt=ek.extendFlat({},$e),c&&(_t.orientation===\"h\"?_t.flipX?mt.x0=$e.x1:mt.x1=0:_t.flipY?mt.y0=$e.y1:mt.y1=0);else mt={};return oX(mt,{x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1})},sr=function($e,St,Qt,Gt){var _t=N($e,St),It={},mt=H($e,St,Qt,Gt);ek.extendFlat(It,{transform:ut({x0:mt.x0,x1:mt.x1,y0:mt.y0,y1:mt.y1,textBB:$e.textBB,_text:$e._text},{isHeader:ix.isHeader($e,l)})}),_t?It=_t:$e.parent&&ek.extendFlat(It,Wt($e,St));var er=$e.transform;return $e.x0!==$e.x1&&$e.y0!==$e.y1&&sX(l.type,er,o),oX(It,{transform:{scale:er.scale,rotate:er.rotate,textX:er.textX,textY:er.textY,anchorX:er.anchorX,anchorY:er.anchorY,targetX:er.targetX,targetY:er.targetY}})},Tr=function($e,St,Qt,Gt,_t){var It=Gt[0],mt=Gt[1];p?$e.exit().transition().each(function(){var er=oLe.select(this),lr=er.select(\"path.surface\");lr.transition().attrTween(\"d\",function(Lr){var ti=Nt(Lr,St,Qt,[It,mt]);return function(Br){return _t(ti(Br))}});var wr=er.select(\"g.slicetext\");wr.attr(\"opacity\",0)}).remove():$e.exit().remove()},fr=function($e){var St=$e.transform;return $e.x0!==$e.x1&&$e.y0!==$e.y1&&sX(l.type,St,o),ek.getTextTransform({textX:St.textX,textY:St.textY,anchorX:St.anchorX,anchorY:St.anchorY,targetX:St.targetX,targetY:St.targetY,scale:St.scale,rotate:St.rotate})};p&&(v.each(function($e){G[Z2($e)]={x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1},$e.transform&&(G[Z2($e)].transform={textX:$e.transform.textX,textY:$e.transform.textY,anchorX:$e.transform.anchorX,anchorY:$e.transform.anchorY,targetX:$e.transform.targetX,targetY:$e.transform.targetY,scale:$e.transform.scale,rotate:$e.transform.rotate})}),_.each(function($e){Z[Z2($e)]={x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1},$e.transform&&(Z[Z2($e)].transform={textX:$e.transform.textX,textY:$e.transform.textY,anchorX:$e.transform.anchorX,anchorY:$e.transform.anchorY,targetX:$e.transform.targetX,targetY:$e.transform.targetY,scale:$e.transform.scale,rotate:$e.transform.rotate}),!U&&ix.isEntry($e)&&(U=$e)})),j=a(t,r,h,_,{width:x,height:C,viewX:_e,viewY:Ce,pathSlice:ot,toMoveInsideSlice:ut,prevEntry:U,makeUpdateSliceInterpolator:$t,makeUpdateTextInterpolator:sr,handleSlicesExit:Tr,hasTransition:p,strTransform:fr}),l.pathbar.visible?KLt(t,r,h,v,{barDifY:A,width:M,height:g,viewX:ie,viewY:Se,pathSlice:me,toMoveInsideSlice:ut,makeUpdateSliceInterpolator:$t,makeUpdateTextInterpolator:sr,handleSlicesExit:Tr,hasTransition:p,strTransform:fr}):v.remove()}});var lX=ye((M0r,fLe)=>{\"use strict\";var JLt=Oa(),$Lt=i1(),QLt=bv(),ePt=QLt.clearMinTextSize,tPt=V0().resizeText,cLe=uLe();fLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l[\"_\"+o+\"layer\"],c,f,h=!n;if(ePt(o,l),c=u.selectAll(\"g.trace.\"+o).data(r,function(v){return v[0].trace.uid}),c.enter().append(\"g\").classed(\"trace\",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&$Lt.hasTransition(n)){i&&(f=i());var d=JLt.transition().duration(n.duration).ease(n.easing).each(\"end\",function(){f&&f()}).each(\"interrupt\",function(){f&&f()});d.each(function(){u.selectAll(\"g.trace\").each(function(v){cLe(t,v,this,n,s)})})}else c.each(function(v){cLe(t,v,this,n,s)}),l.uniformtext.mode&&tPt(t,u.selectAll(\".trace\"),o);h&&c.exit().remove()}});var gLe=ye((E0r,pLe)=>{\"use strict\";var hLe=Oa(),KD=Dr(),dLe=So(),rPt=Zl(),iPt=rX(),vLe=ZD().styleOne,uX=W2(),nx=i1(),nPt=$E(),aPt=WD().formatSliceLabel,cX=!1;pLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf(\"left\")!==-1,M=x.textposition.indexOf(\"right\")!==-1,g=x.textposition.indexOf(\"bottom\")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,A=iPt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf(\"x\")>-1,flipY:x.tiling.flip.indexOf(\"y\")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=A.descendants(),O=1/0,U=-1/0;z.forEach(function(H){var re=H.depth;re>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(O=Math.min(O,re),U=Math.max(U,re))}),i=i.data(z,nx.getPtId),x._maxVisibleLayers=isFinite(U)?U-O+1:0,i.enter().append(\"g\").classed(\"slice\",!0),v(i,cX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=nx.getPtId(p);i.each(function(H){G===null&&nx.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each(\"end\",function(){var H=hLe.select(this);nx.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var re=nx.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var oe=hLe.select(this),_e=KD.ensureSingle(oe,\"path\",\"surface\",function(Ee){Ee.style(\"pointer-events\",E?\"none\":\"all\")});d?_e.transition().attrTween(\"d\",function(Ee){var Ae=_(Ee,cX,j(),[o,s]);return function(Be){return c(Ae(Be))}}):_e.attr(\"d\",c),oe.call(nPt,n,t,r,{styleOne:vLe,eventDataKeys:uX.eventDataKeys,transitionTime:uX.CLICK_TRANSITION_TIME,transitionEasing:uX.CLICK_TRANSITION_EASING}).call(nx.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(vLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text=\"\":re?H._text=P?\"\":nx.getPtLabel(H)||\"\":H._text=aPt(H,n,x,r,T)||\"\";var Ce=KD.ensureSingle(oe,\"g\",\"slicetext\"),Le=KD.ensureSingle(Ce,\"text\",\"\",function(Ee){Ee.attr(\"data-notex\",1)}),ge=KD.ensureUniformFontSize(t,nx.determineTextFont(x,H,T.font)),ie=H._text||\" \",Se=re&&ie.indexOf(\"<br>\")===-1;Le.text(ie).classed(\"slicetext\",!0).attr(\"text-anchor\",M?\"end\":C||Se?\"start\":\"middle\").call(dLe.font,ge).call(rPt.convertToTspans,t),H.textBB=dLe.bBox(Le.node()),H.transform=f(H,{fontSize:ge.size,isHeader:re}),H.transform.fontSize=ge.size,d?Le.transition().attrTween(\"transform\",function(Ee){var Ae=b(Ee,cX,j(),[o,s]);return function(Be){return h(Ae(Be))}}):Le.attr(\"transform\",h(H))}),G}});var yLe=ye((k0r,mLe)=>{\"use strict\";var oPt=lX(),sPt=gLe();mLe.exports=function(t,r,n,i){return oPt(t,r,n,i,{type:\"treemap\",drawDescendants:sPt})}});var xLe=ye((C0r,_Le)=>{\"use strict\";_Le.exports={moduleType:\"trace\",name:\"treemap\",basePlotModule:z6e(),categories:[],animatable:!0,attributes:XD(),layoutAttributes:$W(),supplyDefaults:j6e(),supplyLayoutDefaults:X6e(),calc:eX().calc,crossTraceCalc:eX().crossTraceCalc,plot:yLe(),style:ZD().style,colorbar:$d(),meta:{}}});var wLe=ye((L0r,bLe)=>{\"use strict\";bLe.exports=xLe()});var ALe=ye(GA=>{\"use strict\";var TLe=Mc();GA.name=\"icicle\";GA.plot=function(e,t,r,n){TLe.plotBasePlot(GA.name,e,t,r,n)};GA.clean=function(e,t,r,n){TLe.cleanBasePlot(GA.name,e,t,r,n)}});var fX=ye((I0r,ELe)=>{\"use strict\";var{hovertemplateAttrs:lPt,texttemplateAttrs:uPt,templatefallbackAttrs:SLe}=Ll(),cPt=Tu(),fPt=Cc().attributes,tk=F2(),s0=qE(),JD=XD(),MLe=W2(),hPt=Ao().extendFlat,dPt=Pd().pattern;ELe.exports={labels:s0.labels,parents:s0.parents,values:s0.values,branchvalues:s0.branchvalues,count:s0.count,level:s0.level,maxdepth:s0.maxdepth,tiling:{orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\",editType:\"plot\"},flip:JD.tiling.flip,pad:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},marker:hPt({colors:s0.marker.colors,line:s0.marker.line,pattern:dPt,editType:\"calc\"},cPt(\"marker\",{colorAttr:\"colors\",anim:!1})),leaf:s0.leaf,pathbar:JD.pathbar,text:tk.text,textinfo:s0.textinfo,texttemplate:uPt({editType:\"plot\"},{keys:MLe.eventDataKeys.concat([\"label\",\"value\"])}),texttemplatefallback:SLe({editType:\"plot\"}),hovertext:tk.hovertext,hoverinfo:s0.hoverinfo,hovertemplate:lPt({},{keys:MLe.eventDataKeys}),hovertemplatefallback:SLe(),textfont:tk.textfont,insidetextfont:tk.insidetextfont,outsidetextfont:JD.outsidetextfont,textposition:JD.textposition,sort:tk.sort,root:s0.root,domain:fPt({name:\"icicle\",trace:!0,editType:\"calc\"})}});var hX=ye((R0r,kLe)=>{\"use strict\";kLe.exports={iciclecolorway:{valType:\"colorlist\",editType:\"calc\"},extendiciclecolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var ILe=ye((D0r,PLe)=>{\"use strict\";var CLe=Dr(),vPt=fX(),pPt=ka(),gPt=Cc().defaults,mPt=i0().handleText,yPt=A_().TEXTPAD,_Pt=z2().handleMarkerDefaults,LLe=tc(),xPt=LLe.hasColorscale,bPt=LLe.handleDefaults;PLe.exports=function(t,r,n,i){function a(d,v){return CLe.coerce(t,r,vPt,d,v)}var o=a(\"labels\"),s=a(\"parents\");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a(\"values\");l&&l.length?a(\"branchvalues\"):a(\"count\"),a(\"level\"),a(\"maxdepth\"),a(\"tiling.orientation\"),a(\"tiling.flip\"),a(\"tiling.pad\");var u=a(\"text\");a(\"texttemplate\"),a(\"texttemplatefallback\"),r.texttemplate||a(\"textinfo\",CLe.isArrayOrTypedArray(u)?\"text+label\":\"label\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var c=a(\"pathbar.visible\"),f=\"auto\";mPt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a(\"textposition\"),_Pt(t,r,i,a);var h=r._hasColorscale=xPt(t,\"marker\",\"colors\")||(t.marker||{}).coloraxis;h&&bPt(t,r,i,a,{prefix:\"marker.\",cLetter:\"c\"}),a(\"leaf.opacity\",h?1:.7),r._hovered={marker:{line:{width:2,color:pPt.contrast(i.paper_bgcolor)}}},c&&(a(\"pathbar.thickness\",r.pathbar.textfont.size+2*yPt),a(\"pathbar.side\"),a(\"pathbar.edgeshape\")),a(\"sort\"),a(\"root.color\"),gPt(r,i,a),r._length=null}});var DLe=ye((F0r,RLe)=>{\"use strict\";var wPt=Dr(),TPt=hX();RLe.exports=function(t,r){function n(i,a){return wPt.coerce(t,r,TPt,i,a)}n(\"iciclecolorway\",r.colorway),n(\"extendiciclecolors\")}});var vX=ye(dX=>{\"use strict\";var FLe=UE();dX.calc=function(e,t){return FLe.calc(e,t)};dX.crossTraceCalc=function(e){return FLe._runCrossTraceCalc(\"icicle\",e)}});var OLe=ye((O0r,zLe)=>{\"use strict\";var APt=BE(),SPt=tX();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation===\"h\",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=APt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&SPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var pX=ye((q0r,VLe)=>{\"use strict\";var qLe=Oa(),BLe=ka(),NLe=Dr(),MPt=bv().resizeText,EPt=HD();function kPt(e){var t=e._fullLayout._iciclelayer.selectAll(\".trace\");MPt(e,t,\"icicle\"),t.each(function(r){var n=qLe.select(this),i=r[0],a=i.trace;n.style(\"opacity\",a.opacity),n.selectAll(\"path.surface\").each(function(o){qLe.select(this).call(ULe,o,a,e)})})}function ULe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=NLe.castOption(r,o,\"marker.line.color\")||BLe.defaultLine,l=NLe.castOption(r,o,\"marker.line.width\")||0;e.call(EPt,t,r,n).style(\"stroke-width\",l).call(BLe.stroke,s).style(\"opacity\",a?r.leaf.opacity:null)}VLe.exports={style:kPt,styleOne:ULe}});var XLe=ye((B0r,WLe)=>{\"use strict\";var GLe=Oa(),$D=Dr(),HLe=So(),CPt=Zl(),LPt=OLe(),jLe=pX().styleOne,gX=W2(),HA=i1(),PPt=$E(),IPt=WD().formatSliceLabel,mX=!1;WLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf(\"left\")!==-1,M=x.textposition.indexOf(\"right\")!==-1,g=x.textposition.indexOf(\"bottom\")!==-1,P=LPt(n,[o,s],{flipX:x.tiling.flip.indexOf(\"x\")>-1,flipY:x.tiling.flip.indexOf(\"y\")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),A=P.descendants(),z=1/0,O=-1/0;A.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),O=Math.max(O,H))}),i=i.data(A,HA.getPtId),x._maxVisibleLayers=isFinite(O)?O-z+1:0,i.enter().append(\"g\").classed(\"slice\",!0),v(i,mX,k,[o,s],c),i.order();var U=null;if(d&&p){var G=HA.getPtId(p);i.each(function(N){U===null&&HA.getPtId(N)===G&&(U={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return U||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each(\"end\",function(){var N=GLe.select(this);HA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=GLe.select(this),re=$D.ensureSingle(H,\"path\",\"surface\",function(Le){Le.style(\"pointer-events\",E?\"none\":\"all\")});d?re.transition().attrTween(\"d\",function(Le){var ge=_(Le,mX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf(\"x\")>-1,flipY:x.tiling.flip.indexOf(\"y\")>-1});return function(ie){return c(ge(ie))}}):re.attr(\"d\",c),H.call(PPt,n,t,r,{styleOne:jLe,eventDataKeys:gX.eventDataKeys,transitionTime:gX.CLICK_TRANSITION_TIME,transitionEasing:gX.CLICK_TRANSITION_EASING}).call(HA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(jLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text=\"\":N._text=IPt(N,n,x,r,T)||\"\";var oe=$D.ensureSingle(H,\"g\",\"slicetext\"),_e=$D.ensureSingle(oe,\"text\",\"\",function(Le){Le.attr(\"data-notex\",1)}),Ce=$D.ensureUniformFontSize(t,HA.determineTextFont(x,N,T.font));_e.text(N._text||\" \").classed(\"slicetext\",!0).attr(\"text-anchor\",M?\"end\":C?\"start\":\"middle\").call(HLe.font,Ce).call(CPt.convertToTspans,t),N.textBB=HLe.bBox(_e.node()),N.transform=f(N,{fontSize:Ce.size}),N.transform.fontSize=Ce.size,d?_e.transition().attrTween(\"transform\",function(Le){var ge=b(Le,mX,Z(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr(\"transform\",h(N))}),U}});var YLe=ye((N0r,ZLe)=>{\"use strict\";var RPt=lX(),DPt=XLe();ZLe.exports=function(t,r,n,i){return RPt(t,r,n,i,{type:\"icicle\",drawDescendants:DPt})}});var JLe=ye((U0r,KLe)=>{\"use strict\";KLe.exports={moduleType:\"trace\",name:\"icicle\",basePlotModule:ALe(),categories:[],animatable:!0,attributes:fX(),layoutAttributes:hX(),supplyDefaults:ILe(),supplyLayoutDefaults:DLe(),calc:vX().calc,crossTraceCalc:vX().crossTraceCalc,plot:YLe(),style:pX().style,colorbar:$d(),meta:{}}});var QLe=ye((V0r,$Le)=>{\"use strict\";$Le.exports=JLe()});var tPe=ye(jA=>{\"use strict\";var ePe=Mc();jA.name=\"funnelarea\";jA.plot=function(e,t,r,n){ePe.plotBasePlot(jA.name,e,t,r,n)};jA.clean=function(e,t,r,n){ePe.cleanBasePlot(jA.name,e,t,r,n)}});var yX=ye((H0r,iPe)=>{\"use strict\";var iv=F2(),FPt=Gl(),zPt=Cc().attributes,{hovertemplateAttrs:OPt,texttemplateAttrs:qPt,templatefallbackAttrs:rPe}=Ll(),Y2=Ao().extendFlat;iPe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:Y2({},iv.marker.line.color,{dflt:null}),width:Y2({},iv.marker.line.width,{dflt:1}),editType:\"calc\"},pattern:iv.marker.pattern,editType:\"calc\"},text:iv.text,hovertext:iv.hovertext,scalegroup:Y2({},iv.scalegroup,{}),textinfo:Y2({},iv.textinfo,{flags:[\"label\",\"text\",\"value\",\"percent\"]}),texttemplate:qPt({editType:\"plot\"},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),texttemplatefallback:rPe({editType:\"plot\"}),hoverinfo:Y2({},FPt.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hovertemplate:OPt({},{keys:[\"label\",\"color\",\"value\",\"text\",\"percent\"]}),hovertemplatefallback:rPe(),textposition:Y2({},iv.textposition,{values:[\"inside\",\"none\"],dflt:\"inside\"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:Y2({},iv.title.position,{values:[\"top left\",\"top center\",\"top right\"],dflt:\"top center\"}),editType:\"plot\"},domain:zPt({name:\"funnelarea\",trace:!0,editType:\"calc\"}),aspectratio:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},baseratio:{valType:\"number\",min:0,max:1,dflt:.333,editType:\"plot\"}}});var _X=ye((j0r,nPe)=>{\"use strict\";var BPt=_D().hiddenlabels;nPe.exports={hiddenlabels:BPt,funnelareacolorway:{valType:\"colorlist\",editType:\"calc\"},extendfunnelareacolors:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}});var sPe=ye((W0r,oPe)=>{\"use strict\";var aPe=Dr(),NPt=yX(),UPt=Cc().defaults,VPt=i0().handleText,GPt=z2().handleLabelsAndValues,HPt=z2().handleMarkerDefaults;oPe.exports=function(t,r,n,i){function a(_,b){return aPe.coerce(t,r,NPt,_,b)}var o=a(\"labels\"),s=a(\"values\"),l=GPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a(\"label0\"),a(\"dlabel\")),!u){r.visible=!1;return}r._length=u,HPt(t,r,i,a),a(\"scalegroup\");var c=a(\"text\"),f=a(\"texttemplate\");a(\"texttemplatefallback\");var h;if(f||(h=a(\"textinfo\",Array.isArray(c)?\"text+percent\":\"percent\")),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),f||h&&h!==\"none\"){var d=a(\"textposition\");VPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h===\"none\"&&a(\"textposition\",\"none\");UPt(r,i,a);var v=a(\"title.text\");v&&(a(\"title.position\"),aPe.coerceFont(a,\"title.font\",i.font)),a(\"aspectratio\"),a(\"baseratio\")}});var uPe=ye((X0r,lPe)=>{\"use strict\";var jPt=Dr(),WPt=_X();lPe.exports=function(t,r){function n(i,a){return jPt.coerce(t,r,WPt,i,a)}n(\"hiddenlabels\"),n(\"funnelareacolorway\",r.colorway),n(\"extendfunnelareacolors\")}});var xX=ye((Z0r,fPe)=>{\"use strict\";var cPe=EA();function XPt(e,t){return cPe.calc(e,t)}function ZPt(e){cPe.crossTraceCalc(e,{type:\"funnelarea\"})}fPe.exports={calc:XPt,crossTraceCalc:ZPt}});var gPe=ye((Y0r,pPe)=>{\"use strict\";var K2=Oa(),bX=So(),ax=Dr(),YPt=ax.strScale,hPe=ax.strTranslate,dPe=Zl(),KPt=d2(),JPt=KPt.toMoveInsideBar,vPe=bv(),$Pt=vPe.recordMinTextSize,QPt=vPe.clearMinTextSize,eIt=g_(),WA=TD(),tIt=WA.attachFxHandlers,rIt=WA.determineInsideTextFont,iIt=WA.layoutAreas,nIt=WA.prerenderTitles,aIt=WA.positionTitleOutside,oIt=WA.formatSliceLabel;pPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;QPt(\"funnelarea\",i),nIt(r,t),iIt(r,i._size),ax.makeTraceGroups(i._funnelarealayer,r,\"trace\").each(function(a){var o=K2.select(this),s=a[0],l=s.trace;lIt(a),o.each(function(){var u=K2.select(this).selectAll(\"g.slice\").data(a);u.enter().append(\"g\").classed(\"slice\",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){K2.select(this).selectAll(\"path,g\").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,_=K2.select(this),b=_.selectAll(\"path.surface\").data([f]);b.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":n?\"none\":\"all\"}),_.call(tIt,t,a);var p=\"M\"+(d+f.TR[0])+\",\"+(v+f.TR[1])+wX(f.TR,f.BR)+wX(f.BR,f.BL)+wX(f.BL,f.TL)+\"Z\";b.attr(\"d\",p),oIt(t,f,s);var k=eIt.castOption(l.textposition,f.pts),E=_.selectAll(\"g.slicetext\").data(f.text&&k!==\"none\"?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each(function(){var T=ax.ensureSingle(K2.select(this),\"text\",\"\",function(z){z.attr(\"data-notex\",1)}),L=ax.ensureUniformFontSize(t,rIt(l,f,i.font));T.text(f.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(bX.font,L).call(dPe.convertToTspans,t);var x=bX.bBox(T.node()),C,M,g,P=Math.min(f.BL[1],f.BR[1])+v,A=Math.max(f.TL[1],f.TR[1])+v;M=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=JPt(M,g,P,A,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:\"middle\"}),C.fontSize=L.size,$Pt(l.type,C,i),a[h].transform=C,ax.setTransormAndDisplay(T,C)})});var c=K2.select(this).selectAll(\"g.titletext\").data(l.title.text?[0]:[]);c.enter().append(\"g\").classed(\"titletext\",!0),c.exit().remove(),c.each(function(){var f=ax.ensureSingle(K2.select(this),\"text\",\"\",function(v){v.attr(\"data-notex\",1)}),h=l.title.text;l._meta&&(h=ax.templateString(h,l._meta)),f.text(h).attr({class:\"titletext\",transform:\"\",\"text-anchor\":\"middle\"}).call(bX.font,l.title.font).call(dPe.convertToTspans,t);var d=aIt(s,i._size);f.attr(\"transform\",hPe(d.x,d.y)+YPt(Math.min(1,d.scale))+hPe(d.tx,d.ty))})})})};function wX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return\"l\"+r+\",\"+n}function sIt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function lIt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var O=Math.sqrt(u);return{x:O,y:-O}}function f(){var O=c();return[O.x,O.y]}var h,d=[];d.push(f());var v,_;for(v=e.length-1;v>-1;v--)if(_=e[v],!_.hidden){var b=_.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v<d.length;v++)h=d[v],p=Math.min(p,h[1]),k=Math.max(k,h[1]);for(v=0;v<d.length;v++)d[v][1]-=(k+p)/2;var E=d[d.length-1][0],T=t.r,L=(k-p)/2,x=T/E,C=T/L*n;for(t.r=C*L,v=0;v<d.length;v++)d[v][0]*=x,d[v][1]*=C;h=d[0];var M=[-h[0],h[1]],g=[h[0],h[1]],P=0;for(v=e.length-1;v>-1;v--)if(_=e[v],!_.hidden){P+=1;var A=d[P][0],z=d[P][1];_.TL=[-A,z],_.TR=[A,z],_.BL=M,_.BR=g,_.pxmid=sIt(_.TR,_.BR),M=_.TL,g=_.TR}}});var _Pe=ye((K0r,yPe)=>{\"use strict\";var mPe=Oa(),uIt=X3(),cIt=bv().resizeText;yPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(\".trace\");cIt(t,r,\"funnelarea\"),r.each(function(n){var i=n[0],a=i.trace,o=mPe.select(this);o.style({opacity:a.opacity}),o.selectAll(\"path.surface\").each(function(s){mPe.select(this).call(uIt,s,a,t)})})}});var bPe=ye((J0r,xPe)=>{\"use strict\";xPe.exports={moduleType:\"trace\",name:\"funnelarea\",basePlotModule:tPe(),categories:[\"pie-like\",\"funnelarea\",\"showLegend\"],attributes:yX(),layoutAttributes:_X(),supplyDefaults:sPe(),supplyLayoutDefaults:uPe(),calc:xX().calc,crossTraceCalc:xX().crossTraceCalc,plot:gPe(),style:_Pe(),styleOne:X3(),meta:{}}});var TPe=ye(($0r,wPe)=>{\"use strict\";wPe.exports=bPe()});var zd=ye((Q0r,APe)=>{(function(){var e={24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+d*v+h*_,o[1]=s[1],o[2]=f+d*_-h*v,o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},216:function(i){\"use strict\";i.exports=a;function a(o,s){for(var l={},u=0;u<o.length;++u)for(var c=o[u].name,f=c.split(\".\"),h=l,d=0;d<f.length;++d){var v=f[d].split(\"[\");if(v.length>1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var _=1;_<v.length;++_){var b=parseInt(v[_]);_<v.length-1||d<f.length-1?(b in h||(_<v.length-1?h[b]=[]:h[b]={}),h=h[b]):s?h[b]=u:h[b]=o[u].type}}else d<f.length-1?(v[0]in h||(h[v[0]]={}),h=h[v[0]]):s?h[v[0]]=u:h[v[0]]=o[u].type}return l}},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!=\"object\"||c===null)&&typeof c!=\"function\")throw new Error(\"Weakmap-shim: Key must be object\");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],_=l[3],b=_*u+d*f-v*c,p=_*c+v*u-h*f,k=_*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*_+E*-h+p*-v-k*-d,o[1]=p*_+E*-d+k*-h-b*-v,o[2]=k*_+E*-v+b*-d-p*-h,o}},332:function(i,a,o){\"use strict\";i.exports=z;var s=o(1755),l=o(6867),u=o(1125),c=o(7842),f=o(1318),h=o(946),d=o(5838),v=o(1278),_=o(3637);function b(O){var U=h(O);return[v(U,-1/0),v(U,1/0)]}function p(O,U){for(var G=new Array(U.length),Z=0;Z<U.length;++Z){var j=U[Z],N=O[j[0]],H=O[j[1]];G[Z]=[v(Math.min(N[0],H[0]),-1/0),v(Math.min(N[1],H[1]),-1/0),v(Math.max(N[0],H[0]),1/0),v(Math.max(N[1],H[1]),1/0)]}return G}function k(O){for(var U=new Array(O.length),G=0;G<O.length;++G){var Z=O[G];U[G]=[v(Z[0],-1/0),v(Z[1],-1/0),v(Z[0],1/0),v(Z[1],1/0)]}return U}function E(O,U,G){var Z=[];return l(G,function(j,N){var H=U[j],re=U[N];if(!(H[0]===re[0]||H[0]===re[1]||H[1]===re[0]||H[1]===re[1])){var oe=O[H[0]],_e=O[H[1]],Ce=O[re[0]],Le=O[re[1]];u(oe,_e,Ce,Le)&&Z.push([j,N])}}),Z}function T(O,U,G,Z){var j=[];return l(G,Z,function(N,H){var re=U[N];if(!(re[0]===H||re[1]===H)){var oe=O[H],_e=O[re[0]],Ce=O[re[1]];u(_e,Ce,oe,oe)&&j.push([N,H])}}),j}function L(O,U,G,Z,j){var N,H,re=O.map(function(pt){return[c(pt[0]),c(pt[1])]});for(N=0;N<G.length;++N){var oe=G[N];H=oe[0];var _e=oe[1],Ce=U[H],Le=U[_e],ge=_(d(O[Ce[0]]),d(O[Ce[1]]),d(O[Le[0]]),d(O[Le[1]]));if(ge){var ie=O.length;O.push([h(ge[0]),h(ge[1])]),re.push(ge),Z.push([H,ie],[_e,ie])}}for(Z.sort(function(pt,Vt){if(pt[0]!==Vt[0])return pt[0]-Vt[0];var ot=re[pt[1]],ut=re[Vt[1]];return f(ot[0],ut[0])||f(ot[1],ut[1])}),N=Z.length-1;N>=0;--N){var Se=Z[N];H=Se[0];var Ee=U[H],Ae=Ee[0],Be=Ee[1],Pe=O[Ae],me=O[Be];if((Pe[0]-me[0]||Pe[1]-me[1])<0){var De=Ae;Ae=Be,Be=De}Ee[0]=Ae;var ce=Ee[1]=Se[1],je;for(j&&(je=Ee[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],lt=Se[1];j?U.push([ce,lt,je]):U.push([ce,lt]),ce=lt}j?U.push([ce,Be,je]):U.push([ce,Be])}return re}function x(O,U,G){for(var Z=U.length,j=new s(Z),N=[],H=0;H<U.length;++H){var re=U[H],oe=b(re[0]),_e=b(re[1]);N.push([v(oe[0],-1/0),v(_e[0],-1/0),v(oe[1],1/0),v(_e[1],1/0)])}l(N,function(Se,Ee){j.link(Se,Ee)});for(var Ce=!0,Le=new Array(Z),H=0;H<Z;++H){var ge=j.find(H);ge!==H&&(Ce=!1,O[ge]=[Math.min(O[H][0],O[ge][0]),Math.min(O[H][1],O[ge][1])])}if(Ce)return null;for(var ie=0,H=0;H<Z;++H){var ge=j.find(H);ge===H?(Le[H]=ie,O[ie++]=O[H]):Le[H]=-1}O.length=ie;for(var H=0;H<Z;++H)Le[H]<0&&(Le[H]=Le[j.find(H)]);return Le}function C(O,U){return O[0]-U[0]||O[1]-U[1]}function M(O,U){var G=O[0]-U[0]||O[1]-U[1];return G||(O[2]<U[2]?-1:O[2]>U[2]?1:0)}function g(O,U,G){if(O.length!==0){if(U)for(var Z=0;Z<O.length;++Z){var j=O[Z],N=U[j[0]],H=U[j[1]];j[0]=Math.min(N,H),j[1]=Math.max(N,H)}else for(var Z=0;Z<O.length;++Z){var j=O[Z],N=j[0],H=j[1];j[0]=Math.min(N,H),j[1]=Math.max(N,H)}G?O.sort(M):O.sort(C);for(var re=1,Z=1;Z<O.length;++Z){var oe=O[Z-1],_e=O[Z];_e[0]===oe[0]&&_e[1]===oe[1]&&(!G||_e[2]===oe[2])||(O[re++]=_e)}O.length=re}}function P(O,U,G){var Z=x(O,[],k(O));return g(U,Z,G),!!Z}function A(O,U,G){var Z=p(O,U),j=E(O,U,Z),N=k(O),H=T(O,U,Z,N),re=L(O,U,j,H,G),oe=x(O,re,N);return g(U,oe,G),oe?!0:j.length>0||H.length>0}function z(O,U,G){var Z;if(G){Z=U;for(var j=new Array(U.length),N=0;N<U.length;++N){var H=U[N];j[N]=[H[0],H[1],G[N]]}U=j}for(var re=P(O,U,!!G);A(O,U,!!G);)re=!0;if(G&&re){Z.length=0,G.length=0;for(var N=0;N<U.length;++N){var H=U[N];Z.push([H[0],H[1]]),G.push(H[2])}}return re}},351:function(i,a,o){\"use strict\";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},_=!1;function b(A){var z=!1;return\"altKey\"in A&&(z=z||A.altKey!==v.alt,v.alt=!!A.altKey),\"shiftKey\"in A&&(z=z||A.shiftKey!==v.shift,v.shift=!!A.shiftKey),\"ctrlKey\"in A&&(z=z||A.ctrlKey!==v.control,v.control=!!A.ctrlKey),\"metaKey\"in A&&(z=z||A.metaKey!==v.meta,v.meta=!!A.metaKey),z}function p(A,z){var O=s.x(z),U=s.y(z);\"buttons\"in z&&(A=z.buttons|0),(A!==f||O!==h||U!==d||b(z))&&(f=A|0,h=O||0,d=U||0,c&&c(f,h,d,v))}function k(A){p(0,A)}function E(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function T(A){b(A)&&c&&c(f,h,d,v)}function L(A){s.buttons(A)===0?p(0,A):p(f,A)}function x(A){p(f|s.buttons(A),A)}function C(A){p(f&~s.buttons(A),A)}function M(){_||(_=!0,u.addEventListener(\"mousemove\",L),u.addEventListener(\"mousedown\",x),u.addEventListener(\"mouseup\",C),u.addEventListener(\"mouseleave\",k),u.addEventListener(\"mouseenter\",k),u.addEventListener(\"mouseout\",k),u.addEventListener(\"mouseover\",k),u.addEventListener(\"blur\",E),u.addEventListener(\"keyup\",T),u.addEventListener(\"keydown\",T),u.addEventListener(\"keypress\",T),u!==window&&(window.addEventListener(\"blur\",E),window.addEventListener(\"keyup\",T),window.addEventListener(\"keydown\",T),window.addEventListener(\"keypress\",T)))}function g(){_&&(_=!1,u.removeEventListener(\"mousemove\",L),u.removeEventListener(\"mousedown\",x),u.removeEventListener(\"mouseup\",C),u.removeEventListener(\"mouseleave\",k),u.removeEventListener(\"mouseenter\",k),u.removeEventListener(\"mouseout\",k),u.removeEventListener(\"mouseover\",k),u.removeEventListener(\"blur\",E),u.removeEventListener(\"keyup\",T),u.removeEventListener(\"keydown\",T),u.removeEventListener(\"keypress\",T),u!==window&&(window.removeEventListener(\"blur\",E),window.removeEventListener(\"keyup\",T),window.removeEventListener(\"keydown\",T),window.removeEventListener(\"keypress\",T)))}M();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return _},set:function(A){A?M():g()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},446:function(i,a,o){\"use strict\";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(\":\"),_=l[v];return _||(l[v]=_=s(f,h)),_(c),c}i.exports=u},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},501:function(i,a,o){\"use strict\";i.exports=E;var s=o(2762),l=o(8116),u=o(1879).n,c=[0,0,0],f=[0,0,0],h=[0,0,0],d=[0,0,0],v=[1,1];function _(T){return T[0]=T[1]=T[2]=0,T}function b(T,L){return T[0]=L[0],T[1]=L[1],T[2]=L[2],T}function p(T,L,x,C,M,g,P,A){this.gl=T,this.vertBuffer=L,this.vao=x,this.shader=C,this.tickCount=M,this.tickOffset=g,this.gridCount=P,this.gridOffset=A}var k=p.prototype;k.bind=function(T,L,x){this.shader.bind(),this.shader.uniforms.model=T,this.shader.uniforms.view=L,this.shader.uniforms.projection=x,v[0]=this.gl.drawingBufferWidth,v[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=v,this.vao.bind()},k.unbind=function(){this.vao.unbind()},k.drawAxisLine=function(T,L,x,C,M){var g=_(f);this.shader.uniforms.majorAxis=f,g[T]=L[1][T]-L[0][T],this.shader.uniforms.minorAxis=g;var P=b(d,x);P[T]+=L[0][T],this.shader.uniforms.offset=P,this.shader.uniforms.lineWidth=M,this.shader.uniforms.color=C;var A=_(h);A[(T+2)%3]=1,this.shader.uniforms.screenAxis=A,this.vao.draw(this.gl.TRIANGLES,6);var A=_(h);A[(T+1)%3]=1,this.shader.uniforms.screenAxis=A,this.vao.draw(this.gl.TRIANGLES,6)},k.drawAxisTicks=function(T,L,x,C,M){if(this.tickCount[T]){var g=_(c);g[T]=1,this.shader.uniforms.majorAxis=g,this.shader.uniforms.offset=L,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=C,this.shader.uniforms.lineWidth=M;var P=_(h);P[T]=1,this.shader.uniforms.screenAxis=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[T],this.tickOffset[T])}},k.drawGrid=function(T,L,x,C,M,g){if(this.gridCount[T]){var P=_(f);P[L]=x[1][L]-x[0][L],this.shader.uniforms.minorAxis=P;var A=b(d,C);A[L]+=x[0][L],this.shader.uniforms.offset=A;var z=_(c);z[T]=1,this.shader.uniforms.majorAxis=z;var O=_(h);O[T]=1,this.shader.uniforms.screenAxis=O,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=M,this.vao.draw(this.gl.TRIANGLES,this.gridCount[T],this.gridOffset[T])}},k.drawZero=function(T,L,x,C,M,g){var P=_(f);this.shader.uniforms.majorAxis=P,P[T]=x[1][T]-x[0][T],this.shader.uniforms.minorAxis=P;var A=b(d,C);A[T]+=x[0][T],this.shader.uniforms.offset=A;var z=_(h);z[L]=1,this.shader.uniforms.screenAxis=z,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=M,this.vao.draw(this.gl.TRIANGLES,6)},k.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function E(T,L,x){var C=[],M=[0,0,0],g=[0,0,0],P=[0,0,0],A=[0,0,0];C.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var z=0;z<3;++z){for(var G=C.length/3|0,O=0;O<x[z].length;++O){var U=+x[z][O].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var j=C.length/3|0;M[z]=G,g[z]=j-G;for(var G=C.length/3|0,Z=0;Z<x[z].length;++Z){var U=+x[z][Z].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var j=C.length/3|0;P[z]=G,A[z]=j-G}var N=s(T,new Float32Array(C)),H=l(T,[{buffer:N,type:T.FLOAT,size:3,stride:0,offset:0}]),re=u(T);return re.attributes.position.location=0,new p(T,N,H,re,g,M,A,P)}},544:function(i,a,o){\"use strict\";var s=o(5572);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty(\"value\")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return\"value\"in u(c)},delete:function(c){return delete u(c).value}}}},614:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 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|| > 0  U  ||b|| > 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 > v.z*v.z || v.y*v.y > 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",
       "//\n",
       "vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n",
       "\n",
       "  const float segmentCount = 8.0;\n",
       "\n",
       "  float index = rawIndex - floor(rawIndex /\n",
       "    (segmentCount * 6.0)) *\n",
       "    (segmentCount * 6.0);\n",
       "\n",
       "  float segment = floor(0.001 + index/6.0);\n",
       "  float segmentIndex = index - (segment*6.0);\n",
       "\n",
       "  normal = -normalize(d);\n",
       "\n",
       "  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n",
       "    return mix(vec3(0.0), -d, coneOffset);\n",
       "  }\n",
       "\n",
       "  float nextAngle = (\n",
       "    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n",
       "    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n",
       "  ) ? 1.0 : 0.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 < 3.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",
       "\n",
       "attribute vec3 vector;\n",
       "attribute vec4 color, position;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform float vectorScale, coneScale, coneOffset;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 eyePosition, lightPosition;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  // Scale the vector magnitude to stay constant with\n",
       "  // model & view changes.\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n",
       "  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * conePosition;\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  // vec4 m_position  = model * vec4(conePosition, 1.0);\n",
       "  vec4 t_position  = view * conePosition;\n",
       "  gl_Position      = projection * t_position;\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = conePosition.xyz;\n",
       "  f_position       = position.xyz;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float 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",
       "\n",
       "float 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",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\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 = min(1.0, max(0.0, 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",
       "`]),c=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 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|| > 0  U  ||b|| > 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 > v.z*v.z || v.y*v.y > 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",
       "//\n",
       "vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n",
       "\n",
       "  const float segmentCount = 8.0;\n",
       "\n",
       "  float index = rawIndex - floor(rawIndex /\n",
       "    (segmentCount * 6.0)) *\n",
       "    (segmentCount * 6.0);\n",
       "\n",
       "  float segment = floor(0.001 + index/6.0);\n",
       "  float segmentIndex = index - (segment*6.0);\n",
       "\n",
       "  normal = -normalize(d);\n",
       "\n",
       "  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n",
       "    return mix(vec3(0.0), -d, coneOffset);\n",
       "  }\n",
       "\n",
       "  float nextAngle = (\n",
       "    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n",
       "    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n",
       "  ) ? 1.0 : 0.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 < 3.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",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float vectorScale, coneScale, coneOffset;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n",
       "  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "  gl_Position = projection * (view * conePosition);\n",
       "  f_id        = id;\n",
       "  f_position  = position.xyz;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec3\"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec3\"}]}},620:function(i){i.exports=[\"precision\",\"highp\",\"mediump\",\"lowp\",\"attribute\",\"const\",\"uniform\",\"varying\",\"break\",\"continue\",\"do\",\"for\",\"while\",\"if\",\"else\",\"in\",\"out\",\"inout\",\"float\",\"int\",\"uint\",\"void\",\"bool\",\"true\",\"false\",\"discard\",\"return\",\"mat2\",\"mat3\",\"mat4\",\"vec2\",\"vec3\",\"vec4\",\"ivec2\",\"ivec3\",\"ivec4\",\"bvec2\",\"bvec3\",\"bvec4\",\"sampler1D\",\"sampler2D\",\"sampler3D\",\"samplerCube\",\"sampler1DShadow\",\"sampler2DShadow\",\"struct\",\"asm\",\"class\",\"union\",\"enum\",\"typedef\",\"template\",\"this\",\"packed\",\"goto\",\"switch\",\"default\",\"inline\",\"noinline\",\"volatile\",\"public\",\"static\",\"extern\",\"external\",\"interface\",\"long\",\"short\",\"double\",\"half\",\"fixed\",\"unsigned\",\"input\",\"output\",\"hvec2\",\"hvec3\",\"hvec4\",\"dvec2\",\"dvec3\",\"dvec4\",\"fvec2\",\"fvec3\",\"fvec4\",\"sampler2DRect\",\"sampler3DRect\",\"sampler2DRectShadow\",\"sizeof\",\"cast\",\"namespace\",\"using\"]},665:function(i,a,o){\"use strict\";var s=o(3202);i.exports=f;var l=96;function u(h,d){var v=s(getComputedStyle(h).getPropertyValue(d));return v[0]*f(v[1],h)}function c(h,d){var v=document.createElement(\"div\");v.style[\"font-size\"]=\"128\"+h,d.appendChild(v);var _=u(v,\"font-size\")/128;return d.removeChild(v),_}function f(h,d){switch(d=d||document.body,h=(h||\"px\").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case\"%\":return d.clientHeight/100;case\"ch\":case\"ex\":return c(h,d);case\"em\":return u(d,\"font-size\");case\"rem\":return u(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return l;case\"cm\":return l/2.54;case\"mm\":return l/25.4;case\"pt\":return l/72;case\"pc\":return l/6}return 1}},727:function(i,a,o){\"use strict\";var s=o(2962),l=6;function u(T){var L=T===2?h:T===3?d:T===4?v:T===5?_:b;return T<6?L(s[T]):L(s)}function c(){return[[0]]}function f(T,L){return[[L[0]],[T[0][0]]]}function h(T){return function(x,C){return[T([[+C[0],+x[0][1]],[+C[1],+x[1][1]]]),T([[+x[0][0],+C[0]],[+x[1][0],+C[1]]]),T(x)]}}function d(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2]],[+C[1],+x[1][1],+x[1][2]],[+C[2],+x[2][1],+x[2][2]]]),T([[+x[0][0],+C[0],+x[0][2]],[+x[1][0],+C[1],+x[1][2]],[+x[2][0],+C[2],+x[2][2]]]),T([[+x[0][0],+x[0][1],+C[0]],[+x[1][0],+x[1][1],+C[1]],[+x[2][0],+x[2][1],+C[2]]]),T(x)]}}function v(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3]],[+C[1],+x[1][1],+x[1][2],+x[1][3]],[+C[2],+x[2][1],+x[2][2],+x[2][3]],[+C[3],+x[3][1],+x[3][2],+x[3][3]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3]],[+x[1][0],+C[1],+x[1][2],+x[1][3]],[+x[2][0],+C[2],+x[2][2],+x[2][3]],[+x[3][0],+C[3],+x[3][2],+x[3][3]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3]],[+x[1][0],+x[1][1],+C[1],+x[1][3]],[+x[2][0],+x[2][1],+C[2],+x[2][3]],[+x[3][0],+x[3][1],+C[3],+x[3][3]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+C[3]]]),T(x)]}}function _(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4]]]),T(x)]}}function b(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+C[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+C[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+C[5],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+C[5],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+C[5],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+C[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+C[5]]]),T(x)]}}var p=[c,f];function k(T,L,x,C,M,g,P,A){return function(O,U){switch(O.length){case 0:return T(O,U);case 1:return L(O,U);case 2:return x(O,U);case 3:return C(O,U);case 4:return M(O,U);case 5:return g(O,U)}var G=P[O.length];return G||(G=P[O.length]=A(O.length)),G(O,U)}}function E(){for(;p.length<l;)p.push(u(p.length));i.exports=k.apply(void 0,p.concat([p,u]));for(var T=0;T<l;++T)i.exports[T]=p[T]}E()},737:function(i){i.exports={0:\"NONE\",1:\"ONE\",2:\"LINE_LOOP\",3:\"LINE_STRIP\",4:\"TRIANGLES\",5:\"TRIANGLE_STRIP\",6:\"TRIANGLE_FAN\",256:\"DEPTH_BUFFER_BIT\",512:\"NEVER\",513:\"LESS\",514:\"EQUAL\",515:\"LEQUAL\",516:\"GREATER\",517:\"NOTEQUAL\",518:\"GEQUAL\",519:\"ALWAYS\",768:\"SRC_COLOR\",769:\"ONE_MINUS_SRC_COLOR\",770:\"SRC_ALPHA\",771:\"ONE_MINUS_SRC_ALPHA\",772:\"DST_ALPHA\",773:\"ONE_MINUS_DST_ALPHA\",774:\"DST_COLOR\",775:\"ONE_MINUS_DST_COLOR\",776:\"SRC_ALPHA_SATURATE\",1024:\"STENCIL_BUFFER_BIT\",1028:\"FRONT\",1029:\"BACK\",1032:\"FRONT_AND_BACK\",1280:\"INVALID_ENUM\",1281:\"INVALID_VALUE\",1282:\"INVALID_OPERATION\",1285:\"OUT_OF_MEMORY\",1286:\"INVALID_FRAMEBUFFER_OPERATION\",2304:\"CW\",2305:\"CCW\",2849:\"LINE_WIDTH\",2884:\"CULL_FACE\",2885:\"CULL_FACE_MODE\",2886:\"FRONT_FACE\",2928:\"DEPTH_RANGE\",2929:\"DEPTH_TEST\",2930:\"DEPTH_WRITEMASK\",2931:\"DEPTH_CLEAR_VALUE\",2932:\"DEPTH_FUNC\",2960:\"STENCIL_TEST\",2961:\"STENCIL_CLEAR_VALUE\",2962:\"STENCIL_FUNC\",2963:\"STENCIL_VALUE_MASK\",2964:\"STENCIL_FAIL\",2965:\"STENCIL_PASS_DEPTH_FAIL\",2966:\"STENCIL_PASS_DEPTH_PASS\",2967:\"STENCIL_REF\",2968:\"STENCIL_WRITEMASK\",2978:\"VIEWPORT\",3024:\"DITHER\",3042:\"BLEND\",3088:\"SCISSOR_BOX\",3089:\"SCISSOR_TEST\",3106:\"COLOR_CLEAR_VALUE\",3107:\"COLOR_WRITEMASK\",3317:\"UNPACK_ALIGNMENT\",3333:\"PACK_ALIGNMENT\",3379:\"MAX_TEXTURE_SIZE\",3386:\"MAX_VIEWPORT_DIMS\",3408:\"SUBPIXEL_BITS\",3410:\"RED_BITS\",3411:\"GREEN_BITS\",3412:\"BLUE_BITS\",3413:\"ALPHA_BITS\",3414:\"DEPTH_BITS\",3415:\"STENCIL_BITS\",3553:\"TEXTURE_2D\",4352:\"DONT_CARE\",4353:\"FASTEST\",4354:\"NICEST\",5120:\"BYTE\",5121:\"UNSIGNED_BYTE\",5122:\"SHORT\",5123:\"UNSIGNED_SHORT\",5124:\"INT\",5125:\"UNSIGNED_INT\",5126:\"FLOAT\",5386:\"INVERT\",5890:\"TEXTURE\",6401:\"STENCIL_INDEX\",6402:\"DEPTH_COMPONENT\",6406:\"ALPHA\",6407:\"RGB\",6408:\"RGBA\",6409:\"LUMINANCE\",6410:\"LUMINANCE_ALPHA\",7680:\"KEEP\",7681:\"REPLACE\",7682:\"INCR\",7683:\"DECR\",7936:\"VENDOR\",7937:\"RENDERER\",7938:\"VERSION\",9728:\"NEAREST\",9729:\"LINEAR\",9984:\"NEAREST_MIPMAP_NEAREST\",9985:\"LINEAR_MIPMAP_NEAREST\",9986:\"NEAREST_MIPMAP_LINEAR\",9987:\"LINEAR_MIPMAP_LINEAR\",10240:\"TEXTURE_MAG_FILTER\",10241:\"TEXTURE_MIN_FILTER\",10242:\"TEXTURE_WRAP_S\",10243:\"TEXTURE_WRAP_T\",10497:\"REPEAT\",10752:\"POLYGON_OFFSET_UNITS\",16384:\"COLOR_BUFFER_BIT\",32769:\"CONSTANT_COLOR\",32770:\"ONE_MINUS_CONSTANT_COLOR\",32771:\"CONSTANT_ALPHA\",32772:\"ONE_MINUS_CONSTANT_ALPHA\",32773:\"BLEND_COLOR\",32774:\"FUNC_ADD\",32777:\"BLEND_EQUATION_RGB\",32778:\"FUNC_SUBTRACT\",32779:\"FUNC_REVERSE_SUBTRACT\",32819:\"UNSIGNED_SHORT_4_4_4_4\",32820:\"UNSIGNED_SHORT_5_5_5_1\",32823:\"POLYGON_OFFSET_FILL\",32824:\"POLYGON_OFFSET_FACTOR\",32854:\"RGBA4\",32855:\"RGB5_A1\",32873:\"TEXTURE_BINDING_2D\",32926:\"SAMPLE_ALPHA_TO_COVERAGE\",32928:\"SAMPLE_COVERAGE\",32936:\"SAMPLE_BUFFERS\",32937:\"SAMPLES\",32938:\"SAMPLE_COVERAGE_VALUE\",32939:\"SAMPLE_COVERAGE_INVERT\",32968:\"BLEND_DST_RGB\",32969:\"BLEND_SRC_RGB\",32970:\"BLEND_DST_ALPHA\",32971:\"BLEND_SRC_ALPHA\",33071:\"CLAMP_TO_EDGE\",33170:\"GENERATE_MIPMAP_HINT\",33189:\"DEPTH_COMPONENT16\",33306:\"DEPTH_STENCIL_ATTACHMENT\",33635:\"UNSIGNED_SHORT_5_6_5\",33648:\"MIRRORED_REPEAT\",33901:\"ALIASED_POINT_SIZE_RANGE\",33902:\"ALIASED_LINE_WIDTH_RANGE\",33984:\"TEXTURE0\",33985:\"TEXTURE1\",33986:\"TEXTURE2\",33987:\"TEXTURE3\",33988:\"TEXTURE4\",33989:\"TEXTURE5\",33990:\"TEXTURE6\",33991:\"TEXTURE7\",33992:\"TEXTURE8\",33993:\"TEXTURE9\",33994:\"TEXTURE10\",33995:\"TEXTURE11\",33996:\"TEXTURE12\",33997:\"TEXTURE13\",33998:\"TEXTURE14\",33999:\"TEXTURE15\",34e3:\"TEXTURE16\",34001:\"TEXTURE17\",34002:\"TEXTURE18\",34003:\"TEXTURE19\",34004:\"TEXTURE20\",34005:\"TEXTURE21\",34006:\"TEXTURE22\",34007:\"TEXTURE23\",34008:\"TEXTURE24\",34009:\"TEXTURE25\",34010:\"TEXTURE26\",34011:\"TEXTURE27\",34012:\"TEXTURE28\",34013:\"TEXTURE29\",34014:\"TEXTURE30\",34015:\"TEXTURE31\",34016:\"ACTIVE_TEXTURE\",34024:\"MAX_RENDERBUFFER_SIZE\",34041:\"DEPTH_STENCIL\",34055:\"INCR_WRAP\",34056:\"DECR_WRAP\",34067:\"TEXTURE_CUBE_MAP\",34068:\"TEXTURE_BINDING_CUBE_MAP\",34069:\"TEXTURE_CUBE_MAP_POSITIVE_X\",34070:\"TEXTURE_CUBE_MAP_NEGATIVE_X\",34071:\"TEXTURE_CUBE_MAP_POSITIVE_Y\",34072:\"TEXTURE_CUBE_MAP_NEGATIVE_Y\",34073:\"TEXTURE_CUBE_MAP_POSITIVE_Z\",34074:\"TEXTURE_CUBE_MAP_NEGATIVE_Z\",34076:\"MAX_CUBE_MAP_TEXTURE_SIZE\",34338:\"VERTEX_ATTRIB_ARRAY_ENABLED\",34339:\"VERTEX_ATTRIB_ARRAY_SIZE\",34340:\"VERTEX_ATTRIB_ARRAY_STRIDE\",34341:\"VERTEX_ATTRIB_ARRAY_TYPE\",34342:\"CURRENT_VERTEX_ATTRIB\",34373:\"VERTEX_ATTRIB_ARRAY_POINTER\",34466:\"NUM_COMPRESSED_TEXTURE_FORMATS\",34467:\"COMPRESSED_TEXTURE_FORMATS\",34660:\"BUFFER_SIZE\",34661:\"BUFFER_USAGE\",34816:\"STENCIL_BACK_FUNC\",34817:\"STENCIL_BACK_FAIL\",34818:\"STENCIL_BACK_PASS_DEPTH_FAIL\",34819:\"STENCIL_BACK_PASS_DEPTH_PASS\",34877:\"BLEND_EQUATION_ALPHA\",34921:\"MAX_VERTEX_ATTRIBS\",34922:\"VERTEX_ATTRIB_ARRAY_NORMALIZED\",34930:\"MAX_TEXTURE_IMAGE_UNITS\",34962:\"ARRAY_BUFFER\",34963:\"ELEMENT_ARRAY_BUFFER\",34964:\"ARRAY_BUFFER_BINDING\",34965:\"ELEMENT_ARRAY_BUFFER_BINDING\",34975:\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\",35040:\"STREAM_DRAW\",35044:\"STATIC_DRAW\",35048:\"DYNAMIC_DRAW\",35632:\"FRAGMENT_SHADER\",35633:\"VERTEX_SHADER\",35660:\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\",35661:\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\",35663:\"SHADER_TYPE\",35664:\"FLOAT_VEC2\",35665:\"FLOAT_VEC3\",35666:\"FLOAT_VEC4\",35667:\"INT_VEC2\",35668:\"INT_VEC3\",35669:\"INT_VEC4\",35670:\"BOOL\",35671:\"BOOL_VEC2\",35672:\"BOOL_VEC3\",35673:\"BOOL_VEC4\",35674:\"FLOAT_MAT2\",35675:\"FLOAT_MAT3\",35676:\"FLOAT_MAT4\",35678:\"SAMPLER_2D\",35680:\"SAMPLER_CUBE\",35712:\"DELETE_STATUS\",35713:\"COMPILE_STATUS\",35714:\"LINK_STATUS\",35715:\"VALIDATE_STATUS\",35716:\"INFO_LOG_LENGTH\",35717:\"ATTACHED_SHADERS\",35718:\"ACTIVE_UNIFORMS\",35719:\"ACTIVE_UNIFORM_MAX_LENGTH\",35720:\"SHADER_SOURCE_LENGTH\",35721:\"ACTIVE_ATTRIBUTES\",35722:\"ACTIVE_ATTRIBUTE_MAX_LENGTH\",35724:\"SHADING_LANGUAGE_VERSION\",35725:\"CURRENT_PROGRAM\",36003:\"STENCIL_BACK_REF\",36004:\"STENCIL_BACK_VALUE_MASK\",36005:\"STENCIL_BACK_WRITEMASK\",36006:\"FRAMEBUFFER_BINDING\",36007:\"RENDERBUFFER_BINDING\",36048:\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\",36049:\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\",36050:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\",36051:\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\",36053:\"FRAMEBUFFER_COMPLETE\",36054:\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\",36055:\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\",36057:\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\",36061:\"FRAMEBUFFER_UNSUPPORTED\",36064:\"COLOR_ATTACHMENT0\",36096:\"DEPTH_ATTACHMENT\",36128:\"STENCIL_ATTACHMENT\",36160:\"FRAMEBUFFER\",36161:\"RENDERBUFFER\",36162:\"RENDERBUFFER_WIDTH\",36163:\"RENDERBUFFER_HEIGHT\",36164:\"RENDERBUFFER_INTERNAL_FORMAT\",36168:\"STENCIL_INDEX8\",36176:\"RENDERBUFFER_RED_SIZE\",36177:\"RENDERBUFFER_GREEN_SIZE\",36178:\"RENDERBUFFER_BLUE_SIZE\",36179:\"RENDERBUFFER_ALPHA_SIZE\",36180:\"RENDERBUFFER_DEPTH_SIZE\",36181:\"RENDERBUFFER_STENCIL_SIZE\",36194:\"RGB565\",36336:\"LOW_FLOAT\",36337:\"MEDIUM_FLOAT\",36338:\"HIGH_FLOAT\",36339:\"LOW_INT\",36340:\"MEDIUM_INT\",36341:\"HIGH_INT\",36346:\"SHADER_COMPILER\",36347:\"MAX_VERTEX_UNIFORM_VECTORS\",36348:\"MAX_VARYING_VECTORS\",36349:\"MAX_FRAGMENT_UNIFORM_VECTORS\",37440:\"UNPACK_FLIP_Y_WEBGL\",37441:\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\",37442:\"CONTEXT_LOST_WEBGL\",37443:\"UNPACK_COLORSPACE_CONVERSION_WEBGL\",37444:\"BROWSER_DEFAULT_WEBGL\"}},781:function(i,a,o){\"use strict\";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},783:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3],v=l[0],_=l[1],b=l[2],p=l[3],k,E,T,L,x;return E=c*v+f*_+h*b+d*p,E<0&&(E=-E,v=-v,_=-_,b=-b,p=-p),1-E>1e-6?(k=Math.acos(E),T=Math.sin(k),L=Math.sin((1-u)*k)/T,x=Math.sin(u*k)/T):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*_,o[2]=L*h+x*b,o[3]=L*d+x*p,o}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "attribute vec2 position;\n",
       "varying vec2 uv;\n",
       "void main() {\n",
       "  uv = position;\n",
       "  gl_Position = vec4(position, 0, 1);\n",
       "}`]),c=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform sampler2D accumBuffer;\n",
       "varying vec2 uv;\n",
       "\n",
       "void main() {\n",
       "  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n",
       "  gl_FragColor = min(vec4(1,1,1,1), accum);\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec2\"}])}},811:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, normal;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform mat4 model\n",
       "           , view\n",
       "           , projection\n",
       "           , inverseModel;\n",
       "uniform vec3 eyePosition\n",
       "           , lightPosition;\n",
       "\n",
       "varying vec3 f_normal\n",
       "           , f_lightDirection\n",
       "           , f_eyeDirection\n",
       "           , f_data;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "vec4 project(vec3 p) {\n",
       "  return projection * (view * (model * vec4(p, 1.0)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  gl_Position      = project(position);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * vec4(position , 1.0);\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = position;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float 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",
       "\n",
       "float 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",
       "\n",
       "//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness\n",
       "            , fresnel\n",
       "            , kambient\n",
       "            , kdiffuse\n",
       "            , kspecular;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal\n",
       "           , f_lightDirection\n",
       "           , f_eyeDirection\n",
       "           , f_data;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (f_color.a == 0.0 ||\n",
       "    outOfRange(clipBounds[0], clipBounds[1], f_data)\n",
       "  ) discard;\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 = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n",
       "  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n",
       "\n",
       "  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n",
       "\n",
       "  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * 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 * f_color.a;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec3 f_data;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "  f_color = color;\n",
       "  f_data  = position;\n",
       "  f_uv    = uv;\n",
       "}`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform sampler2D texture;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec3 f_data;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n",
       "\n",
       "  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n",
       "}`]),h=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 uv;\n",
       "attribute float pointSize;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0.0, 0.0 ,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",
       "}`]),d=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform sampler2D texture;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n",
       "  if(dot(pointR, pointR) > 0.25) {\n",
       "    discard;\n",
       "  }\n",
       "  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n",
       "}`]),v=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "  f_id        = id;\n",
       "  f_position  = position;\n",
       "}`]),_=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]),b=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3  position;\n",
       "attribute float pointSize;\n",
       "attribute vec4  id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0.0, 0.0, 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",
       "}`]),p=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "void main() {\n",
       "  gl_Position = projection * (view * (model * vec4(position, 1.0)));\n",
       "}`]),k=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec3 contourColor;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = vec4(contourColor, 1.0);\n",
       "}\n",
       "`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"pointSize\",type:\"float\"}]},a.pickShader={vertex:v,fragment:_,attributes:[{name:\"position\",type:\"vec3\"},{name:\"id\",type:\"vec4\"}]},a.pointPickShader={vertex:b,fragment:_,attributes:[{name:\"position\",type:\"vec3\"},{name:\"pointSize\",type:\"float\"},{name:\"id\",type:\"vec4\"}]},a.contourShader={vertex:p,fragment:k,attributes:[{name:\"position\",type:\"vec3\"}]}},855:function(i,a,o){\"use strict\";i.exports={init:E,sweepBipartite:x,sweepComplete:C,scanBipartite:M,scanComplete:g};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),v=s.mallocInt32(f),_=s.mallocInt32(f),b=s.mallocInt32(f),p=s.mallocInt32(f),k=s.mallocDouble(f*8);function E(P){var A=l.nextPow2(P);h.length<A&&(s.free(h),h=s.mallocInt32(A)),d.length<A&&(s.free(d),d=s.mallocInt32(A)),v.length<A&&(s.free(v),v=s.mallocInt32(A)),_.length<A&&(s.free(_),_=s.mallocInt32(A)),b.length<A&&(s.free(b),b=s.mallocInt32(A)),p.length<A&&(s.free(p),p=s.mallocInt32(A));var z=8*A;k.length<z&&(s.free(k),k=s.mallocDouble(z))}function T(P,A,z,O){var U=A[O],G=P[z-1];P[U]=G,A[G]=U}function L(P,A,z,O){P[z]=O,A[O]=z}function x(P,A,z,O,U,G,Z,j,N,H){for(var re=0,oe=2*P,_e=P-1,Ce=oe-1,Le=z;Le<O;++Le){var ge=G[Le],ie=oe*Le;k[re++]=U[ie+_e],k[re++]=-(ge+1),k[re++]=U[ie+Ce],k[re++]=ge}for(var Le=Z;Le<j;++Le){var ge=H[Le]+c,Se=oe*Le;k[re++]=N[Se+_e],k[re++]=-ge,k[re++]=N[Se+Ce],k[re++]=ge}var Ee=re>>>1;u(k,Ee);for(var Ae=0,Be=0,Le=0;Le<Ee;++Le){var Pe=k[2*Le+1]|0;if(Pe>=c)Pe=Pe-c|0,T(v,_,Be--,Pe);else if(Pe>=0)T(h,d,Ae--,Pe);else if(Pe<=-c){Pe=-Pe-c|0;for(var me=0;me<Ae;++me){var De=A(h[me],Pe);if(De!==void 0)return De}L(v,_,Be++,Pe)}else{Pe=-Pe-1|0;for(var me=0;me<Be;++me){var De=A(Pe,v[me]);if(De!==void 0)return De}L(h,d,Ae++,Pe)}}}function C(P,A,z,O,U,G,Z,j,N,H){for(var re=0,oe=2*P,_e=P-1,Ce=oe-1,Le=z;Le<O;++Le){var ge=G[Le]+1<<1,ie=oe*Le;k[re++]=U[ie+_e],k[re++]=-ge,k[re++]=U[ie+Ce],k[re++]=ge}for(var Le=Z;Le<j;++Le){var ge=H[Le]+1<<1,Se=oe*Le;k[re++]=N[Se+_e],k[re++]=-ge|1,k[re++]=N[Se+Ce],k[re++]=ge|1}var Ee=re>>>1;u(k,Ee);for(var Ae=0,Be=0,Pe=0,Le=0;Le<Ee;++Le){var me=k[2*Le+1]|0,De=me&1;if(Le<Ee-1&&me>>1===k[2*Le+3]>>1&&(De=2,Le+=1),me<0){for(var ce=-(me>>1)-1,je=0;je<Pe;++je){var lt=A(b[je],ce);if(lt!==void 0)return lt}if(De!==0)for(var je=0;je<Ae;++je){var lt=A(h[je],ce);if(lt!==void 0)return lt}if(De!==1)for(var je=0;je<Be;++je){var lt=A(v[je],ce);if(lt!==void 0)return lt}De===0?L(h,d,Ae++,ce):De===1?L(v,_,Be++,ce):De===2&&L(b,p,Pe++,ce)}else{var ce=(me>>1)-1;De===0?T(h,d,Ae--,ce):De===1?T(v,_,Be--,ce):De===2&&T(b,p,Pe--,ce)}}}function M(P,A,z,O,U,G,Z,j,N,H,re,oe){var _e=0,Ce=2*P,Le=A,ge=A+P,ie=1,Se=1;O?Se=c:ie=c;for(var Ee=U;Ee<G;++Ee){var Ae=Ee+ie,Be=Ce*Ee;k[_e++]=Z[Be+Le],k[_e++]=-Ae,k[_e++]=Z[Be+ge],k[_e++]=Ae}for(var Ee=N;Ee<H;++Ee){var Ae=Ee+Se,Pe=Ce*Ee;k[_e++]=re[Pe+Le],k[_e++]=-Ae}var me=_e>>>1;u(k,me);for(var De=0,Ee=0;Ee<me;++Ee){var ce=k[2*Ee+1]|0;if(ce<0){var Ae=-ce,je=!1;if(Ae>=c?(je=!O,Ae-=c):(je=!!O,Ae-=1),je)L(h,d,De++,Ae);else{var lt=oe[Ae],pt=Ce*Ae,Vt=re[pt+A+1],ot=re[pt+A+1+P];e:for(var ut=0;ut<De;++ut){var Wt=h[ut],Nt=Ce*Wt;if(!(ot<Z[Nt+A+1]||Z[Nt+A+1+P]<Vt)){for(var $t=A+2;$t<P;++$t)if(re[pt+$t+P]<Z[Nt+$t]||Z[Nt+$t+P]<re[pt+$t])continue e;var sr=j[Wt],Tr;if(O?Tr=z(lt,sr):Tr=z(sr,lt),Tr!==void 0)return Tr}}}}else T(h,d,De--,ce-ie)}}function g(P,A,z,O,U,G,Z,j,N,H,re){for(var oe=0,_e=2*P,Ce=A,Le=A+P,ge=O;ge<U;++ge){var ie=ge+c,Se=_e*ge;k[oe++]=G[Se+Ce],k[oe++]=-ie,k[oe++]=G[Se+Le],k[oe++]=ie}for(var ge=j;ge<N;++ge){var ie=ge+1,Ee=_e*ge;k[oe++]=H[Ee+Ce],k[oe++]=-ie}var Ae=oe>>>1;u(k,Ae);for(var Be=0,ge=0;ge<Ae;++ge){var Pe=k[2*ge+1]|0;if(Pe<0){var ie=-Pe;if(ie>=c)h[Be++]=ie-c;else{ie-=1;var me=re[ie],De=_e*ie,ce=H[De+A+1],je=H[De+A+1+P];e:for(var lt=0;lt<Be;++lt){var pt=h[lt],Vt=Z[pt];if(Vt===me)break;var ot=_e*pt;if(!(je<G[ot+A+1]||G[ot+A+1+P]<ce)){for(var ut=A+2;ut<P;++ut)if(H[De+ut+P]<G[ot+ut]||G[ot+ut+P]<H[De+ut])continue e;var Wt=z(Vt,me);if(Wt!==void 0)return Wt}}}}else{for(var ie=Pe-c,lt=Be-1;lt>=0;--lt)if(h[lt]===ie){for(var ut=lt+1;ut<Be;++ut)h[ut-1]=h[ut];break}--Be}}}},868:function(i,a,o){i.exports=o(1387)},869:function(i,a,o){\"use strict\";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},870:function(i,a,o){\"use strict\";var s=o(1433);function l(c){this.gl=c,this._elements=null,this._attributes=null,this._elementsType=c.UNSIGNED_SHORT}l.prototype.bind=function(){s(this.gl,this._elements,this._attributes)},l.prototype.update=function(c,f,h){this._elements=f,this._attributes=c,this._elementsType=h||this.gl.UNSIGNED_SHORT},l.prototype.dispose=function(){},l.prototype.unbind=function(){},l.prototype.draw=function(c,f,h){h=h||0;var d=this.gl;this._elements?d.drawElements(c,f,this._elementsType,h):d.drawArrays(c,h,f)};function u(c){return new l(c)}i.exports=u},946:function(i,a,o){\"use strict\";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,_=s(v),b=d.mod,p=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return p*_;if(_){var k=l(_)+4,E=s(b.ushln(k).divRound(h));return p*(_+E*Math.pow(2,-k))}else{var T=h.bitLength()-b.bitLength()+53,E=s(b.ushln(T).divRound(h));return T<1023?p*E*Math.pow(2,-T):(E*=Math.pow(2,-1023),p*E*Math.pow(2,1023-T))}}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec4 uv;\n",
       "attribute vec3 f;\n",
       "attribute vec3 normal;\n",
       "\n",
       "uniform vec3 objectOffset;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 lightPosition, eyePosition;\n",
       "uniform sampler2D colormap;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  vec3 localCoordinate = vec3(uv.zw, f.x);\n",
       "  worldCoordinate = objectOffset + localCoordinate;\n",
       "  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n",
       "  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 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",
       "`]),c=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float 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",
       "\n",
       "float beckmannSpecular(\n",
       "  vec3 lightDirection,\n",
       "  vec3 viewDirection,\n",
       "  vec3 surfaceNormal,\n",
       "  float roughness) {\n",
       "  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n",
       "}\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 lowerBound, upperBound;\n",
       "uniform float contourTint;\n",
       "uniform vec4 contourColor;\n",
       "uniform sampler2D colormap;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform float vertexColor;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    kill > 0.0 ||\n",
       "    vColor.a == 0.0 ||\n",
       "    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n",
       "  ) discard;\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 =\n",
       "    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n",
       "    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",
       "`]),f=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec4 uv;\n",
       "attribute float f;\n",
       "\n",
       "uniform vec3 objectOffset;\n",
       "uniform mat3 permutation;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float height, zOffset;\n",
       "uniform sampler2D colormap;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 lightDirection, eyeDirection, surfaceNormal;\n",
       "varying vec4 vColor;\n",
       "\n",
       "void main() {\n",
       "  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n",
       "  worldCoordinate = objectOffset + dataCoordinate;\n",
       "  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n",
       "  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n",
       "\n",
       "  vec4 clipPosition = projection * (view * worldPosition);\n",
       "  clipPosition.z += zOffset;\n",
       "\n",
       "  gl_Position = clipPosition;\n",
       "  value = f + objectOffset.z;\n",
       "  kill = -1.0;\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",
       "`]),h=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec2 shape;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying float value, kill;\n",
       "varying vec3 worldCoordinate;\n",
       "varying vec2 planeCoordinate;\n",
       "varying vec3 surfaceNormal;\n",
       "\n",
       "vec2 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",
       "\n",
       "void main() {\n",
       "  if ((kill > 0.0) ||\n",
       "      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) 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",
       "`]);a.createShader=function(d){var v=s(d,u,c,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:\"uv\",type:\"vec4\"},{name:\"f\",type:\"float\"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},1085:function(i,a,o){var s=o(1371);i.exports=l;function l(u,c,f){c=typeof c==\"number\"?c:1,f=f||\": \";var h=u.split(/\\r?\\n/),d=String(h.length+c-1).length;return h.map(function(v,_){var b=_+c,p=String(b).length,k=s(b,d-p);return k+f+v}).join(`\n",
       "`)}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},1125:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var v=0;v<2;++v){var _=c[v],b=f[v],p=Math.min(_,b),k=Math.max(_,b),E=h[v],T=d[v],L=Math.min(E,T),x=Math.max(E,T);if(x<p||k<L)return!1}return!0}function u(c,f,h,d){var v=s(c,h,d),_=s(f,h,d);if(v>0&&_>0||v<0&&_<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&_===0&&b===0&&p===0?l(c,f,h,d):!0}},1278:function(i,a,o){\"use strict\";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},1283:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform vec4 highlightId;\n",
       "uniform float highlightScale;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float scale = 1.0;\n",
       "    if(distance(highlightId, id) < 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",
       "}`]),c=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec2 screenSize;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float highlightScale, pixelRatio;\n",
       "uniform vec4 highlightId;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float scale = pixelRatio;\n",
       "    if(distance(highlightId.bgr, id.bgr) < 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",
       "}`]),f=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec4 color;\n",
       "attribute vec2 glyph;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform float highlightScale;\n",
       "uniform vec4 highlightId;\n",
       "uniform vec3 axes[2];\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec2 screenSize;\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float scale, pixelRatio;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n",
       "\n",
       "    gl_Position = vec4(0,0,0,0);\n",
       "  } else {\n",
       "    float lscale = pixelRatio * scale;\n",
       "    if(distance(highlightId, id) < 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",
       "`]),h=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 fragClipBounds[2];\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 interpColor;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n",
       "    interpColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "  gl_FragColor = interpColor * opacity;\n",
       "}\n",
       "`]),d=l([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 fragClipBounds[2];\n",
       "uniform float pickGroup;\n",
       "\n",
       "varying vec4 pickId;\n",
       "varying vec3 dataCoordinate;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickGroup, pickId.bgr);\n",
       "}`]),v=[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"glyph\",type:\"vec2\"},{name:\"id\",type:\"vec4\"}],_={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},k={vertex:u,fragment:d,attributes:v},E={vertex:c,fragment:d,attributes:v},T={vertex:f,fragment:d,attributes:v};function L(x,C){var M=s(x,C),g=M.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,M}a.createPerspective=function(x){return L(x,_)},a.createOrtho=function(x){return L(x,b)},a.createProject=function(x){return L(x,p)},a.createPickPerspective=function(x){return L(x,k)},a.createPickOrtho=function(x){return L(x,E)},a.createPickProject=function(x){return L(x,T)}},1303:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),_=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return _<b?_-b:v>p?v-p:_-p}var k,E;c[0][1]<c[1][1]?(k=c[0],E=c[1]):(k=c[1],E=c[0]);var T=s(d,h,k);return T||(T=s(d,h,E),T)?T:E-d}function u(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else return l(f,c);var v,_;if(c[0][0]<c[1][0])v=c[0],_=c[1];else if(c[0][0]>c[1][0])v=c[1],_=c[0];else return-l(c,f);var b=s(h,d,_),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(_,v,d),p=s(_,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-_[0]}},1318:function(i){\"use strict\";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},1338:function(i){\"use strict\";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d<f;++d)h[d]=u;else for(d=0;d<f;++d)h[d]=a(l,u,c+1);return h}function o(l,u){var c,f;for(c=new Array(l),f=0;f<l;++f)c[f]=u;return c}function s(l,u){switch(typeof u==\"undefined\"&&(u=0),typeof l){case\"number\":if(l>0)return o(l|0,u);break;case\"object\":if(typeof l.length==\"number\")return a(l,u,0);break}return[]}i.exports=s},1369:function(i,a,o){\"use strict\";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d<c;d++){var v=f[d];h+=v*Math.pow(67108864,d)}return s(u)*h}},1371:function(i,a,o){\"use strict\";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!=\"undefined\"?f+\"\":\" \",s(f,c)+u}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},1387:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}},1433:function(i){\"use strict\";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error(\"gl-vao: Too many vertex attributes\");for(var c=0;c<l.length;++c){var f=l[c];if(f.buffer){var h=f.buffer,d=f.size||4,v=f.type||o.FLOAT,_=!!f.normalized,b=f.stride||0,p=f.offset||0;h.bind(),o.enableVertexAttribArray(c),o.vertexAttribPointer(c,d,v,_,b,p)}else{if(typeof f==\"number\")o.vertexAttrib1f(c,f);else if(f.length===1)o.vertexAttrib1f(c,f[0]);else if(f.length===2)o.vertexAttrib2f(c,f[0],f[1]);else if(f.length===3)o.vertexAttrib3f(c,f[0],f[1],f[2]);else if(f.length===4)o.vertexAttrib4f(c,f[0],f[1],f[2],f[3]);else throw new Error(\"gl-vao: Invalid vertex attribute\");o.disableVertexAttribArray(c)}}for(;c<u;++c)o.disableVertexAttribArray(c)}else{o.bindBuffer(o.ARRAY_BUFFER,null);for(var c=0;c<u;++c)o.disableVertexAttribArray(c)}}i.exports=a},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},1493:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, color;\n",
       "attribute float weight;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 coordinates[3];\n",
       "uniform vec4 colors[3];\n",
       "uniform vec2 screenShape;\n",
       "uniform float lineWidth;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void 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",
       "`]),c=s([`precision mediump float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = fragColor;\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec3\"},{name:\"weight\",type:\"float\"}])}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},1533:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return u&&typeof u==\"object\"&&!!u.words}},1538:function(i){(function(){\"use strict\";if(typeof ses!=\"undefined\"&&ses.ok&&!ses.ok())return;function o(A){A.permitHostObjects___&&A.permitHostObjects___(o)}typeof ses!=\"undefined\"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap==\"function\"){var l=WeakMap;if(!(typeof navigator!=\"undefined\"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,_=\"weakmap:\",b=_+\"ident:\"+Math.random()+\"___\";if(typeof crypto!=\"undefined\"&&typeof crypto.getRandomValues==\"function\"&&typeof ArrayBuffer==\"function\"&&typeof Uint8Array==\"function\"){var p=new ArrayBuffer(25),k=new Uint8Array(p);crypto.getRandomValues(k),b=_+\"rand:\"+Array.prototype.map.call(k,function(A){return(A%36).toString(36)}).join(\"\")+\"___\"}function E(A){return!(A.substr(0,_.length)==_&&A.substr(A.length-3)===\"___\")}if(d(Object,\"getOwnPropertyNames\",{value:function(z){return h(z).filter(E)}}),\"getPropertyNames\"in Object){var T=Object.getPropertyNames;d(Object,\"getPropertyNames\",{value:function(z){return T(z).filter(E)}})}function L(A){if(A!==Object(A))throw new TypeError(\"Not an object: \"+A);var z=A[b];if(z&&z.key===A)return z;if(v(A)){z={key:A};try{return d(A,b,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch(O){return}}}(function(){var A=Object.freeze;d(Object,\"freeze\",{value:function(G){return L(G),A(G)}});var z=Object.seal;d(Object,\"seal\",{value:function(G){return L(G),z(G)}});var O=Object.preventExtensions;d(Object,\"preventExtensions\",{value:function(G){return L(G),O(G)}})})();function x(A){return A.prototype=null,Object.freeze(A)}var C=!1;function M(){!C&&typeof console!=\"undefined\"&&(C=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}var g=0,P=function(){this instanceof P||M();var A=[],z=[],O=g++;function U(N,H){var re,oe=L(N);return oe?O in oe?oe[O]:H:(re=A.indexOf(N),re>=0?z[re]:H)}function G(N){var H=L(N);return H?O in H:A.indexOf(N)>=0}function Z(N,H){var re,oe=L(N);return oe?oe[O]=H:(re=A.indexOf(N),re>=0?z[re]=H:(re=A.length,z[re]=H,A[re]=N)),this}function j(N){var H=L(N),re,oe;return H?O in H&&delete H[O]:(re=A.indexOf(N),re<0?!1:(oe=A.length-1,A[re]=void 0,z[re]=z[oe],A[re]=A[oe],A.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:x(U)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,O){return this.get___(z,O)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,O){return this.set___(z,O)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l==\"function\"?function(){s&&typeof Proxy!=\"undefined\"&&(Proxy=void 0);function A(){this instanceof P||M();var z=new l,O=void 0,U=!1;function G(H,re){return O?z.has(H)?z.get(H):O.get___(H,re):z.get(H,re)}function Z(H){return z.has(H)||(O?O.has___(H):!1)}var j;s?j=function(H,re){return z.set(H,re),z.has(H)||(O||(O=new P),O.set(H,re)),this}:j=function(H,re){if(U)try{z.set(H,re)}catch(oe){O||(O=new P),O.set___(H,re)}else z.set(H,re);return this};function N(H){var re=!!z.delete(H);return O&&O.delete___(H)||re}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)U=!0;else throw new Error(\"bogus call to permitHostObjects___\")})}})}A.prototype=P.prototype,i.exports=A,Object.defineProperty(WeakMap.prototype,\"constructor\",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!=\"undefined\"&&(Proxy=void 0),i.exports=P)})()},1570:function(i){\"use strict\";i.exports=o;var a=[function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,E=f[2*k+1];if(E===_)return k;_<E?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,_=[],b=0;b<v;++b)var p=c[b],k=p.length;return _}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,E=f[2*k+1];if(E===_)return k;_<E?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,_=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[1])]);break;case 2:_.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return _}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,E=f[2*k+1];if(E===_)return k;_<E?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,_=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===3){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:_.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:_.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:_.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:_.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:_.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(k===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[1])]);break;case 2:_.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return _}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,E=f[2*k+1];if(E===_)return k;_<E?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,_=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===4){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2)+(d[p[3]]<<3);if(E===0||E===15)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[1]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])]);break;case 2:_.push([l(h,f,p[1],p[2]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])]);break;case 3:_.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])],[l(h,f,p[1],p[3]),l(h,f,p[1],p[2]),l(h,f,p[0],p[3])]);break;case 4:_.push([l(h,f,p[2],p[0]),l(h,f,p[2],p[1]),l(h,f,p[2],p[3])]);break;case 5:_.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[0],p[3])],[l(h,f,p[2],p[1]),l(h,f,p[2],p[3]),l(h,f,p[0],p[3])]);break;case 6:_.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])],[l(h,f,p[2],p[3]),l(h,f,p[2],p[0]),l(h,f,p[1],p[3])]);break;case 7:_.push([l(h,f,p[0],p[3]),l(h,f,p[1],p[3]),l(h,f,p[2],p[3])]);break;case 8:_.push([l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[3],p[2])]);break;case 9:_.push([l(h,f,p[3],p[1]),l(h,f,p[0],p[1]),l(h,f,p[0],p[2])],[l(h,f,p[3],p[2]),l(h,f,p[3],p[1]),l(h,f,p[0],p[2])]);break;case 10:_.push([l(h,f,p[1],p[0]),l(h,f,p[3],p[0]),l(h,f,p[1],p[2])],[l(h,f,p[3],p[0]),l(h,f,p[3],p[2]),l(h,f,p[1],p[2])]);break;case 11:_.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[3],p[2])]);break;case 12:_.push([l(h,f,p[3],p[0]),l(h,f,p[2],p[0]),l(h,f,p[2],p[1])],[l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[2],p[1])]);break;case 13:_.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[3],p[1])]);break;case 14:_.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[3],p[0])]);break;case 15:break}}else if(k===3){var E=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:_.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:_.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:_.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:_.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:_.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(k===2){var E=(d[p[0]]<<0)+(d[p[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:_.push([l(h,f,p[0],p[1])]);break;case 2:_.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return _}return u}];function o(s){return a[s]()}},1682:function(i){\"use strict\";function a(l,u){for(var c=1,f=l.length,h=l[0],d=l[0],v=1;v<f;++v)if(d=h,h=l[v],u(h,d)){if(v===c){c++;continue}l[c++]=h}return l.length=c,l}function o(l){for(var u=1,c=l.length,f=l[0],h=l[0],d=1;d<c;++d,h=f)if(h=f,f=l[d],f!==h){if(d===u){u++;continue}l[u++]=f}return l.length=u,l}function s(l,u,c){return l.length===0?l:u?(c||l.sort(u),a(l,u)):(c||l.sort(),o(l))}i.exports=s},1755:function(i){\"use strict\";\"use restrict\";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l<s;++l)this.roots[l]=l,this.ranks[l]=0}var o=a.prototype;Object.defineProperty(o,\"length\",{get:function(){return this.roots.length}}),o.makeSet=function(){var s=this.roots.length;return this.roots.push(s),this.ranks.push(0),s},o.find=function(s){for(var l=s,u=this.roots;u[s]!==s;)s=u[s];for(;u[l]!==s;){var c=u[l];u[l]=s,l=c}return s},o.link=function(s,l){var u=this.find(s),c=this.find(l);if(u!==c){var f=this.ranks,h=this.roots,d=f[u],v=f[c];d<v?h[u]=c:v<d?h[c]=u:(h[c]=u,++f[u])}}},1811:function(i,a,o){\"use strict\";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),_=o(2504),b=o(3536),p=[0,0,0];i.exports=L;function k(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.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]}var E=k.prototype;E.recalcMatrix=function(x){var C=this._time,M=s.le(C,x),g=this.computedMatrix;if(!(M<0)){var P=this._components;if(M===C.length-1)for(var A=16*M,z=0;z<16;++z)g[z]=P[A++];else{for(var O=C[M+1]-C[M],A=16*M,U=this.prevMatrix,G=!0,z=0;z<16;++z)U[z]=P[A++];for(var Z=this.nextMatrix,z=0;z<16;++z)Z[z]=P[A++],G=G&&U[z]===Z[z];if(O<1e-6||G)for(var z=0;z<16;++z)g[z]=U[z];else l(g,U,Z,(x-C[M])/O)}var j=this.computedUp;j[0]=g[1],j[1]=g[5],j[2]=g[9],b(j,j);var N=this.computedInverse;u(N,g);var H=this.computedEye,re=N[15];H[0]=N[12]/re,H[1]=N[13]/re,H[2]=N[14]/re;for(var oe=this.computedCenter,_e=Math.exp(this.computedRadius[0]),z=0;z<3;++z)oe[z]=H[z]-g[2+4*z]*_e}},E.idle=function(x){if(!(x<this.lastT())){for(var C=this._components,M=C.length-16,g=0;g<16;++g)C.push(C[M++]);this._time.push(x)}},E.flush=function(x){var C=s.gt(this._time,x)-2;C<0||(this._time.splice(0,C),this._components.splice(0,16*C))},E.lastT=function(){return this._time[this._time.length-1]},E.lookAt=function(x,C,M,g){this.recalcMatrix(x),C=C||this.computedEye,M=M||p,g=g||this.computedUp,this.setMatrix(x,d(this.computedMatrix,C,M,g));for(var P=0,A=0;A<3;++A)P+=Math.pow(M[A]-C[A],2);P=Math.log(Math.sqrt(P)),this.computedRadius[0]=P},E.rotate=function(x,C,M,g){this.recalcMatrix(x);var P=this.computedInverse;C&&f(P,P,C),M&&c(P,P,M),g&&h(P,P,g),this.setMatrix(x,u(this.computedMatrix,P))};var T=[0,0,0];E.pan=function(x,C,M,g){T[0]=-(C||0),T[1]=-(M||0),T[2]=-(g||0),this.recalcMatrix(x);var P=this.computedInverse;v(P,P,T),this.setMatrix(x,u(P,P))},E.translate=function(x,C,M,g){T[0]=C||0,T[1]=M||0,T[2]=g||0,this.recalcMatrix(x);var P=this.computedMatrix;v(P,P,T),this.setMatrix(x,P)},E.setMatrix=function(x,C){if(!(x<this.lastT())){this._time.push(x);for(var M=0;M<16;++M)this._components.push(C[M])}},E.setDistance=function(x,C){this.computedRadius[0]=C},E.setDistanceLimits=function(x,C){var M=this._limits;M[0]=x,M[1]=C},E.getDistanceLimits=function(x){var C=this._limits;return x?(x[0]=C[0],x[1]=C[1],x):C};function L(x){x=x||{};var C=x.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new k(C)}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h<f.length;h++){var d=f[h];if(d.type===\"preprocessor\"){var v=d.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/);if(v&&v[2]){var _=v[1],b=v[2];return(_?l(b):b).trim()}}}}},1879:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 offset, majorAxis, minorAxis, screenAxis;\n",
       "uniform float lineWidth;\n",
       "uniform vec2 screenShape;\n",
       "\n",
       "vec3 project(vec3 p) {\n",
       "  vec4 pp = projection * (view * (model * vec4(p, 1.0)));\n",
       "  return pp.xyz / max(pp.w, 0.0001);\n",
       "}\n",
       "\n",
       "void 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",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 color;\n",
       "void main() {\n",
       "  gl_FragColor = color;\n",
       "}`]);a.n=function(_){return l(_,u,c,null,[{name:\"position\",type:\"vec3\"}])};var f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 offset, axis, alignDir, alignOpt;\n",
       "uniform float scale, angle, pixelScale;\n",
       "uniform vec2 resolution;\n",
       "\n",
       "vec3 project(vec3 p) {\n",
       "  vec4 pp = projection * (view * (model * vec4(p, 1.0)));\n",
       "  return pp.xyz / max(pp.w, 0.0001);\n",
       "}\n",
       "\n",
       "float computeViewAngle(vec3 a, vec3 b) {\n",
       "  vec3 A = project(a);\n",
       "  vec3 B = project(b);\n",
       "\n",
       "  return atan(\n",
       "    (B.y - A.y) * resolution.y,\n",
       "    (B.x - A.x) * resolution.x\n",
       "  );\n",
       "}\n",
       "\n",
       "const float PI = 3.141592;\n",
       "const float TWO_PI = 2.0 * PI;\n",
       "const float HALF_PI = 0.5 * PI;\n",
       "const float ONE_AND_HALF_PI = 1.5 * PI;\n",
       "\n",
       "int option = int(floor(alignOpt.x + 0.001));\n",
       "float hv_ratio =       alignOpt.y;\n",
       "bool enableAlign =    (alignOpt.z != 0.0);\n",
       "\n",
       "float mod_angle(float a) {\n",
       "  return mod(a, PI);\n",
       "}\n",
       "\n",
       "float positive_angle(float a) {\n",
       "  return mod_angle((a < 0.0) ?\n",
       "    a + TWO_PI :\n",
       "    a\n",
       "  );\n",
       "}\n",
       "\n",
       "float look_upwards(float a) {\n",
       "  float b = positive_angle(a);\n",
       "  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n",
       "    b - PI :\n",
       "    b;\n",
       "}\n",
       "\n",
       "float look_horizontal_or_vertical(float a, float ratio) {\n",
       "  // ratio controls the ratio between being horizontal to (vertical + horizontal)\n",
       "  // if ratio is set to 0.5 then it is 50%, 50%.\n",
       "  // when using a higher ratio e.g. 0.75 the result would\n",
       "  // likely be more horizontal than vertical.\n",
       "\n",
       "  float b = positive_angle(a);\n",
       "\n",
       "  return\n",
       "    (b < (      ratio) * HALF_PI) ? 0.0 :\n",
       "    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n",
       "    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n",
       "    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n",
       "                                    0.0;\n",
       "}\n",
       "\n",
       "float roundTo(float a, float b) {\n",
       "  return float(b * floor((a + 0.5 * b) / b));\n",
       "}\n",
       "\n",
       "float look_round_n_directions(float a, int n) {\n",
       "  float b = positive_angle(a);\n",
       "  float div = TWO_PI / float(n);\n",
       "  float c = roundTo(b, div);\n",
       "  return look_upwards(c);\n",
       "}\n",
       "\n",
       "float applyAlignOption(float rawAngle, float delta) {\n",
       "  return\n",
       "    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\n",
       "    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n",
       "    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\n",
       "    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n",
       "    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\n",
       "                    rawAngle;                // otherwise return back raw input angle\n",
       "}\n",
       "\n",
       "bool isAxisTitle = (axis.x == 0.0) &&\n",
       "                   (axis.y == 0.0) &&\n",
       "                   (axis.z == 0.0);\n",
       "\n",
       "void main() {\n",
       "  //Compute world offset\n",
       "  float axisDistance = position.z;\n",
       "  vec3 dataPosition = axisDistance * axis + offset;\n",
       "\n",
       "  float beta = angle; // i.e. user defined attributes for each tick\n",
       "\n",
       "  float axisAngle;\n",
       "  float clipAngle;\n",
       "  float flip;\n",
       "\n",
       "  if (enableAlign) {\n",
       "    axisAngle = (isAxisTitle) ? HALF_PI :\n",
       "                      computeViewAngle(dataPosition, dataPosition + axis);\n",
       "    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n",
       "\n",
       "    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n",
       "    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n",
       "\n",
       "    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n",
       "                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n",
       "\n",
       "    beta += applyAlignOption(clipAngle, flip * PI);\n",
       "  }\n",
       "\n",
       "  //Compute plane offset\n",
       "  vec2 planeCoord = position.xy * pixelScale;\n",
       "\n",
       "  mat2 planeXform = scale * mat2(\n",
       "     cos(beta), sin(beta),\n",
       "    -sin(beta), cos(beta)\n",
       "  );\n",
       "\n",
       "  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n",
       "\n",
       "  //Compute clip position\n",
       "  vec3 clipPosition = project(dataPosition);\n",
       "\n",
       "  //Apply text offset in clip coordinates\n",
       "  clipPosition += vec3(viewOffset, 0.0);\n",
       "\n",
       "  //Done\n",
       "  gl_Position = vec4(clipPosition, 1.0);\n",
       "}\n",
       "`]),h=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 color;\n",
       "void main() {\n",
       "  gl_FragColor = color;\n",
       "}`]);a.Q=function(_){return l(_,f,h,null,[{name:\"position\",type:\"vec3\"}])};var d=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position;\n",
       "attribute vec3 normal;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform vec3 enable;\n",
       "uniform vec3 bounds[2];\n",
       "\n",
       "varying vec3 colorChannel;\n",
       "\n",
       "void main() {\n",
       "\n",
       "  vec3 signAxis = sign(bounds[1] - bounds[0]);\n",
       "\n",
       "  vec3 realNormal = signAxis * normal;\n",
       "\n",
       "  if(dot(realNormal, enable) > 0.0) {\n",
       "    vec3 minRange = min(bounds[0], bounds[1]);\n",
       "    vec3 maxRange = max(bounds[0], bounds[1]);\n",
       "    vec3 nPosition = mix(minRange, maxRange, 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",
       "\n",
       "  colorChannel = abs(realNormal);\n",
       "}\n",
       "`]),v=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform vec4 colors[3];\n",
       "\n",
       "varying vec3 colorChannel;\n",
       "\n",
       "void main() {\n",
       "  gl_FragColor = colorChannel.x * colors[0] +\n",
       "                 colorChannel.y * colors[1] +\n",
       "                 colorChannel.z * colors[2];\n",
       "}`]);a.bg=function(_){return l(_,d,v,null,[{name:\"position\",type:\"vec3\"},{name:\"normal\",type:\"vec3\"}])}},1888:function(i,a,o){\"use strict\";var s=o(8828),l=o(1338),u=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!=\"undefined\",f=typeof BigUint64Array!=\"undefined\",h=typeof BigInt64Array!=\"undefined\",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var v=d.DATA,_=d.BUFFER;a.free=function(j){if(u.isBuffer(j))_[s.log2(j.length)].push(j);else{if(Object.prototype.toString.call(j)!==\"[object ArrayBuffer]\"&&(j=j.buffer),!j)return;var N=j.length||j.byteLength,H=s.log2(N)|0;v[H].push(j)}};function b(Z){if(Z){var j=Z.length||Z.byteLength,N=s.log2(j);v[N].push(Z)}}function p(Z){b(Z.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=p,a.freeArrayBuffer=b,a.freeBuffer=function(j){_[s.log2(j.length)].push(j)},a.malloc=function(j,N){if(N===void 0||N===\"arraybuffer\")return k(j);switch(N){case\"uint8\":return E(j);case\"uint16\":return T(j);case\"uint32\":return L(j);case\"int8\":return x(j);case\"int16\":return C(j);case\"int32\":return M(j);case\"float\":case\"float32\":return g(j);case\"double\":case\"float64\":return P(j);case\"uint8_clamped\":return A(j);case\"bigint64\":return O(j);case\"biguint64\":return z(j);case\"buffer\":return G(j);case\"data\":case\"dataview\":return U(j);default:return null}return null};function k(j){var j=s.nextPow2(j),N=s.log2(j),H=v[N];return H.length>0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function E(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=E;function T(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=T;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function M(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=M;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function A(Z){return c?new Uint8ClampedArray(k(Z),0,Z):E(Z)}a.mallocUint8Clamped=A;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function O(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=O;function U(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=U;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=_[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,_[j].length=0}},1903:function(i){i.exports=a;function a(o){var s=new Float32Array(16);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[8]=o[8],s[9]=o[9],s[10]=o[10],s[11]=o[11],s[12]=o[12],s[13]=o[13],s[14]=o[14],s[15]=o[15],s}},1944:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210);i.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d<c.length;++d)h=l(h,s(c[d],f[d]));return h}},1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},2014:function(i,a,o){\"use strict\";\"use restrict\";var s=o(3105),l=o(4623);function u(g){for(var P=0,A=Math.max,z=0,O=g.length;z<O;++z)P=A(P,g[z].length);return P-1}a.dimension=u;function c(g){for(var P=-1,A=Math.max,z=0,O=g.length;z<O;++z)for(var U=g[z],G=0,Z=U.length;G<Z;++G)P=A(P,U[G]);return P+1}a.countVertices=c;function f(g){for(var P=new Array(g.length),A=0,z=g.length;A<z;++A)P[A]=g[A].slice(0);return P}a.cloneCells=f;function h(g,P){var A=g.length,z=g.length-P.length,O=Math.min;if(z)return z;switch(A){case 0:return 0;case 1:return g[0]-P[0];case 2:var N=g[0]+g[1]-P[0]-P[1];return N||O(g[0],g[1])-O(P[0],P[1]);case 3:var U=g[0]+g[1],G=P[0]+P[1];if(N=U+g[2]-(G+P[2]),N)return N;var Z=O(g[0],g[1]),j=O(P[0],P[1]),N=O(Z,g[2])-O(j,P[2]);return N||O(Z+g[2],U)-O(j+P[2],G);default:var H=g.slice(0);H.sort();var re=P.slice(0);re.sort();for(var oe=0;oe<A;++oe)if(z=H[oe]-re[oe],z)return z;return 0}}a.compareCells=h;function d(g,P){return h(g[0],P[0])}function v(g,P){if(P){for(var A=g.length,z=new Array(A),O=0;O<A;++O)z[O]=[g[O],P[O]];z.sort(d);for(var O=0;O<A;++O)g[O]=z[O][0],P[O]=z[O][1];return g}else return g.sort(h),g}a.normalize=v;function _(g){if(g.length===0)return[];for(var P=1,A=g.length,z=1;z<A;++z){var O=g[z];if(h(O,g[z-1])){if(z===P){P++;continue}g[P++]=O}}return g.length=P,g}a.unique=_;function b(g,P){for(var A=0,z=g.length-1,O=-1;A<=z;){var U=A+z>>1,G=h(g[U],P);G<=0?(G===0&&(O=U),A=U+1):G>0&&(z=U-1)}return O}a.findCell=b;function p(g,P){for(var A=new Array(g.length),z=0,O=A.length;z<O;++z)A[z]=[];for(var U=[],z=0,G=P.length;z<G;++z)for(var Z=P[z],j=Z.length,N=1,H=1<<j;N<H;++N){U.length=s.popCount(N);for(var re=0,oe=0;oe<j;++oe)N&1<<oe&&(U[re++]=Z[oe]);var _e=b(g,U);if(!(_e<0))for(;A[_e++].push(z),!(_e>=g.length||h(g[_e],U)!==0););}return A}a.incidence=p;function k(g,P){if(!P)return p(_(T(g,0)),g,0);for(var A=new Array(P),z=0;z<P;++z)A[z]=[];for(var z=0,O=g.length;z<O;++z)for(var U=g[z],G=0,Z=U.length;G<Z;++G)A[U[G]].push(z);return A}a.dual=k;function E(g){for(var P=[],A=0,z=g.length;A<z;++A)for(var O=g[A],U=O.length|0,G=1,Z=1<<U;G<Z;++G){for(var j=[],N=0;N<U;++N)G>>>N&1&&j.push(O[N]);P.push(j)}return v(P)}a.explode=E;function T(g,P){if(P<0)return[];for(var A=[],z=(1<<P+1)-1,O=0;O<g.length;++O)for(var U=g[O],G=z;G<1<<U.length;G=s.nextCombination(G)){for(var Z=new Array(P+1),j=0,N=0;N<U.length;++N)G&1<<N&&(Z[j++]=U[N]);A.push(Z)}return v(A)}a.skeleton=T;function L(g){for(var P=[],A=0,z=g.length;A<z;++A)for(var O=g[A],U=0,G=O.length;U<G;++U){for(var Z=new Array(O.length-1),j=0,N=0;j<G;++j)j!==U&&(Z[N++]=O[j]);P.push(Z)}return v(P)}a.boundary=L;function x(g,P){for(var A=new l(P),z=0;z<g.length;++z)for(var O=g[z],U=0;U<O.length;++U)for(var G=U+1;G<O.length;++G)A.link(O[U],O[G]);for(var Z=[],j=A.ranks,z=0;z<j.length;++z)j[z]=-1;for(var z=0;z<g.length;++z){var N=A.find(g[z][0]);j[N]<0?(j[N]=Z.length,Z.push([g[z].slice(0)])):Z[j[N]].push(g[z].slice(0))}return Z}function C(g){for(var P=_(v(T(g,0))),A=new l(P.length),z=0;z<g.length;++z)for(var O=g[z],U=0;U<O.length;++U)for(var G=b(P,[O[U]]),Z=U+1;Z<O.length;++Z)A.link(G,b(P,[O[Z]]));for(var j=[],N=A.ranks,z=0;z<N.length;++z)N[z]=-1;for(var z=0;z<g.length;++z){var H=A.find(b(P,[g[z][0]]));N[H]<0?(N[H]=j.length,j.push([g[z].slice(0)])):j[N[H]].push(g[z].slice(0))}return j}function M(g,P){return P?x(g,P):C(g)}a.connectedComponents=M},2095:function(i,a,o){\"use strict\";i.exports=b;var s=o(3134),l=o(3088),u=o(5085),c=o(5250),f=o(8210),h=o(1682),d=o(5609);function v(p,k){for(var E=new Array(p),T=0;T<p;++T)E[T]=k;return E}function _(p){for(var k=new Array(p),E=0;E<p;++E)k[E]=[];return k}function b(p,k){var De=d(p,k);p=De[0],k=De[1];for(var E=k.length,T=p.length,L=s(p,k.length),x=0;x<E;++x)if(L[x].length%2===1)throw new Error(\"planar-graph-to-polyline: graph must be manifold\");var C=l(p,k);function M(ut){for(var Wt=ut.length,Nt=[0],$t=0;$t<Wt;++$t){var sr=k[ut[$t]],Tr=k[ut[($t+1)%Wt]],fr=c(-sr[0],sr[1]),$e=c(-sr[0],Tr[1]),St=c(Tr[0],sr[1]),Qt=c(Tr[0],Tr[1]);Nt=f(Nt,f(f(fr,$e),f(St,Qt)))}return Nt[Nt.length-1]>0}C=C.filter(M);for(var g=C.length,P=new Array(g),A=new Array(g),x=0;x<g;++x){P[x]=x;var z=new Array(g),O=C[x].map(function(Wt){return k[Wt]}),U=u([O]),G=0;e:for(var Z=0;Z<g;++Z)if(z[Z]=0,x!==Z){for(var j=C[Z],N=j.length,H=0;H<N;++H){var re=U(k[j[H]]);if(re!==0){re<0&&(z[Z]=1,G+=1);continue e}}z[Z]=1,G+=1}A[x]=[G,x,z]}A.sort(function(ut,Wt){return Wt[0]-ut[0]});for(var x=0;x<g;++x)for(var z=A[x],oe=z[1],_e=z[2],Z=0;Z<g;++Z)_e[Z]&&(P[Z]=oe);for(var Ce=_(g),x=0;x<g;++x)Ce[x].push(P[x]),Ce[P[x]].push(x);for(var Le={},ge=v(E,!1),x=0;x<g;++x)for(var j=C[x],N=j.length,Z=0;Z<N;++Z){var ie=j[Z],Se=j[(Z+1)%N],Ee=Math.min(ie,Se)+\":\"+Math.max(ie,Se);if(Ee in Le){var Ae=Le[Ee];Ce[Ae].push(x),Ce[x].push(Ae),ge[ie]=ge[Se]=!0}else Le[Ee]=x}function Be(ut){for(var Wt=ut.length,Nt=0;Nt<Wt;++Nt)if(!ge[ut[Nt]])return!1;return!0}for(var Pe=[],me=v(g,-1),x=0;x<g;++x)P[x]===x&&!Be(C[x])?(Pe.push(x),me[x]=0):me[x]=-1;for(var De=[];Pe.length>0;){var ce=Pe.pop(),je=Ce[ce];h(je,function(ut,Wt){return ut-Wt});var lt=je.length,pt=me[ce],Vt;if(pt===0){var j=C[ce];Vt=[j]}for(var x=0;x<lt;++x){var ot=je[x];if(!(me[ot]>=0)&&(me[ot]=pt^1,Pe.push(ot),pt===0)){var j=C[ot];Be(j)||(j.reverse(),Vt.push(j))}}pt===0&&De.push(Vt)}return De}},2145:function(i,a){\"use strict\";a.uniforms=u,a.attributes=c;var o={FLOAT:\"float\",FLOAT_VEC2:\"vec2\",FLOAT_VEC3:\"vec3\",FLOAT_VEC4:\"vec4\",INT:\"int\",INT_VEC2:\"ivec2\",INT_VEC3:\"ivec3\",INT_VEC4:\"ivec4\",BOOL:\"bool\",BOOL_VEC2:\"bvec2\",BOOL_VEC3:\"bvec3\",BOOL_VEC4:\"bvec4\",FLOAT_MAT2:\"mat2\",FLOAT_MAT3:\"mat3\",FLOAT_MAT4:\"mat4\",SAMPLER_2D:\"sampler2D\",SAMPLER_CUBE:\"samplerCube\"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var v=0;v<d.length;++v){var _=d[v];s[f[_]]=o[_]}}return s[h]}function u(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_UNIFORMS),v=[],_=0;_<d;++_){var b=f.getActiveUniform(h,_);if(b){var p=l(f,b.type);if(b.size>1)for(var k=0;k<b.size;++k)v.push({name:b.name.replace(\"[0]\",\"[\"+k+\"]\"),type:p});else v.push({name:b.name,type:p})}}return v}function c(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_ATTRIBUTES),v=[],_=0;_<d;++_){var b=f.getActiveAttrib(h,_);b&&v.push({name:b.name,type:l(f,b.type)})}return v}},2229:function(i,a,o){i.exports=o(6843)},2260:function(i,a,o){\"use strict\";var s=o(7766);i.exports=C;var l=null,u,c,f,h;function d(M){var g=M.getParameter(M.FRAMEBUFFER_BINDING),P=M.getParameter(M.RENDERBUFFER_BINDING),A=M.getParameter(M.TEXTURE_BINDING_2D);return[g,P,A]}function v(M,g){M.bindFramebuffer(M.FRAMEBUFFER,g[0]),M.bindRenderbuffer(M.RENDERBUFFER,g[1]),M.bindTexture(M.TEXTURE_2D,g[2])}function _(M,g){var P=M.getParameter(g.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var A=0;A<=P;++A){for(var z=new Array(P),O=0;O<A;++O)z[O]=M.COLOR_ATTACHMENT0+O;for(var O=A;O<P;++O)z[O]=M.NONE;l[A]=z}}function b(M){switch(M){case u:throw new Error(\"gl-fbo: Framebuffer unsupported\");case c:throw new Error(\"gl-fbo: Framebuffer incomplete attachment\");case f:throw new Error(\"gl-fbo: Framebuffer incomplete dimensions\");case h:throw new Error(\"gl-fbo: Framebuffer incomplete missing attachment\");default:throw new Error(\"gl-fbo: Framebuffer failed for unspecified reason\")}}function p(M,g,P,A,z,O){if(!A)return null;var U=s(M,g,P,z,A);return U.magFilter=M.NEAREST,U.minFilter=M.NEAREST,U.mipSamples=1,U.bind(),M.framebufferTexture2D(M.FRAMEBUFFER,O,M.TEXTURE_2D,U.handle,0),U}function k(M,g,P,A,z){var O=M.createRenderbuffer();return M.bindRenderbuffer(M.RENDERBUFFER,O),M.renderbufferStorage(M.RENDERBUFFER,A,g,P),M.framebufferRenderbuffer(M.FRAMEBUFFER,z,M.RENDERBUFFER,O),O}function E(M){var g=d(M.gl),P=M.gl,A=M.handle=P.createFramebuffer(),z=M._shape[0],O=M._shape[1],U=M.color.length,G=M._ext,Z=M._useStencil,j=M._useDepth,N=M._colorType;P.bindFramebuffer(P.FRAMEBUFFER,A);for(var H=0;H<U;++H)M.color[H]=p(P,z,O,N,P.RGBA,P.COLOR_ATTACHMENT0+H);U===0?(M._color_rb=k(P,z,O,P.RGBA4,P.COLOR_ATTACHMENT0),G&&G.drawBuffersWEBGL(l[0])):U>1&&G.drawBuffersWEBGL(l[U]);var re=P.getExtension(\"WEBGL_depth_texture\");re?Z?M.depth=p(P,z,O,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(M.depth=p(P,z,O,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?M._depth_rb=k(P,z,O,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?M._depth_rb=k(P,z,O,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(M._depth_rb=k(P,z,O,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){M._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(P.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var H=0;H<M.color.length;++H)M.color[H].dispose(),M.color[H]=null;M._color_rb&&(P.deleteRenderbuffer(M._color_rb),M._color_rb=null),v(P,g),b(oe)}v(P,g)}function T(M,g,P,A,z,O,U,G){this.gl=M,this._shape=[g|0,P|0],this._destroyed=!1,this._ext=G,this.color=new Array(z);for(var Z=0;Z<z;++Z)this.color[Z]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=A,this._useDepth=O,this._useStencil=U;var j=this,N=[g|0,P|0];Object.defineProperties(N,{0:{get:function(){return j._shape[0]},set:function(H){return j.width=H}},1:{get:function(){return j._shape[1]},set:function(H){return j.height=H}}}),this._shapeVector=N,E(this)}var L=T.prototype;function x(M,g,P){if(M._destroyed)throw new Error(\"gl-fbo: Can't resize destroyed FBO\");if(!(M._shape[0]===g&&M._shape[1]===P)){var A=M.gl,z=A.getParameter(A.MAX_RENDERBUFFER_SIZE);if(g<0||g>z||P<0||P>z)throw new Error(\"gl-fbo: Can't resize FBO, invalid dimensions\");M._shape[0]=g,M._shape[1]=P;for(var O=d(A),U=0;U<M.color.length;++U)M.color[U].shape=M._shape;M._color_rb&&(A.bindRenderbuffer(A.RENDERBUFFER,M._color_rb),A.renderbufferStorage(A.RENDERBUFFER,A.RGBA4,M._shape[0],M._shape[1])),M.depth&&(M.depth.shape=M._shape),M._depth_rb&&(A.bindRenderbuffer(A.RENDERBUFFER,M._depth_rb),M._useDepth&&M._useStencil?A.renderbufferStorage(A.RENDERBUFFER,A.DEPTH_STENCIL,M._shape[0],M._shape[1]):M._useDepth?A.renderbufferStorage(A.RENDERBUFFER,A.DEPTH_COMPONENT16,M._shape[0],M._shape[1]):M._useStencil&&A.renderbufferStorage(A.RENDERBUFFER,A.STENCIL_INDEX,M._shape[0],M._shape[1])),A.bindFramebuffer(A.FRAMEBUFFER,M.handle);var G=A.checkFramebufferStatus(A.FRAMEBUFFER);G!==A.FRAMEBUFFER_COMPLETE&&(M.dispose(),v(A,O),b(G)),v(A,O)}}Object.defineProperties(L,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(M){if(Array.isArray(M)||(M=[M|0,M|0]),M.length!==2)throw new Error(\"gl-fbo: Shape vector must be length 2\");var g=M[0]|0,P=M[1]|0;return x(this,g,P),[g,P]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(M){return M=M|0,x(this,M,this._shape[1]),M},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(M){return M=M|0,x(this,this._shape[0],M),M},enumerable:!1}}),L.bind=function(){if(!this._destroyed){var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,this.handle),M.viewport(0,0,this._shape[0],this._shape[1])}},L.dispose=function(){if(!this._destroyed){this._destroyed=!0;var M=this.gl;M.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(M.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var g=0;g<this.color.length;++g)this.color[g].dispose(),this.color[g]=null;this._color_rb&&(M.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function C(M,g,P,A){u||(u=M.FRAMEBUFFER_UNSUPPORTED,c=M.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,f=M.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=M.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var z=M.getExtension(\"WEBGL_draw_buffers\");if(!l&&z&&_(M,z),Array.isArray(g)&&(A=P,P=g[1]|0,g=g[0]|0),typeof g!=\"number\")throw new Error(\"gl-fbo: Missing shape parameter\");var O=M.getParameter(M.MAX_RENDERBUFFER_SIZE);if(g<0||g>O||P<0||P>O)throw new Error(\"gl-fbo: Parameters are too large for FBO\");A=A||{};var U=1;if(\"color\"in A){if(U=Math.max(A.color|0,0),U<0)throw new Error(\"gl-fbo: Must specify a nonnegative number of colors\");if(U>1)if(z){if(U>M.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\"gl-fbo: Context does not support \"+U+\" draw buffers\")}else throw new Error(\"gl-fbo: Multiple draw buffer extension not supported\")}var G=M.UNSIGNED_BYTE,Z=M.getExtension(\"OES_texture_float\");if(A.float&&U>0){if(!Z)throw new Error(\"gl-fbo: Context does not support floating point textures\");G=M.FLOAT}else A.preferFloat&&U>0&&Z&&(G=M.FLOAT);var j=!0;\"depth\"in A&&(j=!!A.depth);var N=!1;return\"stencil\"in A&&(N=!!A.stencil),new T(M,g,P,G,U,j,N,z)}},2272:function(i,a,o){\"use strict\";var s=o(2646)[4],l=o(2478);i.exports=c;function u(f,h,d,v,_,b){var p=h.opposite(v,_);if(!(p<0)){if(_<v){var k=v;v=_,_=k,k=b,b=p,p=k}h.isConstraint(v,_)||s(f[v],f[_],f[b],f[p])<0&&d.push(v,_)}}function c(f,h){for(var d=[],v=f.length,_=h.stars,b=0;b<v;++b)for(var p=_[b],k=1;k<p.length;k+=2){var E=p[k];if(!(E<b)&&!h.isConstraint(b,E)){for(var T=p[k-1],L=-1,x=1;x<p.length;x+=2)if(p[x-1]===E){L=p[x];break}L<0||s(f[b],f[E],f[T],f[L])<0&&d.push(b,E)}}for(;d.length>0;){for(var E=d.pop(),b=d.pop(),T=-1,L=-1,p=_[b],C=1;C<p.length;C+=2){var M=p[C-1],g=p[C];M===E?L=g:g===E&&(T=M)}T<0||L<0||s(f[b],f[E],f[T],f[L])>=0||(h.flip(b,E),u(f,h,d,T,b,L),u(f,h,d,b,L,T),u(f,h,d,L,E,T),u(f,h,d,E,T,L))}}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2361:function(i){var a=!1;if(typeof Float64Array!=\"undefined\"){var o=new Float64Array(1),s=new Uint32Array(o.buffer);if(o[0]=1,a=!0,s[1]===1072693248){let k=function(L,x){return s[0]=L,s[1]=x,o[0]},E=function(L){return o[0]=L,s[0]},T=function(L){return o[0]=L,s[1]};var u=k,c=E,f=T;i.exports=function(x){return o[0]=x,[s[0],s[1]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}else if(s[0]===1072693248){let k=function(L,x){return s[1]=L,s[0]=x,o[0]},E=function(L){return o[0]=L,s[1]},T=function(L){return o[0]=L,s[0]};var h=k,d=E,v=T;i.exports=function(x){return o[0]=x,[s[1],s[0]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}else a=!1}if(!a){let k=function(L,x){return l.writeUInt32LE(L,0,!0),l.writeUInt32LE(x,4,!0),l.readDoubleLE(0,!0)},E=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(0,!0)},T=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(4,!0)};var _=k,b=E,p=T,l=new Buffer(8);i.exports=function(x){return l.writeDoubleLE(x,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}i.exports.sign=function(k){return i.exports.hi(k)>>>31},i.exports.exponent=function(k){var E=i.exports.hi(k);return(E<<1>>>21)-1023},i.exports.fraction=function(k){var E=i.exports.lo(k),T=i.exports.hi(k),L=T&(1<<20)-1;return T&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(k){var E=i.exports.hi(k);return!(E&2146435072)}},2408:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],_=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-_*u,o[1]=h*c-b*u,o[2]=d*c-p*u,o[3]=v*c-k*u,o[8]=f*u+_*c,o[9]=h*u+b*c,o[10]=d*u+p*c,o[11]=v*u+k*c,o}},2419:function(i){\"use strict\";i.exports=a;function a(o){for(var s=1,l=1;l<o.length;++l)for(var u=0;u<l;++u)if(o[l]<o[u])s=-s;else if(o[u]===o[l])return 0;return s}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},2455:function(i,a){\"use strict\";function o(){function u(h,d,v,_,b,p,k,E,T,L,x){for(var C=2*h,M=_,g=C*_;M<b;++M,g+=C){var P=p[d+g],A=p[d+g+h],z=k[M];e:for(var O=E,U=C*E;O<T;++O,U+=C){var G=L[d+U],Z=L[d+U+h],j=x[O];if(!(Z<P||A<G)){for(var N=d+1;N<h;++N){var H=p[N+g],re=p[N+h+g],oe=L[N+U],_e=L[N+h+U];if(re<oe||_e<H)continue e}var Ce=v(z,j);if(Ce!==void 0)return Ce}}}}function c(h,d,v,_,b,p,k,E,T,L,x){for(var C=2*h,M=E,g=C*E;M<T;++M,g+=C){var P=L[d+g],A=L[d+g+h],z=x[M];e:for(var O=_,U=C*_;O<b;++O,U+=C){var G=p[d+U],Z=p[d+U+h],j=k[O];if(!(A<G||Z<P)){for(var N=d+1;N<h;++N){var H=p[N+U],re=p[N+h+U],oe=L[N+g],_e=L[N+h+g];if(re<oe||_e<H)continue e}var Ce=v(j,z);if(Ce!==void 0)return Ce}}}}function f(h,d,v,_,b,p,k,E,T,L,x){return b-_>T-E?u(h,d,v,_,b,p,k,E,T,L,x):c(h,d,v,_,b,p,k,E,T,L,x)}return f}function s(){function u(v,_,b,p,k,E,T,L,x,C,M){for(var g=2*v,P=p,A=g*p;P<k;++P,A+=g){var z=E[_+A],O=E[_+A+v],U=T[P];e:for(var G=L,Z=g*L;G<x;++G,Z+=g){var j=C[_+Z],N=M[G];if(!(j<=z||O<j)){for(var H=_+1;H<v;++H){var re=E[H+A],oe=E[H+v+A],_e=C[H+Z],Ce=C[H+v+Z];if(oe<_e||Ce<re)continue e}var Le=b(N,U);if(Le!==void 0)return Le}}}}function c(v,_,b,p,k,E,T,L,x,C,M){for(var g=2*v,P=p,A=g*p;P<k;++P,A+=g){var z=E[_+A],O=E[_+A+v],U=T[P];e:for(var G=L,Z=g*L;G<x;++G,Z+=g){var j=C[_+Z],N=M[G];if(!(j<z||O<j)){for(var H=_+1;H<v;++H){var re=E[H+A],oe=E[H+v+A],_e=C[H+Z],Ce=C[H+v+Z];if(oe<_e||Ce<re)continue e}var Le=b(U,N);if(Le!==void 0)return Le}}}}function f(v,_,b,p,k,E,T,L,x,C,M){for(var g=2*v,P=L,A=g*L;P<x;++P,A+=g){var z=C[_+A],O=M[P];e:for(var U=p,G=g*p;U<k;++U,G+=g){var Z=E[_+G],j=E[_+G+v],N=T[U];if(!(z<=Z||j<z)){for(var H=_+1;H<v;++H){var re=E[H+G],oe=E[H+v+G],_e=C[H+A],Ce=C[H+v+A];if(oe<_e||Ce<re)continue e}var Le=b(O,N);if(Le!==void 0)return Le}}}}function h(v,_,b,p,k,E,T,L,x,C,M){for(var g=2*v,P=L,A=g*L;P<x;++P,A+=g){var z=C[_+A],O=M[P];e:for(var U=p,G=g*p;U<k;++U,G+=g){var Z=E[_+G],j=E[_+G+v],N=T[U];if(!(z<Z||j<z)){for(var H=_+1;H<v;++H){var re=E[H+G],oe=E[H+v+G],_e=C[H+A],Ce=C[H+v+A];if(oe<_e||Ce<re)continue e}var Le=b(N,O);if(Le!==void 0)return Le}}}}function d(v,_,b,p,k,E,T,L,x,C,M,g){return E-k>C-x?p?u(v,_,b,k,E,T,L,x,C,M,g):c(v,_,b,k,E,T,L,x,C,M,g):p?f(v,_,b,k,E,T,L,x,C,M,g):h(v,_,b,k,E,T,L,x,C,M,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},2478:function(i){\"use strict\";function a(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>=0?(b=p,_=p-1):v=p+1}return b}function o(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>0?(b=p,_=p-1):v=p+1}return b}function s(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<0?(b=p,v=p+1):_=p-1}return b}function l(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<=0?(b=p,v=p+1):_=p-1}return b}function u(f,h,d,v,_){for(;v<=_;){var b=v+_>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:_=b-1}return-1}function c(f,h,d,v,_,b){return typeof d==\"function\"?b(f,h,d,v===void 0?0:v|0,_===void 0?f.length-1:_|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,_){return c(f,h,d,v,_,a)},gt:function(f,h,d,v,_){return c(f,h,d,v,_,o)},lt:function(f,h,d,v,_){return c(f,h,d,v,_,s)},le:function(f,h,d,v,_){return c(f,h,d,v,_,l)},eq:function(f,h,d,v,_){return c(f,h,d,v,_,u)}}},2504:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},2538:function(i,a,o){\"use strict\";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);i.exports=_;function f(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,p){return b[0]-p[0]||b[1]-p[1]}function d(b){return b.map(f).sort(h)}function v(b,p,k){return p in b?b[p]:k}function _(b,p,k){Array.isArray(p)?(k=k||{},p=p||[]):(k=p||{},p=[]);var E=!!v(k,\"delaunay\",!0),T=!!v(k,\"interior\",!0),L=!!v(k,\"exterior\",!0),x=!!v(k,\"infinity\",!1);if(!T&&!L||b.length===0)return[];var C=s(b,p);if(E||T!==L||x){for(var M=l(b.length,d(p)),g=0;g<C.length;++g){var P=C[g];M.addTriangle(P[0],P[1],P[2])}return E&&u(b,M),L?T?x?c(M,0,x):M.cells():c(M,1,x):c(M,-1)}else return C}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},2613:function(i){i.exports=1e-6},2640:function(i,a,o){\"use strict\";var s=o(1888);i.exports=c;var l={\"false,0,1\":function(h,d,v,_,b){return function(k,E,T,L){var x=k.shape[0]|0,C=k.shape[1]|0,M=k.data,g=k.offset|0,P=k.stride[0]|0,A=k.stride[1]|0,z=g,O,U=-P|0,G=0,Z=-A|0,j=0,N=-P-A|0,H=0,re=P|0,oe=A-P*x|0,_e=0,Ce=0,Le=0,ge=2*x|0,ie=_(ge),Se=_(ge),Ee=0,Ae=0,Be=-1,Pe=-1,me=0,De=-x|0,ce=x|0,je=0,lt=-x-1|0,pt=x-1|0,Vt=0,ot=0,ut=0;for(_e=0;_e<x;++_e)ie[Ee++]=v(M[z],E,T,L),z+=re;if(z+=oe,C>0){if(Ce=1,ie[Ee++]=v(M[z],E,T,L),z+=re,x>0)for(_e=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++),Ee+=1,z+=re,_e=2;_e<x;++_e)O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==me&&d(Se[Ee+Be],ot,H,G,Vt,me,E,T,L)),Ee+=1,z+=re;for(z+=oe,Ee=0,ut=Be,Be=Pe,Pe=ut,ut=De,De=ce,ce=ut,ut=lt,lt=pt,pt=ut,Ce=2;Ce<C;++Ce){if(ie[Ee++]=v(M[z],E,T,L),z+=re,x>0)for(_e=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==je&&d(Se[Ee+De],ot,j,H,je,Vt,E,T,L)),Ee+=1,z+=re,_e=2;_e<x;++_e)O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==je&&d(Se[Ee+De],ot,j,H,je,Vt,E,T,L),Vt!==me&&d(Se[Ee+Be],ot,H,G,Vt,me,E,T,L)),Ee+=1,z+=re;Ce&1&&(Ee=0),ut=Be,Be=Pe,Pe=ut,ut=De,De=ce,ce=ut,ut=lt,lt=pt,pt=ut,z+=oe}}b(Se),b(ie)}},\"false,1,0\":function(h,d,v,_,b){return function(k,E,T,L){var x=k.shape[0]|0,C=k.shape[1]|0,M=k.data,g=k.offset|0,P=k.stride[0]|0,A=k.stride[1]|0,z=g,O,U=-P|0,G=0,Z=-A|0,j=0,N=-P-A|0,H=0,re=A|0,oe=P-A*C|0,_e=0,Ce=0,Le=0,ge=2*C|0,ie=_(ge),Se=_(ge),Ee=0,Ae=0,Be=-1,Pe=-1,me=0,De=-C|0,ce=C|0,je=0,lt=-C-1|0,pt=C-1|0,Vt=0,ot=0,ut=0;for(Ce=0;Ce<C;++Ce)ie[Ee++]=v(M[z],E,T,L),z+=re;if(z+=oe,x>0){if(_e=1,ie[Ee++]=v(M[z],E,T,L),z+=re,C>0)for(Ce=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++),Ee+=1,z+=re,Ce=2;Ce<C;++Ce)O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==me&&d(Se[Ee+Be],ot,j,H,me,Vt,E,T,L)),Ee+=1,z+=re;for(z+=oe,Ee=0,ut=De,De=ce,ce=ut,ut=Be,Be=Pe,Pe=ut,ut=lt,lt=pt,pt=ut,_e=2;_e<x;++_e){if(ie[Ee++]=v(M[z],E,T,L),z+=re,C>0)for(Ce=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==je&&d(Se[Ee+De],ot,H,G,Vt,je,E,T,L)),Ee+=1,z+=re,Ce=2;Ce<C;++Ce)O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==me&&d(Se[Ee+Be],ot,j,H,me,Vt,E,T,L),Vt!==je&&d(Se[Ee+De],ot,H,G,Vt,je,E,T,L)),Ee+=1,z+=re;_e&1&&(Ee=0),ut=De,De=ce,ce=ut,ut=Be,Be=Pe,Pe=ut,ut=lt,lt=pt,pt=ut,z+=oe}}b(Se),b(ie)}}};function u(f,h,d,v,_,b){var p=[b,_].join(\",\"),k=l[p];return k(f,h,d,s.mallocUint32,s.freeUint32)}function c(f){function h(E){throw new Error(\"ndarray-extract-contour: \"+E)}typeof f!=\"object\"&&h(\"Must specify arguments\");var d=f.order;Array.isArray(d)||h(\"Must specify order\");var v=f.arrayArguments||1;v<1&&h(\"Must have at least one array argument\");var _=f.scalarArguments||0;_<0&&h(\"Scalar arg count must be > 0\"),typeof f.vertex!=\"function\"&&h(\"Must specify vertex creation function\"),typeof f.cell!=\"function\"&&h(\"Must specify cell creation function\"),typeof f.phase!=\"function\"&&h(\"Must specify phase function\");for(var b=f.getters||[],p=new Array(v),k=0;k<v;++k)b.indexOf(k)>=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,_,d,p)}},2642:function(i,a,o){\"use strict\";i.exports=u;var s=o(727);function l(c){for(var f=0,h=0;h<c.length;++h)f+=c[h];return f}function u(c,f){for(var h=f.length,d=new Array(h+1),v=0;v<h;++v){for(var _=new Array(h+1),b=0;b<=h;++b)_[b]=c[b][v];d[v]=_}d[h]=new Array(h+1);for(var v=0;v<=h;++v)d[h][v]=1;for(var p=new Array(h+1),v=0;v<h;++v)p[v]=f[v];p[h]=1;var k=s(d,p),E=l(k[h+1]);E===0&&(E=1);for(var T=new Array(h+1),v=0;v<=h;++v)T[v]=l(k[v])/E;return T}},2646:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(8545),c=o(3012),f=6;function h(M){var g=M===3?b:M===4?p:M===5?k:E;return g(l,u,s,c)}function d(){return 0}function v(){return 0}function _(){return 0}function b(M,g,P,A){function z(O,U,G){var Z=P(O[0],O[0]),j=A(Z,U[0]),N=A(Z,G[0]),H=P(U[0],U[0]),re=A(H,O[0]),oe=A(H,G[0]),_e=P(G[0],G[0]),Ce=A(_e,O[0]),Le=A(_e,U[0]),ge=M(g(Le,oe),g(re,j)),ie=g(Ce,N),Se=g(ge,ie);return Se[Se.length-1]}return z}function p(M,g,P,A){function z(O,U,G,Z){var j=M(P(O[0],O[0]),P(O[1],O[1])),N=A(j,U[0]),H=A(j,G[0]),re=A(j,Z[0]),oe=M(P(U[0],U[0]),P(U[1],U[1])),_e=A(oe,O[0]),Ce=A(oe,G[0]),Le=A(oe,Z[0]),ge=M(P(G[0],G[0]),P(G[1],G[1])),ie=A(ge,O[0]),Se=A(ge,U[0]),Ee=A(ge,Z[0]),Ae=M(P(Z[0],Z[0]),P(Z[1],Z[1])),Be=A(Ae,O[0]),Pe=A(Ae,U[0]),me=A(Ae,G[0]),De=M(M(A(g(me,Ee),U[1]),M(A(g(Pe,Le),-G[1]),A(g(Se,Ce),Z[1]))),M(A(g(Pe,Le),O[1]),M(A(g(Be,re),-U[1]),A(g(_e,N),Z[1])))),ce=M(M(A(g(me,Ee),O[1]),M(A(g(Be,re),-G[1]),A(g(ie,H),Z[1]))),M(A(g(Se,Ce),O[1]),M(A(g(ie,H),-U[1]),A(g(_e,N),G[1])))),je=g(De,ce);return je[je.length-1]}return z}function k(M,g,P,A){function z(O,U,G,Z,j){var N=M(P(O[0],O[0]),M(P(O[1],O[1]),P(O[2],O[2]))),H=A(N,U[0]),re=A(N,G[0]),oe=A(N,Z[0]),_e=A(N,j[0]),Ce=M(P(U[0],U[0]),M(P(U[1],U[1]),P(U[2],U[2]))),Le=A(Ce,O[0]),ge=A(Ce,G[0]),ie=A(Ce,Z[0]),Se=A(Ce,j[0]),Ee=M(P(G[0],G[0]),M(P(G[1],G[1]),P(G[2],G[2]))),Ae=A(Ee,O[0]),Be=A(Ee,U[0]),Pe=A(Ee,Z[0]),me=A(Ee,j[0]),De=M(P(Z[0],Z[0]),M(P(Z[1],Z[1]),P(Z[2],Z[2]))),ce=A(De,O[0]),je=A(De,U[0]),lt=A(De,G[0]),pt=A(De,j[0]),Vt=M(P(j[0],j[0]),M(P(j[1],j[1]),P(j[2],j[2]))),ot=A(Vt,O[0]),ut=A(Vt,U[0]),Wt=A(Vt,G[0]),Nt=A(Vt,Z[0]),$t=M(M(M(A(M(A(g(Nt,pt),G[1]),M(A(g(Wt,me),-Z[1]),A(g(lt,Pe),j[1]))),U[2]),M(A(M(A(g(Nt,pt),U[1]),M(A(g(ut,Se),-Z[1]),A(g(je,ie),j[1]))),-G[2]),A(M(A(g(Wt,me),U[1]),M(A(g(ut,Se),-G[1]),A(g(Be,ge),j[1]))),Z[2]))),M(A(M(A(g(lt,Pe),U[1]),M(A(g(je,ie),-G[1]),A(g(Be,ge),Z[1]))),-j[2]),M(A(M(A(g(Nt,pt),U[1]),M(A(g(ut,Se),-Z[1]),A(g(je,ie),j[1]))),O[2]),A(M(A(g(Nt,pt),O[1]),M(A(g(ot,_e),-Z[1]),A(g(ce,oe),j[1]))),-U[2])))),M(M(A(M(A(g(ut,Se),O[1]),M(A(g(ot,_e),-U[1]),A(g(Le,H),j[1]))),Z[2]),M(A(M(A(g(je,ie),O[1]),M(A(g(ce,oe),-U[1]),A(g(Le,H),Z[1]))),-j[2]),A(M(A(g(lt,Pe),U[1]),M(A(g(je,ie),-G[1]),A(g(Be,ge),Z[1]))),O[2]))),M(A(M(A(g(lt,Pe),O[1]),M(A(g(ce,oe),-G[1]),A(g(Ae,re),Z[1]))),-U[2]),M(A(M(A(g(je,ie),O[1]),M(A(g(ce,oe),-U[1]),A(g(Le,H),Z[1]))),G[2]),A(M(A(g(Be,ge),O[1]),M(A(g(Ae,re),-U[1]),A(g(Le,H),G[1]))),-Z[2]))))),sr=M(M(M(A(M(A(g(Nt,pt),G[1]),M(A(g(Wt,me),-Z[1]),A(g(lt,Pe),j[1]))),O[2]),A(M(A(g(Nt,pt),O[1]),M(A(g(ot,_e),-Z[1]),A(g(ce,oe),j[1]))),-G[2])),M(A(M(A(g(Wt,me),O[1]),M(A(g(ot,_e),-G[1]),A(g(Ae,re),j[1]))),Z[2]),A(M(A(g(lt,Pe),O[1]),M(A(g(ce,oe),-G[1]),A(g(Ae,re),Z[1]))),-j[2]))),M(M(A(M(A(g(Wt,me),U[1]),M(A(g(ut,Se),-G[1]),A(g(Be,ge),j[1]))),O[2]),A(M(A(g(Wt,me),O[1]),M(A(g(ot,_e),-G[1]),A(g(Ae,re),j[1]))),-U[2])),M(A(M(A(g(ut,Se),O[1]),M(A(g(ot,_e),-U[1]),A(g(Le,H),j[1]))),G[2]),A(M(A(g(Be,ge),O[1]),M(A(g(Ae,re),-U[1]),A(g(Le,H),G[1]))),-j[2])))),Tr=g($t,sr);return Tr[Tr.length-1]}return z}function E(M,g,P,A){function z(O,U,G,Z,j,N){var H=M(M(P(O[0],O[0]),P(O[1],O[1])),M(P(O[2],O[2]),P(O[3],O[3]))),re=A(H,U[0]),oe=A(H,G[0]),_e=A(H,Z[0]),Ce=A(H,j[0]),Le=A(H,N[0]),ge=M(M(P(U[0],U[0]),P(U[1],U[1])),M(P(U[2],U[2]),P(U[3],U[3]))),ie=A(ge,O[0]),Se=A(ge,G[0]),Ee=A(ge,Z[0]),Ae=A(ge,j[0]),Be=A(ge,N[0]),Pe=M(M(P(G[0],G[0]),P(G[1],G[1])),M(P(G[2],G[2]),P(G[3],G[3]))),me=A(Pe,O[0]),De=A(Pe,U[0]),ce=A(Pe,Z[0]),je=A(Pe,j[0]),lt=A(Pe,N[0]),pt=M(M(P(Z[0],Z[0]),P(Z[1],Z[1])),M(P(Z[2],Z[2]),P(Z[3],Z[3]))),Vt=A(pt,O[0]),ot=A(pt,U[0]),ut=A(pt,G[0]),Wt=A(pt,j[0]),Nt=A(pt,N[0]),$t=M(M(P(j[0],j[0]),P(j[1],j[1])),M(P(j[2],j[2]),P(j[3],j[3]))),sr=A($t,O[0]),Tr=A($t,U[0]),fr=A($t,G[0]),$e=A($t,Z[0]),St=A($t,N[0]),Qt=M(M(P(N[0],N[0]),P(N[1],N[1])),M(P(N[2],N[2]),P(N[3],N[3]))),Gt=A(Qt,O[0]),_t=A(Qt,U[0]),It=A(Qt,G[0]),mt=A(Qt,Z[0]),er=A(Qt,j[0]),lr=M(M(M(A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),G[2]),A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),j[2]),A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),-N[2]))),U[3]),M(A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),U[2]),A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),j[2]),A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),-N[2]))),-G[3]),A(M(M(A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),U[2]),A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),-G[2])),M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),j[2]),A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),-N[2]))),Z[3]))),M(M(A(M(M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),U[2]),A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),-G[2])),M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),Z[2]),A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),-N[2]))),-j[3]),A(M(M(A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),U[2]),A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),-G[2])),M(A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),Z[2]),A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),-j[2]))),N[3])),M(A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),U[2]),A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),j[2]),A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),-N[2]))),O[3]),A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),j[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-N[2]))),-U[3])))),M(M(M(A(M(M(A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),j[2]),A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),-N[2]))),Z[3]),A(M(M(A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),O[2]),A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),Z[2]),A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),-N[2]))),-j[3])),M(A(M(M(A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),O[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-U[2])),M(A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),Z[2]),A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),-j[2]))),N[3]),A(M(M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),U[2]),A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),-G[2])),M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),Z[2]),A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),-N[2]))),O[3]))),M(M(A(M(M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),O[2]),A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),-G[2])),M(A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),Z[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-N[2]))),-U[3]),A(M(M(A(M(A(g(mt,Nt),U[1]),M(A(g(_t,Be),-Z[1]),A(g(ot,Ee),N[1]))),O[2]),A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),Z[2]),A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),-N[2]))),G[3])),M(A(M(M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),O[2]),A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-N[2]))),-Z[3]),A(M(M(A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),O[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-U[2])),M(A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-Z[2]))),N[3]))))),wr=M(M(M(A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),G[2]),A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),j[2]),A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),-N[2]))),O[3]),M(A(M(M(A(M(A(g(er,St),Z[1]),M(A(g(mt,Nt),-j[1]),A(g($e,Wt),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-Z[2])),M(A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),j[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-N[2]))),-G[3]),A(M(M(A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-G[2])),M(A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),j[2]),A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),-N[2]))),Z[3]))),M(M(A(M(M(A(M(A(g(mt,Nt),G[1]),M(A(g(It,lt),-Z[1]),A(g(ut,ce),N[1]))),O[2]),A(M(A(g(mt,Nt),O[1]),M(A(g(Gt,Le),-Z[1]),A(g(Vt,_e),N[1]))),-G[2])),M(A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),Z[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-N[2]))),-j[3]),A(M(M(A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),O[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-G[2])),M(A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),Z[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-j[2]))),N[3])),M(A(M(M(A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),U[2]),A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),-G[2])),M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),j[2]),A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),-N[2]))),O[3]),A(M(M(A(M(A(g(er,St),G[1]),M(A(g(It,lt),-j[1]),A(g(fr,je),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-G[2])),M(A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),j[2]),A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),-N[2]))),-U[3])))),M(M(M(A(M(M(A(M(A(g(er,St),U[1]),M(A(g(_t,Be),-j[1]),A(g(Tr,Ae),N[1]))),O[2]),A(M(A(g(er,St),O[1]),M(A(g(Gt,Le),-j[1]),A(g(sr,Ce),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),j[2]),A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),-N[2]))),G[3]),A(M(M(A(M(A(g(It,lt),U[1]),M(A(g(_t,Be),-G[1]),A(g(De,Se),N[1]))),O[2]),A(M(A(g(It,lt),O[1]),M(A(g(Gt,Le),-G[1]),A(g(me,oe),N[1]))),-U[2])),M(A(M(A(g(_t,Be),O[1]),M(A(g(Gt,Le),-U[1]),A(g(ie,re),N[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-N[2]))),-j[3])),M(A(M(M(A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),O[2]),A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),-U[2])),M(A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-j[2]))),N[3]),A(M(M(A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),U[2]),A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),-G[2])),M(A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),Z[2]),A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),-j[2]))),O[3]))),M(M(A(M(M(A(M(A(g($e,Wt),G[1]),M(A(g(fr,je),-Z[1]),A(g(ut,ce),j[1]))),O[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-G[2])),M(A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),Z[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-j[2]))),-U[3]),A(M(M(A(M(A(g($e,Wt),U[1]),M(A(g(Tr,Ae),-Z[1]),A(g(ot,Ee),j[1]))),O[2]),A(M(A(g($e,Wt),O[1]),M(A(g(sr,Ce),-Z[1]),A(g(Vt,_e),j[1]))),-U[2])),M(A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),Z[2]),A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),-j[2]))),G[3])),M(A(M(M(A(M(A(g(fr,je),U[1]),M(A(g(Tr,Ae),-G[1]),A(g(De,Se),j[1]))),O[2]),A(M(A(g(fr,je),O[1]),M(A(g(sr,Ce),-G[1]),A(g(me,oe),j[1]))),-U[2])),M(A(M(A(g(Tr,Ae),O[1]),M(A(g(sr,Ce),-U[1]),A(g(ie,re),j[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-j[2]))),-Z[3]),A(M(M(A(M(A(g(ut,ce),U[1]),M(A(g(ot,Ee),-G[1]),A(g(De,Se),Z[1]))),O[2]),A(M(A(g(ut,ce),O[1]),M(A(g(Vt,_e),-G[1]),A(g(me,oe),Z[1]))),-U[2])),M(A(M(A(g(ot,Ee),O[1]),M(A(g(Vt,_e),-U[1]),A(g(ie,re),Z[1]))),G[2]),A(M(A(g(De,Se),O[1]),M(A(g(me,oe),-U[1]),A(g(ie,re),G[1]))),-Z[2]))),j[3]))))),Lr=g(lr,wr);return Lr[Lr.length-1]}return z}var T=[d,v,_];function L(M){var g=T[M.length];return g||(g=T[M.length]=h(M.length)),g.apply(void 0,M)}function x(M,g,P,A,z,O,U,G){function Z(j,N,H,re,oe,_e){switch(arguments.length){case 0:case 1:return 0;case 2:return A(j,N);case 3:return z(j,N,H);case 4:return O(j,N,H,re);case 5:return U(j,N,H,re,oe);case 6:return G(j,N,H,re,oe,_e)}for(var Ce=new Array(arguments.length),Le=0;Le<arguments.length;++Le)Ce[Le]=arguments[Le];return M(Ce)}return Z}function C(){for(;T.length<=f;)T.push(h(T.length));i.exports=x.apply(void 0,[L].concat(T));for(var M=0;M<=f;++M)i.exports[M]=T[M]}C()},2651:function(i,a,o){\"use strict\";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),_=l(),b=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,M,g,P,A,z){if(M||(M=[0,0,0]),g||(g=[0,0,0]),P||(P=[0,0,0]),A||(A=[0,0,0,1]),z||(z=[0,0,0,1]),!s(v,C)||(u(_,v),_[3]=0,_[7]=0,_[11]=0,_[15]=1,Math.abs(c(_)<1e-8)))return!1;var O=v[3],U=v[7],G=v[11],Z=v[12],j=v[13],N=v[14],H=v[15];if(O!==0||U!==0||G!==0){b[0]=O,b[1]=U,b[2]=G,b[3]=H;var re=f(_,_);if(!re)return!1;h(_,_),E(A,b,_)}else A[0]=A[1]=A[2]=0,A[3]=1;if(M[0]=Z,M[1]=j,M[2]=N,T(p,v),g[0]=d.length(p[0]),d.normalize(p[0],p[0]),P[0]=d.dot(p[0],p[1]),L(p[1],p[1],p[0],1,-P[0]),g[1]=d.length(p[1]),d.normalize(p[1],p[1]),P[0]/=g[1],P[1]=d.dot(p[0],p[2]),L(p[2],p[2],p[0],1,-P[1]),P[2]=d.dot(p[1],p[2]),L(p[2],p[2],p[1],1,-P[2]),g[2]=d.length(p[2]),d.normalize(p[2],p[2]),P[1]/=g[2],P[2]/=g[2],d.cross(k,p[1],p[2]),d.dot(p[0],k)<0)for(var oe=0;oe<3;oe++)g[oe]*=-1,p[oe][0]*=-1,p[oe][1]*=-1,p[oe][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function E(x,C,M){var g=C[0],P=C[1],A=C[2],z=C[3];return x[0]=M[0]*g+M[4]*P+M[8]*A+M[12]*z,x[1]=M[1]*g+M[5]*P+M[9]*A+M[13]*z,x[2]=M[2]*g+M[6]*P+M[10]*A+M[14]*z,x[3]=M[3]*g+M[7]*P+M[11]*A+M[15]*z,x}function T(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,M,g,P){x[0]=C[0]*g+M[0]*P,x[1]=C[1]*g+M[1]*P,x[2]=C[2]*g+M[2]*P}},2653:function(i,a,o){\"use strict\";var s=o(3865);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},2690:function(i,a,o){\"use strict\";i.exports=f;var s=o(8954),l=o(3952);function u(h,d){for(var v=h.length,_=new Array(v),b=0;b<d.length;++b)_[b]=h[d[b]];for(var p=d.length,b=0;b<v;++b)d.indexOf(b)<0&&(_[p++]=h[b]);return _}function c(h,d){for(var v=h.length,_=d.length,b=0;b<v;++b)for(var p=h[b],k=0;k<p.length;++k){var E=p[k];if(E<_)p[k]=d[E];else{E=E-_;for(var T=0;T<_;++T)E>=d[T]&&(E+=1);p[k]=E}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var _=u(h,v),b=s(_,!0);return c(b,v)}}},2762:function(i,a,o){\"use strict\";var s=o(1888),l=o(5298),u=o(9618),c=[\"uint8\",\"uint8_clamped\",\"uint16\",\"uint32\",\"int8\",\"int16\",\"int32\",\"float32\"];function f(p,k,E,T,L){this.gl=p,this.type=k,this.handle=E,this.length=T,this.usage=L}var h=f.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function d(p,k,E,T,L,x){var C=L.length*L.BYTES_PER_ELEMENT;if(x<0)return p.bufferData(k,L,T),C;if(C+x>E)throw new Error(\"gl-buffer: If resizing buffer, must not specify offset\");return p.bufferSubData(k,x,L),E}function v(p,k){for(var E=s.malloc(p.length,k),T=p.length,L=0;L<T;++L)E[L]=p[L];return E}function _(p,k){for(var E=1,T=k.length-1;T>=0;--T){if(k[T]!==E)return!1;E*=p[T]}return!0}h.update=function(p,k){if(typeof k!=\"number\"&&(k=-1),this.bind(),typeof p==\"object\"&&typeof p.shape!=\"undefined\"){var E=p.dtype;if(c.indexOf(E)<0&&(E=\"float32\"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension(\"OES_element_index_uint\");T&&E!==\"uint16\"?E=\"uint32\":E=\"uint16\"}if(E===p.dtype&&_(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,E),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,\"uint16\"):C=v(p,\"float32\"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p==\"object\"&&typeof p.length==\"number\")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p==\"number\"||p===void 0){if(k>=0)throw new Error(\"gl-buffer: Cannot specify offset when resizing buffer\");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error(\"gl-buffer: Invalid data type\")};function b(p,k,E,T){if(E=E||p.ARRAY_BUFFER,T=T||p.DYNAMIC_DRAW,E!==p.ARRAY_BUFFER&&E!==p.ELEMENT_ARRAY_BUFFER)throw new Error(\"gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER\");if(T!==p.DYNAMIC_DRAW&&T!==p.STATIC_DRAW&&T!==p.STREAM_DRAW)throw new Error(\"gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\");var L=p.createBuffer(),x=new f(p,E,L,0,T);return x.update(k),x}i.exports=b},2825:function(i){i.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931:function(i,a,o){i.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},2962:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(T,L,x,C){return function(g){return C(T(x(g[0][0],g[1][1]),x(-g[0][1],g[1][0])))}}function d(T,L,x,C){return function(g){return C(T(L(T(x(g[1][1],g[2][2]),x(-g[1][2],g[2][1])),g[0][0]),T(L(T(x(g[1][0],g[2][2]),x(-g[1][2],g[2][0])),-g[0][1]),L(T(x(g[1][0],g[2][1]),x(-g[1][1],g[2][0])),g[0][2]))))}}function v(T,L,x,C){return function(g){return C(T(T(L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][1]),T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),-g[1][2]),L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][3]))),g[0][0]),L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][2]),L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),g[1][3]))),-g[0][1])),T(L(T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][3]))),g[0][2]),L(T(L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][2]))),-g[0][3]))))}}function _(T,L,x,C){return function(g){return C(T(T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][1]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),-g[1][4]))),g[0][0]),L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][4]))),-g[0][1])),T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),-g[1][4]))),g[0][2]),T(L(T(T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][4]))),-g[0][3]),L(T(T(L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][3]))),g[0][4])))))}}function b(T){var L=T===2?h:T===3?d:T===4?v:T===5?_:void 0;return L(l,u,s,c)}var p=[function(){return[0]},function(L){return[L[0][0]]}];function k(T,L,x,C,M,g,P,A){return function(O){switch(O.length){case 0:return T(O);case 1:return L(O);case 2:return x(O);case 3:return C(O);case 4:return M(O);case 5:return g(O)}var U=P[O.length];return U||(U=P[O.length]=A(O.length)),U(O)}}function E(){for(;p.length<f;)p.push(b(p.length));i.exports=k.apply(void 0,p.concat([p,b]));for(var T=0;T<p.length;++T)i.exports[T]=p[T]}E()},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){\"use strict\";var _=u(d)||\"of unknown name (see npm glsl-shader-name)\",b=\"unknown type\";v!==void 0&&(b=v===l.FRAGMENT_SHADER?\"fragment\":\"vertex\");for(var p=s(`Error compiling %s shader %s:\n",
       "`,b,_),k=s(\"%s%s\",p,h),E=h.split(`\n",
       "`),T={},L=0;L<E.length;L++){var x=E[L];if(!(x===\"\"||x===\"\\0\")){var C=parseInt(x.split(\":\")[2]);if(isNaN(C))throw new Error(s(\"Could not parse error: %s\",x));T[C]=x}}for(var M=c(d).split(`\n",
       "`),L=0;L<M.length;L++)if(!(!T[L+3]&&!T[L+2]&&!T[L+1])){var g=M[L];if(p+=g+`\n",
       "`,T[L+1]){var P=T[L+1];P=P.substr(P.split(\":\",3).join(\":\").length+1).trim(),p+=s(`^^^ %s\n",
       "\n",
       "`,P)}}return{long:p.trim(),short:k.trim()}}},3012:function(i,a,o){\"use strict\";var s=o(5250),l=o(9362);i.exports=u;function u(c,f){var h=c.length;if(h===1){var d=s(c[0],f);return d[0]?d:[d[1]]}var v=new Array(2*h),_=[.1,.1],b=[.1,.1],p=0;s(c[0],f,_),_[0]&&(v[p++]=_[0]);for(var k=1;k<h;++k){s(c[k],f,b);var E=_[1];l(E,b[0],_),_[0]&&(v[p++]=_[0]);var T=b[1],L=_[1],x=T+L,C=x-T,M=L-C;_[1]=x,M&&(v[p++]=M)}return _[1]&&(v[p++]=_[1]),p===0&&(v[p++]=0),v.length=p,v}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},3088:function(i,a,o){\"use strict\";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v<f;++v)d[0][v]=[],d[1][v]=[];for(var v=0;v<h;++v){var _=u[v];d[0][_[0]].push(_),d[1][_[1]].push(_)}for(var b=[],v=0;v<f;++v)d[0][v].length+d[1][v].length===0&&b.push([v]);function p(g,P){var A=d[P][g[P]];A.splice(A.indexOf(g),1)}function k(g,P,A){for(var z,O,U,G=0;G<2;++G)if(d[G][P].length>0){z=d[G][P][0],U=G;break}O=z[U^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N<j.length;++N){var H=j[N],re=H[Z^1],oe=s(c[g],c[P],c[O],c[re]);oe>0&&(z=H,O=re,U=Z)}return A||z&&p(z,U),O}function E(g,P){var A=d[P][g][0],z=[g];p(A,P);for(var O=A[P^1],U=P;;){for(;O!==g;)z.push(O),O=k(z[z.length-2],O,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),O=k(G,Z)}return z}function T(g,P){return P[1]===P[P.length-1]}for(var v=0;v<f;++v)for(var L=0;L<2;++L){for(var x=[];d[L][v].length>0;){var C=d[0][v].length,M=E(v,L);T(x,M)?x.push.apply(x,M):(x.length>0&&b.push(x),x=M)}x.length>0&&b.push(x)}return b}},3090:function(i,a,o){\"use strict\";i.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var k=new Array(c),f=0;f<c;++f)k[f]=f;return c===2&&u[0][0]===u[1][0]&&u[0][1]===u[1][1]?[0]:k}for(var h=new Array(c),f=0;f<c;++f)h[f]=f;h.sort(function(x,C){var M=u[x][0]-u[C][0];return M||u[x][1]-u[C][1]});for(var d=[h[0],h[1]],v=[h[0],h[1]],f=2;f<c;++f){for(var _=h[f],b=u[_],p=d.length;p>1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(_),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(_)}for(var k=new Array(v.length+d.length-2),E=0,f=0,T=d.length;f<T;++f)k[E++]=d[f];for(var L=v.length-2;L>0;--L)k[E++]=v[L];return k}},3105:function(i,a){\"use strict\";\"use restrict\";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3134:function(i,a,o){\"use strict\";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!=\"number\"){c=0;for(var h=0;h<f;++h){var d=u[h];c=Math.max(c,d[0],d[1])}c=(c|0)+1}c=c|0;for(var v=new Array(c),h=0;h<c;++h)v[h]=[];for(var h=0;h<f;++h){var d=u[h];v[d[0]].push(d[1]),v[d[1]].push(d[0])}for(var _=0;_<c;++_)s(v[_],function(b,p){return b-p});return v}},3140:function(i,a,o){\"use strict\";i.exports=d;var s=o(3250),l=o(8572),u=o(9362),c=o(5382),f=o(8210);function h(v,_,b){var p=u(v[0],-_[0]),k=u(v[1],-_[1]),E=u(b[0],-_[0]),T=u(b[1],-_[1]),L=f(c(p,E),c(k,T));return L[L.length-1]>=0}function d(v,_,b,p){var k=s(_,b,p);if(k===0){var E=l(s(v,_,b)),T=l(s(v,_,p));if(E===T){if(E===0){var L=h(v,_,b),x=h(v,_,p);return L===x?0:L?1:-1}return 0}else{if(T===0)return E>0||h(v,_,p)?-1:1;if(E===0)return T>0||h(v,_,b)?1:-1}return l(T-E)}var C=s(v,_,b);if(C>0)return k>0&&s(v,_,p)>0?1:-1;if(C<0)return k>0||s(v,_,p)>0?1:-1;var M=s(v,_,p);return M>0||h(v,_,b)?1:-1}},3202:function(i){i.exports=function(o,s){s||(s=[0,\"\"]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",s}},3233:function(i){\"use strict\";var a=\"\",o;i.exports=s;function s(l,u){if(typeof l!=\"string\")throw new TypeError(\"expected a string\");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o==\"undefined\")o=l,a=\"\";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3236:function(i){i.exports=function(a){typeof a==\"string\"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l<a.length-1;l++)s.push(a[l],o[l]||\"\");return s.push(a[l]),s.join(\"\")}},3250:function(i,a,o){\"use strict\";var s=o(5250),l=o(8210),u=o(3012),c=o(8545),f=5,h=11102230246251565e-32,d=(3+16*h)*h,v=(7+56*h)*h;function _(g,P,A,z){return function(U,G,Z){var j=g(g(P(G[1],Z[0]),P(-Z[1],G[0])),g(P(U[1],G[0]),P(-G[1],U[0]))),N=g(P(U[1],Z[0]),P(-Z[1],U[0])),H=z(j,N);return H[H.length-1]}}function b(g,P,A,z){return function(U,G,Z,j){var N=g(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(A(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),A(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),g(A(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),j[2])))),H=g(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),A(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),g(A(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(A(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2])))),re=z(N,H);return re[re.length-1]}}function p(g,P,A,z){return function(U,G,Z,j,N){var H=g(g(g(A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),Z[2]),g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),-j[2]),A(g(P(Z[1],j[0]),P(-j[1],Z[0])),N[2]))),G[3]),g(A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),G[2]),g(A(g(P(G[1],N[0]),P(-N[1],G[0])),-j[2]),A(g(P(G[1],j[0]),P(-j[1],G[0])),N[2]))),-Z[3]),A(g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(A(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),A(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),j[3]))),g(A(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(A(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),A(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),-N[3]),g(A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),G[2]),g(A(g(P(G[1],N[0]),P(-N[1],G[0])),-j[2]),A(g(P(G[1],j[0]),P(-j[1],G[0])),N[2]))),U[3]),A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-j[2]),A(g(P(U[1],j[0]),P(-j[1],U[0])),N[2]))),-G[3])))),g(g(A(g(A(g(P(G[1],N[0]),P(-N[1],G[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),N[2]))),j[3]),g(A(g(A(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),j[2]))),-N[3]),A(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(A(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),A(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),U[3]))),g(A(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),A(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),-G[3]),g(A(g(A(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),j[2]))),Z[3]),A(g(A(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(A(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2]))),-j[3]))))),re=g(g(g(A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),Z[2]),g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),-j[2]),A(g(P(Z[1],j[0]),P(-j[1],Z[0])),N[2]))),U[3]),A(g(A(g(P(j[1],N[0]),P(-N[1],j[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-j[2]),A(g(P(U[1],j[0]),P(-j[1],U[0])),N[2]))),-Z[3])),g(A(g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-Z[2]),A(g(P(U[1],Z[0]),P(-Z[1],U[0])),N[2]))),j[3]),A(g(A(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(A(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),A(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),-N[3]))),g(g(A(g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(A(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),A(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),U[3]),A(g(A(g(P(Z[1],N[0]),P(-N[1],Z[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-Z[2]),A(g(P(U[1],Z[0]),P(-Z[1],U[0])),N[2]))),-G[3])),g(A(g(A(g(P(G[1],N[0]),P(-N[1],G[0])),U[2]),g(A(g(P(U[1],N[0]),P(-N[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),N[2]))),Z[3]),A(g(A(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(A(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),A(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2]))),-N[3])))),oe=z(H,re);return oe[oe.length-1]}}function k(g){var P=g===3?_:g===4?b:p;return P(l,s,u,c)}var E=k(3),T=k(4),L=[function(){return 0},function(){return 0},function(P,A){return A[0]-P[0]},function(P,A,z){var O=(P[1]-z[1])*(A[0]-z[0]),U=(P[0]-z[0])*(A[1]-z[1]),G=O-U,Z;if(O>0){if(U<=0)return G;Z=O+U}else if(O<0){if(U>=0)return G;Z=-(O+U)}else return G;var j=d*Z;return G>=j||G<=-j?G:E(P,A,z)},function(P,A,z,O){var U=P[0]-O[0],G=A[0]-O[0],Z=z[0]-O[0],j=P[1]-O[1],N=A[1]-O[1],H=z[1]-O[1],re=P[2]-O[2],oe=A[2]-O[2],_e=z[2]-O[2],Ce=G*H,Le=Z*N,ge=Z*j,ie=U*H,Se=U*N,Ee=G*j,Ae=re*(Ce-Le)+oe*(ge-ie)+_e*(Se-Ee),Be=(Math.abs(Ce)+Math.abs(Le))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Ee))*Math.abs(_e),Pe=v*Be;return Ae>Pe||-Ae>Pe?Ae:T(P,A,z,O)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,A,z,O,U,G){return function(j,N,H,re,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return O(j,N,H);case 4:return U(j,N,H,re);case 5:return G(j,N,H,re,oe)}for(var _e=new Array(arguments.length),Ce=0;Ce<arguments.length;++Ce)_e[Ce]=arguments[Ce];return g(_e)}}function M(){for(;L.length<=f;)L.push(k(L.length));i.exports=C.apply(void 0,[x].concat(L));for(var g=0;g<=f;++g)i.exports[g]=L[g]}M()},3327:function(i,a,o){\"use strict\";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),_=0;_<h;++_)v[_]=d;return v}function f(h,d,v,_){function b(C){return function(M,g,P){return M.getUniform(g.program,P[C])}}function p(C){return function(g){for(var P=k(\"\",C),A=0;A<P.length;++A){var z=P[A],O=z[0],U=z[1];if(_[U]){var G=g;if(typeof O==\"string\"&&(O.indexOf(\".\")===0||O.indexOf(\"[\")===0)){var Z=O;if(O.indexOf(\".\")===0&&(Z=O.slice(1)),Z.indexOf(\"]\")===Z.length-1){var j=Z.indexOf(\"[\"),N=Z.slice(0,j),H=Z.slice(j+1,Z.length-1);G=N?g[N][H]:g[H]}else G=g[Z]}var re=v[U].type,oe;switch(re){case\"bool\":case\"int\":case\"sampler2D\":case\"samplerCube\":h.uniform1i(_[U],G);break;case\"float\":h.uniform1f(_[U],G);break;default:var _e=re.indexOf(\"vec\");if(0<=_e&&_e<=1&&re.length===4+_e){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l(\"\",\"Invalid data type\");switch(re.charAt(0)){case\"b\":case\"i\":h[\"uniform\"+oe+\"iv\"](_[U],G);break;case\"v\":h[\"uniform\"+oe+\"fv\"](_[U],G);break;default:throw new l(\"\",\"Unrecognized data type for vector \"+name+\": \"+re)}}else if(re.indexOf(\"mat\")===0&&re.length===4){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+re);h[\"uniformMatrix\"+oe+\"fv\"](_[U],!1,G);break}else throw new l(\"\",\"Unknown uniform data type for \"+name+\": \"+re)}}}}}function k(C,M){if(typeof M!=\"object\")return[[C,M]];var g=[];for(var P in M){var A=M[P],z=C;parseInt(P)+\"\"===P?z+=\"[\"+P+\"]\":z+=\".\"+P,typeof A==\"object\"?g.push.apply(g,k(z,A)):g.push([z,A])}return g}function E(C){switch(C){case\"bool\":return!1;case\"int\":case\"sampler2D\":case\"samplerCube\":return 0;case\"float\":return 0;default:var M=C.indexOf(\"vec\");if(0<=M&&M<=1&&C.length===4+M){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l(\"\",\"Invalid data type\");return C.charAt(0)===\"b\"?c(g,!1):c(g,0)}else if(C.indexOf(\"mat\")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+C);return c(g*g,0)}else throw new l(\"\",\"Unknown uniform data type for \"+name+\": \"+C)}}function T(C,M,g){if(typeof g==\"object\"){var P=L(g);Object.defineProperty(C,M,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else _[g]?Object.defineProperty(C,M,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[M]=E(v[g].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var g=0;g<C.length;++g)T(M,g,C[g])}else{M={};for(var P in C)T(M,P,C[P])}return M}var x=s(v,!0);return{get:u(L(x)),set:p(x),enumerable:!0,configurable:!0}}},3349:function(i){\"use strict\";function a(){return function(f,h,d,v,_,b){var p=f[0],k=d[0],E=[0],T=k;v|=0;var L=0,x=k;for(L=0;L<p;++L){{var C=h[v]-b,M=h[v+T]-b;C>=0!=M>=0&&_.push(E[0]+.5+.5*(C+M)/(C-M))}v+=x,++E[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,_,b){var p=v.dtype,k=v.order,E=[p,k.join()].join(),T=h[E];return T||(h[E]=T=f([p,k])),T(v.shape.slice(0),v.data,v.stride,v.offset|0,_,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:\"zeroCrossings\"})},3352:function(i,a,o){\"use strict\";var s=o(2478),l=0,u=1,c=2;i.exports=P;function f(A,z,O,U,G){this.mid=A,this.left=z,this.right=O,this.leftPoints=U,this.rightPoints=G,this.count=(z?z.count:0)+(O?O.count:0)+U.length}var h=f.prototype;function d(A,z){A.mid=z.mid,A.left=z.left,A.right=z.right,A.leftPoints=z.leftPoints,A.rightPoints=z.rightPoints,A.count=z.count}function v(A,z){var O=C(z);A.mid=O.mid,A.left=O.left,A.right=O.right,A.leftPoints=O.leftPoints,A.rightPoints=O.rightPoints,A.count=O.count}function _(A,z){var O=A.intervals([]);O.push(z),v(A,O)}function b(A,z){var O=A.intervals([]),U=O.indexOf(z);return U<0?l:(O.splice(U,1),v(A,O),u)}h.intervals=function(A){return A.push.apply(A,this.leftPoints),this.left&&this.left.intervals(A),this.right&&this.right.intervals(A),A},h.insert=function(A){var z=this.count-this.leftPoints.length;if(this.count+=1,A[1]<this.mid)this.left?4*(this.left.count+1)>3*(z+1)?_(this,A):this.left.insert(A):this.left=C([A]);else if(A[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?_(this,A):this.right.insert(A):this.right=C([A]);else{var O=s.ge(this.leftPoints,A,L),U=s.ge(this.rightPoints,A,x);this.leftPoints.splice(O,0,A),this.rightPoints.splice(U,0,A)}},h.remove=function(A){var z=this.count-this.leftPoints;if(A[1]<this.mid){if(!this.left)return l;var O=this.right?this.right.count:0;if(4*O>3*(z-1))return b(this,A);var U=this.left.remove(A);return U===c?(this.left=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else if(A[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,A);var U=this.right.remove(A);return U===c?(this.right=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===A?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===A){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,U=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=U}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,A,L);N<this.leftPoints.length&&this.leftPoints[N][0]===A[0];++N)if(this.leftPoints[N]===A){this.count-=1,this.leftPoints.splice(N,1);for(var U=s.ge(this.rightPoints,A,x);U<this.rightPoints.length&&this.rightPoints[U][1]===A[1];++U)if(this.rightPoints[U]===A)return this.rightPoints.splice(U,1),u}return l}};function p(A,z,O){for(var U=0;U<A.length&&A[U][0]<=z;++U){var G=O(A[U]);if(G)return G}}function k(A,z,O){for(var U=A.length-1;U>=0&&A[U][1]>=z;--U){var G=O(A[U]);if(G)return G}}function E(A,z){for(var O=0;O<A.length;++O){var U=z(A[O]);if(U)return U}}h.queryPoint=function(A,z){if(A<this.mid){if(this.left){var O=this.left.queryPoint(A,z);if(O)return O}return p(this.leftPoints,A,z)}else if(A>this.mid){if(this.right){var O=this.right.queryPoint(A,z);if(O)return O}return k(this.rightPoints,A,z)}else return E(this.leftPoints,z)},h.queryInterval=function(A,z,O){if(A<this.mid&&this.left){var U=this.left.queryInterval(A,z,O);if(U)return U}if(z>this.mid&&this.right){var U=this.right.queryInterval(A,z,O);if(U)return U}return z<this.mid?p(this.leftPoints,z,O):A>this.mid?k(this.rightPoints,A,O):E(this.leftPoints,O)};function T(A,z){return A-z}function L(A,z){var O=A[0]-z[0];return O||A[1]-z[1]}function x(A,z){var O=A[1]-z[1];return O||A[0]-z[0]}function C(A){if(A.length===0)return null;for(var z=[],O=0;O<A.length;++O)z.push(A[O][0],A[O][1]);z.sort(T);for(var U=z[z.length>>1],G=[],Z=[],j=[],O=0;O<A.length;++O){var N=A[O];N[1]<U?G.push(N):U<N[0]?Z.push(N):j.push(N)}var H=j,re=j.slice();return H.sort(L),re.sort(x),new f(U,C(G),C(Z),H,re)}function M(A){this.root=A}var g=M.prototype;g.insert=function(A){this.root?this.root.insert(A):this.root=new f(A[0],null,null,[A],[A])},g.remove=function(A){if(this.root){var z=this.root.remove(A);return z===c&&(this.root=null),z!==l}return!1},g.queryPoint=function(A,z){if(this.root)return this.root.queryPoint(A,z)},g.queryInterval=function(A,z,O){if(A<=z&&this.root)return this.root.queryInterval(A,z,O)},Object.defineProperty(g,\"count\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(g,\"intervals\",{get:function(){return this.root?this.root.intervals([]):[]}});function P(A){return!A||A.length===0?new M(null):new M(C(A))}},3387:function(i,a,o){var s;(function(){\"use strict\";var l={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 u(v){return f(d(v),arguments)}function c(v,_){return u.apply(null,[v].concat(_||[]))}function f(v,_){var b=1,p=v.length,k,E=\"\",T,L,x,C,M,g,P,A;for(T=0;T<p;T++)if(typeof v[T]==\"string\")E+=v[T];else if(typeof v[T]==\"object\"){if(x=v[T],x.keys)for(k=_[b],L=0;L<x.keys.length;L++){if(k==null)throw new Error(u('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',x.keys[L],x.keys[L-1]));k=k[x.keys[L]]}else x.param_no?k=_[x.param_no]:k=_[b++];if(l.not_type.test(x.type)&&l.not_primitive.test(x.type)&&k instanceof Function&&(k=k()),l.numeric_arg.test(x.type)&&typeof k!=\"number\"&&isNaN(k))throw new TypeError(u(\"[sprintf] expecting number but found %T\",k));switch(l.number.test(x.type)&&(P=k>=0),x.type){case\"b\":k=parseInt(k,10).toString(2);break;case\"c\":k=String.fromCharCode(parseInt(k,10));break;case\"d\":case\"i\":k=parseInt(k,10);break;case\"j\":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case\"e\":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case\"f\":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case\"g\":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case\"o\":k=(parseInt(k,10)>>>0).toString(8);break;case\"s\":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case\"t\":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case\"T\":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case\"u\":k=parseInt(k,10)>>>0;break;case\"v\":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case\"x\":k=(parseInt(k,10)>>>0).toString(16);break;case\"X\":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?E+=k:(l.number.test(x.type)&&(!P||x.sign)?(A=P?\"+\":\"-\",k=k.toString().replace(l.sign,\"\")):A=\"\",M=x.pad_char?x.pad_char===\"0\"?\"0\":x.pad_char.charAt(1):\" \",g=x.width-(A+k).length,C=x.width&&g>0?M.repeat(g):\"\",E+=x.align?A+k+C:M===\"0\"?A+C+k:C+A+k)}return E}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var _=v,b,p=[],k=0;_;){if((b=l.text.exec(_))!==null)p.push(b[0]);else if((b=l.modulo.exec(_))!==null)p.push(\"%\");else if((b=l.placeholder.exec(_))!==null){if(b[2]){k|=1;var E=[],T=b[2],L=[];if((L=l.key.exec(T))!==null)for(E.push(L[1]);(T=T.substring(L[0].length))!==\"\";)if((L=l.key_access.exec(T))!==null)E.push(L[1]);else if((L=l.index_access.exec(T))!==null)E.push(L[1]);else throw new SyntaxError(\"[sprintf] failed to parse named argument key\");else throw new SyntaxError(\"[sprintf] failed to parse named argument key\");b[2]=E}else k|=2;if(k===3)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError(\"[sprintf] unexpected placeholder\");_=_.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!=\"undefined\"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},3436:function(i,a,o){\"use strict\";var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, offset;\n",
       "attribute vec4 color;\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float capSize;\n",
       "varying vec4 fragColor;\n",
       "varying vec3 fragPosition;\n",
       "\n",
       "void 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",
       "}`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float opacity;\n",
       "varying vec3 fragPosition;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n",
       "    fragColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "\n",
       "  gl_FragColor = opacity * fragColor;\n",
       "}`]);i.exports=function(f){return l(f,u,c,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"offset\",type:\"vec3\"}])}},3502:function(i,a,o){i.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\\_|texture)/.test(l)}),i.exports=s.concat([\"gl_VertexID\",\"gl_InstanceID\",\"gl_Position\",\"gl_PointSize\",\"gl_FragCoord\",\"gl_FrontFacing\",\"gl_FragDepth\",\"gl_PointCoord\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexUniformVectors\",\"gl_MaxVertexOutputVectors\",\"gl_MaxFragmentInputVectors\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxTextureImageUnits\",\"gl_MaxFragmentUniformVectors\",\"gl_MaxDrawBuffers\",\"gl_MinProgramTexelOffset\",\"gl_MaxProgramTexelOffset\",\"gl_DepthRangeParameters\",\"gl_DepthRange\",\"trunc\",\"round\",\"roundEven\",\"isnan\",\"isinf\",\"floatBitsToInt\",\"floatBitsToUint\",\"intBitsToFloat\",\"uintBitsToFloat\",\"packSnorm2x16\",\"unpackSnorm2x16\",\"packUnorm2x16\",\"unpackUnorm2x16\",\"packHalf2x16\",\"unpackHalf2x16\",\"outerProduct\",\"transpose\",\"determinant\",\"inverse\",\"texture\",\"textureSize\",\"textureProj\",\"textureLod\",\"textureOffset\",\"texelFetch\",\"texelFetchOffset\",\"textureProjOffset\",\"textureLodOffset\",\"textureProjLod\",\"textureProjLodOffset\",\"textureGrad\",\"textureGradOffset\",\"textureProjGrad\",\"textureProjGradOffset\"])},3536:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},3545:function(i,a,o){\"use strict\";i.exports=f;var s=o(8105),l=s(\"lo<p0\"),u=8;function c(h,d,v,_,b,p){for(var k=2*h,E=k*(v+1)+d,T=v+1;T<_;++T,E+=k)for(var L=b[E],x=T,C=k*(T-1);x>v&&b[C+d]>L;--x,C-=k){for(var M=C,g=C+k,P=0;P<k;++P,++M,++g){var A=b[M];b[M]=b[g],b[g]=A}var z=p[x];p[x]=p[x-1],p[x-1]=z}}function f(h,d,v,_,b,p){if(_<=v+1)return v;for(var k=v,E=_,T=_+v>>>1,L=2*h,x=T,C=b[L*T+d];k<E;){if(E-k<u){c(h,d,k,E,b,p),C=b[L*T+d];break}var M=E-k,g=Math.random()*M+k|0,P=b[L*g+d],A=Math.random()*M+k|0,z=b[L*A+d],O=Math.random()*M+k|0,U=b[L*O+d];P<=z?U>=z?(x=A,C=z):P>=U?(x=g,C=P):(x=O,C=U):z>=U?(x=A,C=z):U>=P?(x=g,C=P):(x=O,C=U);for(var j=L*(E-1),N=L*x,G=0;G<L;++G,++j,++N){var Z=b[j];b[j]=b[N],b[N]=Z}var H=p[E-1];p[E-1]=p[x],p[x]=H,x=l(h,d,k,E-1,b,p,C);for(var j=L*(E-1),N=L*x,G=0;G<L;++G,++j,++N){var Z=b[j];b[j]=b[N],b[N]=Z}var H=p[E-1];if(p[E-1]=p[x],p[x]=H,T<x){for(E=x-1;k<E&&b[L*(E-1)+d]===C;)E-=1;E+=1}else if(x<T)for(k=x+1;k<E&&b[L*k+d]===C;)k+=1;else break}return l(h,d,v,T,b,p,b[L*T+d])}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},3589:function(i,a,o){\"use strict\";i.exports=_;var s=o(2260),l=o(1888),u=o(9618),c=o(8828).nextPow2,f=function(b,p,k){for(var E=1e8,T=-1,L=-1,x=b.shape[0],C=b.shape[1],M=0;M<x;M++)for(var g=0;g<C;g++){var P=b.get(M,g,0),A=b.get(M,g,1),z=b.get(M,g,2),O=b.get(M,g,3);if(P<255||A<255||z<255||O<255){var U=p-M,G=k-g,Z=U*U+G*G;Z<E&&(E=Z,T=M,L=g)}}return[T,L,E]};function h(b,p,k,E,T){this.coord=[b,p],this.id=k,this.value=E,this.distance=T}function d(b,p,k){this.gl=b,this.fbo=p,this.buffer=k,this._readTimeout=null;var E=this;this._readCallback=function(){E.gl&&(p.bind(),b.readPixels(0,0,p.shape[0],p.shape[1],b.RGBA,b.UNSIGNED_BYTE,E.buffer),E._readTimeout=null)}}var v=d.prototype;Object.defineProperty(v,\"shape\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(b){if(this.gl){this.fbo.shape=b;var p=this.fbo.shape[0],k=this.fbo.shape[1];if(k*p*4>this.buffer.length){l.free(this.buffer);for(var E=this.buffer=l.mallocUint8(c(k*p*4)),T=0;T<k*p*4;++T)E[T]=255}return b}}}),v.begin=function(){var b=this.gl,p=this.shape;b&&(this.fbo.bind(),b.clearColor(1,1,1,1),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT))},v.end=function(){var b=this.gl;b&&(b.bindFramebuffer(b.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},v.query=function(b,p,k){if(!this.gl)return null;var E=this.fbo.shape.slice();b=b|0,p=p|0,typeof k!=\"number\"&&(k=1);var T=Math.min(Math.max(b-k,0),E[0])|0,L=Math.min(Math.max(b+k,0),E[0])|0,x=Math.min(Math.max(p-k,0),E[1])|0,C=Math.min(Math.max(p+k,0),E[1])|0;if(L<=T||C<=x)return null;var M=[L-T,C-x],g=u(this.buffer,[M[0],M[1],4],[4,E[0]*4,1],4*(T+E[0]*x)),P=f(g.hi(M[0],M[1],1),k,k),A=P[0],z=P[1];if(A<0||Math.pow(this.radius,2)<P[2])return null;var O=g.get(A,z,0),U=g.get(A,z,1),G=g.get(A,z,2),Z=g.get(A,z,3);return new h(A+T|0,z+x|0,O,[U,G,Z],Math.sqrt(P[2]))},v.dispose=function(){this.gl&&(this.fbo.dispose(),l.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function _(b,p){var k=p[0],E=p[1],T={},L=s(b,k,E,T),x=l.mallocUint8(k*E*4);return new d(b,L,x)}},3628:function(i,a,o){\"use strict\";var s=o(1338),l=o(727);function u(h,d){for(var v=0,_=h.length,b=0;b<_;++b)v+=h[b]*d[b];return v}function c(h){var d=h.length;if(d===0)return[];var v=h[0].length,_=s([h.length+1,h.length+1],1),b=s([h.length+1],1);_[d][d]=0;for(var p=0;p<d;++p){for(var k=0;k<=p;++k)_[k][p]=_[p][k]=2*u(h[p],h[k]);b[p]=u(h[p],h[p])}for(var E=l(_,b),T=0,L=E[d+1],p=0;p<L.length;++p)T+=L[p];for(var x=new Array(d),p=0;p<d;++p){for(var L=E[p],C=0,k=0;k<L.length;++k)C+=L[k];x[p]=C/T}return x}function f(h){if(h.length===0)return[];for(var d=h[0].length,v=s([d]),_=c(h),b=0;b<h.length;++b)for(var p=0;p<d;++p)v[p]+=h[b][p]*_[b];return v}f.barycenetric=c,i.exports=f},3637:function(i,a,o){\"use strict\";i.exports=_;var s=o(6504),l=o(8697),u=o(5572),c=o(7721),f=o(544),h=o(2653),d=o(8987);function v(b,p){return u(s(b[0],p[1]),s(b[1],p[0]))}function _(b,p,k,E){var T=f(p,b),L=f(E,k),x=v(T,L);if(c(x)===0)return null;var C=f(b,k),M=v(L,C),g=l(M,x),P=d(T,g),A=h(b,P);return A}},3642:function(i){i.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]}],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]}],\"rainbow-soft\":[{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]}],\"freesurface-blue\":[{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]}],\"freesurface-red\":[{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]}],\"velocity-blue\":[{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]}],\"velocity-green\":[{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]}]}},3711:function(i,a,o){\"use strict\";i.exports=d;var s=o(2640),l=o(781),u={\"2d\":function(v,_,b){var p=v({order:_,scalarArguments:3,getters:b===\"generic\"?[0]:void 0,phase:function(E,T,L,x){return E>x|0},vertex:function(E,T,L,x,C,M,g,P,A,z,O,U,G){var Z=(g<<0)+(P<<1)+(A<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:O.push([E-.5,T-.5]);break;case 1:O.push([E-.25-.25*(x+L-2*G)/(L-x),T-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:O.push([E-.75-.25*(-x-L+2*G)/(x-L),T-.25-.25*(M+x-2*G)/(x-M)]);break;case 3:O.push([E-.5,T-.5-.5*(C+L+M+x-4*G)/(L-C+x-M)]);break;case 4:O.push([E-.25-.25*(M+C-2*G)/(C-M),T-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:O.push([E-.5-.5*(x+L+M+C-4*G)/(L-x+C-M),T-.5]);break;case 6:O.push([E-.5-.25*(-x-L+M+C)/(x-L+C-M),T-.5-.25*(-C-L+M+x)/(C-L+x-M)]);break;case 7:O.push([E-.75-.25*(M+C-2*G)/(C-M),T-.75-.25*(M+x-2*G)/(x-M)]);break;case 8:O.push([E-.75-.25*(-M-C+2*G)/(M-C),T-.75-.25*(-M-x+2*G)/(M-x)]);break;case 9:O.push([E-.5-.25*(x+L+-M-C)/(L-x+M-C),T-.5-.25*(C+L+-M-x)/(L-C+M-x)]);break;case 10:O.push([E-.5-.5*(-x-L+-M-C+4*G)/(x-L+M-C),T-.5]);break;case 11:O.push([E-.25-.25*(-M-C+2*G)/(M-C),T-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:O.push([E-.5,T-.5-.5*(-C-L+-M-x+4*G)/(C-L+M-x)]);break;case 13:O.push([E-.75-.25*(x+L-2*G)/(L-x),T-.25-.25*(-M-x+2*G)/(M-x)]);break;case 14:O.push([E-.25-.25*(-x-L+2*G)/(x-L),T-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:O.push([E-.5,T-.5]);break}},cell:function(E,T,L,x,C,M,g,P,A){C?P.push([E,T]):P.push([T,E])}});return function(k,E){var T=[],L=[];return p(k,T,L,E),{positions:T,cells:L}}}};function c(v,_){var b=v.length+\"d\",p=u[b];if(p)return p(s,v,_)}function f(v,_){for(var b=l(v,_),p=b.length,k=new Array(p),E=new Array(p),T=0;T<p;++T)k[T]=[b[T]],E[T]=[T];return{positions:k,cells:E}}var h={};function d(v,k){if(v.dimension<=0)return{positions:[],cells:[]};if(v.dimension===1)return f(v,k);var b=v.order.join()+\"-\"+v.dtype,p=h[b],k=+k||0;return p||(p=h[b]=c(v.order,v.dtype)),p(v,k)}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3778:function(i,a){a.read=function(o,s,l,u,c){var f,h,d=c*8-u-1,v=(1<<d)-1,_=v>>1,b=-7,p=l?c-1:0,k=l?-1:1,E=o[s+p];for(p+=k,f=E&(1<<-b)-1,E>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-_;else{if(f===v)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-_}return(E?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,_=f*8-c-1,b=(1<<_)-1,p=b>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=u?0:f-1,T=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+E]=d&255,E+=T,d/=256,c-=8);for(h=h<<c|d,_+=c;_>0;o[l+E]=h&255,E+=T,h/=256,_-=8);o[l+E-T]|=L*128}},3788:function(i,a,o){\"use strict\";var s=o(8507),l=o(2419);i.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},3837:function(i,a,o){\"use strict\";i.exports=O;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function _(U){return d.isView(U)&&!(U instanceof v)}function b(U){return Array.isArray(U)||_(U)}function p(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U}function k(U){this.gl=U,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=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickFontStyle=[\"normal\",\"normal\",\"normal\"],this.tickFontWeight=[\"normal\",\"normal\",\"normal\"],this.tickFontVariant=[\"normal\",\"normal\",\"normal\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=[\"auto\",\"auto\",\"auto\"],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=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.labelFontStyle=[\"normal\",\"normal\",\"normal\"],this.labelFontWeight=[\"normal\",\"normal\",\"normal\"],this.labelFontVariant=[\"normal\",\"normal\",\"normal\"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=[\"auto\",\"auto\",\"auto\"],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=u(U)}var E=k.prototype;E.update=function(U){U=U||{};function G(Ae,Be,Pe){if(Pe in U){var me=U[Pe],De=this[Pe],ce;(Ae?b(me)&&b(me[0]):b(me))?this[Pe]=ce=[Be(me[0]),Be(me[1]),Be(me[2])]:this[Pe]=ce=[Be(me),Be(me),Be(me)];for(var je=0;je<3;++je)if(ce[je]!==De[je])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(Ae){if(b(Ae)){if(Ae.length===3)return[+Ae[0],+Ae[1],+Ae[2],1];if(Ae.length===4)return[+Ae[0],+Ae[1],+Ae[2],+Ae[3]]}return[0,0,0,1]}),re,oe=!1,_e=!1;if(\"bounds\"in U)for(var Ce=U.bounds,Le=0;Le<2;++Le)for(var ge=0;ge<3;++ge)Ce[Le][ge]!==this.bounds[Le][ge]&&(_e=!0),this.bounds[Le][ge]=Ce[Le][ge];if(\"ticks\"in U){re=U.ticks,oe=!0,this.autoTicks=!1;for(var Le=0;Le<3;++Le)this.tickSpacing[Le]=0}else Z(\"tickSpacing\")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&(\"ticks\"in U||\"tickSpacing\"in U||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var Le=0;Le<3;++Le)re[Le].sort(function(Be,Pe){return Be.x-Pe.x});f.equal(re,this.ticks)?oe=!1:this.ticks=re}j(\"tickEnable\"),N(\"tickFont\")&&(oe=!0),N(\"tickFontStyle\")&&(oe=!0),N(\"tickFontWeight\")&&(oe=!0),N(\"tickFontVariant\")&&(oe=!0),Z(\"tickSize\"),Z(\"tickAngle\"),Z(\"tickPad\"),H(\"tickColor\");var ie=N(\"labels\");N(\"labelFont\")&&(ie=!0),N(\"labelFontStyle\")&&(ie=!0),N(\"labelFontWeight\")&&(ie=!0),N(\"labelFontVariant\")&&(ie=!0),j(\"labelEnable\"),Z(\"labelSize\"),Z(\"labelPad\"),H(\"labelColor\"),j(\"lineEnable\"),j(\"lineMirror\"),Z(\"lineWidth\"),H(\"lineColor\"),j(\"lineTickEnable\"),j(\"lineTickMirror\"),Z(\"lineTickLength\"),Z(\"lineTickWidth\"),H(\"lineTickColor\"),j(\"gridEnable\"),Z(\"gridWidth\"),H(\"gridColor\"),j(\"zeroEnable\"),H(\"zeroLineColor\"),Z(\"zeroLineWidth\"),j(\"backgroundEnable\"),H(\"backgroundColor\");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Ee),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new T,new T,new T];function x(U,G,Z,j,N){for(var H=U.primalOffset,re=U.primalMinor,oe=U.mirrorOffset,_e=U.mirrorMinor,Ce=j[G],Le=0;Le<3;++Le)if(G!==Le){var ge=H,ie=oe,Se=re,Ee=_e;Ce&1<<Le&&(ge=oe,ie=H,Se=_e,Ee=re),ge[Le]=Z[0][Le],ie[Le]=Z[1][Le],N[Le]>0?(Se[Le]=-1,Ee[Le]=0):(Se[Le]=0,Ee[Le]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(U){};var g=0,P=[0,0,0],A=[0,0,0],z=[0,0,0];E.draw=function(U){U=U||M;for(var Pe=this.gl,G=U.model||h,Z=U.view||h,j=U.projection||h,N=this.bounds,H=U._ortho||!1,re=c(G,Z,j,N,H),oe=re.cubeEdges,_e=re.axis,Ce=Z[12],Le=Z[13],ge=Z[14],ie=Z[15],Se=H?2:1,Ee=Se*this.pixelRatio*(j[3]*Ce+j[7]*Le+j[11]*ge+j[15]*ie)/Pe.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=oe[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var Be=L,Ae=0;Ae<3;++Ae)x(L[Ae],Ae,this.bounds,oe,_e);for(var Pe=this.gl,me=C,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?me[Ae]=_e[Ae]:me[Ae]=0;this._background.draw(G,Z,j,N,me,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var Ae=0;Ae<3;++Ae){var De=[0,0,0];_e[Ae]>0?De[Ae]=N[1][Ae]:De[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var je=(Ae+1+ce)%3,lt=(Ae+1+(ce^1))%3;this.gridEnable[je]&&this._lines.drawGrid(je,lt,this.bounds,De,this.gridColor[je],this.gridWidth[je]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var je=(Ae+1+ce)%3,lt=(Ae+1+(ce^1))%3;this.zeroEnable[lt]&&Math.min(N[0][lt],N[1][lt])<=0&&Math.max(N[0][lt],N[1][lt])>=0&&this._lines.drawZero(je,lt,this.bounds,De,this.zeroLineColor[lt],this.zeroLineWidth[lt]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Be[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Be[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var pt=p(P,Be[Ae].primalMinor),Vt=p(A,Be[Ae].mirrorMinor),ot=this.lineTickLength,ce=0;ce<3;++ce){var ut=Ee/G[5*ce];pt[ce]*=ot[ce]*ut,Vt[ce]*=ot[ce]*ut}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,Be[Ae].primalOffset,pt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,Be[Ae].mirrorOffset,Vt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var Wt,Nt=.5,$t,sr;function Tr(_t){sr=[0,0,0],sr[_t]=1}function fr(_t,It,mt){var er=(_t+1)%3,lr=(_t+2)%3,wr=It[er],Lr=It[lr],ti=mt[er],Br=mt[lr];if(wr>0&&Br>0){Tr(er);return}else if(wr>0&&Br<0){Tr(er);return}else if(wr<0&&Br>0){Tr(er);return}else if(wr<0&&Br<0){Tr(er);return}else if(Lr>0&&ti>0){Tr(lr);return}else if(Lr>0&&ti<0){Tr(lr);return}else if(Lr<0&&ti>0){Tr(lr);return}else if(Lr<0&&ti<0){Tr(lr);return}}for(var Ae=0;Ae<3;++Ae){for(var $e=Be[Ae].primalMinor,St=Be[Ae].mirrorMinor,Qt=p(z,Be[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(Qt[ce]+=Ee*$e[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Gt=[0,0,0];if(Gt[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]=\"auto\"):this.tickAlign[Ae]=-1,$t=1,Wt=[this.tickAlign[Ae],Nt,$t],Wt[0]===\"auto\"?Wt[0]=g:Wt[0]=parseInt(\"\"+Wt[0]),sr=[0,0,0],fr(Ae,$e,St);for(var ce=0;ce<3;++ce)Qt[ce]+=Ee*$e[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],Qt,this.tickColor[Ae],Gt,sr,Wt)}if(this.labelEnable[Ae]){$t=0,sr=[0,0,0],this.labels[Ae].length>4&&(Tr(Ae),$t=1),Wt=[this.labelAlign[Ae],Nt,$t],Wt[0]===\"auto\"?Wt[0]=g:Wt[0]=parseInt(\"\"+Wt[0]);for(var ce=0;ce<3;++ce)Qt[ce]+=Ee*$e[ce]*this.labelPad[ce]/G[5*ce];Qt[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],Qt,this.labelColor[Ae],[0,0,0],sr,Wt)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(U,G){var Z=new k(U);return Z.update(G),Z}},3840:function(i){\"use strict\";i.exports=L;var a=0,o=1;function s(x,C,M,g,P,A){this._color=x,this.key=C,this.value=M,this.left=g,this.right=P,this._count=A}function l(x){return new s(x._color,x.key,x.value,x.left,x.right,x._count)}function u(x,C){return new s(x,C.key,C.value,C.left,C.right,C._count)}function c(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function f(x,C){this._compare=x,this.root=C}var h=f.prototype;Object.defineProperty(h,\"keys\",{get:function(){var x=[];return this.forEach(function(C,M){x.push(C)}),x}}),Object.defineProperty(h,\"values\",{get:function(){var x=[];return this.forEach(function(C,M){x.push(M)}),x}}),Object.defineProperty(h,\"length\",{get:function(){return this.root?this.root._count:0}}),h.insert=function(x,C){for(var M=this._compare,g=this.root,P=[],A=[];g;){var z=M(x,g.key);P.push(g),A.push(z),z<=0?g=g.left:g=g.right}P.push(new s(a,x,C,null,null,1));for(var O=P.length-2;O>=0;--O){var g=P[O];A[O]<=0?P[O]=new s(g._color,g.key,g.value,P[O+1],g.right,g._count+1):P[O]=new s(g._color,g.key,g.value,g.left,P[O+1],g._count+1)}for(var O=P.length-1;O>1;--O){var U=P[O-1],g=P[O];if(U._color===o||g._color===o)break;var G=P[O-2];if(G.left===U)if(U.left===g){var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.left=U.right,U._color=o,U.right=G,P[O-2]=U,P[O-1]=g,c(G),c(U),O>=3){var j=P[O-3];j.left===G?j.left=U:j.right=U}break}}else{var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(U.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=U,g.right=G,P[O-2]=g,P[O-1]=U,c(G),c(U),c(g),O>=3){var j=P[O-3];j.left===G?j.left=g:j.right=g}break}}else if(U.right===g){var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.right=U.left,U._color=o,U.left=G,P[O-2]=U,P[O-1]=g,c(G),c(U),O>=3){var j=P[O-3];j.right===G?j.right=U:j.left=U}break}}else{var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(U.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=U,g.left=G,P[O-2]=g,P[O-1]=U,c(G),c(U),c(g),O>=3){var j=P[O-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(M,P[0])};function d(x,C){if(C.left){var M=d(x,C.left);if(M)return M}var M=x(C.key,C.value);if(M)return M;if(C.right)return d(x,C.right)}function v(x,C,M,g){var P=C(x,g.key);if(P<=0){if(g.left){var A=v(x,C,M,g.left);if(A)return A}var A=M(g.key,g.value);if(A)return A}if(g.right)return v(x,C,M,g.right)}function _(x,C,M,g,P){var A=M(x,P.key),z=M(C,P.key),O;if(A<=0&&(P.left&&(O=_(x,C,M,g,P.left),O)||z>0&&(O=g(P.key,P.value),O)))return O;if(z>0&&P.right)return _(x,C,M,g,P.right)}h.forEach=function(C,M,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(M,this._compare,C,this.root);case 3:return this._compare(M,g)>=0?void 0:_(M,g,this._compare,C,this.root)}},Object.defineProperty(h,\"begin\",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,\"end\",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(x<C.left._count){C=C.left;continue}x-=C.left._count}if(!x)return new b(this,M);if(x-=1,C.right){if(x>=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A<=0&&(P=g.length),A<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A<0&&(P=g.length),A<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A>0&&(P=g.length),A<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A>=0&&(P=g.length),A<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,M=this.root,g=[];M;){var P=C(x,M.key);if(g.push(M),P===0)return new b(this,g);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,M=this.root;M;){var g=C(x,M.key);if(g===0)return M.value;g<=0?M=M.left:M=M.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,\"valid\",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,\"node\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function E(x){for(var C,M,g,P,A=x.length-1;A>=0;--A){if(C=x[A],A===0){C._color=o;return}if(M=x[A-1],M.left===C){if(g=M.right,g.right&&g.right._color===a){if(g=M.right=l(g),P=g.right=l(g.right),M.right=g.left,g.left=M,g.right=P,g._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(g),A>1){var z=x[A-2];z.left===M?z.left=g:z.right=g}x[A-1]=g;return}else if(g.left&&g.left._color===a){if(g=M.right=l(g),P=g.left=l(g.left),M.right=P.left,g.left=P.right,P.left=M,P.right=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),A>1){var z=x[A-2];z.left===M?z.left=P:z.right=P}x[A-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.right=u(a,g);return}else{M.right=u(a,g);continue}else{if(g=l(g),M.right=g.left,g.left=M,g._color=M._color,M._color=a,c(M),c(g),A>1){var z=x[A-2];z.left===M?z.left=g:z.right=g}x[A-1]=g,x[A]=M,A+1<x.length?x[A+1]=C:x.push(C),A=A+2}}else{if(g=M.left,g.left&&g.left._color===a){if(g=M.left=l(g),P=g.left=l(g.left),M.left=g.right,g.right=M,g.left=P,g._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(g),A>1){var z=x[A-2];z.right===M?z.right=g:z.left=g}x[A-1]=g;return}else if(g.right&&g.right._color===a){if(g=M.left=l(g),P=g.right=l(g.right),M.left=P.right,g.right=P.left,P.right=M,P.left=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),A>1){var z=x[A-2];z.right===M?z.right=P:z.left=P}x[A-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.left=u(a,g);return}else{M.left=u(a,g);continue}else{if(g=l(g),M.left=g.right,g.right=M,g._color=M._color,M._color=a,c(M),c(g),A>1){var z=x[A-2];z.right===M?z.right=g:z.left=g}x[A-1]=g,x[A]=M,A+1<x.length?x[A+1]=C:x.push(C),A=A+2}}}}p.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var C=new Array(x.length),M=x[x.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var g=x.length-2;g>=0;--g){var M=x[g];M.left===x[g+1]?C[g]=new s(M._color,M.key,M.value,C[g+1],M.right,M._count):C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var P=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var A=C[P-1];C.push(new s(M._color,A.key,A.value,M.left,M.right,M._count)),C[P-1].key=M.key,C[P-1].value=M.value;for(var g=C.length-2;g>=P;--g)M=C[g],C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count);C[P-1].left=C[P]}if(M=C[C.length-1],M._color===a){var z=C[C.length-2];z.left===M?z.left=null:z.right===M&&(z.right=null),C.pop();for(var g=0;g<C.length;++g)C[g]._count--;return new f(this.tree._compare,C[0])}else if(M.left||M.right){M.left?k(M,M.left):M.right&&k(M,M.right),M._color=o;for(var g=0;g<C.length-1;++g)C[g]._count--;return new f(this.tree._compare,C[0])}else{if(C.length===1)return new f(this.tree._compare,null);for(var g=0;g<C.length;++g)C[g]._count--;var O=C[C.length-2];E(C),O.left===M?O.left=null:O.right=null}return new f(this.tree._compare,C[0])},Object.defineProperty(p,\"key\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,\"value\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,\"index\",{get:function(){var x=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,\"hasNext\",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error(\"Can't update empty node!\");var M=new Array(C.length),g=C[C.length-1];M[M.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?M[P]=new s(g._color,g.key,g.value,M[P+1],g.right,g._count):M[P]=new s(g._color,g.key,g.value,g.left,M[P+1],g._count);return new f(this.tree._compare,M[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,\"hasPrev\",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function T(x,C){return x<C?-1:x>C?1:0}function L(x){return new f(x||T,null)}},3865:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},3952:function(i,a,o){\"use strict\";i.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d<c.length;++d)h[d]=c[d];for(var d=0;d<=c.length;++d){for(var v=c.length;v<=f;++v){for(var _=new Array(f),b=0;b<f;++b)_[b]=Math.pow(v+1-d,b);h[v]=_}var p=s.apply(void 0,h);if(p)return!0}return!1}function u(c){var f=c.length;if(f===0)return[];if(f===1)return[0];for(var h=c[0].length,d=[c[0]],v=[0],_=1;_<f;++_){if(d.push(c[_]),!l(d,h)){d.pop();continue}if(v.push(_),v.length===h+1)return v}return v}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},4008:function(i,a,o){i.exports=o(6690)},4025:function(i,a,o){\"use strict\";var s=o(2361),l=o(8828).countTrailingZeros;i.exports=u;function u(c){var f=l(s.lo(c));if(f<32)return f;var h=l(s.hi(c));return h>20?52:h+32}},4040:function(i){i.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),v=1/(u-c),_=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*v,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*_,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*v,o[14]=(h+f)*_,o[15]=1,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],_=l[3],b=_*u+d*f-v*c,p=_*c+v*u-h*f,k=_*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*_+E*-h+p*-v-k*-d,o[1]=p*_+E*-d+k*-h-b*-v,o[2]=k*_+E*-v+b*-d-p*-h,o[3]=s[3],o}},4081:function(i){\"use strict\";i.exports=a;function a(o,s,l,u,c,f,h,d,v,_){var b=s+f+_;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,_),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},4100:function(i,a,o){\"use strict\";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),_=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function E(){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 T(g,P){var A=null;try{A=g.getContext(\"webgl\",P),A||(A=g.getContext(\"experimental-webgl\",P))}catch(z){return null}return A}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var A=Math.round(Math.pow(10,-P));return Math.ceil(g*A)/A}else if(P>0){var A=Math.round(Math.pow(10,P));return Math.ceil(g/A)*A}return Math.ceil(g)}function x(g){return typeof g==\"boolean\"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement(\"canvas\"),g.container){var A=g.container;A.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=T(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error(\"webgl not supported\");var O=g.bounds||[[-10,-10,-10],[10,10,10]],U=new E,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type===\"orthographic\"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||\"turntable\",_ortho:j},H=g.axes||{},re=l(z,H);re.enable=!H.disable;var oe=g.spikes||{},_e=c(z,oe),Ce=[],Le=[],ge=[],ie=[],Se=!0,Pe=!0,Ee=new Array(16),Ae=new Array(16),Be={view:null,projection:Ee,model:Ae,_ortho:!1},Pe=!0,me=[z.drawingBufferWidth,z.drawingBufferHeight],De=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:U,camera:De,axes:re,axesPixels:null,spikes:_e,bounds:O,objects:Ce,shape:me,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:Be,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(sr){this.aspect[0]=sr.x,this.aspect[1]=sr.y,this.aspect[2]=sr.z,Pe=!0},setBounds:function(sr,Tr){this.bounds[0][sr]=Tr.min,this.bounds[1][sr]=Tr.max},setClearColor:function(sr){this.clearColor=sr},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},je=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function lt(){if(!ce._stopped&&ce.autoResize){var sr=P.parentNode,Tr=1,fr=1;sr&&sr!==document.body?(Tr=sr.clientWidth,fr=sr.clientHeight):(Tr=window.innerWidth,fr=window.innerHeight);var $e=Math.ceil(Tr*ce.pixelRatio)|0,St=Math.ceil(fr*ce.pixelRatio)|0;if($e!==P.width||St!==P.height){P.width=$e,P.height=St;var Qt=P.style;Qt.position=Qt.position||\"absolute\",Qt.left=\"0px\",Qt.top=\"0px\",Qt.width=Tr+\"px\",Qt.height=fr+\"px\",Se=!0}}}ce.autoResize&&lt(),window.addEventListener(\"resize\",lt);function pt(){for(var sr=Ce.length,Tr=ie.length,fr=0;fr<Tr;++fr)ge[fr]=0;e:for(var fr=0;fr<sr;++fr){var $e=Ce[fr],St=$e.pickSlots;if(!St){Le[fr]=-1;continue}for(var Qt=0;Qt<Tr;++Qt)if(ge[Qt]+St<255){Le[fr]=Qt,$e.setPickBase(ge[Qt]+1),ge[Qt]+=St;continue e}var Gt=f(z,me);Le[fr]=Tr,ie.push(Gt),ge.push(St),$e.setPickBase(1),Tr+=1}for(;Tr>0&&ge[Tr-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(sr){ce._stopped||(sr=sr||{},Se=!0,Pe=!0)},ce.add=function(sr){ce._stopped||(sr.axes=re,Ce.push(sr),Le.push(-1),Se=!0,Pe=!0,pt())},ce.remove=function(sr){if(!ce._stopped){var Tr=Ce.indexOf(sr);Tr<0||(Ce.splice(Tr,1),Le.pop(),Se=!0,Pe=!0,pt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener(\"resize\",lt),P.removeEventListener(\"webglcontextlost\",Vt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var sr=0;sr<Ce.length;++sr)Ce[sr].dispose();G.dispose();for(var sr=0;sr<ie.length;++sr)ie[sr].dispose();Z.dispose(),z=null,re=null,_e=null,Ce=[]}},ce._mouseRotating=!1,ce._prevButtons=0,ce.enableMouseListeners=function(){ce.mouseListener=v(P,function(sr,Tr,fr){if(!ce._stopped){var $e=ie.length,St=Ce.length,Qt=U.object;U.distance=1/0,U.mouse[0]=Tr,U.mouse[1]=fr,U.object=null,U.screen=null,U.dataCoordinate=U.dataPosition=null;var Gt=!1;if(sr&&ce._prevButtons)ce._mouseRotating=!0;else{ce._mouseRotating&&(Pe=!0),ce._mouseRotating=!1;for(var _t=0;_t<$e;++_t){var It=ie[_t].query(Tr,je[1]-fr-1,ce.pickRadius);if(It){if(It.distance>U.distance)continue;for(var mt=0;mt<St;++mt){var er=Ce[mt];if(Le[mt]===_t){var lr=er.pick(It);lr&&(U.buttons=sr,U.screen=It.coord,U.distance=It.distance,U.object=er,U.index=lr.distance,U.dataPosition=lr.position,U.dataCoordinate=lr.dataCoordinate,U.data=lr,Gt=!0)}}}}}Qt&&Qt!==U.object&&(Qt.highlight&&Qt.highlight(null),Se=!0),U.object&&(U.object.highlight&&U.object.highlight(U.data),Se=!0),Gt=Gt||U.object!==Qt,Gt&&ce.onselect&&ce.onselect(U),sr&1&&!(ce._prevButtons&1)&&ce.onclick&&ce.onclick(U),ce._prevButtons=sr}})};function Vt(){if(ce.contextLost)return!0;z.isContextLost()&&(ce.contextLost=!0,ce.mouseListener.enabled=!1,ce.selection.object=null,ce.oncontextloss&&ce.oncontextloss())}P.addEventListener(\"webglcontextlost\",Vt);function ot(){if(!Vt()){z.colorMask(!0,!0,!0,!0),z.depthMask(!0),z.disable(z.BLEND),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL);for(var sr=Ce.length,Tr=ie.length,fr=0;fr<Tr;++fr){var $e=ie[fr];$e.shape=je,$e.begin();for(var St=0;St<sr;++St)if(Le[St]===fr){var Qt=Ce[St];Qt.drawPick&&(Qt.pixelRatio=1,Qt.drawPick(Be))}$e.end()}}}var ut=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Wt=[ut[0].slice(),ut[1].slice()];function Nt(){if(!Vt()){lt();var sr=ce.camera.tick();Be.view=ce.camera.matrix,Se=Se||sr,Pe=Pe||sr,re.pixelRatio=ce.pixelRatio,_e.pixelRatio=ce.pixelRatio;var Tr=Ce.length,fr=ut[0],$e=ut[1];fr[0]=fr[1]=fr[2]=1/0,$e[0]=$e[1]=$e[2]=-1/0;for(var St=0;St<Tr;++St){var Qt=Ce[St];Qt.pixelRatio=ce.pixelRatio,Qt.axes=ce.axes,Se=Se||!!Qt.dirty,Pe=Pe||!!Qt.dirty;var Gt=Qt.bounds;if(Gt)for(var _t=Gt[0],It=Gt[1],mt=0;mt<3;++mt)fr[mt]=Math.min(fr[mt],_t[mt]),$e[mt]=Math.max($e[mt],It[mt])}var er=ce.bounds;if(ce.autoBounds)for(var mt=0;mt<3;++mt){if($e[mt]<fr[mt])fr[mt]=-1,$e[mt]=1;else{fr[mt]===$e[mt]&&(fr[mt]-=1,$e[mt]+=1);var lr=.05*($e[mt]-fr[mt]);fr[mt]=fr[mt]-lr,$e[mt]=$e[mt]+lr}er[0][mt]=fr[mt],er[1][mt]=$e[mt]}for(var wr=!1,mt=0;mt<3;++mt)wr=wr||Wt[0][mt]!==er[0][mt]||Wt[1][mt]!==er[1][mt],Wt[0][mt]=er[0][mt],Wt[1][mt]=er[1][mt];if(Pe=Pe||wr,Se=Se||wr,!!Se){if(wr){for(var Lr=[0,0,0],St=0;St<3;++St)Lr[St]=L((er[1][St]-er[0][St])/10);re.autoTicks?re.update({bounds:er,tickSpacing:Lr}):re.update({bounds:er})}var ti=z.drawingBufferWidth,Br=z.drawingBufferHeight;me[0]=ti,me[1]=Br,je[0]=Math.max(ti/ce.pixelRatio,1)|0,je[1]=Math.max(Br/ce.pixelRatio,1)|0,M(ce,j);for(var St=0;St<Tr;++St){var Qt=Ce[St];Qt.axesBounds=er,ce.clipToBounds&&(Qt.clipBounds=er)}U.object&&(ce.snapToData?_e.position=U.dataCoordinate:_e.position=U.dataPosition,_e.bounds=er),Pe&&(Pe=!1,ot()),ce.axesPixels=u(ce.axes,Be,ti,Br),ce.onrender&&ce.onrender(),z.bindFramebuffer(z.FRAMEBUFFER,null),z.viewport(0,0,ti,Br),ce.clearRGBA(),z.depthMask(!0),z.colorMask(!0,!0,!0,!0),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL),z.disable(z.BLEND),z.disable(z.CULL_FACE);var Vr=!1;re.enable&&(Vr=Vr||re.isTransparent(),re.draw(Be)),_e.axes=re,U.object&&_e.draw(Be),z.disable(z.CULL_FACE);for(var St=0;St<Tr;++St){var Qt=Ce[St];Qt.axes=re,Qt.pixelRatio=ce.pixelRatio,Qt.isOpaque&&Qt.isOpaque()&&Qt.draw(Be),Qt.isTransparent&&Qt.isTransparent()&&(Vr=!0)}if(Vr){G.shape=me,G.bind(),z.clear(z.DEPTH_BUFFER_BIT),z.colorMask(!1,!1,!1,!1),z.depthMask(!0),z.depthFunc(z.LESS),re.enable&&re.isTransparent()&&re.drawTransparent(Be);for(var St=0;St<Tr;++St){var Qt=Ce[St];Qt.isOpaque&&Qt.isOpaque()&&Qt.draw(Be)}z.enable(z.BLEND),z.blendEquation(z.FUNC_ADD),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.colorMask(!0,!0,!0,!0),z.depthMask(!1),z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT),re.isTransparent()&&re.drawTransparent(Be);for(var St=0;St<Tr;++St){var Qt=Ce[St];Qt.isTransparent&&Qt.isTransparent()&&Qt.drawTransparent(Be)}z.bindFramebuffer(z.FRAMEBUFFER,null),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.disable(z.DEPTH_TEST),Z.bind(),G.color[0].bind(0),Z.uniforms.accumBuffer=0,d(z),z.disable(z.BLEND)}Se=!1;for(var St=0;St<Tr;++St)Ce[St].dirty=!1}}}function $t(){ce._stopped||ce.contextLost||(Nt(),requestAnimationFrame($t))}return ce.enableMouseListeners(),$t(),ce.redraw=function(){ce._stopped||(Se=!0,Nt())},ce}function M(g,P){var A=g.bounds,z=g.cameraParams,O=z.projection,U=z.model,G=g.gl.drawingBufferWidth,Z=g.gl.drawingBufferHeight,j=g.zNear,N=g.zFar,H=g.fovy,re=G/Z;P?(b(O,-re,re,-1,1,j,N),z._ortho=!0):(_(O,H,re,j,N),z._ortho=!1);for(var oe=0;oe<16;++oe)U[oe]=0;U[15]=1;for(var _e=0,oe=0;oe<3;++oe)_e=Math.max(_e,A[1][oe]-A[0][oe]);for(var oe=0;oe<3;++oe)g.autoScale?U[5*oe]=g.aspect[oe]/(A[1][oe]-A[0][oe]):U[5*oe]=1/_e,g.autoCenter&&(U[12+oe]=-U[5*oe]*.5*(A[0][oe]+A[1][oe]))}},4192:function(i){\"use strict\";i.exports=o;var a=32;function o(_,b){b<=4*a?s(0,b-1,_):v(0,b-1,_)}function s(_,b,p){for(var k=2*(_+1),E=_+1;E<=b;++E){for(var T=p[k++],L=p[k++],x=E,C=k-2;x-- >_;){var M=p[C-2],g=p[C-1];if(M<T)break;if(M===T&&g<L)break;p[C]=M,p[C+1]=g,C-=2}p[C]=T,p[C+1]=L}}function l(_,b,p){_*=2,b*=2;var k=p[_],E=p[_+1];p[_]=p[b],p[_+1]=p[b+1],p[b]=k,p[b+1]=E}function u(_,b,p){_*=2,b*=2,p[_]=p[b],p[_+1]=p[b+1]}function c(_,b,p,k){_*=2,b*=2,p*=2;var E=k[_],T=k[_+1];k[_]=k[b],k[_+1]=k[b+1],k[b]=k[p],k[b+1]=k[p+1],k[p]=E,k[p+1]=T}function f(_,b,p,k,E){_*=2,b*=2,E[_]=E[b],E[b]=p,E[_+1]=E[b+1],E[b+1]=k}function h(_,b,p){_*=2,b*=2;var k=p[_],E=p[b];return k<E?!1:k===E?p[_+1]>p[b+1]:!0}function d(_,b,p,k){_*=2;var E=k[_];return E<b?!0:E===b?k[_+1]<p:!1}function v(_,b,p){var k=(b-_+1)/6|0,E=_+k,T=b-k,L=_+b>>1,x=L-k,C=L+k,M=E,g=x,P=L,A=C,z=T,O=_+1,U=b-1,G=0;h(M,g,p)&&(G=M,M=g,g=G),h(A,z,p)&&(G=A,A=z,z=G),h(M,P,p)&&(G=M,M=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(M,A,p)&&(G=M,M=A,A=G),h(P,A,p)&&(G=P,P=A,A=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(A,z,p)&&(G=A,A=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*A],H=p[2*A+1],re=2*M,oe=2*P,_e=2*z,Ce=2*E,Le=2*L,ge=2*T,ie=0;ie<2;++ie){var Se=p[re+ie],Ee=p[oe+ie],Ae=p[_e+ie];p[Ce+ie]=Se,p[Le+ie]=Ee,p[ge+ie]=Ae}u(x,_,p),u(C,b,p);for(var Be=O;Be<=U;++Be)if(d(Be,Z,j,p))Be!==O&&l(Be,O,p),++O;else if(!d(Be,N,H,p))for(;;)if(d(U,N,H,p)){d(U,Z,j,p)?(c(Be,O,U,p),++O,--U):(l(Be,U,p),--U);break}else{if(--U<Be)break;continue}f(_,O-1,Z,j,p),f(b,U+1,N,H,p),O-2-_<=a?s(_,O-2,p):v(_,O-2,p),b-(U+2)<=a?s(U+2,b,p):v(U+2,b,p),U-O<=a?s(O,U,p):v(O,U,p)}},4209:function(i,a,o){\"use strict\";i.exports=p;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(k,E,T){this.slabs=k,this.coordinates=E,this.horizontal=T}var h=f.prototype;function d(k,E){return k.y-E}function v(k,E){for(var T=null;k;){var L=k.key,x,C;L[0][0]<L[1][0]?(x=L[0],C=L[1]):(x=L[1],C=L[0]);var M=u(x,C,E);if(M<0)k=k.left;else if(M>0)if(E[0]!==L[1][0])T=k,k=k.right;else{var g=v(k.right,E);if(g)return g;k=k.left}else{if(E[0]!==L[1][0])return k;var g=v(k.right,E);if(g)return g;k=k.left}}return T}h.castUp=function(k){var E=s.le(this.coordinates,k[0]);if(E<0)return-1;var T=this.slabs[E],L=v(this.slabs[E],k),x=-1;if(L&&(x=L.value),this.coordinates[E]===k[0]){var C=null;if(L&&(C=L.key),E>0){var M=v(this.slabs[E-1],k);M&&(C?c(M.key,C)>0&&(C=M.key,x=M.value):(x=M.value,C=M.key))}var g=this.horizontal[E];if(g.length>0){var P=s.ge(g,k[1],d);if(P<g.length){var A=g[P];if(k[1]===A.y){if(A.closed)return A.index;for(;P<g.length-1&&g[P+1].y===k[1];)if(P=P+1,A=g[P],A.closed)return A.index;if(A.y===k[1]&&!A.start){if(P=P+1,P>=g.length)return x;A=g[P]}}if(A.start)if(C){var z=u(C[0],C[1],[k[0],A.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=A.index)}else x=A.index;else A.y!==k[1]&&(x=A.index)}}}return x};function _(k,E,T,L){this.y=k,this.index=E,this.start=T,this.closed=L}function b(k,E,T,L){this.x=k,this.segment=E,this.create=T,this.index=L}function p(k){for(var E=k.length,T=2*E,L=new Array(T),x=0;x<E;++x){var C=k[x],M=C[0][0]<C[1][0];L[2*x]=new b(C[0][0],C,M,x),L[2*x+1]=new b(C[1][0],C,!M,x)}L.sort(function(j,N){var H=j.x-N.x;return H||(H=j.create-N.create,H)?H:Math.min(j.segment[0][1],j.segment[1][1])-Math.min(N.segment[0][1],N.segment[1][1])});for(var g=l(c),P=[],A=[],z=[],O=-1/0,x=0;x<T;){for(var U=L[x].x,G=[];x<T;){var Z=L[x];if(Z.x!==U)break;x+=1,Z.segment[0][0]===Z.x&&Z.segment[1][0]===Z.x?Z.create&&(Z.segment[0][1]<Z.segment[1][1]?(G.push(new _(Z.segment[0][1],Z.index,!0,!0)),G.push(new _(Z.segment[1][1],Z.index,!1,!1))):(G.push(new _(Z.segment[1][1],Z.index,!0,!1)),G.push(new _(Z.segment[0][1],Z.index,!1,!0)))):Z.create?g=g.insert(Z.segment,Z.index):g=g.remove(Z.segment)}P.push(g.root),A.push(U),z.push(G)}return new f(P,A,z)}},4317:function(i){\"use strict\";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h<c.shape[0],_=0<=h+1&&h+1<c.shape[0],b=v?+c.get(h):0,p=_?+c.get(h+1):0;return(1-d)*b+d*p}function o(c,f,h){var d=Math.floor(f),v=f-d,_=0<=d&&d<c.shape[0],b=0<=d+1&&d+1<c.shape[0],p=Math.floor(h),k=h-p,E=0<=p&&p<c.shape[1],T=0<=p+1&&p+1<c.shape[1],L=_&&E?c.get(d,p):0,x=_&&T?c.get(d,p+1):0,C=b&&E?c.get(d+1,p):0,M=b&&T?c.get(d+1,p+1):0;return(1-k)*((1-v)*L+v*C)+k*((1-v)*x+v*M)}function s(c,f,h,d){var v=Math.floor(f),_=f-v,b=0<=v&&v<c.shape[0],p=0<=v+1&&v+1<c.shape[0],k=Math.floor(h),E=h-k,T=0<=k&&k<c.shape[1],L=0<=k+1&&k+1<c.shape[1],x=Math.floor(d),C=d-x,M=0<=x&&x<c.shape[2],g=0<=x+1&&x+1<c.shape[2],P=b&&T&&M?c.get(v,k,x):0,A=b&&L&&M?c.get(v,k+1,x):0,z=p&&T&&M?c.get(v+1,k,x):0,O=p&&L&&M?c.get(v+1,k+1,x):0,U=b&&T&&g?c.get(v,k,x+1):0,G=b&&L&&g?c.get(v,k+1,x+1):0,Z=p&&T&&g?c.get(v+1,k,x+1):0,j=p&&L&&g?c.get(v+1,k+1,x+1):0;return(1-C)*((1-E)*((1-_)*P+_*z)+E*((1-_)*A+_*O))+C*((1-E)*((1-_)*U+_*Z)+E*((1-_)*G+_*j))}function l(c){var f=c.shape.length|0,h=new Array(f),d=new Array(f),v=new Array(f),_=new Array(f),b,p;for(b=0;b<f;++b)p=+arguments[b+1],h[b]=Math.floor(p),d[b]=p-h[b],v[b]=0<=h[b]&&h[b]<c.shape[b],_[b]=0<=h[b]+1&&h[b]+1<c.shape[b];var k=0,E,T,L;e:for(b=0;b<1<<f;++b){for(T=1,L=c.offset,E=0;E<f;++E)if(b&1<<E){if(!_[E])continue e;T*=d[E],L+=c.stride[E]*(h[E]+1)}else{if(!v[E])continue e;T*=1-d[E],L+=c.stride[E]*h[E]}k+=T*c.data[L]}return k}function u(c,f,h,d){switch(c.shape.length){case 0:return 0;case 1:return a(c,f);case 2:return o(c,f,h);case 3:return s(c,f,h,d);default:return l.apply(void 0,arguments)}}i.exports=u,i.exports.d1=a,i.exports.d2=o,i.exports.d3=s},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},4359:function(i,a,o){\"use strict\";i.exports=c;var s=o(7718),l=null,u=null;typeof document!=\"undefined\"&&(l=document.createElement(\"canvas\"),l.width=8192,l.height=1024,u=l.getContext(\"2d\"));function c(f,h){return(typeof h!=\"object\"||h===null)&&(h={}),s(f,h.canvas||l,h.context||u,h)}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},4437:function(i,a,o){\"use strict\";i.exports=d;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),h=o(7520);function d(v,_){v=v||document.body,_=_||{};var b=[.01,1/0];\"distanceLimits\"in _&&(b[0]=_.distanceLimits[0],b[1]=_.distanceLimits[1]),\"zoomMin\"in _&&(b[0]=_.zoomMin),\"zoomMax\"in _&&(b[1]=_.zoomMax);var p=l({center:_.center||[0,0,0],up:_.up||[0,1,0],eye:_.eye||[0,0,10],mode:_.mode||\"orbit\",distanceLimits:b}),k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E=0,T=v.clientWidth,L=v.clientHeight,x={keyBindingMode:\"rotate\",enableWheel:!0,view:p,element:v,delay:_.delay||16,rotateSpeed:_.rotateSpeed||1,zoomSpeed:_.zoomSpeed||1,translateSpeed:_.translateSpeed||1,flipX:!!_.flipX,flipY:!!_.flipY,modes:p.modes,_ortho:_._ortho||_.projection&&_.projection.type===\"orthographic\"||!1,tick:function(){var C=s(),M=this.delay,g=C-2*M;p.idle(C-M),p.recalcMatrix(g),p.flush(C-(100+M*2));for(var P=!0,A=p.computedMatrix,z=0;z<16;++z)P=P&&k[z]===A[z],k[z]=A[z];var O=v.clientWidth===T&&v.clientHeight===L;return T=v.clientWidth,L=v.clientHeight,P?!O:(E=Math.exp(p.computedRadius[0]),!0)},lookAt:function(C,M,g){p.lookAt(p.lastT(),C,M,g)},rotate:function(C,M,g){p.rotate(p.lastT(),C,M,g)},pan:function(C,M,g){p.pan(p.lastT(),C,M,g)},translate:function(C,M,g){p.translate(p.lastT(),C,M,g)}};return Object.defineProperties(x,{matrix:{get:function(){return p.computedMatrix},set:function(C){return p.setMatrix(p.lastT(),C),p.computedMatrix},enumerable:!0},mode:{get:function(){return p.getMode()},set:function(C){var M=p.computedUp.slice(),g=p.computedEye.slice(),P=p.computedCenter.slice();if(p.setMode(C),C===\"turntable\"){var A=s();p._active.lookAt(A,g,P,M),p._active.lookAt(A+500,g,P,[0,0,1]),p._active.flush(A)}return p.getMode()},enumerable:!0},center:{get:function(){return p.computedCenter},set:function(C){return p.lookAt(p.lastT(),null,C),p.computedCenter},enumerable:!0},eye:{get:function(){return p.computedEye},set:function(C){return p.lookAt(p.lastT(),C),p.computedEye},enumerable:!0},up:{get:function(){return p.computedUp},set:function(C){return p.lookAt(p.lastT(),null,null,C),p.computedUp},enumerable:!0},distance:{get:function(){return E},set:function(C){return p.setDistance(p.lastT(),C),C},enumerable:!0},distanceLimits:{get:function(){return p.getDistanceLimits(b)},set:function(C){return p.setDistanceLimits(C),C},enumerable:!0}}),v.addEventListener(\"contextmenu\",function(C){return C.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){x.mouseListener=u(v,C),v.addEventListener(\"touchstart\",function(M){var g=f(M.changedTouches[0],v);C(0,g[0],g[1],x._lastMods),C(1,g[0],g[1],x._lastMods)},h?{passive:!0}:!1),v.addEventListener(\"touchmove\",function(M){var g=f(M.changedTouches[0],v);C(1,g[0],g[1],x._lastMods),M.preventDefault()},h?{passive:!1}:!1),v.addEventListener(\"touchend\",function(M){C(0,x._lastX,x._lastY,x._lastMods)},h?{passive:!0}:!1);function C(M,g,P,A){var z=x.keyBindingMode;if(z!==!1){var O=z===\"rotate\",U=z===\"pan\",G=z===\"zoom\",Z=!!A.control,j=!!A.alt,N=!!A.shift,H=!!(M&1),re=!!(M&2),oe=!!(M&4),_e=1/v.clientHeight,Ce=_e*(g-x._lastX),Le=_e*(P-x._lastY),ge=x.flipX?1:-1,ie=x.flipY?1:-1,Se=Math.PI*x.rotateSpeed,Ee=s();if(x._lastX!==-1&&x._lastY!==-1&&((O&&H&&!Z&&!j&&!N||H&&!Z&&!j&&N)&&p.rotate(Ee,ge*Se*Ce,-ie*Se*Le,0),(U&&H&&!Z&&!j&&!N||re||H&&Z&&!j&&!N)&&p.pan(Ee,-x.translateSpeed*Ce*E,x.translateSpeed*Le*E,0),G&&H&&!Z&&!j&&!N||oe||H&&!Z&&j&&!N)){var Ae=-x.zoomSpeed*Le/window.innerHeight*(Ee-p.lastT())*100;p.pan(Ee,0,0,E*(Math.exp(Ae)-1))}return x._lastX=g,x._lastY=P,x._lastMods=A,!0}}x.wheelListener=c(v,function(M,g){if(x.keyBindingMode!==!1&&x.enableWheel){var P=x.flipX?1:-1,A=x.flipY?1:-1,z=s();if(Math.abs(M)>Math.abs(g))p.rotate(z,0,0,-M*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var O=-x.zoomSpeed*A*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,E*(Math.exp(O)-1))}}},!0)},x.enableMouseListeners(),x}},4449:function(i,a,o){\"use strict\";var s=o(2762),l=o(8116),u=o(1493);i.exports=b;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,T){this.gl=p,this.buffer=k,this.vao=E,this.shader=T,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 h=f.prototype,d=[0,0,0],v=[0,0,0],_=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(p){},h.draw=function(p){var k=this.gl,E=this.vao,T=this.shader;E.bind(),T.bind();var L=p.model||c,x=p.view||c,C=p.projection||c,M;this.axes&&(M=this.axes.lastCubeProps.axis);for(var g=d,P=v,A=0;A<3;++A)M&&M[A]<0?(g[A]=this.bounds[0][A],P[A]=this.bounds[1][A]):(g[A]=this.bounds[1][A],P[A]=this.bounds[0][A]);_[0]=k.drawingBufferWidth,_[1]=k.drawingBufferHeight,T.uniforms.model=L,T.uniforms.view=x,T.uniforms.projection=C,T.uniforms.coordinates=[this.position,g,P],T.uniforms.colors=this.colors,T.uniforms.screenShape=_;for(var A=0;A<3;++A)T.uniforms.lineWidth=this.lineWidth[A]*this.pixelRatio,this.enabled[A]&&(E.draw(k.TRIANGLES,6,6*A),this.drawSides[A]&&E.draw(k.TRIANGLES,12,18+12*A));E.unbind()},h.update=function(p){p&&(\"bounds\"in p&&(this.bounds=p.bounds),\"position\"in p&&(this.position=p.position),\"lineWidth\"in p&&(this.lineWidth=p.lineWidth),\"colors\"in p&&(this.colors=p.colors),\"enabled\"in p&&(this.enabled=p.enabled),\"drawSides\"in p&&(this.drawSides=p.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(p,k){var E=[];function T(g,P,A,z,O,U){var G=[g,P,A,0,0,0,1];G[z+3]=1,G[z]=O,E.push.apply(E,G),G[6]=-1,E.push.apply(E,G),G[z]=U,E.push.apply(E,G),E.push.apply(E,G),G[6]=1,E.push.apply(E,G),G[z]=O,E.push.apply(E,G)}T(0,0,0,0,0,1),T(0,0,0,1,0,1),T(0,0,0,2,0,1),T(1,0,0,1,-1,1),T(1,0,0,2,-1,1),T(0,1,0,0,-1,1),T(0,1,0,2,-1,1),T(0,0,1,0,-1,1),T(0,0,1,1,-1,1);var L=s(p,E),x=l(p,[{type:p.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:p.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:p.FLOAT,buffer:L,size:1,offset:24,stride:28}]),C=u(p);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var M=new f(p,L,x,C);return M.update(k),M}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},4505:function(i,a,o){i.exports=o(5847)},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},4623:function(i){\"use strict\";\"use restrict\";i.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s<o;++s)this.roots[s]=s,this.ranks[s]=0}a.prototype.length=function(){return this.roots.length},a.prototype.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},a.prototype.find=function(o){for(var s=this.roots;s[o]!==o;){var l=s[o];s[o]=s[l],o=l}return o},a.prototype.link=function(o,s){var l=this.find(o),u=this.find(s);if(l!==u){var c=this.ranks,f=this.roots,h=c[l],d=c[u];h<d?f[l]=u:d<h?f[u]=l:(f[u]=l,++c[l])}}},4687:function(i,a){\"use strict\";function o(c){if(typeof c==\"object\"){if(\"buttons\"in c)return c.buttons;if(\"which\"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<<f-1}else if(\"button\"in c){var f=c.button;if(f===1)return 4;if(f===2)return 2;if(f>=0)return 1<<f}}return 0}a.buttons=o;function s(c){return c.target||c.srcElement||window}a.element=s;function l(c){if(typeof c==\"object\"){if(\"offsetX\"in c)return c.offsetX;var f=s(c),h=f.getBoundingClientRect();return c.clientX-h.left}return 0}a.x=l;function u(c){if(typeof c==\"object\"){if(\"offsetY\"in c)return c.offsetY;var f=s(c),h=f.getBoundingClientRect();return c.clientY-h.top}return 0}a.y=u},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},4750:function(i,a,o){\"use strict\";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v<f;++v){var _=c[v];h[v]=[d,_],d=_}return h}},4769:function(i){\"use strict\";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,_=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var p=s.length-1;p>=0;--p)h[p]=d*s[p]+v*l[p]+_*u[p]+b*c[p];return h}return d*s+v*l+_*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,_=d*d,b=(1+2*f)*_,p=f*_,k=v*(3-2*f),E=v*d;if(s.length){h||(h=new Array(s.length));for(var T=s.length-1;T>=0;--T)h[T]=b*s[T]+p*l[T]+k*u[T]+E*c[T];return h}return b*s+p*l+k*u+E*c}i.exports=o,i.exports.derivative=a},4772:function(i){i.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},4793:function(i,a,o){\"use strict\";var s;function l(Ie,xe){if(!(Ie instanceof xe))throw new TypeError(\"Cannot call a class as a function\")}function u(Ie,xe){for(var ke=0;ke<xe.length;ke++){var vt=xe[ke];vt.enumerable=vt.enumerable||!1,vt.configurable=!0,\"value\"in vt&&(vt.writable=!0),Object.defineProperty(Ie,f(vt.key),vt)}}function c(Ie,xe,ke){return xe&&u(Ie.prototype,xe),ke&&u(Ie,ke),Object.defineProperty(Ie,\"prototype\",{writable:!1}),Ie}function f(Ie){var xe=h(Ie,\"string\");return T(xe)==\"symbol\"?xe:xe+\"\"}function h(Ie,xe){if(T(Ie)!=\"object\"||!Ie)return Ie;var ke=Ie[Symbol.toPrimitive];if(ke!==void 0){var vt=ke.call(Ie,xe||\"default\");if(T(vt)!=\"object\")return vt;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(xe===\"string\"?String:Number)(Ie)}function d(Ie,xe,ke){return xe=p(xe),v(Ie,b()?Reflect.construct(xe,ke||[],p(Ie).constructor):xe.apply(Ie,ke))}function v(Ie,xe){if(xe&&(T(xe)==\"object\"||typeof xe==\"function\"))return xe;if(xe!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return _(Ie)}function _(Ie){if(Ie===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return Ie}function b(){try{var Ie=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(xe){}return(b=function(){return!!Ie})()}function p(Ie){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(xe){return xe.__proto__||Object.getPrototypeOf(xe)},p(Ie)}function k(Ie,xe){if(typeof xe!=\"function\"&&xe!==null)throw new TypeError(\"Super expression must either be null or a function\");Ie.prototype=Object.create(xe&&xe.prototype,{constructor:{value:Ie,writable:!0,configurable:!0}}),Object.defineProperty(Ie,\"prototype\",{writable:!1}),xe&&E(Ie,xe)}function E(Ie,xe){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ke,vt){return ke.__proto__=vt,ke},E(Ie,xe)}function T(Ie){\"@babel/helpers - typeof\";return T=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(xe){return typeof xe}:function(xe){return xe&&typeof Symbol==\"function\"&&xe.constructor===Symbol&&xe!==Symbol.prototype?\"symbol\":typeof xe},T(Ie)}var L=o(7507),x=o(3778),C=typeof Symbol==\"function\"&&typeof Symbol.for==\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;a.hp=A,s=_e,a.IS=50;var M=2147483647;s=M,A.TYPED_ARRAY_SUPPORT=g(),!A.TYPED_ARRAY_SUPPORT&&typeof console!=\"undefined\"&&typeof console.error==\"function\"&&console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");function g(){try{var Ie=new Uint8Array(1),xe={foo:function(){return 42}};return Object.setPrototypeOf(xe,Uint8Array.prototype),Object.setPrototypeOf(Ie,xe),Ie.foo()===42}catch(ke){return!1}}Object.defineProperty(A.prototype,\"parent\",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,\"offset\",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function P(Ie){if(Ie>M)throw new RangeError('The value \"'+Ie+'\" is invalid for option \"size\"');var xe=new Uint8Array(Ie);return Object.setPrototypeOf(xe,A.prototype),xe}function A(Ie,xe,ke){if(typeof Ie==\"number\"){if(typeof xe==\"string\")throw new TypeError('The \"string\" argument must be of type string. Received type number');return G(Ie)}return z(Ie,xe,ke)}A.poolSize=8192;function z(Ie,xe,ke){if(typeof Ie==\"string\")return Z(Ie,xe);if(ArrayBuffer.isView(Ie))return N(Ie);if(Ie==null)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+T(Ie));if(Ge(Ie,ArrayBuffer)||Ie&&Ge(Ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer!=\"undefined\"&&(Ge(Ie,SharedArrayBuffer)||Ie&&Ge(Ie.buffer,SharedArrayBuffer)))return H(Ie,xe,ke);if(typeof Ie==\"number\")throw new TypeError('The \"value\" argument must not be of type number. Received type number');var vt=Ie.valueOf&&Ie.valueOf();if(vt!=null&&vt!==Ie)return A.from(vt,xe,ke);var ir=re(Ie);if(ir)return ir;if(typeof Symbol!=\"undefined\"&&Symbol.toPrimitive!=null&&typeof Ie[Symbol.toPrimitive]==\"function\")return A.from(Ie[Symbol.toPrimitive](\"string\"),xe,ke);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+T(Ie))}A.from=function(Ie,xe,ke){return z(Ie,xe,ke)},Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array);function O(Ie){if(typeof Ie!=\"number\")throw new TypeError('\"size\" argument must be of type number');if(Ie<0)throw new RangeError('The value \"'+Ie+'\" is invalid for option \"size\"')}function U(Ie,xe,ke){return O(Ie),Ie<=0?P(Ie):xe!==void 0?typeof ke==\"string\"?P(Ie).fill(xe,ke):P(Ie).fill(xe):P(Ie)}A.alloc=function(Ie,xe,ke){return U(Ie,xe,ke)};function G(Ie){return O(Ie),P(Ie<0?0:oe(Ie)|0)}A.allocUnsafe=function(Ie){return G(Ie)},A.allocUnsafeSlow=function(Ie){return G(Ie)};function Z(Ie,xe){if((typeof xe!=\"string\"||xe===\"\")&&(xe=\"utf8\"),!A.isEncoding(xe))throw new TypeError(\"Unknown encoding: \"+xe);var ke=Ce(Ie,xe)|0,vt=P(ke),ir=vt.write(Ie,xe);return ir!==ke&&(vt=vt.slice(0,ir)),vt}function j(Ie){for(var xe=Ie.length<0?0:oe(Ie.length)|0,ke=P(xe),vt=0;vt<xe;vt+=1)ke[vt]=Ie[vt]&255;return ke}function N(Ie){if(Ge(Ie,Uint8Array)){var xe=new Uint8Array(Ie);return H(xe.buffer,xe.byteOffset,xe.byteLength)}return j(Ie)}function H(Ie,xe,ke){if(xe<0||Ie.byteLength<xe)throw new RangeError('\"offset\" is outside of buffer bounds');if(Ie.byteLength<xe+(ke||0))throw new RangeError('\"length\" is outside of buffer bounds');var vt;return xe===void 0&&ke===void 0?vt=new Uint8Array(Ie):ke===void 0?vt=new Uint8Array(Ie,xe):vt=new Uint8Array(Ie,xe,ke),Object.setPrototypeOf(vt,A.prototype),vt}function re(Ie){if(A.isBuffer(Ie)){var xe=oe(Ie.length)|0,ke=P(xe);return ke.length===0||Ie.copy(ke,0,0,xe),ke}if(Ie.length!==void 0)return typeof Ie.length!=\"number\"||Je(Ie.length)?P(0):j(Ie);if(Ie.type===\"Buffer\"&&Array.isArray(Ie.data))return j(Ie.data)}function oe(Ie){if(Ie>=M)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+M.toString(16)+\" bytes\");return Ie|0}function _e(Ie){return+Ie!=Ie&&(Ie=0),A.alloc(+Ie)}A.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==A.prototype},A.compare=function(xe,ke){if(Ge(xe,Uint8Array)&&(xe=A.from(xe,xe.offset,xe.byteLength)),Ge(ke,Uint8Array)&&(ke=A.from(ke,ke.offset,ke.byteLength)),!A.isBuffer(xe)||!A.isBuffer(ke))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(xe===ke)return 0;for(var vt=xe.length,ir=ke.length,ar=0,vr=Math.min(vt,ir);ar<vr;++ar)if(xe[ar]!==ke[ar]){vt=xe[ar],ir=ke[ar];break}return vt<ir?-1:ir<vt?1:0},A.isEncoding=function(xe){switch(String(xe).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},A.concat=function(xe,ke){if(!Array.isArray(xe))throw new TypeError('\"list\" argument must be an Array of Buffers');if(xe.length===0)return A.alloc(0);var vt;if(ke===void 0)for(ke=0,vt=0;vt<xe.length;++vt)ke+=xe[vt].length;var ir=A.allocUnsafe(ke),ar=0;for(vt=0;vt<xe.length;++vt){var vr=xe[vt];if(Ge(vr,Uint8Array))ar+vr.length>ir.length?(A.isBuffer(vr)||(vr=A.from(vr)),vr.copy(ir,ar)):Uint8Array.prototype.set.call(ir,vr,ar);else if(A.isBuffer(vr))vr.copy(ir,ar);else throw new TypeError('\"list\" argument must be an Array of Buffers');ar+=vr.length}return ir};function Ce(Ie,xe){if(A.isBuffer(Ie))return Ie.length;if(ArrayBuffer.isView(Ie)||Ge(Ie,ArrayBuffer))return Ie.byteLength;if(typeof Ie!=\"string\")throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+T(Ie));var ke=Ie.length,vt=arguments.length>2&&arguments[2]===!0;if(!vt&&ke===0)return 0;for(var ir=!1;;)switch(xe){case\"ascii\":case\"latin1\":case\"binary\":return ke;case\"utf8\":case\"utf-8\":return Lr(Ie).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ke*2;case\"hex\":return ke>>>1;case\"base64\":return Vr(Ie).length;default:if(ir)return vt?-1:Lr(Ie).length;xe=(\"\"+xe).toLowerCase(),ir=!0}}A.byteLength=Ce;function Le(Ie,xe,ke){var vt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((ke===void 0||ke>this.length)&&(ke=this.length),ke<=0)||(ke>>>=0,xe>>>=0,ke<=xe))return\"\";for(Ie||(Ie=\"utf8\");;)switch(Ie){case\"hex\":return ot(this,xe,ke);case\"utf8\":case\"utf-8\":return ce(this,xe,ke);case\"ascii\":return pt(this,xe,ke);case\"latin1\":case\"binary\":return Vt(this,xe,ke);case\"base64\":return De(this,xe,ke);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ut(this,xe,ke);default:if(vt)throw new TypeError(\"Unknown encoding: \"+Ie);Ie=(Ie+\"\").toLowerCase(),vt=!0}}A.prototype._isBuffer=!0;function ge(Ie,xe,ke){var vt=Ie[xe];Ie[xe]=Ie[ke],Ie[ke]=vt}A.prototype.swap16=function(){var xe=this.length;if(xe%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var ke=0;ke<xe;ke+=2)ge(this,ke,ke+1);return this},A.prototype.swap32=function(){var xe=this.length;if(xe%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var ke=0;ke<xe;ke+=4)ge(this,ke,ke+3),ge(this,ke+1,ke+2);return this},A.prototype.swap64=function(){var xe=this.length;if(xe%8!==0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var ke=0;ke<xe;ke+=8)ge(this,ke,ke+7),ge(this,ke+1,ke+6),ge(this,ke+2,ke+5),ge(this,ke+3,ke+4);return this},A.prototype.toString=function(){var xe=this.length;return xe===0?\"\":arguments.length===0?ce(this,0,xe):Le.apply(this,arguments)},A.prototype.toLocaleString=A.prototype.toString,A.prototype.equals=function(xe){if(!A.isBuffer(xe))throw new TypeError(\"Argument must be a Buffer\");return this===xe?!0:A.compare(this,xe)===0},A.prototype.inspect=function(){var xe=\"\",ke=a.IS;return xe=this.toString(\"hex\",0,ke).replace(/(.{2})/g,\"$1 \").trim(),this.length>ke&&(xe+=\" ... \"),\"<Buffer \"+xe+\">\"},C&&(A.prototype[C]=A.prototype.inspect),A.prototype.compare=function(xe,ke,vt,ir,ar){if(Ge(xe,Uint8Array)&&(xe=A.from(xe,xe.offset,xe.byteLength)),!A.isBuffer(xe))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+T(xe));if(ke===void 0&&(ke=0),vt===void 0&&(vt=xe?xe.length:0),ir===void 0&&(ir=0),ar===void 0&&(ar=this.length),ke<0||vt>xe.length||ir<0||ar>this.length)throw new RangeError(\"out of range index\");if(ir>=ar&&ke>=vt)return 0;if(ir>=ar)return-1;if(ke>=vt)return 1;if(ke>>>=0,vt>>>=0,ir>>>=0,ar>>>=0,this===xe)return 0;for(var vr=ar-ir,ii=vt-ke,pi=Math.min(vr,ii),$r=this.slice(ir,ar),di=xe.slice(ke,vt),ji=0;ji<pi;++ji)if($r[ji]!==di[ji]){vr=$r[ji],ii=di[ji];break}return vr<ii?-1:ii<vr?1:0};function ie(Ie,xe,ke,vt,ir){if(Ie.length===0)return-1;if(typeof ke==\"string\"?(vt=ke,ke=0):ke>2147483647?ke=2147483647:ke<-2147483648&&(ke=-2147483648),ke=+ke,Je(ke)&&(ke=ir?0:Ie.length-1),ke<0&&(ke=Ie.length+ke),ke>=Ie.length){if(ir)return-1;ke=Ie.length-1}else if(ke<0)if(ir)ke=0;else return-1;if(typeof xe==\"string\"&&(xe=A.from(xe,vt)),A.isBuffer(xe))return xe.length===0?-1:Se(Ie,xe,ke,vt,ir);if(typeof xe==\"number\")return xe=xe&255,typeof Uint8Array.prototype.indexOf==\"function\"?ir?Uint8Array.prototype.indexOf.call(Ie,xe,ke):Uint8Array.prototype.lastIndexOf.call(Ie,xe,ke):Se(Ie,[xe],ke,vt,ir);throw new TypeError(\"val must be string, number or Buffer\")}function Se(Ie,xe,ke,vt,ir){var ar=1,vr=Ie.length,ii=xe.length;if(vt!==void 0&&(vt=String(vt).toLowerCase(),vt===\"ucs2\"||vt===\"ucs-2\"||vt===\"utf16le\"||vt===\"utf-16le\")){if(Ie.length<2||xe.length<2)return-1;ar=2,vr/=2,ii/=2,ke/=2}function pi(wi,On){return ar===1?wi[On]:wi.readUInt16BE(On*ar)}var $r;if(ir){var di=-1;for($r=ke;$r<vr;$r++)if(pi(Ie,$r)===pi(xe,di===-1?0:$r-di)){if(di===-1&&(di=$r),$r-di+1===ii)return di*ar}else di!==-1&&($r-=$r-di),di=-1}else for(ke+ii>vr&&(ke=vr-ii),$r=ke;$r>=0;$r--){for(var ji=!0,In=0;In<ii;In++)if(pi(Ie,$r+In)!==pi(xe,In)){ji=!1;break}if(ji)return $r}return-1}A.prototype.includes=function(xe,ke,vt){return this.indexOf(xe,ke,vt)!==-1},A.prototype.indexOf=function(xe,ke,vt){return ie(this,xe,ke,vt,!0)},A.prototype.lastIndexOf=function(xe,ke,vt){return ie(this,xe,ke,vt,!1)};function Ee(Ie,xe,ke,vt){ke=Number(ke)||0;var ir=Ie.length-ke;vt?(vt=Number(vt),vt>ir&&(vt=ir)):vt=ir;var ar=xe.length;vt>ar/2&&(vt=ar/2);var vr;for(vr=0;vr<vt;++vr){var ii=parseInt(xe.substr(vr*2,2),16);if(Je(ii))return vr;Ie[ke+vr]=ii}return vr}function Ae(Ie,xe,ke,vt){return dt(Lr(xe,Ie.length-ke),Ie,ke,vt)}function Be(Ie,xe,ke,vt){return dt(ti(xe),Ie,ke,vt)}function Pe(Ie,xe,ke,vt){return dt(Vr(xe),Ie,ke,vt)}function me(Ie,xe,ke,vt){return dt(Br(xe,Ie.length-ke),Ie,ke,vt)}A.prototype.write=function(xe,ke,vt,ir){if(ke===void 0)ir=\"utf8\",vt=this.length,ke=0;else if(vt===void 0&&typeof ke==\"string\")ir=ke,vt=this.length,ke=0;else if(isFinite(ke))ke=ke>>>0,isFinite(vt)?(vt=vt>>>0,ir===void 0&&(ir=\"utf8\")):(ir=vt,vt=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");var ar=this.length-ke;if((vt===void 0||vt>ar)&&(vt=ar),xe.length>0&&(vt<0||ke<0)||ke>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");ir||(ir=\"utf8\");for(var vr=!1;;)switch(ir){case\"hex\":return Ee(this,xe,ke,vt);case\"utf8\":case\"utf-8\":return Ae(this,xe,ke,vt);case\"ascii\":case\"latin1\":case\"binary\":return Be(this,xe,ke,vt);case\"base64\":return Pe(this,xe,ke,vt);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return me(this,xe,ke,vt);default:if(vr)throw new TypeError(\"Unknown encoding: \"+ir);ir=(\"\"+ir).toLowerCase(),vr=!0}},A.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function De(Ie,xe,ke){return xe===0&&ke===Ie.length?L.fromByteArray(Ie):L.fromByteArray(Ie.slice(xe,ke))}function ce(Ie,xe,ke){ke=Math.min(Ie.length,ke);for(var vt=[],ir=xe;ir<ke;){var ar=Ie[ir],vr=null,ii=ar>239?4:ar>223?3:ar>191?2:1;if(ir+ii<=ke){var pi=void 0,$r=void 0,di=void 0,ji=void 0;switch(ii){case 1:ar<128&&(vr=ar);break;case 2:pi=Ie[ir+1],(pi&192)===128&&(ji=(ar&31)<<6|pi&63,ji>127&&(vr=ji));break;case 3:pi=Ie[ir+1],$r=Ie[ir+2],(pi&192)===128&&($r&192)===128&&(ji=(ar&15)<<12|(pi&63)<<6|$r&63,ji>2047&&(ji<55296||ji>57343)&&(vr=ji));break;case 4:pi=Ie[ir+1],$r=Ie[ir+2],di=Ie[ir+3],(pi&192)===128&&($r&192)===128&&(di&192)===128&&(ji=(ar&15)<<18|(pi&63)<<12|($r&63)<<6|di&63,ji>65535&&ji<1114112&&(vr=ji))}}vr===null?(vr=65533,ii=1):vr>65535&&(vr-=65536,vt.push(vr>>>10&1023|55296),vr=56320|vr&1023),vt.push(vr),ir+=ii}return lt(vt)}var je=4096;function lt(Ie){var xe=Ie.length;if(xe<=je)return String.fromCharCode.apply(String,Ie);for(var ke=\"\",vt=0;vt<xe;)ke+=String.fromCharCode.apply(String,Ie.slice(vt,vt+=je));return ke}function pt(Ie,xe,ke){var vt=\"\";ke=Math.min(Ie.length,ke);for(var ir=xe;ir<ke;++ir)vt+=String.fromCharCode(Ie[ir]&127);return vt}function Vt(Ie,xe,ke){var vt=\"\";ke=Math.min(Ie.length,ke);for(var ir=xe;ir<ke;++ir)vt+=String.fromCharCode(Ie[ir]);return vt}function ot(Ie,xe,ke){var vt=Ie.length;(!xe||xe<0)&&(xe=0),(!ke||ke<0||ke>vt)&&(ke=vt);for(var ir=\"\",ar=xe;ar<ke;++ar)ir+=We[Ie[ar]];return ir}function ut(Ie,xe,ke){for(var vt=Ie.slice(xe,ke),ir=\"\",ar=0;ar<vt.length-1;ar+=2)ir+=String.fromCharCode(vt[ar]+vt[ar+1]*256);return ir}A.prototype.slice=function(xe,ke){var vt=this.length;xe=~~xe,ke=ke===void 0?vt:~~ke,xe<0?(xe+=vt,xe<0&&(xe=0)):xe>vt&&(xe=vt),ke<0?(ke+=vt,ke<0&&(ke=0)):ke>vt&&(ke=vt),ke<xe&&(ke=xe);var ir=this.subarray(xe,ke);return Object.setPrototypeOf(ir,A.prototype),ir};function Wt(Ie,xe,ke){if(Ie%1!==0||Ie<0)throw new RangeError(\"offset is not uint\");if(Ie+xe>ke)throw new RangeError(\"Trying to access beyond buffer length\")}A.prototype.readUintLE=A.prototype.readUIntLE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr<ke&&(ar*=256);)ir+=this[xe+vr]*ar;return ir},A.prototype.readUintBE=A.prototype.readUIntBE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe+--ke],ar=1;ke>0&&(ar*=256);)ir+=this[xe+--ke]*ar;return ir},A.prototype.readUint8=A.prototype.readUInt8=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,1,this.length),this[xe]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,2,this.length),this[xe]|this[xe+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,2,this.length),this[xe]<<8|this[xe+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),(this[xe]|this[xe+1]<<8|this[xe+2]<<16)+this[xe+3]*16777216},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},A.prototype.readBigUInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,\"offset\");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),ar=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+vt*Math.pow(2,24);return BigInt(ir)+(BigInt(ar)<<BigInt(32))}),A.prototype.readBigUInt64BE=tt(function(xe){xe=xe>>>0,mt(xe,\"offset\");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],ar=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt;return(BigInt(ir)<<BigInt(32))+BigInt(ar)}),A.prototype.readIntLE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr<ke&&(ar*=256);)ir+=this[xe+vr]*ar;return ar*=128,ir>=ar&&(ir-=Math.pow(2,8*ke)),ir},A.prototype.readIntBE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=ke,ar=1,vr=this[xe+--ir];ir>0&&(ar*=256);)vr+=this[xe+--ir]*ar;return ar*=128,vr>=ar&&(vr-=Math.pow(2,8*ke)),vr},A.prototype.readInt8=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},A.prototype.readInt16LE=function(xe,ke){xe=xe>>>0,ke||Wt(xe,2,this.length);var vt=this[xe]|this[xe+1]<<8;return vt&32768?vt|4294901760:vt},A.prototype.readInt16BE=function(xe,ke){xe=xe>>>0,ke||Wt(xe,2,this.length);var vt=this[xe+1]|this[xe]<<8;return vt&32768?vt|4294901760:vt},A.prototype.readInt32LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},A.prototype.readInt32BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},A.prototype.readBigInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,\"offset\");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(vt<<24);return(BigInt(ir)<<BigInt(32))+BigInt(ke+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24))}),A.prototype.readBigInt64BE=tt(function(xe){xe=xe>>>0,mt(xe,\"offset\");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=(ke<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(ir)<<BigInt(32))+BigInt(this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt)}),A.prototype.readFloatLE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),x.read(this,xe,!0,23,4)},A.prototype.readFloatBE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),x.read(this,xe,!1,23,4)},A.prototype.readDoubleLE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,8,this.length),x.read(this,xe,!0,52,8)},A.prototype.readDoubleBE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,8,this.length),x.read(this,xe,!1,52,8)};function Nt(Ie,xe,ke,vt,ir,ar){if(!A.isBuffer(Ie))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(xe>ir||xe<ar)throw new RangeError('\"value\" argument is out of bounds');if(ke+vt>Ie.length)throw new RangeError(\"Index out of range\")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=1,ii=0;for(this[ke]=xe&255;++ii<vt&&(vr*=256);)this[ke+ii]=xe/vr&255;return ke+vt},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=vt-1,ii=1;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)this[ke+vr]=xe/ii&255;return ke+vt},A.prototype.writeUint8=A.prototype.writeUInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,255,0),this[ke]=xe&255,ke+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke+3]=xe>>>24,this[ke+2]=xe>>>16,this[ke+1]=xe>>>8,this[ke]=xe&255,ke+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4};function $t(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,ke}function sr(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke+7]=ar,ar=ar>>8,Ie[ke+6]=ar,ar=ar>>8,Ie[ke+5]=ar,ar=ar>>8,Ie[ke+4]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke+3]=vr,vr=vr>>8,Ie[ke+2]=vr,vr=vr>>8,Ie[ke+1]=vr,vr=vr>>8,Ie[ke]=vr,ke+8}A.prototype.writeBigUInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,ke,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),A.prototype.writeBigUInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),A.prototype.writeIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=0,ii=1,pi=0;for(this[ke]=xe&255;++vr<vt&&(ii*=256);)xe<0&&pi===0&&this[ke+vr-1]!==0&&(pi=1),this[ke+vr]=(xe/ii>>0)-pi&255;return ke+vt},A.prototype.writeIntBE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=vt-1,ii=1,pi=0;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)xe<0&&pi===0&&this[ke+vr+1]!==0&&(pi=1),this[ke+vr]=(xe/ii>>0)-pi&255;return ke+vt},A.prototype.writeInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,127,-128),xe<0&&(xe=255+xe+1),this[ke]=xe&255,ke+1},A.prototype.writeInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},A.prototype.writeInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},A.prototype.writeInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),this[ke]=xe&255,this[ke+1]=xe>>>8,this[ke+2]=xe>>>16,this[ke+3]=xe>>>24,ke+4},A.prototype.writeInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4},A.prototype.writeBigInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,ke,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),A.prototype.writeBigInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))});function Tr(Ie,xe,ke,vt,ir,ar){if(ke+vt>Ie.length)throw new RangeError(\"Index out of range\");if(ke<0)throw new RangeError(\"Index out of range\")}function fr(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||Tr(Ie,xe,ke,4,34028234663852886e22,-34028234663852886e22),x.write(Ie,xe,ke,vt,23,4),ke+4}A.prototype.writeFloatLE=function(xe,ke,vt){return fr(this,xe,ke,!0,vt)},A.prototype.writeFloatBE=function(xe,ke,vt){return fr(this,xe,ke,!1,vt)};function $e(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||Tr(Ie,xe,ke,8,17976931348623157e292,-17976931348623157e292),x.write(Ie,xe,ke,vt,52,8),ke+8}A.prototype.writeDoubleLE=function(xe,ke,vt){return $e(this,xe,ke,!0,vt)},A.prototype.writeDoubleBE=function(xe,ke,vt){return $e(this,xe,ke,!1,vt)},A.prototype.copy=function(xe,ke,vt,ir){if(!A.isBuffer(xe))throw new TypeError(\"argument should be a Buffer\");if(vt||(vt=0),!ir&&ir!==0&&(ir=this.length),ke>=xe.length&&(ke=xe.length),ke||(ke=0),ir>0&&ir<vt&&(ir=vt),ir===vt||xe.length===0||this.length===0)return 0;if(ke<0)throw new RangeError(\"targetStart out of bounds\");if(vt<0||vt>=this.length)throw new RangeError(\"Index out of range\");if(ir<0)throw new RangeError(\"sourceEnd out of bounds\");ir>this.length&&(ir=this.length),xe.length-ke<ir-vt&&(ir=xe.length-ke+vt);var ar=ir-vt;return this===xe&&typeof Uint8Array.prototype.copyWithin==\"function\"?this.copyWithin(ke,vt,ir):Uint8Array.prototype.set.call(xe,this.subarray(vt,ir),ke),ar},A.prototype.fill=function(xe,ke,vt,ir){if(typeof xe==\"string\"){if(typeof ke==\"string\"?(ir=ke,ke=0,vt=this.length):typeof vt==\"string\"&&(ir=vt,vt=this.length),ir!==void 0&&typeof ir!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof ir==\"string\"&&!A.isEncoding(ir))throw new TypeError(\"Unknown encoding: \"+ir);if(xe.length===1){var ar=xe.charCodeAt(0);(ir===\"utf8\"&&ar<128||ir===\"latin1\")&&(xe=ar)}}else typeof xe==\"number\"?xe=xe&255:typeof xe==\"boolean\"&&(xe=Number(xe));if(ke<0||this.length<ke||this.length<vt)throw new RangeError(\"Out of range index\");if(vt<=ke)return this;ke=ke>>>0,vt=vt===void 0?this.length:vt>>>0,xe||(xe=0);var vr;if(typeof xe==\"number\")for(vr=ke;vr<vt;++vr)this[vr]=xe;else{var ii=A.isBuffer(xe)?xe:A.from(xe,ir),pi=ii.length;if(pi===0)throw new TypeError('The value \"'+xe+'\" is invalid for argument \"value\"');for(vr=0;vr<vt-ke;++vr)this[vr+ke]=ii[vr%pi]}return this};var St={};function Qt(Ie,xe,ke){St[Ie]=function(vt){function ir(){var ar;return l(this,ir),ar=d(this,ir),Object.defineProperty(ar,\"message\",{value:xe.apply(ar,arguments),writable:!0,configurable:!0}),ar.name=\"\".concat(ar.name,\" [\").concat(Ie,\"]\"),ar.stack,delete ar.name,ar}return k(ir,vt),c(ir,[{key:\"code\",get:function(){return Ie},set:function(vr){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:vr,writable:!0})}},{key:\"toString\",value:function(){return\"\".concat(this.name,\" [\").concat(Ie,\"]: \").concat(this.message)}}])}(ke)}Qt(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(Ie){return Ie?\"\".concat(Ie,\" is outside of buffer bounds\"):\"Attempt to access memory outside buffer bounds\"},RangeError),Qt(\"ERR_INVALID_ARG_TYPE\",function(Ie,xe){return'The \"'.concat(Ie,'\" argument must be of type number. Received type ').concat(T(xe))},TypeError),Qt(\"ERR_OUT_OF_RANGE\",function(Ie,xe,ke){var vt='The value of \"'.concat(Ie,'\" is out of range.'),ir=ke;return Number.isInteger(ke)&&Math.abs(ke)>Math.pow(2,32)?ir=Gt(String(ke)):typeof ke==\"bigint\"&&(ir=String(ke),(ke>Math.pow(BigInt(2),BigInt(32))||ke<-Math.pow(BigInt(2),BigInt(32)))&&(ir=Gt(ir)),ir+=\"n\"),vt+=\" It must be \".concat(xe,\". Received \").concat(ir),vt},RangeError);function Gt(Ie){for(var xe=\"\",ke=Ie.length,vt=Ie[0]===\"-\"?1:0;ke>=vt+4;ke-=3)xe=\"_\".concat(Ie.slice(ke-3,ke)).concat(xe);return\"\".concat(Ie.slice(0,ke)).concat(xe)}function _t(Ie,xe,ke){mt(xe,\"offset\"),(Ie[xe]===void 0||Ie[xe+ke]===void 0)&&er(xe,Ie.length-(ke+1))}function It(Ie,xe,ke,vt,ir,ar){if(Ie>ke||Ie<xe){var vr=typeof xe==\"bigint\"?\"n\":\"\",ii;throw ar>3?xe===0||xe===BigInt(0)?ii=\">= 0\".concat(vr,\" and < 2\").concat(vr,\" ** \").concat((ar+1)*8).concat(vr):ii=\">= -(2\".concat(vr,\" ** \").concat((ar+1)*8-1).concat(vr,\") and < 2 ** \")+\"\".concat((ar+1)*8-1).concat(vr):ii=\">= \".concat(xe).concat(vr,\" and <= \").concat(ke).concat(vr),new St.ERR_OUT_OF_RANGE(\"value\",ii,Ie)}_t(vt,ir,ar)}function mt(Ie,xe){if(typeof Ie!=\"number\")throw new St.ERR_INVALID_ARG_TYPE(xe,\"number\",Ie)}function er(Ie,xe,ke){throw Math.floor(Ie)!==Ie?(mt(Ie,ke),new St.ERR_OUT_OF_RANGE(ke||\"offset\",\"an integer\",Ie)):xe<0?new St.ERR_BUFFER_OUT_OF_BOUNDS:new St.ERR_OUT_OF_RANGE(ke||\"offset\",\">= \".concat(ke?1:0,\" and <= \").concat(xe),Ie)}var lr=/[^+/0-9A-Za-z-_]/g;function wr(Ie){if(Ie=Ie.split(\"=\")[0],Ie=Ie.trim().replace(lr,\"\"),Ie.length<2)return\"\";for(;Ie.length%4!==0;)Ie=Ie+\"=\";return Ie}function Lr(Ie,xe){xe=xe||1/0;for(var ke,vt=Ie.length,ir=null,ar=[],vr=0;vr<vt;++vr){if(ke=Ie.charCodeAt(vr),ke>55295&&ke<57344){if(!ir){if(ke>56319){(xe-=3)>-1&&ar.push(239,191,189);continue}else if(vr+1===vt){(xe-=3)>-1&&ar.push(239,191,189);continue}ir=ke;continue}if(ke<56320){(xe-=3)>-1&&ar.push(239,191,189),ir=ke;continue}ke=(ir-55296<<10|ke-56320)+65536}else ir&&(xe-=3)>-1&&ar.push(239,191,189);if(ir=null,ke<128){if((xe-=1)<0)break;ar.push(ke)}else if(ke<2048){if((xe-=2)<0)break;ar.push(ke>>6|192,ke&63|128)}else if(ke<65536){if((xe-=3)<0)break;ar.push(ke>>12|224,ke>>6&63|128,ke&63|128)}else if(ke<1114112){if((xe-=4)<0)break;ar.push(ke>>18|240,ke>>12&63|128,ke>>6&63|128,ke&63|128)}else throw new Error(\"Invalid code point\")}return ar}function ti(Ie){for(var xe=[],ke=0;ke<Ie.length;++ke)xe.push(Ie.charCodeAt(ke)&255);return xe}function Br(Ie,xe){for(var ke,vt,ir,ar=[],vr=0;vr<Ie.length&&!((xe-=2)<0);++vr)ke=Ie.charCodeAt(vr),vt=ke>>8,ir=ke%256,ar.push(ir),ar.push(vt);return ar}function Vr(Ie){return L.toByteArray(wr(Ie))}function dt(Ie,xe,ke,vt){var ir;for(ir=0;ir<vt&&!(ir+ke>=xe.length||ir>=Ie.length);++ir)xe[ir+ke]=Ie[ir];return ir}function Ge(Ie,xe){return Ie instanceof xe||Ie!=null&&Ie.constructor!=null&&Ie.constructor.name!=null&&Ie.constructor.name===xe.name}function Je(Ie){return Ie!==Ie}var We=function(){for(var Ie=\"0123456789abcdef\",xe=new Array(256),ke=0;ke<16;++ke)for(var vt=ke*16,ir=0;ir<16;++ir)xe[vt+ir]=Ie[ke]+Ie[ir];return xe}();function tt(Ie){return typeof BigInt==\"undefined\"?xt:Ie}function xt(){throw new Error(\"BigInt not supported\")}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},4935:function(i,a,o){\"use strict\";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(E,T,L,x){this.gl=E,this.shader=T,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var _=v.prototype,b=[0,0];_.bind=function(E,T,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=E,C.view=T,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},_.unbind=function(){this.vao.unbind()},_.update=function(E,T,L,x,C){var M=[];function g(H,re,oe,_e,Ce,Le){var ge=[oe.style,oe.weight,oe.variant,oe.family].join(\"_\"),ie=h[ge];ie||(ie=h[ge]={});var Se=ie[re];Se||(Se=ie[re]=p(re,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:\"center\",textBaseline:\"middle\",lineSpacing:Ce,styletags:Le}));for(var Ee=(_e||12)/12,Ae=Se.positions,Be=Se.cells,Pe=0,me=Be.length;Pe<me;++Pe)for(var De=Be[Pe],ce=2;ce>=0;--ce){var je=Ae[De[ce]];M.push(Ee*je[0],-Ee*je[1],H)}}for(var P=[0,0,0],A=[0,0,0],z=[0,0,0],O=[0,0,0],U=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=M.length/d|0,g(.5*(E[0][Z]+E[1][Z]),T[Z],L[Z],12,U,G),O[Z]=(M.length/d|0)-z[Z],P[Z]=M.length/d|0;for(var j=0;j<x[Z].length;++j)if(x[Z][j].text){var N={family:x[Z][j].font||C[Z].family,style:C[Z].fontStyle||C[Z].style,weight:C[Z].fontWeight||C[Z].weight,variant:C[Z].fontVariant||C[Z].variant};g(x[Z][j].x,x[Z][j].text,N,x[Z][j].fontSize||12,U,G)}A[Z]=(M.length/d|0)-P[Z]}this.buffer.update(M),this.tickOffset=P,this.tickCount=A,this.labelOffset=z,this.labelCount=O},_.drawTicks=function(E,T,L,x,C,M,g,P){this.tickCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[E],this.tickOffset[E]))},_.drawLabel=function(E,T,L,x,C,M,g,P){this.labelCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.labelCount[E],this.labelOffset[E]))},_.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function p(E,T){try{return u(E,T)}catch(L){return console.warn('error vectorizing text:\"'+E+'\" error:',L),{cells:[],positions:[]}}}function k(E,T,L,x,C,M){var g=s(E),P=l(E,[{buffer:g,size:3}]),A=c(E);A.attributes.position.location=0;var z=new v(E,A,g,P);return z.update(T,L,x,C,M),z}},5023:function(i,a,o){\"use strict\";var s=o(2478);i.exports=d;function l(v,_,b,p,k,E,T){this.cells=v,this.neighbor=_,this.flags=p,this.constraint=b,this.active=k,this.next=E,this.boundary=T}var u=l.prototype;function c(v,_){return v[0]-_[0]||v[1]-_[1]||v[2]-_[2]}u.locate=function(){var v=[0,0,0];return function(_,b,p){var k=_,E=b,T=p;return b<p?b<_&&(k=b,E=p,T=_):p<_&&(k=p,E=_,T=b),k<0?-1:(v[0]=k,v[1]=E,v[2]=T,s.eq(this.cells,v,c))}}();function f(v,_){for(var b=v.cells(),p=b.length,k=0;k<p;++k){var E=b[k],T=E[0],L=E[1],x=E[2];L<x?L<T&&(E[0]=L,E[1]=x,E[2]=T):x<T&&(E[0]=x,E[1]=T,E[2]=L)}b.sort(c);for(var C=new Array(p),k=0;k<C.length;++k)C[k]=0;var M=[],g=[],P=new Array(3*p),A=new Array(3*p),z=null;_&&(z=[]);for(var O=new l(b,P,A,C,M,g,z),k=0;k<p;++k)for(var E=b[k],U=0;U<3;++U){var T=E[U],L=E[(U+1)%3],G=P[3*k+U]=O.locate(L,T,v.opposite(L,T)),Z=A[3*k+U]=v.isConstraint(T,L);G<0&&(Z?g.push(k):(M.push(k),C[k]=1),_&&z.push([L,T,-1]))}return O}function h(v,_,b){for(var p=0,k=0;k<v.length;++k)_[k]===b&&(v[p++]=v[k]);return v.length=p,v}function d(v,_,b){var p=f(v,b);if(_===0)return b?p.cells.concat(p.boundary):p.cells;for(var k=1,E=p.active,T=p.next,L=p.flags,x=p.cells,C=p.constraint,M=p.neighbor;E.length>0||T.length>0;){for(;E.length>0;){var g=E.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],A=0;A<3;++A){var z=M[3*g+A];z>=0&&L[z]===0&&(C[3*g+A]?T.push(z):(E.push(z),L[z]=k))}}}var O=T;T=E,E=O,T.length=0,k=-k}var U=h(x,L,_);return b?U.concat(p.boundary):U}},5033:function(i){\"use strict\";i.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(E){return function(T,L){var x=E[T];return x?!!x.queryPoint(L,f):!1}}function d(E){for(var T={},L=0;L<E.length;++L){var x=E[L],C=x[0][0],M=x[0][1],g=x[1][1],P=[Math.min(M,g),Math.max(M,g)];C in T?T[C].push(P):T[C]=[P]}for(var A={},z=Object.keys(T),L=0;L<z.length;++L){var O=T[z[L]];A[z[L]]=u(O)}return h(A)}function v(E,T){return function(L){var x=c.le(T,L[0]);if(x<0)return 1;var C=E[x];if(!C)if(x>0&&T[x]===L[0])C=E[x-1];else return 1;for(var M=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]<g[1][0])if(P<0)C=C.left;else if(P>0)M=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)M=1,C=C.right;else return 0}return M}}function _(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function p(E,T){return function(x){return E(x[0],x[1])?0:T(x)}}function k(E){for(var T=E.length,L=[],x=[],C=0,M=0;M<T;++M)for(var g=E[M],P=g.length,A=P-1,z=0;z<P;A=z++){var O=g[A],U=g[z];O[0]===U[0]?x.push([O,U]):L.push([O,U])}if(L.length===0)return x.length===0?_:b(d(x));var G=l(L),Z=v(G.slabs,G.coordinates);return x.length===0?Z:p(d(x),Z)}},5091:function(i,a,o){\"use strict\";a.shader=k,a.program=E;var s=o(8866),l=o(2992),u=typeof WeakMap==\"undefined\"?o(606):WeakMap,c=new u,f=0;function h(T,L,x,C,M,g,P){this.id=T,this.src=L,this.type=x,this.shader=C,this.count=g,this.programs=[],this.cache=P}h.prototype.dispose=function(){if(--this.count===0){for(var T=this.cache,L=T.gl,x=this.programs,C=0,M=x.length;C<M;++C){var g=T.programs[x[C]];g&&(delete T.programs[C],L.deleteProgram(g))}L.deleteShader(this.shader),delete T.shaders[this.type===L.FRAGMENT_SHADER|0][this.src]}};function d(T){this.gl=T,this.shaders=[{},{}],this.programs={}}var v=d.prototype;function _(T,L,x){var C=T.createShader(L);if(T.shaderSource(C,x),T.compileShader(C),!T.getShaderParameter(C,T.COMPILE_STATUS)){var M=T.getShaderInfoLog(C);try{var g=l(M,x,L)}catch(P){throw console.warn(\"Failed to format compiler error: \"+P),new s(M,`Error compiling shader:\n",
       "`+M)}throw new s(M,g.short,g.long)}return C}v.getShaderReference=function(T,L){var x=this.gl,C=this.shaders[T===x.FRAGMENT_SHADER|0],M=C[L];if(!M||!x.isShader(M.shader)){var g=_(x,T,L);M=C[L]=new h(f++,L,T,g,[],1,this)}else M.count+=1;return M};function b(T,L,x,C,M){var g=T.createProgram();T.attachShader(g,L),T.attachShader(g,x);for(var P=0;P<C.length;++P)T.bindAttribLocation(g,M[P],C[P]);if(T.linkProgram(g),!T.getProgramParameter(g,T.LINK_STATUS)){var A=T.getProgramInfoLog(g);throw new s(A,\"Error linking program: \"+A)}return g}v.getProgram=function(T,L,x,C){var M=[T.id,L.id,x.join(\":\"),C.join(\":\")].join(\"@\"),g=this.programs[M];return(!g||!this.gl.isProgram(g))&&(this.programs[M]=g=b(this.gl,T.shader,L.shader,x,C),T.programs.push(M),L.programs.push(M)),g};function p(T){var L=c.get(T);return L||(L=new d(T),c.set(T,L)),L}function k(T,L,x){return p(T).getShaderReference(L,x)}function E(T,L,x,C,M){return p(T).getProgram(L,x,C,M)}},5093:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var _,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,_=f;_<b;_+=c)s[0]=u[_],s[1]=u[_+1],s[2]=u[_+2],d(s,s,v),u[_]=s[0],u[_+1]=s[1],u[_+2]=s[2];return u}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},5202:function(i,a,o){\"use strict\";var s=o(1944),l=o(8210);i.exports=f,i.exports.positive=h,i.exports.negative=d;function u(v,_){var b=l(s(v,_),[_[_.length-1]]);return b[b.length-1]}function c(v,_,b,p){var k=p-_,E=-_/k;E<0?E=0:E>1&&(E=1);for(var T=1-E,L=v.length,x=new Array(L),C=0;C<L;++C)x[C]=E*v[C]+T*b[C];return x}function f(v,_){for(var b=[],p=[],k=u(v[v.length-1],_),E=v[v.length-1],T=v[0],L=0;L<v.length;++L,E=T){T=v[L];var x=u(T,_);if(k<0&&x>0||k>0&&x<0){var C=c(E,x,T,k);b.push(C),p.push(C.slice())}x<0?p.push(T.slice()):x>0?b.push(T.slice()):(b.push(T.slice()),p.push(T.slice())),k=x}return{positive:b,negative:p}}function h(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],T=0;T<v.length;++T,k=E){E=v[T];var L=u(E,_);(p<0&&L>0||p>0&&L<0)&&b.push(c(k,L,E,p)),L>=0&&b.push(E.slice()),p=L}return b}function d(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],T=0;T<v.length;++T,k=E){E=v[T];var L=u(E,_);(p<0&&L>0||p>0&&L<0)&&b.push(c(k,L,E,p)),L<=0&&b.push(E.slice()),p=L}return b}},5219:function(i){\"use strict\";i.exports=function(a){for(var o=a.length,s,l=0;l<o;l++)if(s=a.charCodeAt(l),(s<9||s>13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},5250:function(i){\"use strict\";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,v=s-d,_=a*l,b=_-l,p=_-b,k=l-p,E=c-d*p,T=E-v*p,L=T-d*k,x=v*k-L;return u?(u[0]=x,u[1]=c,u):[x,c]}},5298:function(i,a){\"use strict\";var o={\"float64,2,1,0\":function(){return function(v,_,b,p,k){var E=v[0],T=v[1],L=v[2],x=b[0],C=b[1],M=b[2];p|=0;var g=0,P=0,A=0,z=M,O=C-L*M,U=x-T*C;for(A=0;A<E;++A){for(P=0;P<T;++P){for(g=0;g<L;++g)_[p]/=k,p+=z;p+=O}p+=U}}},\"uint8,2,0,1,float64,2,1,0\":function(){return function(v,_,b,p,k,E,T,L){var x=v[0],C=v[1],M=v[2],g=b[0],P=b[1],A=b[2],z=E[0],O=E[1],U=E[2];p|=0,T|=0;for(var G=p,Z=T,j=v[0]|0;j>0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,T=Z+j*z+N*O;var H=0,re=0,oe=0,_e=A,Ce=g-M*A,Le=P-x*g,ge=U,ie=z-M*U,Se=O-x*z;for(oe=0;oe<C;++oe){for(re=0;re<x;++re){for(H=0;H<M;++H)_[p]=k[T]*L,p+=_e,T+=ge;p+=Ce,T+=ie}p+=Le,T+=Se}}}}},\"float32,1,0,float32,1,0\":function(){return function(v,_,b,p,k,E,T){var L=v[0],x=v[1],C=b[0],M=b[1],g=E[0],P=E[1];p|=0,T|=0;var A=0,z=0,O=M,U=C-x*M,G=P,Z=g-x*P;for(z=0;z<L;++z){for(A=0;A<x;++A)_[p]=k[T],p+=O,T+=G;p+=U,T+=Z}}},\"float32,1,0,float32,0,1\":function(){return function(v,_,b,p,k,E,T){var L=v[0],x=v[1],C=b[0],M=b[1],g=E[0],P=E[1];p|=0,T|=0;for(var A=p,z=T,O=v[1]|0;O>0;){O<64?(x=O,O=0):(x=64,O-=64);for(var U=v[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),p=A+O*M+U*C,T=z+O*P+U*g;var G=0,Z=0,j=M,N=C-x*M,H=P,re=g-x*P;for(Z=0;Z<L;++Z){for(G=0;G<x;++G)_[p]=k[T],p+=j,T+=H;p+=N,T+=re}}}}},\"uint8,2,0,1,uint8,1,2,0\":function(){return function(v,_,b,p,k,E,T){var L=v[0],x=v[1],C=v[2],M=b[0],g=b[1],P=b[2],A=E[0],z=E[1],O=E[2];p|=0,T|=0;for(var U=p,G=T,Z=v[2]|0;Z>0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=U+Z*P+j*M+N*g,T=G+Z*O+j*A+N*z;var H=0,re=0,oe=0,_e=P,Ce=M-C*P,Le=g-L*M,ge=O,ie=A-C*O,Se=z-L*A;for(oe=0;oe<x;++oe){for(re=0;re<L;++re){for(H=0;H<C;++H)_[p]=k[T],p+=_e,T+=ge;p+=Ce,T+=ie}p+=Le,T+=Se}}}}}},\"uint8,2,0,1,array,2,0,1\":function(){return function(v,_,b,p,k,E,T){var L=v[0],x=v[1],C=v[2],M=b[0],g=b[1],P=b[2],A=E[0],z=E[1],O=E[2];p|=0,T|=0;var U=0,G=0,Z=0,j=P,N=M-C*P,H=g-L*M,re=O,oe=A-C*O,_e=z-L*A;for(Z=0;Z<x;++Z){for(G=0;G<L;++G){for(U=0;U<C;++U)_[p]=k[T],p+=j,T+=re;p+=N,T+=oe}p+=H,T+=_e}}}};function s(d,v){var _=v.join(\",\"),b=o[_];return b()}var l=s,u={mul:function(d){var v={};return function(b,p,k){var E=b.dtype,T=b.order,L=p.dtype,x=p.order,C=k.dtype,M=k.order,g=[E,T.join(),L,x.join(),C,M.join()].join(),P=v[g];return P||(v[g]=P=d([E,T,L,x,C,M])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k.data,k.stride,k.offset|0)}},muls:function(d){var v={};return function(b,p,k){var E=b.dtype,T=b.order,L=p.dtype,x=p.order,C=[E,T.join(),L,x.join()].join(),M=v[C];return M||(v[C]=M=d([E,T,L,x])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k)}},mulseq:function(d){var v={};return function(b,p){var k=b.dtype,E=b.order,T=[k,E.join()].join(),L=v[T];return L||(v[T]=L=d([k,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},div:function(d){var v={};return function(b,p,k){var E=b.dtype,T=b.order,L=p.dtype,x=p.order,C=k.dtype,M=k.order,g=[E,T.join(),L,x.join(),C,M.join()].join(),P=v[g];return P||(v[g]=P=d([E,T,L,x,C,M])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k.data,k.stride,k.offset|0)}},divs:function(d){var v={};return function(b,p,k){var E=b.dtype,T=b.order,L=p.dtype,x=p.order,C=[E,T.join(),L,x.join()].join(),M=v[C];return M||(v[C]=M=d([E,T,L,x])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k)}},divseq:function(d){var v={};return function(b,p){var k=b.dtype,E=b.order,T=[k,E.join()].join(),L=v[T];return L||(v[T]=L=d([k,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},assign:function(d){var v={};return function(b,p){var k=b.dtype,E=b.order,T=p.dtype,L=p.order,x=[k,E.join(),T,L.join()].join(),C=v[x];return C||(v[x]=C=d([k,E,T,L])),C(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0)}}};function c(d){var v=u[d.funcName];return v(l.bind(void 0,d))}function f(d){return c({funcName:d.funcName})}var h={mul:\"*\",div:\"/\"};(function(){for(var d in h)a[d]=f({funcName:d}),a[d+\"s\"]=f({funcName:d+\"s\"}),a[d+\"seq\"]=f({funcName:d+\"seq\"})})(),a.assign=f({funcName:\"assign\"})},5304:function(i,a,o){\"use strict\";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,_,b){this.gl=d,this.buffer=v,this.vao=_,this.shader=b}var f=c.prototype;f.draw=function(d,v,_,b,p,k){for(var E=!1,T=0;T<3;++T)E=E||p[T];if(E){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:_,bounds:b,enable:p,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],_=[],b=0,p=0;p<3;++p)for(var k=(p+1)%3,E=(p+2)%3,T=[0,0,0],L=[0,0,0],x=-1;x<=1;x+=2){_.push(b,b+2,b+1,b+1,b+2,b+3),T[p]=x,L[p]=x;for(var C=-1;C<=1;C+=2){T[k]=C;for(var M=-1;M<=1;M+=2)T[E]=M,v.push(T[0],T[1],T[2],L[0],L[1],L[2]),b+=1}var g=k;k=E,E=g}var P=s(d,new Float32Array(v)),A=s(d,new Uint16Array(_),d.ELEMENT_ARRAY_BUFFER),z=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],A),O=u(d);return O.attributes.position.location=0,O.attributes.normal.location=1,new c(d,P,z,O)}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},5382:function(i,a,o){\"use strict\";var s=o(8210),l=o(3012);i.exports=u;function u(c,f){if(c.length===1)return l(f,c[0]);if(f.length===1)return l(c,f[0]);if(c.length===0||f.length===0)return[0];var h=[0];if(c.length<f.length)for(var d=0;d<c.length;++d)h=s(h,l(f,c[d]));else for(var d=0;d<f.length;++d)h=s(h,l(c,f[d]));return h}},5445:function(i,a,o){\"use strict\";i.exports=L;var s=o(5033),l=o(5202),u=o(6429),c=o(6760),f=o(5665),h=o(5352),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=new Float32Array(16);function _(x,C,M){this.lo=x,this.hi=C,this.pixelsPerDataUnit=M}var b=[0,0,0,1],p=[0,0,0,1];function k(x,C,M,g,P){for(var A=0;A<3;++A){for(var z=b,O=p,U=0;U<3;++U)O[U]=z[U]=M[U];O[3]=z[3]=1,O[A]+=1,h(O,O,C),O[3]<0&&(x[A]=1/0),z[A]-=1,h(z,z,C),z[3]<0&&(x[A]=1/0);var G=(z[0]/z[3]-O[0]/O[3])*g,Z=(z[1]/z[3]-O[1]/O[3])*P;x[A]=.25*Math.sqrt(G*G+Z*Z)}return x}var E=[new _(1/0,-1/0,1/0),new _(1/0,-1/0,1/0),new _(1/0,-1/0,1/0)],T=[0,0,0];function L(x,C,M,g,Z){var A=C.model||d,z=C.view||d,O=C.projection||d,U=C._ortho||!1,G=x.bounds,Z=Z||u(A,z,O,G,U),j=Z.axis;c(v,z,A),c(v,O,v);for(var N=E,H=0;H<3;++H)N[H].lo=1/0,N[H].hi=-1/0,N[H].pixelsPerDataUnit=1/0;var re=s(f(v,v));f(v,v);for(var oe=0;oe<3;++oe){var _e=(oe+1)%3,Ce=(oe+2)%3,Le=T;e:for(var H=0;H<2;++H){var ge=[];if(j[oe]<0!=!!H){Le[oe]=G[H][oe];for(var ie=0;ie<2;++ie){Le[_e]=G[ie^H][_e];for(var Se=0;Se<2;++Se)Le[Ce]=G[Se^ie^H][Ce],ge.push(Le.slice())}for(var Ee=U?5:4,ie=Ee;ie===Ee;++ie){if(ge.length===0)continue e;ge=l.positive(ge,re[ie])}for(var ie=0;ie<ge.length;++ie)for(var Ce=ge[ie],Ae=k(T,v,Ce,M,g),Se=0;Se<3;++Se)N[Se].lo=Math.min(N[Se].lo,Ce[Se]),N[Se].hi=Math.max(N[Se].hi,Ce[Se]),Se!==oe&&(N[Se].pixelsPerDataUnit=Math.min(N[Se].pixelsPerDataUnit,Math.abs(Ae[Se])))}}}return N}},5455:function(i,a,o){i.exports=o(7056)},5486:function(i,a,o){i.exports=o(3066)},5542:function(i,a,o){\"use strict\";var s=o(2478);i.exports=f;function l(h,d){this.stars=h,this.edges=d}var u=l.prototype;function c(h,d,v){for(var _=1,b=h.length;_<b;_+=2)if(h[_-1]===d&&h[_]===v){h[_-1]=h[b-2],h[_]=h[b-1],h.length=b-2;return}}u.isConstraint=function(){var h=[0,0];function d(v,_){return v[0]-_[0]||v[1]-_[1]}return function(v,_){return h[0]=Math.min(v,_),h[1]=Math.max(v,_),s.eq(this.edges,h,d)>=0}}(),u.removeTriangle=function(h,d,v){var _=this.stars;c(_[h],d,v),c(_[d],v,h),c(_[v],h,d)},u.addTriangle=function(h,d,v){var _=this.stars;_[h].push(d,v),_[d].push(v,h),_[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],_=1,b=v.length;_<b;_+=2)if(v[_]===h)return v[_-1];return-1},u.flip=function(h,d){var v=this.opposite(h,d),_=this.opposite(d,h);this.removeTriangle(h,d,v),this.removeTriangle(d,h,_),this.addTriangle(h,_,v),this.addTriangle(d,v,_)},u.edges=function(){for(var h=this.stars,d=[],v=0,_=h.length;v<_;++v)for(var b=h[v],p=0,k=b.length;p<k;p+=2)d.push([b[p],b[p+1]]);return d},u.cells=function(){for(var h=this.stars,d=[],v=0,_=h.length;v<_;++v)for(var b=h[v],p=0,k=b.length;p<k;p+=2){var E=b[p],T=b[p+1];v<Math.min(E,T)&&d.push([v,E,T])}return d};function f(h,d){for(var v=new Array(h),_=0;_<h;++_)v[_]=[];return new l(v,d)}},5567:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[4],h=s[5],d=s[6],v=s[7],_=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[4]=f*c+_*u,o[5]=h*c+b*u,o[6]=d*c+p*u,o[7]=v*c+k*u,o[8]=_*c-f*u,o[9]=b*c-h*u,o[10]=p*c-d*u,o[11]=k*c-v*u,o}},5572:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},5609:function(i,a,o){\"use strict\";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],_=0;_<c.length;++_){var b=f[_].length;d[_]=b,h[_]=!0,b<=1&&v.push(_)}for(;v.length>0;){var p=v.pop();h[p]=!1;for(var k=f[p],_=0;_<k.length;++_){var E=k[_];--d[E]===0&&v.push(E)}}for(var T=new Array(c.length),L=[],_=0;_<c.length;++_)if(h[_]){var p=L.length;T[_]=p,L.push(c[_])}else T[_]=-1;for(var x=[],_=0;_<u.length;++_){var C=u[_];h[C[0]]&&h[C[1]]&&x.push([T[C[0]],T[C[1]]])}return[x,L]}},5632:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o}},5665:function(i){i.exports=a;function a(o,s){if(o===s){var l=s[1],u=s[2],c=s[3],f=s[6],h=s[7],d=s[11];o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=l,o[6]=s[9],o[7]=s[13],o[8]=u,o[9]=f,o[11]=s[14],o[12]=c,o[13]=h,o[14]=d}else o[0]=s[0],o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=s[1],o[5]=s[5],o[6]=s[9],o[7]=s[13],o[8]=s[2],o[9]=s[6],o[10]=s[10],o[11]=s[14],o[12]=s[3],o[13]=s[7],o[14]=s[11],o[15]=s[15];return o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},5714:function(i,a,o){\"use strict\";i.exports=M;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(g,P,A,z){return c[0]=z,c[1]=A,c[2]=P,c[3]=g,f[0]}var d=o(2478),v=o(9618),_=o(7319),b=_.createShader,p=_.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(g,P){for(var A=0,z=0;z<3;++z){var O=g[z]-P[z];A+=O*O}return Math.sqrt(A)}function T(g){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],A=0;A<3;++A)P[0][A]=Math.max(g[0][A],P[0][A]),P[1][A]=Math.min(g[1][A],P[1][A]);return P}function L(g,P,A,z){this.arcLength=g,this.position=P,this.index=A,this.dataCoordinate=z}function x(g,P,A,z,O,U){this.gl=g,this.shader=P,this.pickShader=A,this.buffer=z,this.vao=O,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=U,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=x.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(g){this.pickId=g},C.drawTransparent=C.draw=function(g){if(this.vertexCount){var P=this.gl,A=this.shader,z=this.vao;A.bind(),A.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,clipBounds:T(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.drawPick=function(g){if(this.vertexCount){var P=this.gl,A=this.pickShader,z=this.vao;A.bind(),A.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,pickId:this.pickId,clipBounds:T(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.update=function(g){var P,A;this.dirty=!0;var z=!!g.connectGaps;\"dashScale\"in g&&(this.dashScale=g.dashScale),this.hasAlpha=!1,\"opacity\"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var O=[],U=[],G=[],Z=0,j=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=g.position||g.positions;if(H){var re=g.color||g.colors||[0,0,0,1],oe=g.lineWidth||1,_e=!1;e:for(P=1;P<H.length;++P){var Ce=H[P-1],Le=H[P];for(U.push(Z),G.push(Ce.slice()),A=0;A<3;++A){if(isNaN(Ce[A])||isNaN(Le[A])||!isFinite(Ce[A])||!isFinite(Le[A])){if(!z&&O.length>0){for(var ge=0;ge<24;++ge)O.push(O[O.length-12]);j+=2,_e=!0}continue e}N[0][A]=Math.min(N[0][A],Ce[A],Le[A]),N[1][A]=Math.max(N[1][A],Ce[A],Le[A])}var ie,Se;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Se=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Se=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(oe)?Ee=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Ee=oe;var Ae=Z;if(Z+=E(Ce,Le),_e){for(A=0;A<2;++A)O.push(Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3]);j+=2,_e=!1}O.push(Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3],Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,-Ee,ie[0],ie[1],ie[2],ie[3],Le[0],Le[1],Le[2],Ce[0],Ce[1],Ce[2],Z,-Ee,Se[0],Se[1],Se[2],Se[3],Le[0],Le[1],Le[2],Ce[0],Ce[1],Ce[2],Z,Ee,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(O),U.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=U,\"dashes\"in g){var Be=g.dashes,Pe=Be.slice();for(Pe.unshift(0),P=1;P<Pe.length;++P)Pe[P]=Pe[P-1]+Pe[P];var me=v(new Array(256*4),[256,1,4]);for(P=0;P<256;++P){for(A=0;A<4;++A)me.set(P,0,A,0);d.le(Pe,Pe[Pe.length-1]*P/255)&1?me.set(P,0,0,0):me.set(P,0,0,255)}this.texture.setPixels(me)}},C.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},C.pick=function(g){if(!g||g.id!==this.pickId)return null;var P=h(g.value[0],g.value[1],g.value[2],0),A=d.le(this.arcLength,P);if(A<0)return null;if(A===this.arcLength.length-1)return new L(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),A);for(var z=this.points[A],O=this.points[Math.min(A+1,this.points.length-1)],U=(P-this.arcLength[A])/(this.arcLength[A+1]-this.arcLength[A]),G=1-U,Z=[0,0,0],j=0;j<3;++j)Z[j]=G*z[j]+U*O[j];var N=Math.min(U<.5?A:A+1,this.points.length-1);return new L(P,Z,N,this.points[N])};function M(g){var P=g.gl||g.scene&&g.scene.gl,A=b(P);A.attributes.position.location=0,A.attributes.nextPosition.location=1,A.attributes.arcLength.location=2,A.attributes.lineWidth.location=3,A.attributes.color.location=4;var z=p(P);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var O=s(P),U=l(P,[{buffer:O,size:3,offset:0,stride:48},{buffer:O,size:3,offset:12,stride:48},{buffer:O,size:1,offset:24,stride:48},{buffer:O,size:1,offset:28,stride:48},{buffer:O,size:4,offset:32,stride:48}]),G=v(new Array(256*4),[256,1,4]),Z=0;Z<1024;++Z)G.data[Z]=255;var j=u(P,G);j.wrap=P.REPEAT;var N=new x(P,A,z,O,U,j);return N.update(g),N}},5716:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},5721:function(i){\"use strict\";i.exports=a;function a(o){for(var s=0,l=0,u=1;u<o.length;++u)o[u][0]<o[s][0]&&(s=u),o[u][0]>o[l][0]&&(l=u);return s<l?[[s],[l]]:s>l?[[l],[s]]:[[s]]}},5771:function(i,a,o){\"use strict\";var s=o(8507),l=o(3788),u=o(2419);i.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,v=0;v<h;++v){var _=f[v],b=u(_);if(b!==0){if(d>0){var p=f[d-1];if(s(_,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=_}}return f.length=d,f}},5838:function(i,a,o){\"use strict\";i.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f<u.length;++f)c[f]=s(u[f]);return c}},5847:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}},5874:function(i,a,o){i.exports=A;var s=o(620),l=o(7827),u=o(6852),c=o(7932),f=o(3508),h=999,d=9999,v=0,_=1,b=2,p=3,k=4,E=5,T=6,L=7,x=8,C=9,M=10,g=11,P=[\"block-comment\",\"line-comment\",\"preprocessor\",\"operator\",\"integer\",\"float\",\"ident\",\"builtin\",\"keyword\",\"whitespace\",\"eof\",\"integer\"];function A(z){var O=0,U=0,G=h,Z,j,N=[],H=[],re=0,oe=0,_e=1,Ce=0,Le=0,ge=!1,ie=!1,Se=\"\",Ee;z=z||{};var Ae=u,Be=s;z.version===\"300 es\"&&(Ae=f,Be=c);for(var Pe={},me={},O=0;O<Ae.length;O++)Pe[Ae[O]]=!0;for(var O=0;O<Be.length;O++)me[Be[O]]=!0;return function($e){return H=[],$e!==null?ce($e):je()};function De($e){$e.length&&H.push({type:P[G],data:$e,position:Le,line:_e,column:Ce})}function ce($e){O=0,$e.toString&&($e=$e.toString()),Se+=$e.replace(/\\r\\n/g,`\n",
       "`),Ee=Se.length;for(var St;Z=Se[O],O<Ee;){switch(St=O,G){case v:O=ut();break;case _:O=ot();break;case b:O=Vt();break;case p:O=Wt();break;case k:O=sr();break;case g:O=$t();break;case E:O=Tr();break;case d:O=fr();break;case C:O=pt();break;case h:O=lt();break}if(St!==O)switch(Se[St]){case`\n",
       "`:Ce=0,++_e;break;default:++Ce;break}}return U+=O,Se=Se.slice(O),H}function je($e){return N.length&&De(N.join(\"\")),G=M,De(\"(eof)\"),H}function lt(){return N=N.length?[]:N,j===\"/\"&&Z===\"*\"?(Le=U+O-1,G=v,j=Z,O+1):j===\"/\"&&Z===\"/\"?(Le=U+O-1,G=_,j=Z,O+1):Z===\"#\"?(G=b,Le=U+O,O):/\\s/.test(Z)?(G=C,Le=U+O,O):(ge=/\\d/.test(Z),ie=/[^\\w_]/.test(Z),Le=U+O,G=ge?k:ie?p:d,O)}function pt(){return/[^\\s]/g.test(Z)?(De(N.join(\"\")),G=h,O):(N.push(Z),j=Z,O+1)}function Vt(){return(Z===\"\\r\"||Z===`\n",
       "`)&&j!==\"\\\\\"?(De(N.join(\"\")),G=h,O):(N.push(Z),j=Z,O+1)}function ot(){return Vt()}function ut(){return Z===\"/\"&&j===\"*\"?(N.push(Z),De(N.join(\"\")),G=h,O+1):(N.push(Z),j=Z,O+1)}function Wt(){if(j===\".\"&&/\\d/.test(Z))return G=E,O;if(j===\"/\"&&Z===\"*\")return G=v,O;if(j===\"/\"&&Z===\"/\")return G=_,O;if(Z===\".\"&&N.length){for(;Nt(N););return G=E,O}if(Z===\";\"||Z===\")\"||Z===\"(\"){if(N.length)for(;Nt(N););return De(Z),G=h,O+1}var $e=N.length===2&&Z!==\"=\";if(/[\\w_\\d\\s]/.test(Z)||$e){for(;Nt(N););return G=h,O}return N.push(Z),j=Z,O+1}function Nt($e){var St=0,Qt,Gt;do{if(Qt=l.indexOf($e.slice(0,$e.length+St).join(\"\")),Gt=l[Qt],Qt===-1){if(St--+$e.length>0)continue;Gt=$e.slice(0,1).join(\"\")}return De(Gt),Le+=Gt.length,N=N.slice(Gt.length),N.length}while(!0)}function $t(){return/[^a-fA-F0-9]/.test(Z)?(De(N.join(\"\")),G=h,O):(N.push(Z),j=Z,O+1)}function sr(){return Z===\".\"||/[eE]/.test(Z)?(N.push(Z),G=E,j=Z,O+1):Z===\"x\"&&N.length===1&&N[0]===\"0\"?(G=g,N.push(Z),j=Z,O+1):/[^\\d]/.test(Z)?(De(N.join(\"\")),G=h,O):(N.push(Z),j=Z,O+1)}function Tr(){return Z===\"f\"&&(N.push(Z),j=Z,O+=1),/[eE]/.test(Z)||(Z===\"-\"||Z===\"+\")&&/[eE]/.test(j)?(N.push(Z),j=Z,O+1):/[^\\d]/.test(Z)?(De(N.join(\"\")),G=h,O):(N.push(Z),j=Z,O+1)}function fr(){if(/[^\\d\\w_]/.test(Z)){var $e=N.join(\"\");return me[$e]?G=x:Pe[$e]?G=L:G=T,De(N.join(\"\")),G=h,O}return N.push(Z),j=Z,O+1}}},5878:function(i,a,o){\"use strict\";i.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var v=Math.abs(s(f,h,d)),_=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return v/_}function c(f,h,d){for(var v=h.length,_=f.length,b=new Array(v),p=new Array(v),k=new Array(v),E=new Array(v),T=0;T<v;++T)b[T]=p[T]=-1,k[T]=1/0,E[T]=!1;for(var T=0;T<_;++T){var L=f[T];if(L.length!==2)throw new Error(\"Input must be a graph\");var x=L[1],C=L[0];p[C]!==-1?p[C]=-2:p[C]=x,b[x]!==-1?b[x]=-2:b[x]=C}function M(ie){if(E[ie])return 1/0;var Se=b[ie],Ee=p[ie];return Se<0||Ee<0?1/0:u(h[ie],h[Se],h[Ee])}function g(ie,Se){var Ee=j[ie],Ae=j[Se];j[ie]=Ae,j[Se]=Ee,N[Ee]=Se,N[Ae]=ie}function P(ie){return k[j[ie]]}function A(ie){return ie&1?ie-1>>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Ee=Se,Ae=2*ie+1,Be=2*(ie+1),Pe=ie;if(Ae<re){var me=P(Ae);me<Ee&&(Pe=Ae,Ee=me)}if(Be<re){var De=P(Be);De<Ee&&(Pe=Be)}if(Pe===ie)return ie;g(ie,Pe),ie=Pe}}function O(ie){for(var Se=P(ie);ie>0;){var Ee=A(ie);if(Ee>=0){var Ae=P(Ee);if(Se<Ae){g(ie,Ee),ie=Ee;continue}}return ie}}function U(){if(re>0){var ie=j[0];return g(0,re-1),re-=1,z(0),ie}return-1}function G(ie,Se){var Ee=j[ie];return k[Ee]===Se?ie:(k[Ee]=-1/0,O(ie),U(),k[Ee]=Se,re+=1,O(re-1))}function Z(ie){if(!E[ie]){E[ie]=!0;var Se=b[ie],Ee=p[ie];b[Ee]>=0&&(b[Ee]=Se),p[Se]>=0&&(p[Se]=Ee),N[Se]>=0&&G(N[Se],M(Se)),N[Ee]>=0&&G(N[Ee],M(Ee))}}for(var j=[],N=new Array(v),T=0;T<v;++T){var H=k[T]=M(T);H<1/0?(N[T]=j.length,j.push(T)):N[T]=-1}for(var re=j.length,T=re>>1;T>=0;--T)z(T);for(;;){var oe=U();if(oe<0||k[oe]>d)break;Z(oe)}for(var _e=[],T=0;T<v;++T)E[T]||(N[T]=_e.length,_e.push(h[T].slice()));var Ce=_e.length;function Le(ie,Se){if(ie[Se]<0)return Se;var Ee=Se,Ae=Se;do{var Be=ie[Ae];if(!E[Ae]||Be<0||Be===Ae||(Ae=Be,Be=ie[Ae],!E[Ae]||Be<0||Be===Ae))break;Ae=Be,Ee=ie[Ee]}while(Ee!==Ae);for(var Pe=Se;Pe!==Ae;Pe=ie[Pe])ie[Pe]=Ae;return Ae}var ge=[];return f.forEach(function(ie){var Se=Le(b,ie[0]),Ee=Le(p,ie[1]);if(Se>=0&&Ee>=0&&Se!==Ee){var Ae=N[Se],Be=N[Ee];Ae!==Be&&ge.push([Ae,Be])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5964:function(i){\"use strict\";i.exports=function(a){return!a&&a!==0?\"\":a.toString()}},5995:function(i,a,o){\"use strict\";i.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),v=0;v<h.length;++v)d[v]=f[h[v]];return l(d)*c<1})}},6037:function(i,a,o){i.exports=l;var s=o(3628);function l(u){for(var c=s(u),f=0,h=0;h<u.length;++h)for(var d=u[h],v=0;v<c.length;++v)f+=Math.pow(d[v]-c[v],2);return Math.sqrt(f/u.length)}},6079:function(i){i.exports=a;function a(o,s,l,u){var c=u[0],f=u[1],h=u[2],d=Math.sqrt(c*c+f*f+h*h),v,_,b,p,k,E,T,L,x,C,M,g,P,A,z,O,U,G,Z,j,N,H,re,oe;return Math.abs(d)<1e-6?null:(d=1/d,c*=d,f*=d,h*=d,v=Math.sin(l),_=Math.cos(l),b=1-_,p=s[0],k=s[1],E=s[2],T=s[3],L=s[4],x=s[5],C=s[6],M=s[7],g=s[8],P=s[9],A=s[10],z=s[11],O=c*c*b+_,U=f*c*b+h*v,G=h*c*b-f*v,Z=c*f*b-h*v,j=f*f*b+_,N=h*f*b+c*v,H=c*h*b+f*v,re=f*h*b-c*v,oe=h*h*b+_,o[0]=p*O+L*U+g*G,o[1]=k*O+x*U+P*G,o[2]=E*O+C*U+A*G,o[3]=T*O+M*U+z*G,o[4]=p*Z+L*j+g*N,o[5]=k*Z+x*j+P*N,o[6]=E*Z+C*j+A*N,o[7]=T*Z+M*j+z*N,o[8]=p*H+L*re+g*oe,o[9]=k*H+x*re+P*oe,o[10]=E*H+C*re+A*oe,o[11]=T*H+M*re+z*oe,s!==o&&(o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o)}},6141:function(i,a,o){i.exports=o(2953)},6199:function(i,a,o){\"use strict\";var s=o(1338),l={zero:function(L,x,C,M){var g=L[0],P=C[0];M|=0;var A=0,z=P;for(A=0;A<g;++A)x[M]=0,M+=z},fdTemplate1:function(L,x,C,M,g,P,A){var z=L[0],O=C[0],U=P[0],G=-1*O,Z=O;M|=0,A|=0;var j=0,N=O,H=U;for(j=0;j<z;++j)g[A]=.5*(x[M+G]-x[M+Z]),M+=N,A+=H},fdTemplate2:function(L,x,C,M,g,P,A,z,O,U){var G=L[0],Z=L[1],j=C[0],N=C[1],H=P[0],re=P[1],oe=O[0],_e=O[1],Ce=-1*j,Le=j,ge=-1*N,ie=N;M|=0,A|=0,U|=0;var Se=0,Ee=0,Ae=N,Be=j-Z*N,Pe=re,me=H-Z*re,De=_e,ce=oe-Z*_e;for(Ee=0;Ee<G;++Ee){for(Se=0;Se<Z;++Se)g[A]=.5*(x[M+Ce]-x[M+Le]),z[U]=.5*(x[M+ge]-x[M+ie]),M+=Ae,A+=Pe,U+=De;M+=Be,A+=me,U+=ce}}},u={cdiff:function(L){var x={};return function(M,g,P){var A=M.dtype,z=M.order,O=g.dtype,U=g.order,G=P.dtype,Z=P.order,j=[A,z.join(),O,U.join(),G,Z.join()].join(),N=x[j];return N||(x[j]=N=L([A,z,O,U,G,Z])),N(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}},zero:function(L){var x={};return function(M){var g=M.dtype,P=M.order,A=[g,P.join()].join(),z=x[A];return z||(x[A]=z=L([g,P])),z(M.shape.slice(0),M.data,M.stride,M.offset|0)}},fdTemplate1:function(L){var x={};return function(M,g){var P=M.dtype,A=M.order,z=g.dtype,O=g.order,U=[P,A.join(),z,O.join()].join(),G=x[U];return G||(x[U]=G=L([P,A,z,O])),G(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0)}},fdTemplate2:function(L){var x={};return function(M,g,P){var A=M.dtype,z=M.order,O=g.dtype,U=g.order,G=P.dtype,Z=P.order,j=[A,z.join(),O,U.join(),G,Z.join()].join(),N=x[j];return N||(x[j]=N=L([A,z,O,U,G,Z])),N(M.shape.slice(0),M.data,M.stride,M.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}}};function c(L){var x=u[L.funcName];return x(f.bind(void 0,L))}function f(L){return l[L.funcName]}function h(L){return c({funcName:L.funcName})}var d={},v={},_={body:\"\",args:[],thisVars:[],localVars:[]},b=h({funcName:\"cdiff\"}),p=h({funcName:\"zero\"});function k(L){return L in d?d[L]:d[L]=h({funcName:\"fdTemplate\"+L})}function E(L,x,C,M){return function(g,P){var A=P.shape.slice();return A[0]>2&&A[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(A[0]-2,A[1]-2),g.pick(-1,-1,0).lo(1,1).hi(A[0]-2,A[1]-2),g.pick(-1,-1,1).lo(1,1).hi(A[0]-2,A[1]-2)),A[1]>2&&(C(P.pick(0,-1).lo(1).hi(A[1]-2),g.pick(0,-1,1).lo(1).hi(A[1]-2)),x(g.pick(0,-1,0).lo(1).hi(A[1]-2))),A[1]>2&&(C(P.pick(A[0]-1,-1).lo(1).hi(A[1]-2),g.pick(A[0]-1,-1,1).lo(1).hi(A[1]-2)),x(g.pick(A[0]-1,-1,0).lo(1).hi(A[1]-2))),A[0]>2&&(C(P.pick(-1,0).lo(1).hi(A[0]-2),g.pick(-1,0,0).lo(1).hi(A[0]-2)),x(g.pick(-1,0,1).lo(1).hi(A[0]-2))),A[0]>2&&(C(P.pick(-1,A[1]-1).lo(1).hi(A[0]-2),g.pick(-1,A[1]-1,0).lo(1).hi(A[0]-2)),x(g.pick(-1,A[1]-1,1).lo(1).hi(A[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(A[0]-1,0,0,0),g.set(A[0]-1,0,1,0),g.set(0,A[1]-1,0,0),g.set(0,A[1]-1,1,0),g.set(A[0]-1,A[1]-1,0,0),g.set(A[0]-1,A[1]-1,1,0),g}}function T(L){var x=L.join(),A=v[x];if(A)return A;for(var C=L.length,M=[b,p],g=1;g<=C;++g)M.push(k(g));var P=E,A=P.apply(void 0,M);return v[x]=A,A}i.exports=function(x,C,M){if(Array.isArray(M)||(typeof M==\"string\"?M=s(C.dimension,M):M=s(C.dimension,\"clamp\")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=T(M);return g(x,C)}},6204:function(i){\"use strict\";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s<c;++s)f+=o[s].length;var h=new Array(f),d=0;for(s=0;s<c;++s){var v=o[s],_=v.length;for(l=0;l<_;++l){var b=h[d++]=new Array(_-1),p=0;for(u=0;u<_;++u)u!==l&&(b[p++]=v[u]);if(l&1){var k=b[1];b[1]=b[0],b[0]=k}}}return h}},6296:function(i,a,o){\"use strict\";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(_){return d[_]}),this._mode=v,this._active=d[v],this._active||(this._mode=\"turntable\",this._active=d.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 f=c.prototype;f.flush=function(d){for(var v=this._controllerList,_=0;_<v.length;++_)v[_].flush(d)},f.idle=function(d){for(var v=this._controllerList,_=0;_<v.length;++_)v[_].idle(d)},f.lookAt=function(d,v,_,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].lookAt(d,v,_,b)},f.rotate=function(d,v,_,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].rotate(d,v,_,b)},f.pan=function(d,v,_,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].pan(d,v,_,b)},f.translate=function(d,v,_,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].translate(d,v,_,b)},f.setMatrix=function(d,v){for(var _=this._controllerList,b=0;b<_.length;++b)_[b].setMatrix(d,v)},f.setDistanceLimits=function(d,v){for(var _=this._controllerList,b=0;b<_.length;++b)_[b].setDistanceLimits(d,v)},f.setDistance=function(d,v){for(var _=this._controllerList,b=0;b<_.length;++b)_[b].setDistance(d,v)},f.recalcMatrix=function(d){this._active.recalcMatrix(d)},f.getDistance=function(d){return this._active.getDistance(d)},f.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},f.lastT=function(){return this._active.lastT()},f.setMode=function(d){if(d!==this._mode){var v=this._controllerNames.indexOf(d);if(!(v<0)){var _=this._active,b=this._controllerList[v],p=Math.max(_.lastT(),b.lastT());_.recalcMatrix(p),b.setMatrix(p,_.computedMatrix),this._active=b,this._mode=d,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}}},f.getMode=function(){return this._mode};function h(d){d=d||{};var v=d.eye||[0,0,1],_=d.center||[0,0,0],b=d.up||[0,1,0],p=d.distanceLimits||[0,1/0],k=d.mode||\"turntable\",E=s(),T=l(),L=u();return E.setDistanceLimits(p[0],p[1]),E.lookAt(0,v,_,b),T.setDistanceLimits(p[0],p[1]),T.lookAt(0,v,_,b),L.setDistanceLimits(p[0],p[1]),L.lookAt(0,v,_,b),new c({turntable:E,orbit:T,matrix:L},k)}},6330:function(i,a,o){\"use strict\";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},6405:function(i,a,o){\"use strict\";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,_=1/0,b=-1/0,p=1/0,k=-1/0,E=1/0,T=-1/0,L=null,x=null,C=[],M=1/0,g=!1,P=u.coneSizemode===\"raw\",A=0;A<f.length;A++){var z=f[A];_=Math.min(z[0],_),b=Math.max(z[0],b),p=Math.min(z[1],p),k=Math.max(z[1],k),E=Math.min(z[2],E),T=Math.max(z[2],T);var O=h[A];if(s.length(O)>v&&(v=s.length(O)),A&&!P){var U=2*s.distance(L,z)/(s.length(x)+s.length(O));U?(M=Math.min(M,U),g=!1):g=!0}g||(L=z,x=O),C.push(O)}var G=[_,p,E],Z=[b,k,T];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var A=0,H=0;A<f.length;A++)for(var z=f[A],re=z[0],oe=z[1],_e=z[2],Ce=C[A],Le=s.length(Ce)*j,ge=0,ie=8;ge<ie;ge++){d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.vectors.push(Ce),d.vectors.push(Ce),d.vectors.push(Ce),d.vectors.push(Ce),d.vectors.push(Ce),d.vectors.push(Ce),d.vertexIntensity.push(Le,Le,Le),d.vertexIntensity.push(Le,Le,Le);var Se=d.positions.length;d.cells.push([Se-6,Se-5,Se-4],[Se-3,Se-2,Se-1])}return d};var l=o(614);i.exports.createMesh=o(9060),i.exports.createConeMesh=function(u,c){return i.exports.createMesh(u,c,{shaders:l,traceType:\"cone\"})}},6429:function(i,a,o){\"use strict\";i.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),_=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,M,g){for(var P=0;P<4;++P){C[P]=g[12+P];for(var A=0;A<3;++A)C[P]+=M[A]*g[4*A+P]}}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 k(C){for(var M=0;M<p.length;++M)if(C=u.positive(C,p[M]),C.length<3)return 0;for(var g=C[0],P=g[0]/g[3],A=g[1]/g[3],z=0,M=1;M+1<C.length;++M){var O=C[M],U=C[M+1],G=O[0]/O[3],Z=O[1]/O[3],j=U[0]/U[3],N=U[1]/U[3],H=G-P,re=Z-A,oe=j-P,_e=N-A;z+=Math.abs(H*_e-re*oe)}return z}var E=[1,1,1],T=[0,0,0],L={cubeEdges:E,axis:T};function x(C,M,g,P,A){l(f,M,C),l(f,g,f);for(var z=0,O=0;O<2;++O){v[2]=P[O][2];for(var U=0;U<2;++U){v[1]=P[U][1];for(var G=0;G<2;++G)v[0]=P[G][0],b(h[z],v,f),z+=1}}for(var Z=-1,O=0;O<8;++O){for(var j=h[O][3],N=0;N<3;++N)d[O][N]=h[O][N]/j;A&&(d[O][2]*=-1),j<0&&(Z<0||d[O][2]<d[Z][2])&&(Z=O)}if(Z<0){Z=0;for(var H=0;H<3;++H){for(var re=(H+2)%3,oe=(H+1)%3,_e=-1,Ce=-1,Le=0;Le<2;++Le){var ge=Le<<H,ie=ge+(Le<<re)+(1-Le<<oe),Se=ge+(1-Le<<re)+(Le<<oe);c(d[ge],d[ie],d[Se],_)<0||(Le?_e=1:Ce=1)}if(_e<0||Ce<0){Ce>_e&&(Z|=1<<H);continue}for(var Le=0;Le<2;++Le){var ge=Le<<H,ie=ge+(Le<<re)+(1-Le<<oe),Se=ge+(1-Le<<re)+(Le<<oe),Ee=k([h[ge],h[ie],h[Se],h[ge+(1<<re)+(1<<oe)]]);Le?_e=Ee:Ce=Ee}if(Ce>_e){Z|=1<<H;continue}}}for(var Ae=7^Z,Be=-1,O=0;O<8;++O)O===Z||O===Ae||(Be<0||d[Be][1]>d[O][1])&&(Be=O);for(var Pe=-1,O=0;O<3;++O){var me=Be^1<<O;if(!(me===Z||me===Ae)){Pe<0&&(Pe=me);var oe=d[me];oe[0]<d[Pe][0]&&(Pe=me)}}for(var De=-1,O=0;O<3;++O){var me=Be^1<<O;if(!(me===Z||me===Ae||me===Pe)){De<0&&(De=me);var oe=d[me];oe[0]>d[De][0]&&(De=me)}}var ce=E;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Pe^Be)]=Be&Pe,ce[s.log2(Be^De)]=Be&De;var je=De^7;je===Z||je===Ae?(je=Pe^7,ce[s.log2(De^je)]=je&De):ce[s.log2(Pe^je)]=je&Pe;for(var lt=T,pt=Z,H=0;H<3;++H)pt&1<<H?lt[H]=-1:lt[H]=1;return L}},6444:function(i,a){\"use strict\";a.create=s,a.equal=l;function o(u,c){var f=u+\"\",h=f.indexOf(\".\"),d=0;h>=0&&(d=f.length-h-1);var v=Math.pow(10,d),_=Math.round(u*c*v),b=_+\"\";if(b.indexOf(\"e\")>=0)return b;var p=_/v,k=_%v;_<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var E=\"\"+p;if(_<0&&(E=\"-\"+E),d){for(var T=\"\"+k;T.length<d;)T=\"0\"+T;return E+\".\"+T}else return E}function s(u,c){for(var f=[],h=0;h<3;++h){for(var d=[],v=.5*(u[0][h]+u[1][h]),_=0;_*c[h]<=u[1][h];++_)d.push({x:_*c[h],text:o(c[h],_)});for(var _=-1;_*c[h]>=u[0][h];--_)d.push({x:_*c[h],text:o(c[h],_)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;h<u[f].length;++h){var d=u[f][h],v=c[f][h];if(d.x!==v.x||d.text!==v.text||d.font!==v.font||d.fontColor!==v.fontColor||d.fontSize!==v.fontSize||d.dx!==v.dx||d.dy!==v.dy)return!1}}return!0}},6468:function(i){i.exports=function(o){return atob(o)}},6504:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},6582:function(i,a,o){var s=o(7894);i.exports=l;function l(u,c,f,h){var d,v,_,b,p,k,E,T,L,x,C=c[0],M=c[1],g=c[2],P=h[0],A=h[1],z=h[2],O=f[0],U=f[1],G=f[2];return Math.abs(C-O)<1e-6&&Math.abs(M-U)<1e-6&&Math.abs(g-G)<1e-6?s(u):(E=C-O,T=M-U,L=g-G,x=1/Math.sqrt(E*E+T*T+L*L),E*=x,T*=x,L*=x,d=A*L-z*T,v=z*E-P*L,_=P*T-A*E,x=Math.sqrt(d*d+v*v+_*_),x?(x=1/x,d*=x,v*=x,_*=x):(d=0,v=0,_=0),b=T*_-L*v,p=L*d-E*_,k=E*v-T*d,x=Math.sqrt(b*b+p*p+k*k),x?(x=1/x,b*=x,p*=x,k*=x):(b=0,p=0,k=0),u[0]=d,u[1]=b,u[2]=E,u[3]=0,u[4]=v,u[5]=p,u[6]=T,u[7]=0,u[8]=_,u[9]=k,u[10]=L,u[11]=0,u[12]=-(d*C+v*M+_*g),u[13]=-(b*C+p*M+k*g),u[14]=-(E*C+T*M+L*g),u[15]=1,u)}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},6658:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o}},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},6729:function(i,a,o){\"use strict\";var s=o(3642),l=o(395);i.exports=u;function u(d){var v,_,b,p,k,E,T,L,g,x,C;if(d||(d={}),L=(d.nshades||72)-1,T=d.format||\"hex\",E=d.colormap,E||(E=\"jet\"),typeof E==\"string\"){if(E=E.toLowerCase(),!s[E])throw Error(E+\" not a supported colorscale\");k=s[E]}else if(Array.isArray(E))k=E.slice();else throw Error(\"unsupported colormap option\",E);if(k.length>L+1)throw new Error(E+\" map requires nshades to be at least size \"+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha==\"number\"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var M=k.map(function(z,O){var U=k[O].index,G=k[O].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*U),G}),g=[];for(C=0;C<v.length-1;++C){p=v[C+1]-v[C],_=M[C],b=M[C+1];for(var P=0;P<p;P++){var A=P/p;g.push([Math.round(l(_[0],b[0],A)),Math.round(l(_[1],b[1],A)),Math.round(l(_[2],b[2],A)),l(_[3],b[3],A)])}}return g.push(k[k.length-1].rgb.concat(x[1])),T===\"hex\"?g=g.map(f):T===\"rgbaString\"?g=g.map(h):T===\"float\"&&(g=g.map(c)),g}function c(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function f(d){for(var v,_=\"#\",b=0;b<3;++b)v=d[b],v=v.toString(16),_+=(\"00\"+v).substr(v.length);return _}function h(d){return\"rgba(\"+d.join(\",\")+\")\"}},6740:function(i,a,o){var s=o(3236),l=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 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|| > 0  U  ||b|| > 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 > v.z*v.z || v.y*v.y > 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",
       "//\n",
       "vec3 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",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 color, position;\n",
       "attribute vec2 uv;\n",
       "\n",
       "uniform float vectorScale, tubeScale;\n",
       "uniform mat4 model, view, projection, inverseModel;\n",
       "uniform vec3 eyePosition, lightPosition;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  // Scale the vector magnitude to stay constant with\n",
       "  // model & view changes.\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n",
       "  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  //Lighting geometry parameters\n",
       "  vec4 cameraCoordinate = view * tubePosition;\n",
       "  cameraCoordinate.xyz /= cameraCoordinate.w;\n",
       "  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n",
       "  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n",
       "  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n",
       "\n",
       "  // vec4 m_position  = model * vec4(tubePosition, 1.0);\n",
       "  vec4 t_position  = view * tubePosition;\n",
       "  gl_Position      = projection * t_position;\n",
       "\n",
       "  f_color          = color;\n",
       "  f_data           = tubePosition.xyz;\n",
       "  f_position       = position.xyz;\n",
       "  f_uv             = uv;\n",
       "}\n",
       "`]),u=s([`#extension GL_OES_standard_derivatives : enable\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "float 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",
       "\n",
       "float 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",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3 clipBounds[2];\n",
       "uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\n",
       "uniform sampler2D texture;\n",
       "\n",
       "varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\n",
       "varying vec4 f_color;\n",
       "varying vec2 f_uv;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\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 = min(1.0, max(0.0, 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",
       "`]),c=s([`precision highp float;\n",
       "\n",
       "precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "vec3 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|| > 0  U  ||b|| > 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 > v.z*v.z || v.y*v.y > 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",
       "//\n",
       "vec3 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",
       "\n",
       "attribute vec4 vector;\n",
       "attribute vec4 position;\n",
       "attribute vec4 id;\n",
       "\n",
       "uniform mat4 model, view, projection;\n",
       "uniform float tubeScale;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  vec3 normal;\n",
       "  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n",
       "  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n",
       "\n",
       "  gl_Position = projection * (view * tubePosition);\n",
       "  f_id        = id;\n",
       "  f_position  = position.xyz;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3  clipBounds[2];\n",
       "uniform float pickId;\n",
       "\n",
       "varying vec3 f_position;\n",
       "varying vec4 f_id;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId, f_id.xyz);\n",
       "}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:\"position\",type:\"vec4\"},{name:\"color\",type:\"vec4\"},{name:\"uv\",type:\"vec2\"},{name:\"vector\",type:\"vec4\"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:\"position\",type:\"vec4\"},{name:\"id\",type:\"vec4\"},{name:\"vector\",type:\"vec4\"}]}},6743:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=u+u,v=c+c,_=f+f,b=u*d,p=u*v,k=u*_,E=c*v,T=c*_,L=f*_,x=h*d,C=h*v,M=h*_;return o[0]=1-(E+L),o[1]=p+M,o[2]=k-C,o[3]=0,o[4]=p-M,o[5]=1-(b+L),o[6]=T+x,o[7]=0,o[8]=k+C,o[9]=T-x,o[10]=1-(b+E),o[11]=0,o[12]=l[0],o[13]=l[1],o[14]=l[2],o[15]=1,o}},6760:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=s[4],v=s[5],_=s[6],b=s[7],p=s[8],k=s[9],E=s[10],T=s[11],L=s[12],x=s[13],C=s[14],M=s[15],g=l[0],P=l[1],A=l[2],z=l[3];return o[0]=g*u+P*d+A*p+z*L,o[1]=g*c+P*v+A*k+z*x,o[2]=g*f+P*_+A*E+z*C,o[3]=g*h+P*b+A*T+z*M,g=l[4],P=l[5],A=l[6],z=l[7],o[4]=g*u+P*d+A*p+z*L,o[5]=g*c+P*v+A*k+z*x,o[6]=g*f+P*_+A*E+z*C,o[7]=g*h+P*b+A*T+z*M,g=l[8],P=l[9],A=l[10],z=l[11],o[8]=g*u+P*d+A*p+z*L,o[9]=g*c+P*v+A*k+z*x,o[10]=g*f+P*_+A*E+z*C,o[11]=g*h+P*b+A*T+z*M,g=l[12],P=l[13],A=l[14],z=l[15],o[12]=g*u+P*d+A*p+z*L,o[13]=g*c+P*v+A*k+z*x,o[14]=g*f+P*_+A*E+z*C,o[15]=g*h+P*b+A*T+z*M,o}},6768:function(i,a,o){\"use strict\";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6803:function(i,a,o){\"use strict\";var s,l=o(8828),u=o(1755);function c(P){for(var A=0,z=Math.max,O=0,U=P.length;O<U;++O)A=z(A,P[O].length);return A-1}s=c;function f(P){for(var A=-1,z=Math.max,O=0,U=P.length;O<U;++O)for(var G=P[O],Z=0,j=G.length;Z<j;++Z)A=z(A,G[Z]);return A+1}s=f;function h(P){for(var A=new Array(P.length),z=0,O=P.length;z<O;++z)A[z]=P[z].slice(0);return A}s=h;function d(P,A){var z=P.length,O=P.length-A.length,U=Math.min;if(O)return O;switch(z){case 0:return 0;case 1:return P[0]-A[0];case 2:var H=P[0]+P[1]-A[0]-A[1];return H||U(P[0],P[1])-U(A[0],A[1]);case 3:var G=P[0]+P[1],Z=A[0]+A[1];if(H=G+P[2]-(Z+A[2]),H)return H;var j=U(P[0],P[1]),N=U(A[0],A[1]),H=U(j,P[2])-U(N,A[2]);return H||U(j+P[2],G)-U(N+A[2],Z);default:var re=P.slice(0);re.sort();var oe=A.slice(0);oe.sort();for(var _e=0;_e<z;++_e)if(O=re[_e]-oe[_e],O)return O;return 0}}a.Fw=d;function v(P,A){return d(P[0],A[0])}function _(P,A){if(A){for(var z=P.length,O=new Array(z),U=0;U<z;++U)O[U]=[P[U],A[U]];O.sort(v);for(var U=0;U<z;++U)P[U]=O[U][0],A[U]=O[U][1];return P}else return P.sort(d),P}s=_;function b(P){if(P.length===0)return[];for(var A=1,z=P.length,O=1;O<z;++O){var U=P[O];if(d(U,P[O-1])){if(O===A){A++;continue}P[A++]=U}}return P.length=A,P}s=b;function p(P,A){for(var z=0,O=P.length-1,U=-1;z<=O;){var G=z+O>>1,Z=d(P[G],A);Z<=0?(Z===0&&(U=G),z=G+1):Z>0&&(O=G-1)}return U}s=p;function k(P,A){for(var z=new Array(P.length),O=0,U=z.length;O<U;++O)z[O]=[];for(var G=[],O=0,Z=A.length;O<Z;++O)for(var j=A[O],N=j.length,H=1,re=1<<N;H<re;++H){G.length=l.popCount(H);for(var oe=0,_e=0;_e<N;++_e)H&1<<_e&&(G[oe++]=j[_e]);var Ce=p(P,G);if(!(Ce<0))for(;z[Ce++].push(O),!(Ce>=P.length||d(P[Ce],G)!==0););}return z}s=k;function E(P,A){if(!A)return k(b(L(P,0)),P,0);for(var z=new Array(A),O=0;O<A;++O)z[O]=[];for(var O=0,U=P.length;O<U;++O)for(var G=P[O],Z=0,j=G.length;Z<j;++Z)z[G[Z]].push(O);return z}s=E;function T(P){for(var A=[],z=0,O=P.length;z<O;++z)for(var U=P[z],G=U.length|0,Z=1,j=1<<G;Z<j;++Z){for(var N=[],H=0;H<G;++H)Z>>>H&1&&N.push(U[H]);A.push(N)}return _(A)}s=T;function L(P,A){if(A<0)return[];for(var z=[],O=(1<<A+1)-1,U=0;U<P.length;++U)for(var G=P[U],Z=O;Z<1<<G.length;Z=l.nextCombination(Z)){for(var j=new Array(A+1),N=0,H=0;H<G.length;++H)Z&1<<H&&(j[N++]=G[H]);z.push(j)}return _(z)}s=L;function x(P){for(var A=[],z=0,O=P.length;z<O;++z)for(var U=P[z],G=0,Z=U.length;G<Z;++G){for(var j=new Array(U.length-1),N=0,H=0;N<Z;++N)N!==G&&(j[H++]=U[N]);A.push(j)}return _(A)}s=x;function C(P,A){for(var z=new u(A),O=0;O<P.length;++O)for(var U=P[O],G=0;G<U.length;++G)for(var Z=G+1;Z<U.length;++Z)z.link(U[G],U[Z]);for(var j=[],N=z.ranks,O=0;O<N.length;++O)N[O]=-1;for(var O=0;O<P.length;++O){var H=z.find(P[O][0]);N[H]<0?(N[H]=j.length,j.push([P[O].slice(0)])):j[N[H]].push(P[O].slice(0))}return j}function M(P){for(var A=b(_(L(P,0))),z=new u(A.length),O=0;O<P.length;++O)for(var U=P[O],G=0;G<U.length;++G)for(var Z=p(A,[U[G]]),j=G+1;j<U.length;++j)z.link(Z,p(A,[U[j]]));for(var N=[],H=z.ranks,O=0;O<H.length;++O)H[O]=-1;for(var O=0;O<P.length;++O){var re=z.find(p(A,[P[O][0]]));H[re]<0?(H[re]=N.length,N.push([P[O].slice(0)])):N[H[re]].push(P[O].slice(0))}return N}function g(P,A){return A?C(P,A):M(P)}s=g},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},6852:function(i){i.exports=[\"abs\",\"acos\",\"all\",\"any\",\"asin\",\"atan\",\"ceil\",\"clamp\",\"cos\",\"cross\",\"dFdx\",\"dFdy\",\"degrees\",\"distance\",\"dot\",\"equal\",\"exp\",\"exp2\",\"faceforward\",\"floor\",\"fract\",\"gl_BackColor\",\"gl_BackLightModelProduct\",\"gl_BackLightProduct\",\"gl_BackMaterial\",\"gl_BackSecondaryColor\",\"gl_ClipPlane\",\"gl_ClipVertex\",\"gl_Color\",\"gl_DepthRange\",\"gl_DepthRangeParameters\",\"gl_EyePlaneQ\",\"gl_EyePlaneR\",\"gl_EyePlaneS\",\"gl_EyePlaneT\",\"gl_Fog\",\"gl_FogCoord\",\"gl_FogFragCoord\",\"gl_FogParameters\",\"gl_FragColor\",\"gl_FragCoord\",\"gl_FragData\",\"gl_FragDepth\",\"gl_FragDepthEXT\",\"gl_FrontColor\",\"gl_FrontFacing\",\"gl_FrontLightModelProduct\",\"gl_FrontLightProduct\",\"gl_FrontMaterial\",\"gl_FrontSecondaryColor\",\"gl_LightModel\",\"gl_LightModelParameters\",\"gl_LightModelProducts\",\"gl_LightProducts\",\"gl_LightSource\",\"gl_LightSourceParameters\",\"gl_MaterialParameters\",\"gl_MaxClipPlanes\",\"gl_MaxCombinedTextureImageUnits\",\"gl_MaxDrawBuffers\",\"gl_MaxFragmentUniformComponents\",\"gl_MaxLights\",\"gl_MaxTextureCoords\",\"gl_MaxTextureImageUnits\",\"gl_MaxTextureUnits\",\"gl_MaxVaryingFloats\",\"gl_MaxVertexAttribs\",\"gl_MaxVertexTextureImageUnits\",\"gl_MaxVertexUniformComponents\",\"gl_ModelViewMatrix\",\"gl_ModelViewMatrixInverse\",\"gl_ModelViewMatrixInverseTranspose\",\"gl_ModelViewMatrixTranspose\",\"gl_ModelViewProjectionMatrix\",\"gl_ModelViewProjectionMatrixInverse\",\"gl_ModelViewProjectionMatrixInverseTranspose\",\"gl_ModelViewProjectionMatrixTranspose\",\"gl_MultiTexCoord0\",\"gl_MultiTexCoord1\",\"gl_MultiTexCoord2\",\"gl_MultiTexCoord3\",\"gl_MultiTexCoord4\",\"gl_MultiTexCoord5\",\"gl_MultiTexCoord6\",\"gl_MultiTexCoord7\",\"gl_Normal\",\"gl_NormalMatrix\",\"gl_NormalScale\",\"gl_ObjectPlaneQ\",\"gl_ObjectPlaneR\",\"gl_ObjectPlaneS\",\"gl_ObjectPlaneT\",\"gl_Point\",\"gl_PointCoord\",\"gl_PointParameters\",\"gl_PointSize\",\"gl_Position\",\"gl_ProjectionMatrix\",\"gl_ProjectionMatrixInverse\",\"gl_ProjectionMatrixInverseTranspose\",\"gl_ProjectionMatrixTranspose\",\"gl_SecondaryColor\",\"gl_TexCoord\",\"gl_TextureEnvColor\",\"gl_TextureMatrix\",\"gl_TextureMatrixInverse\",\"gl_TextureMatrixInverseTranspose\",\"gl_TextureMatrixTranspose\",\"gl_Vertex\",\"greaterThan\",\"greaterThanEqual\",\"inversesqrt\",\"length\",\"lessThan\",\"lessThanEqual\",\"log\",\"log2\",\"matrixCompMult\",\"max\",\"min\",\"mix\",\"mod\",\"normalize\",\"not\",\"notEqual\",\"pow\",\"radians\",\"reflect\",\"refract\",\"sign\",\"sin\",\"smoothstep\",\"sqrt\",\"step\",\"tan\",\"texture2D\",\"texture2DLod\",\"texture2DProj\",\"texture2DProjLod\",\"textureCube\",\"textureCubeLod\",\"texture2DLodEXT\",\"texture2DProjLodEXT\",\"textureCubeLodEXT\",\"texture2DGradEXT\",\"texture2DProjGradEXT\",\"textureCubeGradEXT\"]},6859:function(i,a,o){i=o.nmd(i),function(s,l){\"use strict\";function u(j,N){if(!j)throw new Error(N||\"Assertion failed\")}function c(j,N){j.super_=N;var H=function(){};H.prototype=N.prototype,j.prototype=new H,j.prototype.constructor=j}function f(j,N,H){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((N===\"le\"||N===\"be\")&&(H=N,N=10),this._init(j||0,N||10,H||\"be\"))}typeof s==\"object\"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!=\"undefined\"&&typeof window.Buffer!=\"undefined\"?h=window.Buffer:h=o(7790).Buffer}catch(j){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N==\"object\"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,H){return N.cmp(H)>0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,re){if(typeof N==\"number\")return this._initNumber(N,H,re);if(typeof N==\"object\")return this._initArray(N,H,re);H===\"hex\"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\\s+/g,\"\");var oe=0;N[0]===\"-\"&&(oe++,this.negative=1),oe<N.length&&(H===16?this._parseHex(N,oe,re):(this._parseBase(N,H,oe),re===\"le\"&&this._initArray(this.toArray(),H,re)))},f.prototype._initNumber=function(N,H,re){N<0&&(this.negative=1,N=-N),N<67108864?(this.words=[N&67108863],this.length=1):N<4503599627370496?(this.words=[N&67108863,N/67108864&67108863],this.length=2):(u(N<9007199254740992),this.words=[N&67108863,N/67108864&67108863,1],this.length=3),re===\"le\"&&this._initArray(this.toArray(),H,re)},f.prototype._initArray=function(N,H,re){if(u(typeof N.length==\"number\"),N.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(N.length/3),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e,Ce,Le=0;if(re===\"be\")for(oe=N.length-1,_e=0;oe>=0;oe-=3)Ce=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=Ce<<Le&67108863,this.words[_e+1]=Ce>>>26-Le&67108863,Le+=24,Le>=26&&(Le-=26,_e++);else if(re===\"le\")for(oe=0,_e=0;oe<N.length;oe+=3)Ce=N[oe]|N[oe+1]<<8|N[oe+2]<<16,this.words[_e]|=Ce<<Le&67108863,this.words[_e+1]=Ce>>>26-Le&67108863,Le+=24,Le>=26&&(Le-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var re=d(j,H);return H-1>=N&&(re|=d(j,H-1)<<4),re}f.prototype._parseHex=function(N,H,re){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e=0,Ce=0,Le;if(re===\"be\")for(oe=N.length-1;oe>=H;oe-=2)Le=v(N,H,oe)<<_e,this.words[Ce]|=Le&67108863,_e>=18?(_e-=18,Ce+=1,this.words[Ce]|=Le>>>26):_e+=8;else{var ge=N.length-H;for(oe=ge%2===0?H+1:H;oe<N.length;oe+=2)Le=v(N,H,oe)<<_e,this.words[Ce]|=Le&67108863,_e>=18?(_e-=18,Ce+=1,this.words[Ce]|=Le>>>26):_e+=8}this.strip()};function _(j,N,H,re){for(var oe=0,_e=Math.min(j.length,H),Ce=N;Ce<_e;Ce++){var Le=j.charCodeAt(Ce)-48;oe*=re,Le>=49?oe+=Le-49+10:Le>=17?oe+=Le-17+10:oe+=Le}return oe}f.prototype._parseBase=function(N,H,re){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=H)oe++;oe--,_e=_e/H|0;for(var Ce=N.length-re,Le=Ce%oe,ge=Math.min(Ce,Ce-Le)+re,ie=0,Se=re;Se<ge;Se+=oe)ie=_(N,Se,Se+oe,H),this.imuln(_e),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie);if(Le!==0){var Ee=1;for(ie=_(N,Se,N.length,H),Se=0;Se<Le;Se++)Ee*=H;this.imuln(Ee),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie)}this.strip()},f.prototype.copy=function(N){N.words=new Array(this.length);for(var H=0;H<this.length;H++)N.words[H]=this.words[H];N.length=this.length,N.negative=this.negative,N.red=this.red},f.prototype.clone=function(){var N=new f(null);return this.copy(N),N},f.prototype._expand=function(N){for(;this.length<N;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var b=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],p=[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],k=[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];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var re;if(N===16||N===\"hex\"){re=\"\";for(var oe=0,_e=0,Ce=0;Ce<this.length;Ce++){var Le=this.words[Ce],ge=((Le<<oe|_e)&16777215).toString(16);_e=Le>>>24-oe&16777215,_e!==0||Ce!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re,oe+=2,oe>=26&&(oe-=26,Ce--)}for(_e!==0&&(re=_e.toString(16)+re);re.length%H!==0;)re=\"0\"+re;return this.negative!==0&&(re=\"-\"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=k[N];re=\"\";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Ae=Ee.modn(Se).toString(N);Ee=Ee.idivn(Se),Ee.isZero()?re=Ae+re:re=b[ie-Ae.length]+Ae+re}for(this.isZero()&&(re=\"0\"+re);re.length%H!==0;)re=\"0\"+re;return this.negative!==0&&(re=\"-\"+re),re}u(!1,\"Base should be between 2 and 36\")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,\"Number can only safely store up to 53 bits\"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!=\"undefined\"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,re){var oe=this.byteLength(),_e=re||Math.max(1,oe);u(oe<=_e,\"byte array longer than desired length\"),u(_e>0,\"Requested array length <= 0\"),this.strip();var Ce=H===\"le\",Le=new N(_e),ge,ie,Se=this.clone();if(Ce){for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Le[ie]=ge;for(;ie<_e;ie++)Le[ie]=0}else{for(ie=0;ie<_e-oe;ie++)Le[ie]=0;for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Le[_e-ie-1]=ge}return Le},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,re=0;return H>=4096&&(re+=13,H>>>=13),H>=64&&(re+=7,H>>>=7),H>=8&&(re+=4,H>>>=4),H>=2&&(re+=2,H>>>=2),re+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,re=0;return(H&8191)===0&&(re+=13,H>>>=13),(H&127)===0&&(re+=7,H>>>=7),(H&15)===0&&(re+=4,H>>>=4),(H&3)===0&&(re+=2,H>>>=2),(H&1)===0&&re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function E(j){for(var N=new Array(j.bitLength()),H=0;H<N.length;H++){var re=H/26|0,oe=H%26;N[H]=(j.words[re]&1<<oe)>>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;H<this.length;H++){var re=this._zeroBits(this.words[H]);if(N+=re,re!==26)break}return N},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(N){return this.negative!==0?this.abs().inotn(N).iaddn(1):this.clone()},f.prototype.fromTwos=function(N){return this.testn(N-1)?this.notn(N).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(N){for(;this.length<N.length;)this.words[this.length++]=0;for(var H=0;H<N.length;H++)this.words[H]=this.words[H]|N.words[H];return this.strip()},f.prototype.ior=function(N){return u((this.negative|N.negative)===0),this.iuor(N)},f.prototype.or=function(N){return this.length>N.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var re=0;re<H.length;re++)this.words[re]=this.words[re]&N.words[re];return this.length=H.length,this.strip()},f.prototype.iand=function(N){return u((this.negative|N.negative)===0),this.iuand(N)},f.prototype.and=function(N){return this.length>N.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,re;this.length>N.length?(H=this,re=N):(H=N,re=this);for(var oe=0;oe<re.length;oe++)this.words[oe]=H.words[oe]^re.words[oe];if(this!==H)for(;oe<H.length;oe++)this.words[oe]=H.words[oe];return this.length=H.length,this.strip()},f.prototype.ixor=function(N){return u((this.negative|N.negative)===0),this.iuxor(N)},f.prototype.xor=function(N){return this.length>N.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N==\"number\"&&N>=0);var H=Math.ceil(N/26)|0,re=N%26;this._expand(H),re>0&&H--;for(var oe=0;oe<H;oe++)this.words[oe]=~this.words[oe]&67108863;return re>0&&(this.words[oe]=~this.words[oe]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N==\"number\"&&N>=0);var re=N/26|0,oe=N%26;return this._expand(re+1),H?this.words[re]=this.words[re]|1<<oe:this.words[re]=this.words[re]&~(1<<oe),this.strip()},f.prototype.iadd=function(N){var H;if(this.negative!==0&&N.negative===0)return this.negative=0,H=this.isub(N),this.negative^=1,this._normSign();if(this.negative===0&&N.negative!==0)return N.negative=0,H=this.isub(N),N.negative=1,H._normSign();var re,oe;this.length>N.length?(re=this,oe=N):(re=N,oe=this);for(var _e=0,Ce=0;Ce<oe.length;Ce++)H=(re.words[Ce]|0)+(oe.words[Ce]|0)+_e,this.words[Ce]=H&67108863,_e=H>>>26;for(;_e!==0&&Ce<re.length;Ce++)H=(re.words[Ce]|0)+_e,this.words[Ce]=H&67108863,_e=H>>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;Ce<re.length;Ce++)this.words[Ce]=re.words[Ce];return this},f.prototype.add=function(N){var H;return N.negative!==0&&this.negative===0?(N.negative=0,H=this.sub(N),N.negative^=1,H):N.negative===0&&this.negative!==0?(this.negative=0,H=N.sub(this),this.negative=1,H):this.length>N.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;re>0?(oe=this,_e=N):(oe=N,_e=this);for(var Ce=0,Le=0;Le<_e.length;Le++)H=(oe.words[Le]|0)-(_e.words[Le]|0)+Ce,Ce=H>>26,this.words[Le]=H&67108863;for(;Ce!==0&&Le<oe.length;Le++)H=(oe.words[Le]|0)+Ce,Ce=H>>26,this.words[Le]=H&67108863;if(Ce===0&&Le<oe.length&&oe!==this)for(;Le<oe.length;Le++)this.words[Le]=oe.words[Le];return this.length=Math.max(this.length,Le),oe!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(N){return this.clone().isub(N)};function T(j,N,H){H.negative=N.negative^j.negative;var re=j.length+N.length|0;H.length=re,re=re-1|0;var oe=j.words[0]|0,_e=N.words[0]|0,Ce=oe*_e,Le=Ce&67108863,ge=Ce/67108864|0;H.words[0]=Le;for(var ie=1;ie<re;ie++){for(var Se=ge>>>26,Ee=ge&67108863,Ae=Math.min(ie,N.length-1),Be=Math.max(0,ie-j.length+1);Be<=Ae;Be++){var Pe=ie-Be|0;oe=j.words[Pe]|0,_e=N.words[Be]|0,Ce=oe*_e+Ee,Se+=Ce/67108864|0,Ee=Ce&67108863}H.words[ie]=Ee|0,ge=Se|0}return ge!==0?H.words[ie]=ge|0:H.length--,H.strip()}var L=function(N,H,re){var oe=N.words,_e=H.words,Ce=re.words,Le=0,ge,ie,Se,Ee=oe[0]|0,Ae=Ee&8191,Be=Ee>>>13,Pe=oe[1]|0,me=Pe&8191,De=Pe>>>13,ce=oe[2]|0,je=ce&8191,lt=ce>>>13,pt=oe[3]|0,Vt=pt&8191,ot=pt>>>13,ut=oe[4]|0,Wt=ut&8191,Nt=ut>>>13,$t=oe[5]|0,sr=$t&8191,Tr=$t>>>13,fr=oe[6]|0,$e=fr&8191,St=fr>>>13,Qt=oe[7]|0,Gt=Qt&8191,_t=Qt>>>13,It=oe[8]|0,mt=It&8191,er=It>>>13,lr=oe[9]|0,wr=lr&8191,Lr=lr>>>13,ti=_e[0]|0,Br=ti&8191,Vr=ti>>>13,dt=_e[1]|0,Ge=dt&8191,Je=dt>>>13,We=_e[2]|0,tt=We&8191,xt=We>>>13,Ie=_e[3]|0,xe=Ie&8191,ke=Ie>>>13,vt=_e[4]|0,ir=vt&8191,ar=vt>>>13,vr=_e[5]|0,ii=vr&8191,pi=vr>>>13,$r=_e[6]|0,di=$r&8191,ji=$r>>>13,In=_e[7]|0,wi=In&8191,On=In>>>13,qn=_e[8]|0,Fn=qn&8191,ra=qn>>>13,la=_e[9]|0,Ut=la&8191,wt=la>>>13;re.negative=N.negative^H.negative,re.length=19,ge=Math.imul(Ae,Br),ie=Math.imul(Ae,Vr),ie=ie+Math.imul(Be,Br)|0,Se=Math.imul(Be,Vr);var rr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(rr>>>26)|0,rr&=67108863,ge=Math.imul(me,Br),ie=Math.imul(me,Vr),ie=ie+Math.imul(De,Br)|0,Se=Math.imul(De,Vr),ge=ge+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(Be,Ge)|0,Se=Se+Math.imul(Be,Je)|0;var nr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(nr>>>26)|0,nr&=67108863,ge=Math.imul(je,Br),ie=Math.imul(je,Vr),ie=ie+Math.imul(lt,Br)|0,Se=Math.imul(lt,Vr),ge=ge+Math.imul(me,Ge)|0,ie=ie+Math.imul(me,Je)|0,ie=ie+Math.imul(De,Ge)|0,Se=Se+Math.imul(De,Je)|0,ge=ge+Math.imul(Ae,tt)|0,ie=ie+Math.imul(Ae,xt)|0,ie=ie+Math.imul(Be,tt)|0,Se=Se+Math.imul(Be,xt)|0;var Er=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Er>>>26)|0,Er&=67108863,ge=Math.imul(Vt,Br),ie=Math.imul(Vt,Vr),ie=ie+Math.imul(ot,Br)|0,Se=Math.imul(ot,Vr),ge=ge+Math.imul(je,Ge)|0,ie=ie+Math.imul(je,Je)|0,ie=ie+Math.imul(lt,Ge)|0,Se=Se+Math.imul(lt,Je)|0,ge=ge+Math.imul(me,tt)|0,ie=ie+Math.imul(me,xt)|0,ie=ie+Math.imul(De,tt)|0,Se=Se+Math.imul(De,xt)|0,ge=ge+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,ke)|0,ie=ie+Math.imul(Be,xe)|0,Se=Se+Math.imul(Be,ke)|0;var Xr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,ge=Math.imul(Wt,Br),ie=Math.imul(Wt,Vr),ie=ie+Math.imul(Nt,Br)|0,Se=Math.imul(Nt,Vr),ge=ge+Math.imul(Vt,Ge)|0,ie=ie+Math.imul(Vt,Je)|0,ie=ie+Math.imul(ot,Ge)|0,Se=Se+Math.imul(ot,Je)|0,ge=ge+Math.imul(je,tt)|0,ie=ie+Math.imul(je,xt)|0,ie=ie+Math.imul(lt,tt)|0,Se=Se+Math.imul(lt,xt)|0,ge=ge+Math.imul(me,xe)|0,ie=ie+Math.imul(me,ke)|0,ie=ie+Math.imul(De,xe)|0,Se=Se+Math.imul(De,ke)|0,ge=ge+Math.imul(Ae,ir)|0,ie=ie+Math.imul(Ae,ar)|0,ie=ie+Math.imul(Be,ir)|0,Se=Se+Math.imul(Be,ar)|0;var ri=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ri>>>26)|0,ri&=67108863,ge=Math.imul(sr,Br),ie=Math.imul(sr,Vr),ie=ie+Math.imul(Tr,Br)|0,Se=Math.imul(Tr,Vr),ge=ge+Math.imul(Wt,Ge)|0,ie=ie+Math.imul(Wt,Je)|0,ie=ie+Math.imul(Nt,Ge)|0,Se=Se+Math.imul(Nt,Je)|0,ge=ge+Math.imul(Vt,tt)|0,ie=ie+Math.imul(Vt,xt)|0,ie=ie+Math.imul(ot,tt)|0,Se=Se+Math.imul(ot,xt)|0,ge=ge+Math.imul(je,xe)|0,ie=ie+Math.imul(je,ke)|0,ie=ie+Math.imul(lt,xe)|0,Se=Se+Math.imul(lt,ke)|0,ge=ge+Math.imul(me,ir)|0,ie=ie+Math.imul(me,ar)|0,ie=ie+Math.imul(De,ir)|0,Se=Se+Math.imul(De,ar)|0,ge=ge+Math.imul(Ae,ii)|0,ie=ie+Math.imul(Ae,pi)|0,ie=ie+Math.imul(Be,ii)|0,Se=Se+Math.imul(Be,pi)|0;var Qr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,ge=Math.imul($e,Br),ie=Math.imul($e,Vr),ie=ie+Math.imul(St,Br)|0,Se=Math.imul(St,Vr),ge=ge+Math.imul(sr,Ge)|0,ie=ie+Math.imul(sr,Je)|0,ie=ie+Math.imul(Tr,Ge)|0,Se=Se+Math.imul(Tr,Je)|0,ge=ge+Math.imul(Wt,tt)|0,ie=ie+Math.imul(Wt,xt)|0,ie=ie+Math.imul(Nt,tt)|0,Se=Se+Math.imul(Nt,xt)|0,ge=ge+Math.imul(Vt,xe)|0,ie=ie+Math.imul(Vt,ke)|0,ie=ie+Math.imul(ot,xe)|0,Se=Se+Math.imul(ot,ke)|0,ge=ge+Math.imul(je,ir)|0,ie=ie+Math.imul(je,ar)|0,ie=ie+Math.imul(lt,ir)|0,Se=Se+Math.imul(lt,ar)|0,ge=ge+Math.imul(me,ii)|0,ie=ie+Math.imul(me,pi)|0,ie=ie+Math.imul(De,ii)|0,Se=Se+Math.imul(De,pi)|0,ge=ge+Math.imul(Ae,di)|0,ie=ie+Math.imul(Ae,ji)|0,ie=ie+Math.imul(Be,di)|0,Se=Se+Math.imul(Be,ji)|0;var Oi=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,ge=Math.imul(Gt,Br),ie=Math.imul(Gt,Vr),ie=ie+Math.imul(_t,Br)|0,Se=Math.imul(_t,Vr),ge=ge+Math.imul($e,Ge)|0,ie=ie+Math.imul($e,Je)|0,ie=ie+Math.imul(St,Ge)|0,Se=Se+Math.imul(St,Je)|0,ge=ge+Math.imul(sr,tt)|0,ie=ie+Math.imul(sr,xt)|0,ie=ie+Math.imul(Tr,tt)|0,Se=Se+Math.imul(Tr,xt)|0,ge=ge+Math.imul(Wt,xe)|0,ie=ie+Math.imul(Wt,ke)|0,ie=ie+Math.imul(Nt,xe)|0,Se=Se+Math.imul(Nt,ke)|0,ge=ge+Math.imul(Vt,ir)|0,ie=ie+Math.imul(Vt,ar)|0,ie=ie+Math.imul(ot,ir)|0,Se=Se+Math.imul(ot,ar)|0,ge=ge+Math.imul(je,ii)|0,ie=ie+Math.imul(je,pi)|0,ie=ie+Math.imul(lt,ii)|0,Se=Se+Math.imul(lt,pi)|0,ge=ge+Math.imul(me,di)|0,ie=ie+Math.imul(me,ji)|0,ie=ie+Math.imul(De,di)|0,Se=Se+Math.imul(De,ji)|0,ge=ge+Math.imul(Ae,wi)|0,ie=ie+Math.imul(Ae,On)|0,ie=ie+Math.imul(Be,wi)|0,Se=Se+Math.imul(Be,On)|0;var $i=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+($i>>>26)|0,$i&=67108863,ge=Math.imul(mt,Br),ie=Math.imul(mt,Vr),ie=ie+Math.imul(er,Br)|0,Se=Math.imul(er,Vr),ge=ge+Math.imul(Gt,Ge)|0,ie=ie+Math.imul(Gt,Je)|0,ie=ie+Math.imul(_t,Ge)|0,Se=Se+Math.imul(_t,Je)|0,ge=ge+Math.imul($e,tt)|0,ie=ie+Math.imul($e,xt)|0,ie=ie+Math.imul(St,tt)|0,Se=Se+Math.imul(St,xt)|0,ge=ge+Math.imul(sr,xe)|0,ie=ie+Math.imul(sr,ke)|0,ie=ie+Math.imul(Tr,xe)|0,Se=Se+Math.imul(Tr,ke)|0,ge=ge+Math.imul(Wt,ir)|0,ie=ie+Math.imul(Wt,ar)|0,ie=ie+Math.imul(Nt,ir)|0,Se=Se+Math.imul(Nt,ar)|0,ge=ge+Math.imul(Vt,ii)|0,ie=ie+Math.imul(Vt,pi)|0,ie=ie+Math.imul(ot,ii)|0,Se=Se+Math.imul(ot,pi)|0,ge=ge+Math.imul(je,di)|0,ie=ie+Math.imul(je,ji)|0,ie=ie+Math.imul(lt,di)|0,Se=Se+Math.imul(lt,ji)|0,ge=ge+Math.imul(me,wi)|0,ie=ie+Math.imul(me,On)|0,ie=ie+Math.imul(De,wi)|0,Se=Se+Math.imul(De,On)|0,ge=ge+Math.imul(Ae,Fn)|0,ie=ie+Math.imul(Ae,ra)|0,ie=ie+Math.imul(Be,Fn)|0,Se=Se+Math.imul(Be,ra)|0;var tn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(tn>>>26)|0,tn&=67108863,ge=Math.imul(wr,Br),ie=Math.imul(wr,Vr),ie=ie+Math.imul(Lr,Br)|0,Se=Math.imul(Lr,Vr),ge=ge+Math.imul(mt,Ge)|0,ie=ie+Math.imul(mt,Je)|0,ie=ie+Math.imul(er,Ge)|0,Se=Se+Math.imul(er,Je)|0,ge=ge+Math.imul(Gt,tt)|0,ie=ie+Math.imul(Gt,xt)|0,ie=ie+Math.imul(_t,tt)|0,Se=Se+Math.imul(_t,xt)|0,ge=ge+Math.imul($e,xe)|0,ie=ie+Math.imul($e,ke)|0,ie=ie+Math.imul(St,xe)|0,Se=Se+Math.imul(St,ke)|0,ge=ge+Math.imul(sr,ir)|0,ie=ie+Math.imul(sr,ar)|0,ie=ie+Math.imul(Tr,ir)|0,Se=Se+Math.imul(Tr,ar)|0,ge=ge+Math.imul(Wt,ii)|0,ie=ie+Math.imul(Wt,pi)|0,ie=ie+Math.imul(Nt,ii)|0,Se=Se+Math.imul(Nt,pi)|0,ge=ge+Math.imul(Vt,di)|0,ie=ie+Math.imul(Vt,ji)|0,ie=ie+Math.imul(ot,di)|0,Se=Se+Math.imul(ot,ji)|0,ge=ge+Math.imul(je,wi)|0,ie=ie+Math.imul(je,On)|0,ie=ie+Math.imul(lt,wi)|0,Se=Se+Math.imul(lt,On)|0,ge=ge+Math.imul(me,Fn)|0,ie=ie+Math.imul(me,ra)|0,ie=ie+Math.imul(De,Fn)|0,Se=Se+Math.imul(De,ra)|0,ge=ge+Math.imul(Ae,Ut)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(Be,Ut)|0,Se=Se+Math.imul(Be,wt)|0;var fn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(fn>>>26)|0,fn&=67108863,ge=Math.imul(wr,Ge),ie=Math.imul(wr,Je),ie=ie+Math.imul(Lr,Ge)|0,Se=Math.imul(Lr,Je),ge=ge+Math.imul(mt,tt)|0,ie=ie+Math.imul(mt,xt)|0,ie=ie+Math.imul(er,tt)|0,Se=Se+Math.imul(er,xt)|0,ge=ge+Math.imul(Gt,xe)|0,ie=ie+Math.imul(Gt,ke)|0,ie=ie+Math.imul(_t,xe)|0,Se=Se+Math.imul(_t,ke)|0,ge=ge+Math.imul($e,ir)|0,ie=ie+Math.imul($e,ar)|0,ie=ie+Math.imul(St,ir)|0,Se=Se+Math.imul(St,ar)|0,ge=ge+Math.imul(sr,ii)|0,ie=ie+Math.imul(sr,pi)|0,ie=ie+Math.imul(Tr,ii)|0,Se=Se+Math.imul(Tr,pi)|0,ge=ge+Math.imul(Wt,di)|0,ie=ie+Math.imul(Wt,ji)|0,ie=ie+Math.imul(Nt,di)|0,Se=Se+Math.imul(Nt,ji)|0,ge=ge+Math.imul(Vt,wi)|0,ie=ie+Math.imul(Vt,On)|0,ie=ie+Math.imul(ot,wi)|0,Se=Se+Math.imul(ot,On)|0,ge=ge+Math.imul(je,Fn)|0,ie=ie+Math.imul(je,ra)|0,ie=ie+Math.imul(lt,Fn)|0,Se=Se+Math.imul(lt,ra)|0,ge=ge+Math.imul(me,Ut)|0,ie=ie+Math.imul(me,wt)|0,ie=ie+Math.imul(De,Ut)|0,Se=Se+Math.imul(De,wt)|0;var yn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,ge=Math.imul(wr,tt),ie=Math.imul(wr,xt),ie=ie+Math.imul(Lr,tt)|0,Se=Math.imul(Lr,xt),ge=ge+Math.imul(mt,xe)|0,ie=ie+Math.imul(mt,ke)|0,ie=ie+Math.imul(er,xe)|0,Se=Se+Math.imul(er,ke)|0,ge=ge+Math.imul(Gt,ir)|0,ie=ie+Math.imul(Gt,ar)|0,ie=ie+Math.imul(_t,ir)|0,Se=Se+Math.imul(_t,ar)|0,ge=ge+Math.imul($e,ii)|0,ie=ie+Math.imul($e,pi)|0,ie=ie+Math.imul(St,ii)|0,Se=Se+Math.imul(St,pi)|0,ge=ge+Math.imul(sr,di)|0,ie=ie+Math.imul(sr,ji)|0,ie=ie+Math.imul(Tr,di)|0,Se=Se+Math.imul(Tr,ji)|0,ge=ge+Math.imul(Wt,wi)|0,ie=ie+Math.imul(Wt,On)|0,ie=ie+Math.imul(Nt,wi)|0,Se=Se+Math.imul(Nt,On)|0,ge=ge+Math.imul(Vt,Fn)|0,ie=ie+Math.imul(Vt,ra)|0,ie=ie+Math.imul(ot,Fn)|0,Se=Se+Math.imul(ot,ra)|0,ge=ge+Math.imul(je,Ut)|0,ie=ie+Math.imul(je,wt)|0,ie=ie+Math.imul(lt,Ut)|0,Se=Se+Math.imul(lt,wt)|0;var Sn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,ge=Math.imul(wr,xe),ie=Math.imul(wr,ke),ie=ie+Math.imul(Lr,xe)|0,Se=Math.imul(Lr,ke),ge=ge+Math.imul(mt,ir)|0,ie=ie+Math.imul(mt,ar)|0,ie=ie+Math.imul(er,ir)|0,Se=Se+Math.imul(er,ar)|0,ge=ge+Math.imul(Gt,ii)|0,ie=ie+Math.imul(Gt,pi)|0,ie=ie+Math.imul(_t,ii)|0,Se=Se+Math.imul(_t,pi)|0,ge=ge+Math.imul($e,di)|0,ie=ie+Math.imul($e,ji)|0,ie=ie+Math.imul(St,di)|0,Se=Se+Math.imul(St,ji)|0,ge=ge+Math.imul(sr,wi)|0,ie=ie+Math.imul(sr,On)|0,ie=ie+Math.imul(Tr,wi)|0,Se=Se+Math.imul(Tr,On)|0,ge=ge+Math.imul(Wt,Fn)|0,ie=ie+Math.imul(Wt,ra)|0,ie=ie+Math.imul(Nt,Fn)|0,Se=Se+Math.imul(Nt,ra)|0,ge=ge+Math.imul(Vt,Ut)|0,ie=ie+Math.imul(Vt,wt)|0,ie=ie+Math.imul(ot,Ut)|0,Se=Se+Math.imul(ot,wt)|0;var Ba=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,ge=Math.imul(wr,ir),ie=Math.imul(wr,ar),ie=ie+Math.imul(Lr,ir)|0,Se=Math.imul(Lr,ar),ge=ge+Math.imul(mt,ii)|0,ie=ie+Math.imul(mt,pi)|0,ie=ie+Math.imul(er,ii)|0,Se=Se+Math.imul(er,pi)|0,ge=ge+Math.imul(Gt,di)|0,ie=ie+Math.imul(Gt,ji)|0,ie=ie+Math.imul(_t,di)|0,Se=Se+Math.imul(_t,ji)|0,ge=ge+Math.imul($e,wi)|0,ie=ie+Math.imul($e,On)|0,ie=ie+Math.imul(St,wi)|0,Se=Se+Math.imul(St,On)|0,ge=ge+Math.imul(sr,Fn)|0,ie=ie+Math.imul(sr,ra)|0,ie=ie+Math.imul(Tr,Fn)|0,Se=Se+Math.imul(Tr,ra)|0,ge=ge+Math.imul(Wt,Ut)|0,ie=ie+Math.imul(Wt,wt)|0,ie=ie+Math.imul(Nt,Ut)|0,Se=Se+Math.imul(Nt,wt)|0;var ua=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ua>>>26)|0,ua&=67108863,ge=Math.imul(wr,ii),ie=Math.imul(wr,pi),ie=ie+Math.imul(Lr,ii)|0,Se=Math.imul(Lr,pi),ge=ge+Math.imul(mt,di)|0,ie=ie+Math.imul(mt,ji)|0,ie=ie+Math.imul(er,di)|0,Se=Se+Math.imul(er,ji)|0,ge=ge+Math.imul(Gt,wi)|0,ie=ie+Math.imul(Gt,On)|0,ie=ie+Math.imul(_t,wi)|0,Se=Se+Math.imul(_t,On)|0,ge=ge+Math.imul($e,Fn)|0,ie=ie+Math.imul($e,ra)|0,ie=ie+Math.imul(St,Fn)|0,Se=Se+Math.imul(St,ra)|0,ge=ge+Math.imul(sr,Ut)|0,ie=ie+Math.imul(sr,wt)|0,ie=ie+Math.imul(Tr,Ut)|0,Se=Se+Math.imul(Tr,wt)|0;var ma=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,ge=Math.imul(wr,di),ie=Math.imul(wr,ji),ie=ie+Math.imul(Lr,di)|0,Se=Math.imul(Lr,ji),ge=ge+Math.imul(mt,wi)|0,ie=ie+Math.imul(mt,On)|0,ie=ie+Math.imul(er,wi)|0,Se=Se+Math.imul(er,On)|0,ge=ge+Math.imul(Gt,Fn)|0,ie=ie+Math.imul(Gt,ra)|0,ie=ie+Math.imul(_t,Fn)|0,Se=Se+Math.imul(_t,ra)|0,ge=ge+Math.imul($e,Ut)|0,ie=ie+Math.imul($e,wt)|0,ie=ie+Math.imul(St,Ut)|0,Se=Se+Math.imul(St,wt)|0;var Wa=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,ge=Math.imul(wr,wi),ie=Math.imul(wr,On),ie=ie+Math.imul(Lr,wi)|0,Se=Math.imul(Lr,On),ge=ge+Math.imul(mt,Fn)|0,ie=ie+Math.imul(mt,ra)|0,ie=ie+Math.imul(er,Fn)|0,Se=Se+Math.imul(er,ra)|0,ge=ge+Math.imul(Gt,Ut)|0,ie=ie+Math.imul(Gt,wt)|0,ie=ie+Math.imul(_t,Ut)|0,Se=Se+Math.imul(_t,wt)|0;var Fa=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(wr,Fn),ie=Math.imul(wr,ra),ie=ie+Math.imul(Lr,Fn)|0,Se=Math.imul(Lr,ra),ge=ge+Math.imul(mt,Ut)|0,ie=ie+Math.imul(mt,wt)|0,ie=ie+Math.imul(er,Ut)|0,Se=Se+Math.imul(er,wt)|0;var Xo=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,ge=Math.imul(wr,Ut),ie=Math.imul(wr,wt),ie=ie+Math.imul(Lr,Ut)|0,Se=Math.imul(Lr,wt);var da=(Le+ge|0)+((ie&8191)<<13)|0;return Le=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,Ce[0]=rr,Ce[1]=nr,Ce[2]=Er,Ce[3]=Xr,Ce[4]=ri,Ce[5]=Qr,Ce[6]=Oi,Ce[7]=$i,Ce[8]=tn,Ce[9]=fn,Ce[10]=yn,Ce[11]=Sn,Ce[12]=Ba,Ce[13]=ua,Ce[14]=ma,Ce[15]=Wa,Ce[16]=Fa,Ce[17]=Xo,Ce[18]=da,Le!==0&&(Ce[19]=Le,re.length++),re};Math.imul||(L=T);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var re=0,oe=0,_e=0;_e<H.length-1;_e++){var Ce=oe;oe=0;for(var Le=re&67108863,ge=Math.min(_e,N.length-1),ie=Math.max(0,_e-j.length+1);ie<=ge;ie++){var Se=_e-ie,Ee=j.words[Se]|0,Ae=N.words[ie]|0,Be=Ee*Ae,Pe=Be&67108863;Ce=Ce+(Be/67108864|0)|0,Pe=Pe+Le|0,Le=Pe&67108863,Ce=Ce+(Pe>>>26)|0,oe+=Ce>>>26,Ce&=67108863}H.words[_e]=Le,re=Ce,Ce=oe}return re!==0?H.words[_e]=re:H.length--,H.strip()}function C(j,N,H){var re=new M;return re.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var re,oe=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,H):oe<63?re=T(this,N,H):oe<1024?re=x(this,N,H):re=C(this,N,H),re};function M(j,N){this.x=j,this.y=N}M.prototype.makeRBT=function(N){for(var H=new Array(N),re=f.prototype._countBits(N)-1,oe=0;oe<N;oe++)H[oe]=this.revBin(oe,re,N);return H},M.prototype.revBin=function(N,H,re){if(N===0||N===re-1)return N;for(var oe=0,_e=0;_e<H;_e++)oe|=(N&1)<<H-_e-1,N>>=1;return oe},M.prototype.permute=function(N,H,re,oe,_e,Ce){for(var Le=0;Le<Ce;Le++)oe[Le]=H[N[Le]],_e[Le]=re[N[Le]]},M.prototype.transform=function(N,H,re,oe,_e,Ce){this.permute(Ce,N,H,re,oe,_e);for(var Le=1;Le<_e;Le<<=1)for(var ge=Le<<1,ie=Math.cos(2*Math.PI/ge),Se=Math.sin(2*Math.PI/ge),Ee=0;Ee<_e;Ee+=ge)for(var Ae=ie,Be=Se,Pe=0;Pe<Le;Pe++){var me=re[Ee+Pe],De=oe[Ee+Pe],ce=re[Ee+Pe+Le],je=oe[Ee+Pe+Le],lt=Ae*ce-Be*je;je=Ae*je+Be*ce,ce=lt,re[Ee+Pe]=me+ce,oe[Ee+Pe]=De+je,re[Ee+Pe+Le]=me-ce,oe[Ee+Pe+Le]=De-je,Pe!==ge&&(lt=ie*Ae-Se*Be,Be=ie*Be+Se*Ae,Ae=lt)}},M.prototype.guessLen13b=function(N,H){var re=Math.max(H,N)|1,oe=re&1,_e=0;for(re=re/2|0;re;re=re>>>1)_e++;return 1<<_e+1+oe},M.prototype.conjugate=function(N,H,re){if(!(re<=1))for(var oe=0;oe<re/2;oe++){var _e=N[oe];N[oe]=N[re-oe-1],N[re-oe-1]=_e,_e=H[oe],H[oe]=-H[re-oe-1],H[re-oe-1]=-_e}},M.prototype.normalize13b=function(N,H){for(var re=0,oe=0;oe<H/2;oe++){var _e=Math.round(N[2*oe+1]/H)*8192+Math.round(N[2*oe]/H)+re;N[oe]=_e&67108863,_e<67108864?re=0:re=_e/67108864|0}return N},M.prototype.convert13b=function(N,H,re,oe){for(var _e=0,Ce=0;Ce<H;Ce++)_e=_e+(N[Ce]|0),re[2*Ce]=_e&8191,_e=_e>>>13,re[2*Ce+1]=_e&8191,_e=_e>>>13;for(Ce=2*H;Ce<oe;++Ce)re[Ce]=0;u(_e===0),u((_e&-8192)===0)},M.prototype.stub=function(N){for(var H=new Array(N),re=0;re<N;re++)H[re]=0;return H},M.prototype.mulp=function(N,H,re){var oe=2*this.guessLen13b(N.length,H.length),_e=this.makeRBT(oe),Ce=this.stub(oe),Le=new Array(oe),ge=new Array(oe),ie=new Array(oe),Se=new Array(oe),Ee=new Array(oe),Ae=new Array(oe),Be=re.words;Be.length=oe,this.convert13b(N.words,N.length,Le,oe),this.convert13b(H.words,H.length,Se,oe),this.transform(Le,Ce,ge,ie,oe,_e),this.transform(Se,Ce,Ee,Ae,oe,_e);for(var Pe=0;Pe<oe;Pe++){var me=ge[Pe]*Ee[Pe]-ie[Pe]*Ae[Pe];ie[Pe]=ge[Pe]*Ae[Pe]+ie[Pe]*Ee[Pe],ge[Pe]=me}return this.conjugate(ge,ie,oe),this.transform(ge,ie,Be,Ce,oe,_e),this.conjugate(Be,Ce,oe),this.normalize13b(Be,oe),re.negative=N.negative^H.negative,re.length=N.length+H.length,re.strip()},f.prototype.mul=function(N){var H=new f(null);return H.words=new Array(this.length+N.length),this.mulTo(N,H)},f.prototype.mulf=function(N){var H=new f(null);return H.words=new Array(this.length+N.length),C(this,N,H)},f.prototype.imul=function(N){return this.clone().mulTo(N,this)},f.prototype.imuln=function(N){u(typeof N==\"number\"),u(N<67108864);for(var H=0,re=0;re<this.length;re++){var oe=(this.words[re]|0)*N,_e=(oe&67108863)+(H&67108863);H>>=26,H+=oe/67108864|0,H+=_e>>>26,this.words[re]=_e&67108863}return H!==0&&(this.words[re]=H,this.length++),this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=E(N);if(H.length===0)return new f(1);for(var re=this,oe=0;oe<H.length&&H[oe]===0;oe++,re=re.sqr());if(++oe<H.length)for(var _e=re.sqr();oe<H.length;oe++,_e=_e.sqr())H[oe]!==0&&(re=re.mul(_e));return re},f.prototype.iushln=function(N){u(typeof N==\"number\"&&N>=0);var H=N%26,re=(N-H)/26,oe=67108863>>>26-H<<26-H,_e;if(H!==0){var Ce=0;for(_e=0;_e<this.length;_e++){var Le=this.words[_e]&oe,ge=(this.words[_e]|0)-Le<<H;this.words[_e]=ge|Ce,Ce=Le>>>26-H}Ce&&(this.words[_e]=Ce,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e<re;_e++)this.words[_e]=0;this.length+=re}return this.strip()},f.prototype.ishln=function(N){return u(this.negative===0),this.iushln(N)},f.prototype.iushrn=function(N,H,re){u(typeof N==\"number\"&&N>=0);var oe;H?oe=(H-H%26)/26:oe=0;var _e=N%26,Ce=Math.min((N-_e)/26,this.length),Le=67108863^67108863>>>_e<<_e,ge=re;if(oe-=Ce,oe=Math.max(0,oe),ge){for(var ie=0;ie<Ce;ie++)ge.words[ie]=this.words[ie];ge.length=Ce}if(Ce!==0)if(this.length>Ce)for(this.length-=Ce,ie=0;ie<this.length;ie++)this.words[ie]=this.words[ie+Ce];else this.words[0]=0,this.length=1;var Se=0;for(ie=this.length-1;ie>=0&&(Se!==0||ie>=oe);ie--){var Ee=this.words[ie]|0;this.words[ie]=Se<<26-_e|Ee>>>_e,Se=Ee&Le}return ge&&Se!==0&&(ge.words[ge.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,re){return u(this.negative===0),this.iushrn(N,H,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N==\"number\"&&N>=0);var H=N%26,re=(N-H)/26,oe=1<<H;if(this.length<=re)return!1;var _e=this.words[re];return!!(_e&oe)},f.prototype.imaskn=function(N){u(typeof N==\"number\"&&N>=0);var H=N%26,re=(N-H)/26;if(u(this.negative===0,\"imaskn works only with positive numbers\"),this.length<=re)return this;if(H!==0&&re++,this.length=Math.min(re,this.length),H!==0){var oe=67108863^67108863>>>H<<H;this.words[this.length-1]&=oe}return this.strip()},f.prototype.maskn=function(N){return this.clone().imaskn(N)},f.prototype.iaddn=function(N){return u(typeof N==\"number\"),u(N<67108864),N<0?this.isubn(-N):this.negative!==0?this.length===1&&(this.words[0]|0)<N?(this.words[0]=N-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(N),this.negative=1,this):this._iaddn(N)},f.prototype._iaddn=function(N){this.words[0]+=N;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},f.prototype.isubn=function(N){if(u(typeof N==\"number\"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this.strip()},f.prototype.addn=function(N){return this.clone().iaddn(N)},f.prototype.subn=function(N){return this.clone().isubn(N)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(N,H,re){var oe=N.length+re,_e;this._expand(oe);var Ce,Le=0;for(_e=0;_e<N.length;_e++){Ce=(this.words[_e+re]|0)+Le;var ge=(N.words[_e]|0)*H;Ce-=ge&67108863,Le=(Ce>>26)-(ge/67108864|0),this.words[_e+re]=Ce&67108863}for(;_e<this.length-re;_e++)Ce=(this.words[_e+re]|0)+Le,Le=Ce>>26,this.words[_e+re]=Ce&67108863;if(Le===0)return this.strip();for(u(Le===-1),Le=0,_e=0;_e<this.length;_e++)Ce=-(this.words[_e]|0)+Le,Le=Ce>>26,this.words[_e]=Ce&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var re=this.length-N.length,oe=this.clone(),_e=N,Ce=_e.words[_e.length-1]|0,Le=this._countBits(Ce);re=26-Le,re!==0&&(_e=_e.ushln(re),oe.iushln(re),Ce=_e.words[_e.length-1]|0);var ge=oe.length-_e.length,ie;if(H!==\"mod\"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Se=0;Se<ie.length;Se++)ie.words[Se]=0}var Ee=oe.clone()._ishlnsubmul(_e,1,ge);Ee.negative===0&&(oe=Ee,ie&&(ie.words[ge]=1));for(var Ae=ge-1;Ae>=0;Ae--){var Be=(oe.words[_e.length+Ae]|0)*67108864+(oe.words[_e.length+Ae-1]|0);for(Be=Math.min(Be/Ce|0,67108863),oe._ishlnsubmul(_e,Be,Ae);oe.negative!==0;)Be--,oe.negative=0,oe._ishlnsubmul(_e,1,Ae),oe.isZero()||(oe.negative^=1);ie&&(ie.words[Ae]=Be)}return ie&&ie.strip(),oe.strip(),H!==\"div\"&&re!==0&&oe.iushrn(re),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,H,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,Ce;return this.negative!==0&&N.negative===0?(Ce=this.neg().divmod(N,H),H!==\"mod\"&&(oe=Ce.div.neg()),H!==\"div\"&&(_e=Ce.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(Ce=this.divmod(N.neg(),H),H!==\"mod\"&&(oe=Ce.div.neg()),{div:oe,mod:Ce.mod}):(this.negative&N.negative)!==0?(Ce=this.neg().divmod(N.neg(),H),H!==\"div\"&&(_e=Ce.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:Ce.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H===\"div\"?{div:this.divn(N.words[0]),mod:null}:H===\"mod\"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,\"div\",!1).div},f.prototype.mod=function(N){return this.divmod(N,\"mod\",!1).mod},f.prototype.umod=function(N){return this.divmod(N,\"mod\",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var re=H.div.negative!==0?H.mod.isub(N):H.mod,oe=N.ushrn(1),_e=N.andln(1),Ce=re.cmp(oe);return Ce<0||_e===1&&Ce===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,re=0,oe=this.length-1;oe>=0;oe--)re=(H*re+(this.words[oe]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,re=this.length-1;re>=0;re--){var oe=(this.words[re]|0)+H*67108864;this.words[re]=oe/N|0,H=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ce=new f(0),Le=new f(1),ge=0;H.isEven()&&re.isEven();)H.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Se=H.clone();!H.isZero();){for(var Ee=0,Ae=1;(H.words[0]&Ae)===0&&Ee<26;++Ee,Ae<<=1);if(Ee>0)for(H.iushrn(Ee);Ee-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var Be=0,Pe=1;(re.words[0]&Pe)===0&&Be<26;++Be,Pe<<=1);if(Be>0)for(re.iushrn(Be);Be-- >0;)(Ce.isOdd()||Le.isOdd())&&(Ce.iadd(ie),Le.isub(Se)),Ce.iushrn(1),Le.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(Ce),_e.isub(Le)):(re.isub(H),Ce.isub(oe),Le.isub(_e))}return{a:Ce,b:Le,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ce=re.clone();H.cmpn(1)>0&&re.cmpn(1)>0;){for(var Le=0,ge=1;(H.words[0]&ge)===0&&Le<26;++Le,ge<<=1);if(Le>0)for(H.iushrn(Le);Le-- >0;)oe.isOdd()&&oe.iadd(Ce),oe.iushrn(1);for(var ie=0,Se=1;(re.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Ce),_e.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(_e)):(re.isub(H),_e.isub(oe))}var Ee;return H.cmpn(1)===0?Ee=oe:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),re=N.clone();H.negative=0,re.negative=0;for(var oe=0;H.isEven()&&re.isEven();oe++)H.iushrn(1),re.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=H.cmp(re);if(_e<0){var Ce=H;H=re,re=Ce}else if(_e===0||re.cmpn(1)===0)break;H.isub(re)}while(!0);return re.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N==\"number\");var H=N%26,re=(N-H)/26,oe=1<<H;if(this.length<=re)return this._expand(re+1),this.words[re]|=oe,this;for(var _e=oe,Ce=re;_e!==0&&Ce<this.length;Ce++){var Le=this.words[Ce]|0;Le+=_e,_e=Le>>>26,Le&=67108863,this.words[Ce]=Le}return _e!==0&&(this.words[Ce]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var re;if(this.length>1)re=1;else{H&&(N=-N),u(N<=67108863,\"Number is too big\");var oe=this.words[0]|0;re=oe===N?0:oe<N?-1:1}return this.negative!==0?-re|0:re},f.prototype.cmp=function(N){if(this.negative!==0&&N.negative===0)return-1;if(this.negative===0&&N.negative!==0)return 1;var H=this.ucmp(N);return this.negative!==0?-H|0:H},f.prototype.ucmp=function(N){if(this.length>N.length)return 1;if(this.length<N.length)return-1;for(var H=0,re=this.length-1;re>=0;re--){var oe=this.words[re]|0,_e=N.words[re]|0;if(oe!==_e){oe<_e?H=-1:oe>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,\"Already a number in reduction context\"),u(this.negative===0,\"red works only with positives\"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,\"Already a number in reduction context\"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,\"redAdd works only with red numbers\"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,\"redSub works only with red numbers\"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,\"redISub works only with red numbers\"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,\"redShl works only with red numbers\"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,re;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),re=H.bitLength();while(re>this.n);var oe=re<this.n?-1:H.ucmp(this.p);return oe===0?(H.words[0]=0,H.length=1):oe>0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function A(){P.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}c(A,P),A.prototype.split=function(N,H){for(var re=4194303,oe=Math.min(N.length,9),_e=0;_e<oe;_e++)H.words[_e]=N.words[_e];if(H.length=oe,N.length<=9){N.words[0]=0,N.length=1;return}var Ce=N.words[9];for(H.words[H.length++]=Ce&re,_e=10;_e<N.length;_e++){var Le=N.words[_e]|0;N.words[_e-10]=(Le&re)<<4|Ce>>>22,Ce=Le}Ce>>>=22,N.words[_e-10]=Ce,Ce===0&&N.length>10?N.length-=10:N.length-=9},A.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,re=0;re<N.length;re++){var oe=N.words[re]|0;H+=oe*977,N.words[re]=H&67108863,H=oe*64+(H/67108864|0)}return N.words[N.length-1]===0&&(N.length--,N.words[N.length-1]===0&&N.length--),N};function z(){P.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}c(z,P);function O(){P.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}c(O,P);function U(){P.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}c(U,P),U.prototype.imulK=function(N){for(var H=0,re=0;re<N.length;re++){var oe=(N.words[re]|0)*19+H,_e=oe&67108863;oe>>>=26,N.words[re]=_e,H=oe}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N===\"k256\")H=new A;else if(N===\"p224\")H=new z;else if(N===\"p192\")H=new O;else if(N===\"p25519\")H=new U;else throw new Error(\"Unknown prime \"+N);return g[N]=H,H};function G(j){if(typeof j==\"string\"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),\"modulus must be greater than 1\"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,\"red works only with positives\"),u(N.red,\"red works only with red numbers\")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,\"red works only with positives\"),u(N.red&&N.red===H.red,\"red works only with red numbers\")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var re=N.add(H);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var re=N.iadd(H);return re.cmp(this.m)>=0&&re.isub(this.m),re},G.prototype.sub=function(N,H){this._verify2(N,H);var re=N.sub(H);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var re=N.isub(H);return re.cmpn(0)<0&&re.iadd(this.m),re},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var Ce=new f(1).toRed(this),Le=Ce.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(Le)!==0;)ie.redIAdd(Le);for(var Se=this.pow(ie,oe),Ee=this.pow(N,oe.addn(1).iushrn(1)),Ae=this.pow(N,oe),Be=_e;Ae.cmp(Ce)!==0;){for(var Pe=Ae,me=0;Pe.cmp(Ce)!==0;me++)Pe=Pe.redSqr();u(me<Be);var De=this.pow(Se,new f(1).iushln(Be-me-1));Ee=Ee.redMul(De),Se=De.redSqr(),Ae=Ae.redMul(Se),Be=me}return Ee},G.prototype.invm=function(N){var H=N._invmp(this.m);return H.negative!==0?(H.negative=0,this.imod(H).redNeg()):this.imod(H)},G.prototype.pow=function(N,H){if(H.isZero())return new f(1).toRed(this);if(H.cmpn(1)===0)return N.clone();var re=4,oe=new Array(1<<re);oe[0]=new f(1).toRed(this),oe[1]=N;for(var _e=2;_e<oe.length;_e++)oe[_e]=this.mul(oe[_e-1],N);var Ce=oe[0],Le=0,ge=0,ie=H.bitLength()%26;for(ie===0&&(ie=26),_e=H.length-1;_e>=0;_e--){for(var Se=H.words[_e],Ee=ie-1;Ee>=0;Ee--){var Ae=Se>>Ee&1;if(Ce!==oe[0]&&(Ce=this.sqr(Ce)),Ae===0&&Le===0){ge=0;continue}Le<<=1,Le|=Ae,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(Ce=this.mul(Ce,oe[Le]),ge=0,Le=0)}ie=26}return Ce},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Ce=_e;return _e.cmp(this.m)>=0?Ce=_e.isub(this.m):_e.cmpn(0)<0&&(Ce=_e.iadd(this.m)),Ce._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var re=N.mul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Ce=_e;return _e.cmp(this.m)>=0?Ce=_e.isub(this.m):_e.cmpn(0)<0&&(Ce=_e.iadd(this.m)),Ce._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},6864:function(i){i.exports=a;function a(){var o=new Float32Array(16);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6867:function(i,a,o){\"use strict\";i.exports=p;var s=o(1888),l=o(855),u=o(7150);function c(k,E){for(var T=0;T<k;++T)if(!(E[T]<=E[T+k]))return!0;return!1}function f(k,E,T,L){for(var x=0,C=0,M=0,g=k.length;M<g;++M){var P=k[M];if(!c(E,P)){for(var A=0;A<2*E;++A)T[x++]=P[A];L[C++]=M}}return C}function h(k,E,T,L){var x=k.length,C=E.length;if(!(x<=0||C<=0)){var M=k[0].length>>>1;if(!(M<=0)){var g,P=s.mallocDouble(2*M*x),A=s.mallocInt32(x);if(x=f(k,M,P,A),x>0){if(M===1&&L)l.init(x),g=l.sweepComplete(M,T,0,x,P,A,0,x,P,A);else{var z=s.mallocDouble(2*M*C),O=s.mallocInt32(C);C=f(E,M,z,O),C>0&&(l.init(x+C),M===1?g=l.sweepBipartite(M,T,0,x,P,A,0,C,z,O):g=u(M,T,L,x,P,A,C,z,O),s.free(z),s.free(O))}s.free(P),s.free(A)}return g}}}var d;function v(k,E){d.push([k,E])}function _(k){return d=[],h(k,k,v,!0),d}function b(k,E){return d=[],h(k,E,v,!1),d}function p(k,E,T){switch(arguments.length){case 1:return _(k);case 2:return typeof E==\"function\"?h(k,k,E,!0):b(k,E);case 3:return h(k,E,T,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=s[0],o[1]=c+h*_-d*v,o[2]=f+h*v+d*_,o}},7004:function(i){\"use strict\";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var _=0,c=u;c<s;++c){var f=o[c],h=l;l=f+h;var d=l-f,v=h-d;v&&(o[_++]=v)}return o[_++]=l,o.length=_,o}},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},7089:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],_=s[4],b=s[5],p=s[6],k=s[7];return s!==o&&(o[8]=s[8],o[9]=s[9],o[10]=s[10],o[11]=s[11],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c+_*u,o[1]=h*c+b*u,o[2]=d*c+p*u,o[3]=v*c+k*u,o[4]=_*c-f*u,o[5]=b*c-h*u,o[6]=p*c-d*u,o[7]=k*c-v*u,o}},7150:function(i,a,o){\"use strict\";i.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),_=128,b=1<<22,p=1<<22,k=v(\"!(lo>=p0)&&!(p1>=hi)\"),E=v(\"lo===p0\"),T=v(\"lo<p0\"),L=v(\"hi<=p0\"),x=v(\"lo<=p0&&p0<=hi\"),C=v(\"lo<p0&&p0<=hi\"),M=6,g=2,P=1024,A=s.mallocInt32(P),z=s.mallocDouble(P);function O(N,H){var re=8*l.log2(H+1)*(N+1)|0,oe=l.nextPow2(M*re);A.length<oe&&(s.free(A),A=s.mallocInt32(oe));var _e=l.nextPow2(g*re);z.length<_e&&(s.free(z),z=s.mallocDouble(_e))}function U(N,H,re,oe,_e,Ce,Le,ge,ie){var Se=M*N;A[Se]=H,A[Se+1]=re,A[Se+2]=oe,A[Se+3]=_e,A[Se+4]=Ce,A[Se+5]=Le;var Ee=g*N;z[Ee]=ge,z[Ee+1]=ie}function G(N,H,re,oe,_e,Ce,Le,ge,ie,Se,Ee){var Ae=2*N,Be=ie*Ae,Pe=Se[Be+H];e:for(var me=_e,De=_e*Ae;me<Ce;++me,De+=Ae){var ce=Le[De+H],je=Le[De+H+N];if(!(Pe<ce||je<Pe)&&!(oe&&Pe===ce)){for(var lt=ge[me],pt=H+1;pt<N;++pt){var ce=Le[De+pt],je=Le[De+pt+N],Vt=Se[Be+pt],ot=Se[Be+pt+N];if(je<Vt||ot<ce)continue e}var ut;if(oe?ut=re(Ee,lt):ut=re(lt,Ee),ut!==void 0)return ut}}}function Z(N,H,re,oe,_e,Ce,Le,ge,ie,Se){var Ee=2*N,Ae=ge*Ee,Be=ie[Ae+H];e:for(var Pe=oe,me=oe*Ee;Pe<_e;++Pe,me+=Ee){var De=Le[Pe];if(De!==Se){var ce=Ce[me+H],je=Ce[me+H+N];if(!(Be<ce||je<Be)){for(var lt=H+1;lt<N;++lt){var ce=Ce[me+lt],je=Ce[me+lt+N],pt=ie[Ae+lt],Vt=ie[Ae+lt+N];if(je<pt||Vt<ce)continue e}var ot=re(De,Se);if(ot!==void 0)return ot}}}}function j(N,H,re,oe,_e,Ce,Le,ge,ie){O(N,oe+Le);var Se=0,Ee=2*N,Ae;for(U(Se++,0,0,oe,0,Le,re?16:0,-1/0,1/0),re||U(Se++,0,0,Le,0,oe,1,-1/0,1/0);Se>0;){Se-=1;var Be=Se*M,Pe=A[Be],me=A[Be+1],De=A[Be+2],ce=A[Be+3],je=A[Be+4],lt=A[Be+5],pt=Se*g,Vt=z[pt],ot=z[pt+1],ut=lt&1,Wt=!!(lt&16),Nt=_e,$t=Ce,sr=ge,Tr=ie;if(ut&&(Nt=ge,$t=ie,sr=_e,Tr=Ce),!(lt&2&&(De=T(N,Pe,me,De,Nt,$t,ot),me>=De))&&!(lt&4&&(me=L(N,Pe,me,De,Nt,$t,Vt),me>=De))){var fr=De-me,$e=je-ce;if(Wt){if(N*fr*(fr+$e)<p){if(Ae=h.scanComplete(N,Pe,H,me,De,Nt,$t,ce,je,sr,Tr),Ae!==void 0)return Ae;continue}}else if(N*Math.min(fr,$e)<_){if(Ae=c(N,Pe,H,ut,me,De,Nt,$t,ce,je,sr,Tr),Ae!==void 0)return Ae;continue}else if(N*fr*$e<b){if(Ae=h.scanBipartite(N,Pe,H,ut,me,De,Nt,$t,ce,je,sr,Tr),Ae!==void 0)return Ae;continue}var St=k(N,Pe,me,De,Nt,$t,Vt,ot);if(me<St)if(N*(St-me)<_){if(Ae=f(N,Pe+1,H,me,St,Nt,$t,ce,je,sr,Tr),Ae!==void 0)return Ae}else if(Pe===N-2){if(ut?Ae=h.sweepBipartite(N,H,ce,je,sr,Tr,me,St,Nt,$t):Ae=h.sweepBipartite(N,H,me,St,Nt,$t,ce,je,sr,Tr),Ae!==void 0)return Ae}else U(Se++,Pe+1,me,St,ce,je,ut,-1/0,1/0),U(Se++,Pe+1,ce,je,me,St,ut^1,-1/0,1/0);if(St<De){var Qt=d(N,Pe,ce,je,sr,Tr),Gt=sr[Ee*Qt+Pe],_t=E(N,Pe,Qt,je,sr,Tr,Gt);if(_t<je&&U(Se++,Pe,St,De,_t,je,(ut|4)+(Wt?16:0),Gt,ot),ce<Qt&&U(Se++,Pe,St,De,ce,Qt,(ut|2)+(Wt?16:0),Vt,Gt),Qt+1===_t){if(Wt?Ae=Z(N,Pe,H,St,De,Nt,$t,Qt,sr,Tr[Qt]):Ae=G(N,Pe,H,ut,St,De,Nt,$t,Qt,sr,Tr[Qt]),Ae!==void 0)return Ae}else if(Qt<_t){var It;if(Wt){if(It=x(N,Pe,St,De,Nt,$t,Gt),St<It){var mt=E(N,Pe,St,It,Nt,$t,Gt);if(Pe===N-2){if(St<mt&&(Ae=h.sweepComplete(N,H,St,mt,Nt,$t,Qt,_t,sr,Tr),Ae!==void 0)||mt<It&&(Ae=h.sweepBipartite(N,H,mt,It,Nt,$t,Qt,_t,sr,Tr),Ae!==void 0))return Ae}else St<mt&&U(Se++,Pe+1,St,mt,Qt,_t,16,-1/0,1/0),mt<It&&(U(Se++,Pe+1,mt,It,Qt,_t,0,-1/0,1/0),U(Se++,Pe+1,Qt,_t,mt,It,1,-1/0,1/0))}}else ut?It=C(N,Pe,St,De,Nt,$t,Gt):It=x(N,Pe,St,De,Nt,$t,Gt),St<It&&(Pe===N-2?ut?Ae=h.sweepBipartite(N,H,Qt,_t,sr,Tr,St,It,Nt,$t):Ae=h.sweepBipartite(N,H,St,It,Nt,$t,Qt,_t,sr,Tr):(U(Se++,Pe+1,St,It,Qt,_t,ut,-1/0,1/0),U(Se++,Pe+1,Qt,_t,St,It,ut^1,-1/0,1/0)))}}}}}},7163:function(i){i.exports=function(s){return s!=null&&(a(s)||o(s)||!!s._isBuffer)};function a(s){return!!s.constructor&&typeof s.constructor.isBuffer==\"function\"&&s.constructor.isBuffer(s)}function o(s){return typeof s.readFloatLE==\"function\"&&typeof s.slice==\"function\"&&a(s.slice(0,0))}},7169:function(i,a,o){\"use strict\";var s=typeof WeakMap==\"undefined\"?o(1538):WeakMap,l=o(2762),u=o(8116),c=new s;function f(h){var d=c.get(h),v=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!v||!h.isBuffer(v)){var _=l(h,new Float32Array([-1,-1,-1,4,4,-1]));d=u(h,[{buffer:_,type:h.FLOAT,size:2}]),d._triangleBuffer=_,c.set(h,d)}d.bind(),h.drawArrays(h.TRIANGLES,0,3),d.unbind()}i.exports=f},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,_,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=_[0],f[7]=_[1],f[11]=_[2],f[15]=_[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},7201:function(i,a,o){\"use strict\";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),_=o(7608),b=o(9618),p=o(6729),k=o(7765),E=o(1888),T=o(840),L=o(7626),x=T.meshShader,C=T.wireShader,M=T.pointShader,g=T.pickShader,P=T.pointPickShader,A=T.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(ge,ie,Se,Ee,Ae,Be,Pe,me,De,ce,je,lt,pt,Vt,ot,ut,Wt,Nt,$t,sr,Tr,fr,$e,St,Qt,Gt,_t){this.gl=ge,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ie,this.dirty=!0,this.triShader=Se,this.lineShader=Ee,this.pointShader=Ae,this.pickShader=Be,this.pointPickShader=Pe,this.contourShader=me,this.trianglePositions=De,this.triangleColors=je,this.triangleNormals=pt,this.triangleUVs=lt,this.triangleIds=ce,this.triangleVAO=Vt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ot,this.edgeColors=Wt,this.edgeUVs=Nt,this.edgeIds=ut,this.edgeVAO=$t,this.edgeCount=0,this.pointPositions=sr,this.pointColors=fr,this.pointUVs=$e,this.pointSizes=St,this.pointIds=Tr,this.pointVAO=Qt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Gt,this.contourVAO=_t,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var U=O.prototype;U.isOpaque=function(){return!this.hasAlpha},U.isTransparent=function(){return this.hasAlpha},U.pickSlots=1,U.setPickBase=function(ge){this.pickId=ge};function G(ge,ie){if(!ie||!ie.length)return 1;for(var Se=0;Se<ie.length;++Se){if(ie.length<2)return 1;if(ie[Se][0]===ge)return ie[Se][1];if(ie[Se][0]>ge&&Se>0){var Ee=(ie[Se][0]-ge)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Ee)+Ee*ie[Se-1][1]}}return 1}function Z(ge,ie){for(var Se=p({colormap:ge,nshades:256,format:\"rgba\"}),Ee=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var Be=Se[Ae],Pe=0;Pe<3;++Pe)Ee[4*Ae+Pe]=Be[Pe];ie?Ee[4*Ae+3]=255*G(Ae/255,ie):Ee[4*Ae+3]=255*Be[3]}return b(Ee,[256,256,4],[4,0,1])}function j(ge){for(var ie=ge.length,Se=new Array(ie),Ee=0;Ee<ie;++Ee)Se[Ee]=ge[Ee][2];return Se}U.highlight=function(ge){if(!ge||!this.contourEnable){this.contourCount=0;return}for(var ie=k(this.cells,this.intensity,ge.intensity),Se=ie.cells,Ee=ie.vertexIds,Ae=ie.vertexWeights,Be=Se.length,Pe=E.mallocFloat32(2*3*Be),me=0,De=0;De<Be;++De)for(var ce=Se[De],je=0;je<2;++je){var lt=ce[0];ce.length===2&&(lt=ce[je]);for(var pt=Ee[lt][0],Vt=Ee[lt][1],ot=Ae[lt],ut=1-ot,Wt=this.positions[pt],Nt=this.positions[Vt],$t=0;$t<3;++$t)Pe[me++]=ot*Wt[$t]+ut*Nt[$t]}this.contourCount=me/3|0,this.contourPositions.update(Pe.subarray(0,me)),E.free(Pe)},U.update=function(ge){ge=ge||{};var ie=this.gl;this.dirty=!0,\"contourEnable\"in ge&&(this.contourEnable=ge.contourEnable),\"contourColor\"in ge&&(this.contourColor=ge.contourColor),\"lineWidth\"in ge&&(this.lineWidth=ge.lineWidth),\"lightPosition\"in ge&&(this.lightPosition=ge.lightPosition),this.hasAlpha=!1,\"opacity\"in ge&&(this.opacity=ge.opacity,this.opacity<1&&(this.hasAlpha=!0)),\"opacityscale\"in ge&&(this.opacityscale=ge.opacityscale,this.hasAlpha=!0),\"ambient\"in ge&&(this.ambientLight=ge.ambient),\"diffuse\"in ge&&(this.diffuseLight=ge.diffuse),\"specular\"in ge&&(this.specularLight=ge.specular),\"roughness\"in ge&&(this.roughness=ge.roughness),\"fresnel\"in ge&&(this.fresnel=ge.fresnel),ge.texture?(this.texture.dispose(),this.texture=h(ie,ge.texture)):ge.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=ie.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=ie.LINEAR,this.texture.setPixels(Z(ge.colormap,this.opacityscale)),this.texture.generateMipmap());var Se=ge.cells,Ee=ge.positions;if(!(!Ee||!Se)){var Ae=[],Be=[],Pe=[],me=[],De=[],ce=[],je=[],lt=[],pt=[],Vt=[],ot=[],ut=[],Wt=[],Nt=[];this.cells=Se,this.positions=Ee;var $t=ge.vertexNormals,sr=ge.cellNormals,Tr=ge.vertexNormalsEpsilon===void 0?s:ge.vertexNormalsEpsilon,fr=ge.faceNormalsEpsilon===void 0?l:ge.faceNormalsEpsilon;ge.useFacetNormals&&!sr&&(sr=d.faceNormals(Se,Ee,fr)),!sr&&!$t&&($t=d.vertexNormals(Se,Ee,Tr));var $e=ge.vertexColors,St=ge.cellColors,Qt=ge.meshColor||[1,1,1,1],Gt=ge.vertexUVs,_t=ge.vertexIntensity,It=ge.cellUVs,mt=ge.cellIntensity,er=1/0,lr=-1/0;if(!Gt&&!It)if(_t)if(ge.vertexIntensityBounds)er=+ge.vertexIntensityBounds[0],lr=+ge.vertexIntensityBounds[1];else for(var wr=0;wr<_t.length;++wr){var Lr=_t[wr];er=Math.min(er,Lr),lr=Math.max(lr,Lr)}else if(mt)if(ge.cellIntensityBounds)er=+ge.cellIntensityBounds[0],lr=+ge.cellIntensityBounds[1];else for(var wr=0;wr<mt.length;++wr){var Lr=mt[wr];er=Math.min(er,Lr),lr=Math.max(lr,Lr)}else for(var wr=0;wr<Ee.length;++wr){var Lr=Ee[wr][2];er=Math.min(er,Lr),lr=Math.max(lr,Lr)}_t?this.intensity=_t:mt?this.intensity=mt:this.intensity=j(Ee),this.pickVertex=!(mt||St);var ti=ge.pointSizes,Br=ge.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var wr=0;wr<Ee.length;++wr)for(var Vr=Ee[wr],dt=0;dt<3;++dt)isNaN(Vr[dt])||!isFinite(Vr[dt])||(this.bounds[0][dt]=Math.min(this.bounds[0][dt],Vr[dt]),this.bounds[1][dt]=Math.max(this.bounds[1][dt],Vr[dt]));var Ge=0,Je=0,We=0;e:for(var wr=0;wr<Se.length;++wr){var tt=Se[wr];switch(tt.length){case 1:for(var xt=tt[0],Vr=Ee[xt],dt=0;dt<3;++dt)if(isNaN(Vr[dt])||!isFinite(Vr[dt]))continue e;Vt.push(Vr[0],Vr[1],Vr[2]);var Ie;$e?Ie=$e[xt]:St?Ie=St[wr]:Ie=Qt,this.opacityscale&&_t?Be.push(Ie[0],Ie[1],Ie[2],this.opacity*G((_t[xt]-er)/(lr-er),this.opacityscale)):Ie.length===3?ot.push(Ie[0],Ie[1],Ie[2],this.opacity):(ot.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var xe;Gt?xe=Gt[xt]:_t?xe=[(_t[xt]-er)/(lr-er),0]:It?xe=It[wr]:mt?xe=[(mt[wr]-er)/(lr-er),0]:xe=[(Vr[2]-er)/(lr-er),0],ut.push(xe[0],xe[1]),ti?Wt.push(ti[xt]):Wt.push(Br),Nt.push(wr),We+=1;break;case 2:for(var dt=0;dt<2;++dt)for(var xt=tt[dt],Vr=Ee[xt],ke=0;ke<3;++ke)if(isNaN(Vr[ke])||!isFinite(Vr[ke]))continue e;for(var dt=0;dt<2;++dt){var xt=tt[dt],Vr=Ee[xt];ce.push(Vr[0],Vr[1],Vr[2]);var Ie;$e?Ie=$e[xt]:St?Ie=St[wr]:Ie=Qt,this.opacityscale&&_t?Be.push(Ie[0],Ie[1],Ie[2],this.opacity*G((_t[xt]-er)/(lr-er),this.opacityscale)):Ie.length===3?je.push(Ie[0],Ie[1],Ie[2],this.opacity):(je.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var xe;Gt?xe=Gt[xt]:_t?xe=[(_t[xt]-er)/(lr-er),0]:It?xe=It[wr]:mt?xe=[(mt[wr]-er)/(lr-er),0]:xe=[(Vr[2]-er)/(lr-er),0],lt.push(xe[0],xe[1]),pt.push(wr)}Je+=1;break;case 3:for(var dt=0;dt<3;++dt)for(var xt=tt[dt],Vr=Ee[xt],ke=0;ke<3;++ke)if(isNaN(Vr[ke])||!isFinite(Vr[ke]))continue e;for(var dt=0;dt<3;++dt){var xt=tt[2-dt],Vr=Ee[xt];Ae.push(Vr[0],Vr[1],Vr[2]);var Ie;$e?Ie=$e[xt]:St?Ie=St[wr]:Ie=Qt,Ie?this.opacityscale&&_t?Be.push(Ie[0],Ie[1],Ie[2],this.opacity*G((_t[xt]-er)/(lr-er),this.opacityscale)):Ie.length===3?Be.push(Ie[0],Ie[1],Ie[2],this.opacity):(Be.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0)):Be.push(.5,.5,.5,1);var xe;Gt?xe=Gt[xt]:_t?xe=[(_t[xt]-er)/(lr-er),0]:It?xe=It[wr]:mt?xe=[(mt[wr]-er)/(lr-er),0]:xe=[(Vr[2]-er)/(lr-er),0],me.push(xe[0],xe[1]);var vt;$t?vt=$t[xt]:vt=sr[wr],Pe.push(vt[0],vt[1],vt[2]),De.push(wr)}Ge+=1;break;default:break}}this.pointCount=We,this.edgeCount=Je,this.triangleCount=Ge,this.pointPositions.update(Vt),this.pointColors.update(ot),this.pointUVs.update(ut),this.pointSizes.update(Wt),this.pointIds.update(new Uint32Array(Nt)),this.edgePositions.update(ce),this.edgeColors.update(je),this.edgeUVs.update(lt),this.edgeIds.update(new Uint32Array(pt)),this.trianglePositions.update(Ae),this.triangleColors.update(Be),this.triangleUVs.update(me),this.triangleNormals.update(Pe),this.triangleIds.update(new Uint32Array(De))}},U.drawTransparent=U.draw=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,Ae=ge.projection||z,Be=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)Be[0][Pe]=Math.max(Be[0][Pe],this.clipBounds[0][Pe]),Be[1][Pe]=Math.min(Be[1][Pe],this.clipBounds[1][Pe]);var me={model:Se,view:Ee,projection:Ae,inverseModel:z.slice(),clipBounds:Be,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};me.inverseModel=_(me.inverseModel,me.model),ie.disable(ie.CULL_FACE),this.texture.bind(0);var De=new Array(16);v(De,me.view,me.model),v(De,me.projection,De),_(De,De);for(var Pe=0;Pe<3;++Pe)me.eyePosition[Pe]=De[12+Pe]/De[15];for(var ce=De[15],Pe=0;Pe<3;++Pe)ce+=this.lightPosition[Pe]*De[4*Pe+3];for(var Pe=0;Pe<3;++Pe){for(var je=De[12+Pe],lt=0;lt<3;++lt)je+=De[4*lt+Pe]*this.lightPosition[lt];me.lightPosition[Pe]=je/ce}if(this.triangleCount>0){var pt=this.triShader;pt.bind(),pt.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var pt=this.lineShader;pt.bind(),pt.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var pt=this.pointShader;pt.bind(),pt.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var pt=this.contourShader;pt.bind(),pt.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,Ae=ge.projection||z,Be=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)Be[0][Pe]=Math.max(Be[0][Pe],this.clipBounds[0][Pe]),Be[1][Pe]=Math.min(Be[1][Pe],this.clipBounds[1][Pe]);this._model=[].slice.call(Se),this._view=[].slice.call(Ee),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Se,view:Ee,projection:Ae,clipBounds:Be,pickId:this.pickId/255},De=this.pickShader;if(De.bind(),De.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var De=this.pointPickShader;De.bind(),De.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Se=this.cells[ie],Ee=this.positions,Ae=new Array(Se.length),Be=0;Be<Se.length;++Be)Ae[Be]=Ee[Se[Be]];var Pe=ge.coord[0],me=ge.coord[1];if(!this.pickVertex){var De=this.positions[Se[0]],ce=this.positions[Se[1]],je=this.positions[Se[2]],lt=[(De[0]+ce[0]+je[0])/3,(De[1]+ce[1]+je[1])/3,(De[2]+ce[2]+je[2])/3];return{_cellCenter:!0,position:[Pe,me],index:ie,cell:Se,cellId:ie,intensity:this.intensity[ie],dataCoordinate:lt}}var pt=L(Ae,[Pe*this.pixelRatio,this._resolution[1]-me*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!pt)return null;for(var Vt=pt[2],ot=0,Be=0;Be<Se.length;++Be)ot+=Vt[Be]*this.intensity[Se[Be]];return{position:pt[1],index:Se[pt[0]],cell:Se,cellId:ie,intensity:ot,dataCoordinate:this.positions[Se[pt[0]]]}},U.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()};function N(ge){var ie=u(ge,x.vertex,x.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.normal.location=4,ie}function H(ge){var ie=u(ge,C.vertex,C.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie}function re(ge){var ie=u(ge,M.vertex,M.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.pointSize.location=4,ie}function oe(ge){var ie=u(ge,g.vertex,g.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie}function _e(ge){var ie=u(ge,P.vertex,P.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie.attributes.pointSize.location=4,ie}function Ce(ge){var ie=u(ge,A.vertex,A.fragment);return ie.attributes.position.location=0,ie}function Le(ge,ie){arguments.length===1&&(ie=ge,ge=ie.gl);var Se=ge.getExtension(\"OES_standard_derivatives\")||ge.getExtension(\"MOZ_OES_standard_derivatives\")||ge.getExtension(\"WEBKIT_OES_standard_derivatives\");if(!Se)throw new Error(\"derivatives not supported\");var Ee=N(ge),Ae=H(ge),Be=re(ge),Pe=oe(ge),me=_e(ge),De=Ce(ge),ce=h(ge,b(new Uint8Array([255,255,255,255]),[1,1,4]));ce.generateMipmap(),ce.minFilter=ge.LINEAR_MIPMAP_LINEAR,ce.magFilter=ge.LINEAR;var je=c(ge),lt=c(ge),pt=c(ge),Vt=c(ge),ot=c(ge),ut=f(ge,[{buffer:je,type:ge.FLOAT,size:3},{buffer:ot,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:lt,type:ge.FLOAT,size:4},{buffer:pt,type:ge.FLOAT,size:2},{buffer:Vt,type:ge.FLOAT,size:3}]),Wt=c(ge),Nt=c(ge),$t=c(ge),sr=c(ge),Tr=f(ge,[{buffer:Wt,type:ge.FLOAT,size:3},{buffer:sr,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Nt,type:ge.FLOAT,size:4},{buffer:$t,type:ge.FLOAT,size:2}]),fr=c(ge),$e=c(ge),St=c(ge),Qt=c(ge),Gt=c(ge),_t=f(ge,[{buffer:fr,type:ge.FLOAT,size:3},{buffer:Gt,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:$e,type:ge.FLOAT,size:4},{buffer:St,type:ge.FLOAT,size:2},{buffer:Qt,type:ge.FLOAT,size:1}]),It=c(ge),mt=f(ge,[{buffer:It,type:ge.FLOAT,size:3}]),er=new O(ge,ce,Ee,Ae,Be,Pe,me,De,je,ot,lt,pt,Vt,ut,Wt,sr,Nt,$t,Tr,fr,Gt,$e,St,Qt,_t,It,mt);return er.update(ie),er}i.exports=Le},7261:function(i,a,o){\"use strict\";i.exports=E;var s=o(9215),l=o(7608),u=o(6079),c=o(5911),f=o(3536),h=o(244);function d(T,L,x){return Math.sqrt(Math.pow(T,2)+Math.pow(L,2)+Math.pow(x,2))}function v(T){return Math.min(1,Math.max(-1,T))}function _(T){var L=Math.abs(T[0]),x=Math.abs(T[1]),C=Math.abs(T[2]),M=[0,0,0];L>Math.max(x,C)?M[2]=1:x>Math.max(L,C)?M[0]=1:M[1]=1;for(var g=0,P=0,A=0;A<3;++A)g+=T[A]*T[A],P+=M[A]*T[A];for(var A=0;A<3;++A)M[A]-=P/g*T[A];return f(M,M),M}function b(T,L,x,C,M,g,P,A){this.center=s(x),this.up=s(C),this.right=s(M),this.radius=s([g]),this.angle=s([P,A]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,L),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 z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(T,L){T>0?T=Math.log(T):T=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(T){var L=this.radius.bounds[0];return T?(T[0]=Math.exp(L[0][0]),T[1]=Math.exp(L[1][0]),T):[Math.exp(L[0][0]),Math.exp(L[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 L=this.computedUp,x=this.computedRight,C=0,M=0,g=0;g<3;++g)M+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),A=0,g=0;g<3;++g)x[g]-=L[g]*M/C,A+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(A),g=0;g<3;++g)x[g]/=z;var O=this.computedToward;c(O,L,x),f(O,O);for(var U=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),re=Math.sin(Z),oe=this.computedCenter,_e=j*H,Ce=N*H,Le=re,ge=-j*re,ie=-N*re,Se=H,Ee=this.computedEye,Ae=this.computedMatrix,g=0;g<3;++g){var Be=_e*x[g]+Ce*O[g]+Le*L[g];Ae[4*g+1]=ge*x[g]+ie*O[g]+Se*L[g],Ae[4*g+2]=Be,Ae[4*g+3]=0}var Pe=Ae[1],me=Ae[5],De=Ae[9],ce=Ae[2],je=Ae[6],lt=Ae[10],pt=me*lt-De*je,Vt=De*ce-Pe*lt,ot=Pe*je-me*ce,ut=d(pt,Vt,ot);pt/=ut,Vt/=ut,ot/=ut,Ae[0]=pt,Ae[4]=Vt,Ae[8]=ot;for(var g=0;g<3;++g)Ee[g]=oe[g]+Ae[2+4*g]*U;for(var g=0;g<3;++g){for(var A=0,Wt=0;Wt<3;++Wt)A+=Ae[g+4*Wt]*Ee[Wt];Ae[12+g]=-A}Ae[15]=1},p.getMatrix=function(T,L){this.recalcMatrix(T);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(T,L,x,C){if(this.angle.move(T,L,x),C){this.recalcMatrix(T);var M=this.computedMatrix;k[0]=M[2],k[1]=M[6],k[2]=M[10];for(var g=this.computedUp,P=this.computedRight,A=this.computedToward,z=0;z<3;++z)M[4*z]=g[z],M[4*z+1]=P[z],M[4*z+2]=A[z];u(M,M,C,k);for(var z=0;z<3;++z)g[z]=M[4*z],P[z]=M[4*z+1];this.up.set(T,g[0],g[1],g[2]),this.right.set(T,P[0],P[1],P[2])}},p.pan=function(T,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(T);var M=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=M[1],A=M[5],z=M[9],O=d(P,A,z);P/=O,A/=O,z/=O;var U=M[0],G=M[4],Z=M[8],j=U*P+G*A+Z*z;U-=P*j,G-=A*j,Z-=z*j;var N=d(U,G,Z);U/=N,G/=N,Z/=N;var H=U*L+P*x,re=G*L+A*x,oe=Z*L+z*x;this.center.move(T,H,re,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(T,Math.log(_e))},p.translate=function(T,L,x,C){this.center.move(T,L||0,x||0,C||0)},p.setMatrix=function(T,L,x,C){var M=1;typeof x==\"number\"&&(M=x|0),(M<0||M>3)&&(M=1);var g=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(T),L=this.computedMatrix);var A=L[M],z=L[M+4],O=L[M+8];if(C){var G=Math.abs(A),Z=Math.abs(z),j=Math.abs(O),N=Math.max(G,Z,j);G===N?(A=A<0?-1:1,z=O=0):j===N?(O=O<0?-1:1,A=z=0):(z=z<0?-1:1,A=O=0)}else{var U=d(A,z,O);A/=U,z/=U,O/=U}var H=L[g],re=L[g+4],oe=L[g+8],_e=H*A+re*z+oe*O;H-=A*_e,re-=z*_e,oe-=O*_e;var Ce=d(H,re,oe);H/=Ce,re/=Ce,oe/=Ce;var Le=z*oe-O*re,ge=O*H-A*oe,ie=A*re-z*H,Se=d(Le,ge,ie);Le/=Se,ge/=Se,ie/=Se,this.center.jump(T,fr,$e,St),this.radius.idle(T),this.up.jump(T,A,z,O),this.right.jump(T,H,re,oe);var Ee,Ae;if(M===2){var Be=L[1],Pe=L[5],me=L[9],De=Be*H+Pe*re+me*oe,ce=Be*Le+Pe*ge+me*ie;Vt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Ae=Math.atan2(ce,De)}else{var je=L[2],lt=L[6],pt=L[10],Vt=je*A+lt*z+pt*O,ot=je*H+lt*re+pt*oe,ut=je*Le+lt*ge+pt*ie;Ee=Math.asin(v(Vt)),Ae=Math.atan2(ut,ot)}this.angle.jump(T,Ae,Ee),this.recalcMatrix(T);var Wt=L[2],Nt=L[6],$t=L[10],sr=this.computedMatrix;l(sr,L);var Tr=sr[15],fr=sr[12]/Tr,$e=sr[13]/Tr,St=sr[14]/Tr,Qt=Math.exp(this.computedRadius[0]);this.center.jump(T,fr-Wt*Qt,$e-Nt*Qt,St-$t*Qt)},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,L){L>0&&this.radius.set(T,Math.log(L))},p.lookAt=function(T,L,x,C){this.recalcMatrix(T),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var M=C[0],g=C[1],P=C[2],A=d(M,g,P);if(!(A<1e-6)){M/=A,g/=A,P/=A;var z=L[0]-x[0],O=L[1]-x[1],U=L[2]-x[2],G=d(z,O,U);if(!(G<1e-6)){z/=G,O/=G,U/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],re=M*j+g*N+P*H;j-=re*M,N-=re*g,H-=re*P;var oe=d(j,N,H);if(!(oe<.01&&(j=g*U-P*O,N=P*z-M*U,H=M*O-g*z,oe=d(j,N,H),oe<1e-6))){j/=oe,N/=oe,H/=oe,this.up.set(T,M,g,P),this.right.set(T,j,N,H),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(G));var _e=g*H-P*N,Ce=P*j-M*H,Le=M*N-g*j,ge=d(_e,Ce,Le);_e/=ge,Ce/=ge,Le/=ge;var ie=M*z+g*O+P*U,Se=j*z+N*O+H*U,Ee=_e*z+Ce*O+Le*U,Ae=Math.asin(v(ie)),Be=Math.atan2(Ee,Se),Pe=this.angle._state,me=Pe[Pe.length-1],De=Pe[Pe.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-Be),je=Math.abs(me-Be),lt=Math.abs(me-2*Math.PI-Be);ce<je&&(me+=2*Math.PI),lt<je&&(me-=2*Math.PI),this.angle.jump(this.angle.lastT(),me,De),this.angle.set(T,Be,Ae)}}}};function E(T){T=T||{};var L=T.center||[0,0,0],x=T.up||[0,1,0],C=T.right||_(x),M=T.radius||1,g=T.theta||0,P=T.phi||0;if(L=[].slice.call(L,0,3),x=[].slice.call(x,0,3),f(x,x),C=[].slice.call(C,0,3),f(C,C),\"eye\"in T){var A=T.eye,z=[A[0]-L[0],A[1]-L[1],A[2]-L[2]];c(C,z,x),d(C[0],C[1],C[2])<1e-6?C=_(x):f(C,C),M=d(z[0],z[1],z[2]);var O=h(x,z)/M,U=h(C,z)/M;P=Math.acos(O),g=Math.acos(U)}return M=Math.log(M),new b(T.zoomMin,T.zoomMax,L,x,C,M,g,P)}},7319:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute vec3 position, nextPosition;\n",
       "attribute float arcLength, lineWidth;\n",
       "attribute vec4 color;\n",
       "\n",
       "uniform vec2 screenShape;\n",
       "uniform float pixelRatio;\n",
       "uniform mat4 model, view, projection;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec3 worldPosition;\n",
       "varying float pixelArcLength;\n",
       "\n",
       "vec4 project(vec3 p) {\n",
       "  return projection * (view * (model * vec4(p, 1.0)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  vec4 startPoint = project(position);\n",
       "  vec4 endPoint   = project(nextPosition);\n",
       "\n",
       "  vec2 A = startPoint.xy / startPoint.w;\n",
       "  vec2 B =   endPoint.xy /   endPoint.w;\n",
       "\n",
       "  float clipAngle = atan(\n",
       "    (B.y - A.y) * screenShape.y,\n",
       "    (B.x - A.x) * screenShape.x\n",
       "  );\n",
       "\n",
       "  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\n",
       "    sin(clipAngle),\n",
       "    -cos(clipAngle)\n",
       "  ) / screenShape;\n",
       "\n",
       "  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\n",
       "\n",
       "  worldPosition = position;\n",
       "  pixelArcLength = arcLength;\n",
       "  fragColor = color;\n",
       "}\n",
       "`]),c=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform vec3      clipBounds[2];\n",
       "uniform sampler2D dashTexture;\n",
       "uniform float     dashScale;\n",
       "uniform float     opacity;\n",
       "\n",
       "varying vec3    worldPosition;\n",
       "varying float   pixelArcLength;\n",
       "varying vec4    fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (\n",
       "    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n",
       "    fragColor.a * opacity == 0.\n",
       "  ) discard;\n",
       "\n",
       "  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n",
       "  if(dashWeight < 0.5) {\n",
       "    discard;\n",
       "  }\n",
       "  gl_FragColor = fragColor * opacity;\n",
       "}\n",
       "`]),f=s([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "#define FLOAT_MAX  1.70141184e38\n",
       "#define FLOAT_MIN  1.17549435e-38\n",
       "\n",
       "// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\n",
       "vec4 packFloat(float v) {\n",
       "  float av = abs(v);\n",
       "\n",
       "  //Handle special cases\n",
       "  if(av < FLOAT_MIN) {\n",
       "    return vec4(0.0, 0.0, 0.0, 0.0);\n",
       "  } else if(v > FLOAT_MAX) {\n",
       "    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n",
       "  } else if(v < -FLOAT_MAX) {\n",
       "    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n",
       "  }\n",
       "\n",
       "  vec4 c = vec4(0,0,0,0);\n",
       "\n",
       "  //Compute exponent and mantissa\n",
       "  float e = floor(log2(av));\n",
       "  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",
       "  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",
       "\n",
       "bool outOfRange(float a, float b, float p) {\n",
       "  return ((p > max(a, b)) || \n",
       "          (p < min(a, b)));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec2 a, vec2 b, vec2 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec3 a, vec3 b, vec3 p) {\n",
       "  return (outOfRange(a.x, b.x, p.x) ||\n",
       "          outOfRange(a.y, b.y, p.y) ||\n",
       "          outOfRange(a.z, b.z, p.z));\n",
       "}\n",
       "\n",
       "bool outOfRange(vec4 a, vec4 b, vec4 p) {\n",
       "  return outOfRange(a.xyz, b.xyz, p.xyz);\n",
       "}\n",
       "\n",
       "uniform float pickId;\n",
       "uniform vec3 clipBounds[2];\n",
       "\n",
       "varying vec3 worldPosition;\n",
       "varying float pixelArcLength;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n",
       "\n",
       "  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n",
       "}`]),h=[{name:\"position\",type:\"vec3\"},{name:\"nextPosition\",type:\"vec3\"},{name:\"arcLength\",type:\"float\"},{name:\"lineWidth\",type:\"float\"},{name:\"color\",type:\"vec4\"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},7352:function(i,a,o){\"use strict\";var s=o(5721),l=o(4750),u=o(2690);i.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},7399:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,v=c+c,_=l*h,b=u*h,p=u*d,k=c*h,E=c*d,T=c*v,L=f*h,x=f*d,C=f*v;return o[0]=1-p-T,o[1]=b+C,o[2]=k-x,o[3]=0,o[4]=b-C,o[5]=1-_-T,o[6]=E+L,o[7]=0,o[8]=k+x,o[9]=E-L,o[10]=1-_-p,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7417:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=_;function _(E,T,L,x){if(c(T)===0||c(L)===0)return!1;var C=u(T,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(E,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(E){return[E||0,E||0,E||0]}function k(){return[0,0,0,1]}},7507:function(i,a){\"use strict\";a.byteLength=d,a.toByteArray=_,a.fromByteArray=k;for(var o=[],s=[],l=typeof Uint8Array!=\"undefined\"?Uint8Array:Array,u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",c=0,f=u.length;c<f;++c)o[c]=u[c],s[u.charCodeAt(c)]=c;s[45]=62,s[95]=63;function h(E){var T=E.length;if(T%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var L=E.indexOf(\"=\");L===-1&&(L=T);var x=L===T?0:4-L%4;return[L,x]}function d(E){var T=h(E),L=T[0],x=T[1];return(L+x)*3/4-x}function v(E,T,L){return(T+L)*3/4-L}function _(E){var T,L=h(E),x=L[0],C=L[1],M=new l(v(E,x,C)),g=0,P=C>0?x-4:x,A;for(A=0;A<P;A+=4)T=s[E.charCodeAt(A)]<<18|s[E.charCodeAt(A+1)]<<12|s[E.charCodeAt(A+2)]<<6|s[E.charCodeAt(A+3)],M[g++]=T>>16&255,M[g++]=T>>8&255,M[g++]=T&255;return C===2&&(T=s[E.charCodeAt(A)]<<2|s[E.charCodeAt(A+1)]>>4,M[g++]=T&255),C===1&&(T=s[E.charCodeAt(A)]<<10|s[E.charCodeAt(A+1)]<<4|s[E.charCodeAt(A+2)]>>2,M[g++]=T>>8&255,M[g++]=T&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function p(E,T,L){for(var x,C=[],M=T;M<L;M+=3)x=(E[M]<<16&16711680)+(E[M+1]<<8&65280)+(E[M+2]&255),C.push(b(x));return C.join(\"\")}function k(E){for(var T,L=E.length,x=L%3,C=[],M=16383,g=0,P=L-x;g<P;g+=M)C.push(p(E,g,g+M>P?P:g+M));return x===1?(T=E[L-1],C.push(o[T>>2]+o[T<<4&63]+\"==\")):x===2&&(T=(E[L-2]<<8)+E[L-1],C.push(o[T>>10]+o[T>>4&63]+o[T<<2&63]+\"=\")),C.join(\"\")}},7518:function(i,a,o){\"use strict\";var s=o(1433);function l(f,h,d,v,_,b){this.location=f,this.dimension=h,this.a=d,this.b=v,this.c=_,this.d=b}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f<this._attribs.length;++f)this._attribs[f].bind(this.gl)},u.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},u.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},u.prototype.update=function(f,h,d){if(this.bind(),s(this.gl,h,f),this.unbind(),this._attribs.length=0,f)for(var v=0;v<f.length;++v){var _=f[v];typeof _==\"number\"?this._attribs.push(new l(v,1,_)):Array.isArray(_)&&this._attribs.push(new l(v,_.length,_[0],_[1],_[2],_[3]))}this._useElements=!!h,this._elementsType=d||this.gl.UNSIGNED_SHORT},u.prototype.draw=function(f,h,d){d=d||0;var v=this.gl;this._useElements?v.drawElements(f,h,this._elementsType,d):v.drawArrays(f,d,h)};function c(f,h){return new u(f,h,h.createVertexArrayOES())}i.exports=c},7520:function(i,a,o){\"use strict\";var s=o(9507);function l(){var u=!1;try{var c=Object.defineProperty({},\"passive\",{get:function(){u=!0}});window.addEventListener(\"test\",null,c),window.removeEventListener(\"test\",null,c)}catch(f){u=!1}return u}i.exports=s&&l()},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},7608:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=s[4],d=s[5],v=s[6],_=s[7],b=s[8],p=s[9],k=s[10],E=s[11],T=s[12],L=s[13],x=s[14],C=s[15],M=l*d-u*h,g=l*v-c*h,P=l*_-f*h,A=u*v-c*d,z=u*_-f*d,O=c*_-f*v,U=b*L-p*T,G=b*x-k*T,Z=b*C-E*T,j=p*x-k*L,N=p*C-E*L,H=k*C-E*x,re=M*H-g*N+P*j+A*Z-z*G+O*U;return re?(re=1/re,o[0]=(d*H-v*N+_*j)*re,o[1]=(c*N-u*H-f*j)*re,o[2]=(L*O-x*z+C*A)*re,o[3]=(k*z-p*O-E*A)*re,o[4]=(v*Z-h*H-_*G)*re,o[5]=(l*H-c*Z+f*G)*re,o[6]=(x*P-T*O-C*g)*re,o[7]=(b*O-k*P+E*g)*re,o[8]=(h*N-d*Z+_*U)*re,o[9]=(u*Z-l*N-f*U)*re,o[10]=(T*z-L*P+C*M)*re,o[11]=(p*P-b*z-E*M)*re,o[12]=(d*G-h*j-v*U)*re,o[13]=(l*j-u*G+c*U)*re,o[14]=(L*g-T*A-x*M)*re,o[15]=(b*A-p*g+k*M)*re,o):null}},7626:function(i,a,o){\"use strict\";var s=o(2642),l=o(9346);i.exports=d;function u(v,_){for(var b=[0,0,0,0],p=0;p<4;++p)for(var k=0;k<4;++k)b[k]+=v[4*p+k]*_[p];return b}function c(v,_,b,p,k){for(var E=u(p,u(b,u(_,[v[0],v[1],v[2],1]))),T=0;T<3;++T)E[T]/=E[3];return[.5*k[0]*(1+E[0]),.5*k[1]*(1-E[1])]}function f(v,_){if(v.length===2){for(var b=0,p=0,k=0;k<2;++k)b+=Math.pow(_[k]-v[0][k],2),p+=Math.pow(_[k]-v[1][k],2);return b=Math.sqrt(b),p=Math.sqrt(p),b+p<1e-6?[1,0]:[p/(b+p),b/(p+b)]}else if(v.length===3){var E=[0,0];return l(v[0],v[1],v[2],_,E),s(v,E)}return[]}function h(v,_){for(var b=[0,0,0],p=0;p<v.length;++p)for(var k=v[p],E=_[p],T=0;T<3;++T)b[T]+=E*k[T];return b}function d(v,_,b,p,k,E){if(v.length===1)return[0,v[0].slice()];for(var T=new Array(v.length),L=0;L<v.length;++L)T[L]=c(v[L],b,p,k,E);for(var x=0,C=1/0,L=0;L<T.length;++L){for(var M=0,g=0;g<2;++g)M+=Math.pow(T[L][g]-_[g],2);M<C&&(C=M,x=L)}for(var P=f(T,_),A=0,L=0;L<3;++L){if(P[L]<-.001||P[L]>1.0001)return null;A+=P[L]}return Math.abs(A-1)>.001?null:[x,h(v,P),P]}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},7640:function(i,a,o){\"use strict\";var s=o(1888);function l(_){switch(_){case\"uint32\":return[s.mallocUint32,s.freeUint32];default:return null}}var u={\"uint32,1,0\":function(_,b){return function(k,E,T,L,x,C,M,g,P,A,z){var O,U,G,Z=k*x+L,j,N=_(g),H,re,oe,_e;for(O=k+1;O<=E;++O){for(U=O,Z+=x,G=Z,H=0,re=Z,j=0;j<g;++j)N[H++]=T[re],re+=P;e:for(;U-- >k;){H=0,re=G-x;t:for(j=0;j<g;++j){if(oe=T[re],_e=N[H],oe<_e)break e;if(oe>_e)break t;re+=A,H+=z}for(H=G,re=G-x,j=0;j<g;++j)T[H]=T[re],H+=P,re+=P;G-=x}for(H=G,re=0,j=0;j<g;++j)T[H]=N[re++],H+=P}b(N)}}};function c(_,b){var p=l(b),k=[b,_].join(\",\"),E=u[k];return p?E(p[0],p[1]):E()}var f={\"uint32,1,0\":function(_,b,p){return function k(E,T,L,x,C,M,g,P,A,z,O){var U=(T-E+1)/6|0,G=E+U,Z=T-U,j=E+T>>1,N=j-U,H=j+U,re=G,oe=N,_e=j,Ce=H,Le=Z,ge=E+1,ie=T-1,Se=!0,Ee,Ae,Be,Pe,me,De,ce,je,lt,pt=0,Vt=0,ot=0,ut,Wt,Nt,$t,sr,Tr,fr,$e,St,Qt,Gt,_t,It,mt,er,lr,wr=P,Lr=b(wr),ti=b(wr);Wt=C*re,Nt=C*oe,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=re,re=oe,oe=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*Ce,Nt=C*Le,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=Ce,Ce=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*re,Nt=C*_e,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=re,re=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*_e,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=oe,oe=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*re,Nt=C*Ce,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=re,re=Ce,Ce=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*_e,Nt=C*Ce,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=_e,_e=Ce,Ce=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*Le,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=oe,oe=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*_e,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=oe,oe=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*Ce,Nt=C*Le,lr=x;e:for(ut=0;ut<P;++ut){if(ce=Wt+lr,je=Nt+lr,ot=L[ce]-L[je],ot>0){Ae=Ce,Ce=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}for(Wt=C*re,Nt=C*oe,$t=C*_e,sr=C*Ce,Tr=C*Le,fr=C*G,$e=C*j,St=C*Z,er=0,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,lt=$t+lr,Qt=sr+lr,Gt=Tr+lr,_t=fr+lr,It=$e+lr,mt=St+lr,Lr[er]=L[je],ti[er]=L[Qt],Se=Se&&Lr[er]===ti[er],Be=L[ce],Pe=L[lt],me=L[Gt],L[_t]=Be,L[It]=Pe,L[mt]=me,++er,lr+=A;for(Wt=C*N,Nt=C*E,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,L[ce]=L[je],lr+=A;for(Wt=C*H,Nt=C*T,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,L[ce]=L[je],lr+=A;if(Se)for(De=ge;De<=ie;++De){ce=x+De*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-Lr[er],ot!==0)break e;er+=O,ce+=z}if(ot!==0)if(ot<0){if(De!==ge)for(Wt=C*De,Nt=C*ge,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;++ge}else for(;;){ce=x+ie*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-Lr[er],ot!==0)break e;er+=O,ce+=z}if(ot>0)ie--;else if(ot<0){for(Wt=C*De,Nt=C*ge,$t=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,lt=$t+lr,Ee=L[ce],L[ce]=L[je],L[je]=L[lt],L[lt]=Ee,lr+=A;++ge,--ie;break}else{for(Wt=C*De,Nt=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;--ie;break}}}else for(De=ge;De<=ie;++De){ce=x+De*C,er=0;e:for(ut=0;ut<P;++ut){if(pt=L[ce]-Lr[er],pt!==0)break e;er+=O,ce+=z}if(pt<0){if(De!==ge)for(Wt=C*De,Nt=C*ge,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;++ge}else{ce=x+De*C,er=0;e:for(ut=0;ut<P;++ut){if(Vt=L[ce]-ti[er],Vt!==0)break e;er+=O,ce+=z}if(Vt>0)for(;;){ce=x+ie*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-ti[er],ot!==0)break e;er+=O,ce+=z}if(ot>0){if(--ie<De)break;continue}else{ce=x+ie*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-Lr[er],ot!==0)break e;er+=O,ce+=z}if(ot<0){for(Wt=C*De,Nt=C*ge,$t=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,lt=$t+lr,Ee=L[ce],L[ce]=L[je],L[je]=L[lt],L[lt]=Ee,lr+=A;++ge,--ie}else{for(Wt=C*De,Nt=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;--ie}break}}}}for(Wt=C*E,Nt=C*(ge-1),er=0,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,L[ce]=L[je],L[je]=Lr[er],++er,lr+=A;for(Wt=C*T,Nt=C*(ie+1),er=0,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,L[ce]=L[je],L[je]=ti[er],++er,lr+=A;if(ge-2-E<=32?_(E,ge-2,L,x,C,M,g,P,A,z,O):k(E,ge-2,L,x,C,M,g,P,A,z,O),T-(ie+2)<=32?_(ie+2,T,L,x,C,M,g,P,A,z,O):k(ie+2,T,L,x,C,M,g,P,A,z,O),Se){p(Lr),p(ti);return}if(ge<G&&ie>Z){e:for(;;){for(ce=x+ge*C,er=0,lr=x,ut=0;ut<P;++ut){if(L[ce]!==Lr[er])break e;++er,ce+=A}++ge}e:for(;;){for(ce=x+ie*C,er=0,lr=x,ut=0;ut<P;++ut){if(L[ce]!==ti[er])break e;++er,ce+=A}--ie}for(De=ge;De<=ie;++De){ce=x+De*C,er=0;e:for(ut=0;ut<P;++ut){if(pt=L[ce]-Lr[er],pt!==0)break e;er+=O,ce+=z}if(pt===0){if(De!==ge)for(Wt=C*De,Nt=C*ge,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;++ge}else{ce=x+De*C,er=0;e:for(ut=0;ut<P;++ut){if(Vt=L[ce]-ti[er],Vt!==0)break e;er+=O,ce+=z}if(Vt===0)for(;;){ce=x+ie*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-ti[er],ot!==0)break e;er+=O,ce+=z}if(ot===0){if(--ie<De)break;continue}else{ce=x+ie*C,er=0;e:for(ut=0;ut<P;++ut){if(ot=L[ce]-Lr[er],ot!==0)break e;er+=O,ce+=z}if(ot<0){for(Wt=C*De,Nt=C*ge,$t=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,lt=$t+lr,Ee=L[ce],L[ce]=L[je],L[je]=L[lt],L[lt]=Ee,lr+=A;++ge,--ie}else{for(Wt=C*De,Nt=C*ie,lr=x,ut=0;ut<P;++ut)ce=Wt+lr,je=Nt+lr,Ee=L[ce],L[ce]=L[je],L[je]=Ee,lr+=A;--ie}break}}}}}p(Lr),p(ti),ie-ge<=32?_(ge,ie,L,x,C,M,g,P,A,z,O):k(ge,ie,L,x,C,M,g,P,A,z,O)}}};function h(_,b,p){var k=l(b),E=[b,_].join(\",\"),T=f[E];return _.length>1&&k?T(p,k[0],k[1]):T(p)}var d={\"uint32,1,0\":function(_,b){return function(p){var k=p.data,E=p.offset|0,T=p.shape,L=p.stride,x=L[0]|0,C=T[0]|0,M=L[1]|0,g=T[1]|0,P=M,A=M,z=1;C<=32?_(0,C-1,k,E,x,M,C,g,P,A,z):b(0,C-1,k,E,x,M,C,g,P,A,z)}}};function v(_,b){var p=[b,_].join(\",\"),k=d[p],E=c(_,b),T=h(_,b,E);return k(E,T)}i.exports=v},7642:function(i,a,o){\"use strict\";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var _=d.point,b=v.point,p=_.length,k=0;k<p;++k){var E=b[k]-_[k];if(E)return E}return 0}function f(d,v,_){if(d===1)return _?[[-1,0]]:[];var b=v.map(function(L,x){return[L[0],x]});b.sort(function(L,x){return L[0]-x[0]});for(var p=new Array(d-1),k=1;k<d;++k){var E=b[k-1],T=b[k];p[k-1]=[E[1],T[1]]}return _&&p.push([-1,p[0][1]],[p[d-1][1],-1]),p}function h(d,v){var _=d.length;if(_===0)return[];var b=d[0].length;if(b<1)return[];if(b===1)return f(_,d,v);for(var p=new Array(_),k=1,E=0;E<_;++E){for(var T=d[E],L=new Array(b+1),x=0,C=0;C<b;++C){var M=T[C];L[C]=M,x+=M*M}L[b]=x,p[E]=new u(L,E),k=Math.max(x,k)}l(p,c),_=p.length;for(var g=new Array(_+b+1),P=new Array(_+b+1),A=(b+1)*(b+1)*k,z=new Array(b+1),E=0;E<=b;++E)z[E]=0;z[b]=A,g[0]=z.slice(),P[0]=-1;for(var E=0;E<=b;++E){var L=z.slice();L[E]=1,g[E+1]=L,P[E+1]=-1}for(var E=0;E<_;++E){var O=p[E];g[E+b+1]=O.point,P[E+b+1]=O.index}var U=s(g,!1);if(v?U=U.filter(function(G){for(var Z=0,j=0;j<=b;++j){var N=P[G[j]];if(N<0&&++Z>=2)return!1;G[j]=N}return!0}):U=U.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var E=0;E<U.length;++E){var O=U[E],L=O[0];O[0]=O[1],O[1]=L}return U}},7656:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2],h,d,v,_,b,p,k,E,T,L,x,C;return s===o?(o[12]=s[0]*u+s[4]*c+s[8]*f+s[12],o[13]=s[1]*u+s[5]*c+s[9]*f+s[13],o[14]=s[2]*u+s[6]*c+s[10]*f+s[14],o[15]=s[3]*u+s[7]*c+s[11]*f+s[15]):(h=s[0],d=s[1],v=s[2],_=s[3],b=s[4],p=s[5],k=s[6],E=s[7],T=s[8],L=s[9],x=s[10],C=s[11],o[0]=h,o[1]=d,o[2]=v,o[3]=_,o[4]=b,o[5]=p,o[6]=k,o[7]=E,o[8]=T,o[9]=L,o[10]=x,o[11]=C,o[12]=h*u+b*c+T*f+s[12],o[13]=d*u+p*c+L*f+s[13],o[14]=v*u+k*c+x*f+s[14],o[15]=_*u+E*c+C*f+s[15]),o}},7718:function(i,a,o){i.exports=O,i.exports.processPixels=z;var s=o(3711),l=o(9618),u=o(5878),c=o(332),f=o(2538),h=o(2095),d=\"b\",v=\"b|\",_=\"i\",b=\"i|\",p=\"sup\",k=\"+\",E=\"+1\",T=\"sub\",L=\"-\",x=\"-1\";function C(U,G,Z,j){for(var N=\"<\"+U+\">\",H=\"</\"+U+\">\",re=N.length,oe=H.length,_e=G[0]===k||G[0]===L,Ce=0,Le=-oe;Ce>-1&&(Ce=Z.indexOf(N,Ce),!(Ce===-1||(Le=Z.indexOf(H,Ce+re),Le===-1)||Le<=Ce));){for(var ge=Ce;ge<Le+oe;++ge)if(ge<Ce+re||ge>=Le)j[ge]=null,Z=Z.substr(0,ge)+\" \"+Z.substr(ge+1);else if(j[ge]!==null){var ie=j[ge].indexOf(G[0]);ie===-1?j[ge]+=G:_e&&(j[ge]=j[ge].substr(0,ie+1)+(1+parseInt(j[ge][ie+1]))+j[ge].substr(ie+2))}var Se=Ce+re,Ee=Z.substr(Se,Le-Se),Ae=Ee.indexOf(N);Ae!==-1?Ce=Ae:Ce=Le+oe}return j}function M(U,G,Z){for(var j=G.textAlign||\"start\",N=G.textBaseline||\"alphabetic\",H=[1<<30,1<<30],re=[0,0],oe=U.length,_e=0;_e<oe;++_e)for(var Ce=U[_e],Le=0;Le<2;++Le)H[Le]=Math.min(H[Le],Ce[Le])|0,re[Le]=Math.max(re[Le],Ce[Le])|0;var ge=0;switch(j){case\"center\":ge=-.5*(H[0]+re[0]);break;case\"right\":case\"end\":ge=-re[0];break;case\"left\":case\"start\":ge=-H[0];break;default:throw new Error(\"vectorize-text: Unrecognized textAlign: '\"+j+\"'\")}var ie=0;switch(N){case\"hanging\":case\"top\":ie=-H[1];break;case\"middle\":ie=-.5*(H[1]+re[1]);break;case\"alphabetic\":case\"ideographic\":ie=-3*Z;break;case\"bottom\":ie=-re[1];break;default:throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\"+N+\"'\")}var Se=1/Z;return\"lineHeight\"in G?Se*=+G.lineHeight:\"width\"in G?Se=G.width/(re[0]-H[0]):\"height\"in G&&(Se=G.height/(re[1]-H[1])),U.map(function(Ee){return[Se*(Ee[0]+ge),Se*(Ee[1]+ie)]})}function g(U,G,Z,j,N,H){Z=Z.replace(/\\n/g,\"\"),H.breaklines===!0?Z=Z.replace(/\\<br\\>/g,`\n",
       "`):Z=Z.replace(/\\<br\\>/g,\" \");var re=\"\",oe=[];for(me=0;me<Z.length;++me)oe[me]=re;H.bolds===!0&&(oe=C(d,v,Z,oe)),H.italics===!0&&(oe=C(_,b,Z,oe)),H.superscripts===!0&&(oe=C(p,E,Z,oe)),H.subscripts===!0&&(oe=C(T,x,Z,oe));var _e=[],Ce=\"\";for(me=0;me<Z.length;++me)oe[me]!==null&&(Ce+=Z[me],_e.push(oe[me]));var Le=Ce.split(`\n",
       "`),ge=Le.length,ie=Math.round(N*j),Se=j,Ee=j*2,Ae=0,Be=ge*ie+Ee;U.height<Be&&(U.height=Be),G.fillStyle=\"#000\",G.fillRect(0,0,U.width,U.height),G.fillStyle=\"#fff\";var Pe,me,De,ce,je,lt=0,pt=\"\";function Vt(){if(pt!==\"\"){var $e=G.measureText(pt).width;G.fillText(pt,Se+De,Ee+ce),De+=$e}}function ot(){return\"\"+Math.round(je)+\"px \"}function ut($e,St){var Qt=\"\"+G.font;if(H.subscripts===!0){var Gt=$e.indexOf(L),_t=St.indexOf(L),It=Gt>-1?parseInt($e[1+Gt]):0,mt=_t>-1?parseInt(St[1+_t]):0;It!==mt&&(Qt=Qt.replace(ot(),\"?px \"),je*=Math.pow(.75,mt-It),Qt=Qt.replace(\"?px \",ot())),ce+=.25*ie*(mt-It)}if(H.superscripts===!0){var er=$e.indexOf(k),lr=St.indexOf(k),wr=er>-1?parseInt($e[1+er]):0,Lr=lr>-1?parseInt(St[1+lr]):0;wr!==Lr&&(Qt=Qt.replace(ot(),\"?px \"),je*=Math.pow(.75,Lr-wr),Qt=Qt.replace(\"?px \",ot())),ce-=.25*ie*(Lr-wr)}if(H.bolds===!0){var ti=$e.indexOf(v)>-1,Br=St.indexOf(v)>-1;!ti&&Br&&(Vr?Qt=Qt.replace(\"italic \",\"italic bold \"):Qt=\"bold \"+Qt),ti&&!Br&&(Qt=Qt.replace(\"bold \",\"\"))}if(H.italics===!0){var Vr=$e.indexOf(b)>-1,dt=St.indexOf(b)>-1;!Vr&&dt&&(Qt=\"italic \"+Qt),Vr&&!dt&&(Qt=Qt.replace(\"italic \",\"\"))}G.font=Qt}for(Pe=0;Pe<ge;++Pe){var Wt=Le[Pe]+`\n",
       "`;for(De=0,ce=Pe*ie,je=j,pt=\"\",me=0;me<Wt.length;++me){var Nt=me+lt<_e.length?_e[me+lt]:_e[_e.length-1];re===Nt?pt+=Wt[me]:(Vt(),pt=Wt[me],Nt!==void 0&&(ut(re,Nt),re=Nt))}Vt(),lt+=Wt.length;var $t=Math.round(De+2*Se)|0;Ae<$t&&(Ae=$t)}var sr=Ae,Tr=Ee+ie*ge,fr=l(G.getImageData(0,0,sr,Tr).data,[Tr,sr,4]);return fr.pick(-1,-1,0).transpose(1,0)}function P(U,G){var Z=s(U,128);return G?u(Z.cells,Z.positions,.25):{edges:Z.cells,positions:Z.positions}}function A(U,G,Z,j){var N=P(U,j),H=M(N.positions,G,Z),re=N.edges,oe=G.orientation===\"ccw\";if(c(H,re),G.polygons||G.polygon||G.polyline){for(var _e=h(re,H),Ce=new Array(_e.length),Le=0;Le<_e.length;++Le){for(var ge=_e[Le],ie=new Array(ge.length),Se=0;Se<ge.length;++Se){for(var Ee=ge[Se],Ae=new Array(Ee.length),Be=0;Be<Ee.length;++Be)Ae[Be]=H[Ee[Be]].slice();oe&&Ae.reverse(),ie[Se]=Ae}Ce[Le]=ie}return Ce}else return G.triangles||G.triangulate||G.triangle?{cells:f(H,re,{delaunay:!1,exterior:!1,interior:!0}),positions:H}:{edges:re,positions:H}}function z(U,G,Z){try{return A(U,G,Z,!0)}catch(j){}try{return A(U,G,Z,!1)}catch(j){}return G.polygons||G.polyline||G.polygon?[]:G.triangles||G.triangulate||G.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function O(U,G,Z,j){var N=64,H=1.25,re={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};j&&(j.size&&j.size>0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(re.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(re.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(re.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(re.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(re.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+\"px\",j.font].filter(function(_e){return _e}).join(\" \"),Z.textAlign=\"start\",Z.textBaseline=\"alphabetic\",Z.direction=\"ltr\";var oe=g(G,Z,U,N,H,re);return z(oe,j,N)}},7721:function(i,a,o){\"use strict\";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},7765:function(i,a,o){\"use strict\";i.exports=p;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(k){for(var E=k.length,T=0,L=0;L<E;++L)T=Math.max(T,k[L].length)|0;return T-1}function h(k,E){for(var T=k.length,L=l.mallocUint8(T),x=0;x<T;++x)L[x]=k[x]<E|0;return L}function d(k,E){for(var T=k.length,L=E*(E+1)/2*T|0,x=l.mallocUint32(L*2),C=0,M=0;M<T;++M)for(var g=k[M],E=g.length,P=0;P<E;++P)for(var A=0;A<P;++A){var z=g[A],O=g[P];x[C++]=Math.min(z,O)|0,x[C++]=Math.max(z,O)|0}var U=C/2|0;u(s(x,[U,2]));for(var G=2,M=2;M<C;M+=2)x[M-2]===x[M]&&x[M-1]===x[M+1]||(x[G++]=x[M],x[G++]=x[M+1]);return s(x,[G/2|0,2])}function v(k,E,T,L){for(var x=k.data,C=k.shape[0],M=l.mallocDouble(C),g=0,P=0;P<C;++P){var A=x[2*P],z=x[2*P+1];if(T[A]!==T[z]){var O=E[A],U=E[z];x[2*g]=A,x[2*g+1]=z,M[g++]=(U-L)/(U-O)}}return k.shape[0]=g,s(M,[g])}function _(k,E){var T=l.mallocInt32(E*2),L=k.shape[0],x=k.data;T[0]=0;for(var C=0,M=0;M<L;++M){var g=x[2*M];if(g!==C){for(T[2*C+1]=M;++C<g;)T[2*C]=M,T[2*C+1]=M;T[2*C]=M}}for(T[2*C+1]=L;++C<E;)T[2*C]=T[2*C+1]=L;return T}function b(k){for(var E=k.shape[0]|0,T=k.data,L=new Array(E),x=0;x<E;++x)L[x]=[T[2*x],T[2*x+1]];return L}function p(k,E,T,L){T=T||0,typeof L==\"undefined\"&&(L=f(k));var x=k.length;if(x===0||L<1)return{cells:[],vertexIds:[],vertexWeights:[]};var C=h(E,+T),M=d(k,L),g=v(M,E,C,+T),P=_(M,E.length|0),A=c(L)(k,M.data,P,C),z=b(M),O=[].slice.call(g.data,0,g.shape[0]);return l.free(C),l.free(M.data),l.free(g.data),l.free(P),{cells:A,vertexIds:z,vertexWeights:O}}},7766:function(i,a,o){\"use strict\";var s=o(9618),l=o(5298),u=o(1888);i.exports=g;var c=null,f=null,h=null;function d(P){c=[P.LINEAR,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_NEAREST],f=[P.NEAREST,P.LINEAR,P.NEAREST_MIPMAP_NEAREST,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_LINEAR],h=[P.REPEAT,P.CLAMP_TO_EDGE,P.MIRRORED_REPEAT]}function v(P){return typeof HTMLCanvasElement!=\"undefined\"&&P instanceof HTMLCanvasElement||typeof HTMLImageElement!=\"undefined\"&&P instanceof HTMLImageElement||typeof HTMLVideoElement!=\"undefined\"&&P instanceof HTMLVideoElement||typeof ImageData!=\"undefined\"&&P instanceof ImageData}var _=function(P,A){l.muls(P,A,255)};function b(P,A,z){var O=P.gl,U=O.getParameter(O.MAX_TEXTURE_SIZE);if(A<0||A>U||z<0||z>U)throw new Error(\"gl-texture2d: Invalid texture size\");return P._shape=[A,z],P.bind(),O.texImage2D(O.TEXTURE_2D,0,P.format,A,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,A,z,O,U,G){this.gl=P,this.handle=A,this.format=U,this.type=G,this._shape=[z,O],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(P)>=0&&(A.getExtension(\"OES_texture_float_linear\")||(P=A.NEAREST)),f.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+P);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(P)>=0&&(A.getExtension(\"OES_texture_float_linear\")||(P=A.NEAREST)),f.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown filter mode \"+P);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var A=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,A!==this._anisoSamples){var z=this.gl.getExtension(\"EXT_texture_filter_anisotropic\");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error(\"gl-texture2d: Must specify wrap mode for rows and columns\");for(var A=0;A<2;++A)if(h.indexOf(P[A])<0)throw new Error(\"gl-texture2d: Unknown wrap mode \"+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error(\"gl-texture2d: Invalid texture shape\");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var A=this.gl;return P!==void 0&&A.activeTexture(A.TEXTURE0+(P|0)),A.bindTexture(A.TEXTURE_2D,this.handle),P!==void 0?P|0:A.getParameter(A.ACTIVE_TEXTURE)-A.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),A=0;P>0;++A,P>>>=1)this._mipLevels.indexOf(A)<0&&this._mipLevels.push(A)},k.setPixels=function(P,A,z,O){var U=this.gl;this.bind(),Array.isArray(A)?(O=z,z=A[1]|0,A=A[0]|0):(A=A||0,z=z||0),O=O||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(O)<0;Z?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(O)):U.texSubImage2D(U.TEXTURE_2D,O,A,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||A+P.shape[1]>this._shape[1]>>>O||z+P.shape[0]>this._shape[0]>>>O||A<0||z<0)throw new Error(\"gl-texture2d: Texture dimensions are out of bounds\");T(U,A,z,O,this.format,this.type,this._mipLevels,P)}else throw new Error(\"gl-texture2d: Unsupported data type\")};function E(P,A){return P.length===3?A[2]===1&&A[1]===P[0]*P[2]&&A[0]===P[2]:A[0]===1&&A[1]===P[0]}function T(P,A,z,O,U,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error(\"gl-texture2d: Invalid ndarray, must be 2d or 3d\");var re=0,oe=0,_e=E(H,j.stride.slice());N===\"float32\"?re=P.FLOAT:N===\"float64\"?(re=P.FLOAT,_e=!1,N=\"float32\"):N===\"uint8\"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N=\"uint8\");var Ce=1;if(H.length===2)oe=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)oe=P.ALPHA;else if(H[2]===2)oe=P.LUMINANCE_ALPHA;else if(H[2]===3)oe=P.RGB;else if(H[2]===4)oe=P.RGBA;else throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");Ce=H[2]}else throw new Error(\"gl-texture2d: Invalid shape for texture\");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(U===P.LUMINANCE||U===P.ALPHA)&&(oe=U),oe!==U)throw new Error(\"gl-texture2d: Incompatible texture format for setPixels\");var Le=j.size,ge=Z.indexOf(O)<0;if(ge&&Z.push(O),re===G&&_e)j.offset===0&&j.data.length===Le?ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,j.data):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,j.data):ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,j.data.subarray(j.offset,j.offset+Le)):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,j.data.subarray(j.offset,j.offset+Le));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(Le):ie=u.mallocUint8(Le);var Se=s(ie,H,[H[2],H[2]*H[0],1]);re===P.FLOAT&&G===P.UNSIGNED_BYTE?_(Se,j):l.assign(Se,j),ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,ie.subarray(0,Le)):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,ie.subarray(0,Le)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var A=P.createTexture();return P.bindTexture(P.TEXTURE_2D,A),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),A}function x(P,A,z,O,U){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(A<0||A>G||z<0||z>G)throw new Error(\"gl-texture2d: Invalid texture shape\");if(U===P.FLOAT&&!P.getExtension(\"OES_texture_float\"))throw new Error(\"gl-texture2d: Floating point textures not supported on this platform\");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,O,A,z,0,O,U,null),new p(P,Z,A,z,O,U)}function C(P,A,z,O,U,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,U,U,G,A),new p(P,Z,z,O,U,G)}function M(P,A){var z=A.dtype,O=A.shape.slice(),U=P.getParameter(P.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>U||O[1]<0||O[1]>U)throw new Error(\"gl-texture2d: Invalid texture size\");var G=E(O,A.stride.slice()),Z=0;z===\"float32\"?Z=P.FLOAT:z===\"float64\"?(Z=P.FLOAT,G=!1,z=\"float32\"):z===\"uint8\"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z=\"uint8\");var j=0;if(O.length===2)j=P.LUMINANCE,O=[O[0],O[1],1],A=s(A.data,O,[A.stride[0],A.stride[1],1],A.offset);else if(O.length===3)if(O[2]===1)j=P.ALPHA;else if(O[2]===2)j=P.LUMINANCE_ALPHA;else if(O[2]===3)j=P.RGB;else if(O[2]===4)j=P.RGBA;else throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");else throw new Error(\"gl-texture2d: Invalid shape for texture\");Z===P.FLOAT&&!P.getExtension(\"OES_texture_float\")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,re=A.size;if(G)A.offset===0&&A.data.length===re?N=A.data:N=A.data.subarray(A.offset,A.offset+re);else{var oe=[O[2],O[2]*O[0],1];H=u.malloc(re,z);var _e=s(H,O,oe,0);(z===\"float32\"||z===\"float64\")&&Z===P.UNSIGNED_BYTE?_(_e,A):l.assign(_e,A),N=H.subarray(0,re)}var Ce=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,O[0],O[1],0,j,Z,N),G||u.free(H),new p(P,Ce,O[0],O[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error(\"gl-texture2d: Missing arguments for texture2d constructor\");if(c||d(P),typeof arguments[1]==\"number\")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]==\"object\"){var A=arguments[1],z=v(A)?A:A.raw;if(z)return C(P,z,A.width|0,A.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(A.shape&&A.data&&A.stride)return M(P,A)}throw new Error(\"gl-texture2d: Invalid arguments for texture2d constructor\")}},7790:function(){},7815:function(i,a,o){\"use strict\";var s=o(2931),l=o(9970),u=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"],c=function(T,L,x,C){for(var M=T.points,g=T.velocities,P=T.divergences,A=[],z=[],O=[],U=[],G=[],Z=[],j=0,N=0,H=l.create(),re=l.create(),oe=8,_e=0;_e<M.length;_e++){var Ce=M[_e],Le=g[_e],ge=P[_e];L===0&&(ge=x*.05),N=s.length(Le)/C,H=l.create(),s.copy(H,Le),H[3]=ge;for(var ie=0;ie<oe;ie++)G[ie]=[Ce[0],Ce[1],Ce[2],ie];if(U.length>0)for(var ie=0;ie<oe;ie++){var Se=(ie+1)%oe;A.push(U[ie],G[ie],G[Se],G[Se],U[Se],U[ie]),O.push(re,H,H,H,re,re),Z.push(j,N,N,N,j,j);var Ee=A.length;z.push([Ee-6,Ee-5,Ee-4],[Ee-3,Ee-2,Ee-1])}var Ae=U;U=G,G=Ae;var Be=re;re=H,H=Be;var Pe=j;j=N,N=Pe}return{positions:A,cells:z,vectors:O,vertexIntensity:Z}},f=function(T,L,x,C){for(var M=0,g=0;g<T.length;g++)for(var P=T[g].velocities,A=0;A<P.length;A++)M=Math.max(M,s.length(P[A]));for(var z=T.map(function(_e){return c(_e,x,C,M)}),O=[],U=[],G=[],Z=[],g=0;g<z.length;g++){var j=z[g],N=O.length;O=O.concat(j.positions),G=G.concat(j.vectors),Z=Z.concat(j.vertexIntensity);for(var A=0;A<j.cells.length;A++){var H=j.cells[A],re=[];U.push(re);for(var oe=0;oe<H.length;oe++)re.push(H[oe]+N)}}return{positions:O,cells:U,vectors:G,vertexIntensity:Z,colormap:L}},h=function(T,L){var x=T.length,C;for(C=0;C<x;C++){var M=T[C];if(M===L)return C;if(M>L)return C-1}return C},d=function(T,L,x){return T<L?L:T>x?x:T},v=function(T,L,x){var C=L.vectors,M=L.meshgrid,g=T[0],P=T[1],A=T[2],z=M[0].length,O=M[1].length,U=M[2].length,G=h(M[0],g),Z=h(M[1],P),j=h(M[2],A),N=G+1,H=Z+1,re=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,O-1),H=d(H,0,O-1),j=d(j,0,U-1),re=d(re,0,U-1),G<0||Z<0||j<0||N>z-1||H>O-1||re>U-1)return s.create();var oe=M[0][G],_e=M[0][N],Ce=M[1][Z],Le=M[1][H],ge=M[2][j],ie=M[2][re],Se=(g-oe)/(_e-oe),Ee=(P-Ce)/(Le-Ce),Ae=(A-ge)/(ie-ge);isFinite(Se)||(Se=.5),isFinite(Ee)||(Ee=.5),isFinite(Ae)||(Ae=.5);var Be,Pe,me,De,ce,je;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=O-1-Z,H=O-1-H),x.reversedZ&&(j=U-1-j,re=U-1-re),x.filled){case 5:ce=j,je=re,me=Z*U,De=H*U,Be=G*U*O,Pe=N*U*O;break;case 4:ce=j,je=re,Be=G*U,Pe=N*U,me=Z*U*z,De=H*U*z;break;case 3:me=Z,De=H,ce=j*O,je=re*O,Be=G*O*U,Pe=N*O*U;break;case 2:me=Z,De=H,Be=G*O,Pe=N*O,ce=j*O*z,je=re*O*z;break;case 1:Be=G,Pe=N,ce=j*z,je=re*z,me=Z*z*U,De=H*z*U;break;default:Be=G,Pe=N,me=Z*z,De=H*z,ce=j*z*O,je=re*z*O;break}var lt=C[Be+me+ce],pt=C[Be+me+je],Vt=C[Be+De+ce],ot=C[Be+De+je],ut=C[Pe+me+ce],Wt=C[Pe+me+je],Nt=C[Pe+De+ce],$t=C[Pe+De+je],sr=s.create(),Tr=s.create(),fr=s.create(),$e=s.create();s.lerp(sr,lt,ut,Se),s.lerp(Tr,pt,Wt,Se),s.lerp(fr,Vt,Nt,Se),s.lerp($e,ot,$t,Se);var St=s.create(),Qt=s.create();s.lerp(St,sr,fr,Ee),s.lerp(Qt,Tr,$e,Ee);var Gt=s.create();return s.lerp(Gt,St,Qt,Ae),Gt},_=function(T,L){var x=L[0],C=L[1],M=L[2];return T[0]=x<0?-x:x,T[1]=C<0?-C:C,T[2]=M<0?-M:M,T},b=function(T){var L=1/0;T.sort(function(g,P){return g-P});for(var x=T.length,C=1;C<x;C++){var M=Math.abs(T[C]-T[C-1]);M<L&&(L=M)}return L},p=function(T){for(var L=[],x=[],C=[],M={},g={},P={},A=T.length,z=0;z<A;z++){var O=T[z],U=O[0],G=O[1],Z=O[2];M[U]||(L.push(U),M[U]=!0),g[G]||(x.push(G),g[G]=!0),P[Z]||(C.push(Z),P[Z]=!0)}var j=b(L),N=b(x),H=b(C),re=Math.min(j,N,H);return isFinite(re)?re:1};i.exports=function(T,L){var x=T.startingPositions,C=T.maxLength||1e3,M=T.tubeSize||1,g=T.absoluteTubeSize,P=T.gridFill||\"+x+y+z\",A={};P.indexOf(\"-x\")!==-1&&(A.reversedX=!0),P.indexOf(\"-y\")!==-1&&(A.reversedY=!0),P.indexOf(\"-z\")!==-1&&(A.reversedZ=!0),A.filled=u.indexOf(P.replace(/-/g,\"\").replace(/\\+/g,\"\"));var z=T.getVelocity||function(Wt){return v(Wt,T,A)},O=T.getDivergence||function(Wt,Nt){var $t=s.create(),sr=1e-4;s.add($t,Wt,[sr,0,0]);var Tr=z($t);s.subtract(Tr,Tr,Nt),s.scale(Tr,Tr,1/sr),s.add($t,Wt,[0,sr,0]);var fr=z($t);s.subtract(fr,fr,Nt),s.scale(fr,fr,1/sr),s.add($t,Wt,[0,0,sr]);var $e=z($t);return s.subtract($e,$e,Nt),s.scale($e,$e,1/sr),s.add($t,Tr,fr),s.add($t,$t,$e),$t},U=[],G=L[0][0],Z=L[0][1],j=L[0][2],N=L[1][0],H=L[1][1],re=L[1][2],oe=function(Wt){var Nt=Wt[0],$t=Wt[1],sr=Wt[2];return!(Nt<G||Nt>N||$t<Z||$t>H||sr<j||sr>re)},_e=s.distance(L[0],L[1]),Ce=10*_e/C,Le=Ce*Ce,ge=1,ie=0,Se=x.length;Se>1&&(ge=p(x));for(var Ee=0;Ee<Se;Ee++){var Ae=s.create();s.copy(Ae,x[Ee]);var Be=[Ae],Pe=[],me=z(Ae),De=Ae;Pe.push(me);var ce=[],je=O(Ae,me),lt=s.length(je);isFinite(lt)&&lt>ie&&(ie=lt),ce.push(lt),U.push({points:Be,velocities:Pe,divergences:ce});for(var pt=0;pt<C*100&&Be.length<C&&oe(Ae);){pt++;var Vt=s.clone(me),ot=s.squaredLength(Vt);if(ot===0)break;if(ot>Le&&s.scale(Vt,Vt,Ce/Math.sqrt(ot)),s.add(Vt,Vt,Ae),me=z(Vt),s.squaredDistance(De,Vt)-Le>-1e-4*Le){Be.push(Vt),De=Vt,Pe.push(me);var je=O(Vt,me),lt=s.length(je);isFinite(lt)&&lt>ie&&(ie=lt),ce.push(lt)}Ae=Vt}}var ut=f(U,T.colormap,ie,ge);return g?ut.tubeScale=g:(ie===0&&(ie=1),ut.tubeScale=M*.5*ge/ie),ut};var k=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(T,L){return E(T,L,{shaders:k,traceType:\"streamtube\"})}},7827:function(i){i.exports=[\"<<=\",\">>=\",\"++\",\"--\",\"<<\",\">>\",\"<=\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"+=\",\"-=\",\"*=\",\"/=\",\"%=\",\"&=\",\"^^\",\"^=\",\"|=\",\"(\",\")\",\"[\",\"]\",\".\",\"!\",\"~\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\">\",\"&\",\"^\",\"|\",\"?\",\":\",\"=\",\",\",\";\",\"{\",\"}\"]},7842:function(i,a,o){\"use strict\";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,_){if(s(v))return _?h(v,d(_)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v==\"string\")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(_))p.mul(_[1]),k=_[0].clone();else if(l(_))k=_.clone();else if(typeof _==\"string\")k=c(_);else if(!_)k=u(1);else if(_===Math.floor(_))k=u(_);else{for(;_!==Math.floor(_);)_=_*Math.pow(2,256),b+=256;k=u(_)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},7894:function(i){i.exports=a;function a(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat([\"layout\",\"centroid\",\"smooth\",\"case\",\"mat2x2\",\"mat2x3\",\"mat2x4\",\"mat3x2\",\"mat3x3\",\"mat3x4\",\"mat4x2\",\"mat4x3\",\"mat4x4\",\"uvec2\",\"uvec3\",\"uvec4\",\"samplerCubeShadow\",\"sampler2DArray\",\"sampler2DArrayShadow\",\"isampler2D\",\"isampler3D\",\"isamplerCube\",\"isampler2DArray\",\"usampler2D\",\"usampler3D\",\"usamplerCube\",\"usampler2DArray\",\"coherent\",\"restrict\",\"readonly\",\"writeonly\",\"resource\",\"atomic_uint\",\"noperspective\",\"patch\",\"sample\",\"subroutine\",\"common\",\"partition\",\"active\",\"filter\",\"image1D\",\"image2D\",\"image3D\",\"imageCube\",\"iimage1D\",\"iimage2D\",\"iimage3D\",\"iimageCube\",\"uimage1D\",\"uimage2D\",\"uimage3D\",\"uimageCube\",\"image1DArray\",\"image2DArray\",\"iimage1DArray\",\"iimage2DArray\",\"uimage1DArray\",\"uimage2DArray\",\"image1DShadow\",\"image2DShadow\",\"image1DArrayShadow\",\"image2DArrayShadow\",\"imageBuffer\",\"iimageBuffer\",\"uimageBuffer\",\"sampler1DArray\",\"sampler1DArrayShadow\",\"isampler1D\",\"isampler1DArray\",\"usampler1D\",\"usampler1DArray\",\"isampler2DRect\",\"usampler2DRect\",\"samplerBuffer\",\"isamplerBuffer\",\"usamplerBuffer\",\"sampler2DMS\",\"isampler2DMS\",\"usampler2DMS\",\"sampler2DMSArray\",\"isampler2DMSArray\",\"usampler2DMSArray\"])},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},8105:function(i){\"use strict\";i.exports=o;var a={\"lo===p0\":s,\"lo<p0\":l,\"lo<=p0\":u,\"hi<=p0\":c,\"lo<p0&&p0<=hi\":h,\"lo<=p0&&p0<=hi\":f,\"!(lo>=p0)&&!(p1>=hi)\":d};function o(v){return a[v]}function s(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g];if(z===T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function l(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g];if(z<T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function u(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+P];if(z<=T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function c(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+P];if(z<=T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function f(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g],O=k[x+P];if(z<=T&&T<=O)if(M===A)M+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=E[A];E[A]=E[M],E[M++]=Z}}return M}function h(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g],O=k[x+P];if(z<T&&T<=O)if(M===A)M+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=E[A];E[A]=E[M],E[M++]=Z}}return M}function d(v,_,b,p,k,E,T,L){for(var x=2*v,C=x*b,M=C,g=b,P=_,A=v+_,z=b;p>z;++z,C+=x){var O=k[C+P],U=k[C+A];if(!(O>=T)&&!(L>=U))if(g===z)g+=1,M+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[M],k[M++]=Z}var j=E[z];E[z]=E[g],E[g++]=j}}return g}},8107:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},8116:function(i,a,o){\"use strict\";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,v){var _=f.createVertexArray?new u(f):f.getExtension(\"OES_vertex_array_object\"),b;return _?b=s(f,_):b=l(f),b.update(h,d,v),b}i.exports=c},8192:function(i,a,o){i.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),v=s(h[0],h[1],h[2]);l(d,d),l(v,v);var _=u(d,v);return _>1?0:Math.acos(_)}},8210:function(i){\"use strict\";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,v=0,_=0,b=Math.abs,p=s[v],k=b(p),E=l[_],T=b(E),L,x;k<T?(x=p,v+=1,v<u&&(p=s[v],k=b(p))):(x=E,_+=1,_<c&&(E=l[_],T=b(E))),v<u&&k<T||_>=c?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=E,_+=1,_<c&&(E=l[_],T=b(E)));for(var C=L+x,M=C-L,g=x-M,P=g,A=C,z,O,U,G,Z;v<u&&_<c;)k<T?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=E,_+=1,_<c&&(E=l[_],T=b(E))),x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z;for(;v<u;)L=p,x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z,v+=1,v<u&&(p=s[v]);for(;_<c;)L=E,x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z,_+=1,_<c&&(E=l[_]);return P&&(h[d++]=P),A&&(h[d++]=A),d||(h[d++]=0),h.length=d,h}},8277:function(i){\"use strict\";function a(){return function(f,h,d,v,_){var b=f[0],p=f[1],k=f[2],E=d[0],T=d[1],L=d[2],x=[0,0,0];v|=0;var C=0,M=0,g=0,P=L,A=T-k*L,z=E-p*T;for(g=0;g<b;++g){for(M=0;M<p;++M){for(C=0;C<k;++C){{var O=_,U;for(U=0;U<x.length-1;++U)O=O[x[U]];h[v]=O[x[x.length-1]]}v+=P,++x[2]}v+=A,x[2]-=k,++x[1]}v+=z,x[1]-=p,++x[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,_){var b=v.dtype,p=v.order,k=[b,p.join()].join(),E=h[k];return E||(h[k]=E=f([b,p])),E(v.shape.slice(0),v.data,v.stride,v.offset|0,_)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:\"convert\"})},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,\"valueOf\",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;v<f;++v)h[v]=[0,0,0];for(var v=0;v<l.length;++v)for(var _=l[v],b=0,p=_[_.length-1],k=_[0],E=0;E<_.length;++E){b=p,p=k,k=_[(E+1)%_.length];for(var T=u[b],L=u[p],x=u[k],C=new Array(3),M=0,g=new Array(3),P=0,A=0;A<3;++A)C[A]=T[A]-L[A],M+=C[A]*C[A],g[A]=x[A]-L[A],P+=g[A]*g[A];if(M*P>d)for(var z=h[p],O=1/Math.sqrt(M*P),A=0;A<3;++A){var U=(A+1)%3,G=(A+2)%3;z[A]+=O*(g[U]*C[G]-g[G]*C[U])}}for(var v=0;v<f;++v){for(var z=h[v],Z=0,A=0;A<3;++A)Z+=z[A]*z[A];if(Z>d)for(var O=1/Math.sqrt(Z),A=0;A<3;++A)z[A]*=O;else for(var A=0;A<3;++A)z[A]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;v<f;++v){for(var _=l[v],b=new Array(3),p=0;p<3;++p)b[p]=u[_[p]];for(var k=new Array(3),E=new Array(3),p=0;p<3;++p)k[p]=b[1][p]-b[0][p],E[p]=b[2][p]-b[0][p];for(var T=new Array(3),L=0,p=0;p<3;++p){var x=(p+1)%3,C=(p+2)%3;T[p]=k[x]*E[C]-k[C]*E[x],L+=T[p]*T[p]}L>d?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)T[p]*=L;h[v]=T}return h}},8418:function(i,a,o){\"use strict\";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function k(Ae){return b.isView(Ae)&&!(Ae instanceof p)}function E(Ae){return Array.isArray(Ae)||k(Ae)}i.exports=Ee;function T(Ae,Be){var Pe=Ae[0],me=Ae[1],De=Ae[2],ce=Ae[3];return Ae[0]=Be[0]*Pe+Be[4]*me+Be[8]*De+Be[12]*ce,Ae[1]=Be[1]*Pe+Be[5]*me+Be[9]*De+Be[13]*ce,Ae[2]=Be[2]*Pe+Be[6]*me+Be[10]*De+Be[14]*ce,Ae[3]=Be[3]*Pe+Be[7]*me+Be[11]*De+Be[15]*ce,Ae}function L(Ae,Be,Pe,me){return T(me,me,Pe),T(me,me,Be),T(me,me,Ae)}function x(Ae,Be){this.index=Ae,this.dataCoordinate=this.position=Be}function C(Ae){return Ae===!0||Ae>1?1:Ae}function M(Ae,Be,Pe,me,De,ce,je,lt,pt,Vt,ot,ut){this.gl=Ae,this.pixelRatio=1,this.shader=Be,this.orthoShader=Pe,this.projectShader=me,this.pointBuffer=De,this.colorBuffer=ce,this.glyphBuffer=je,this.idBuffer=lt,this.vao=pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Vt,this.pickOrthoShader=ot,this.pickProjectShader=ut,this.points=[],this._selectResult=new x(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}var g=M.prototype;g.pickSlots=1,g.setPickBase=function(Ae){this.pickId=Ae},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],A=[0,0,0],z=[0,0,0],O=[0,0,0,1],U=[0,0,0,1],G=_.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function H(Ae,Be){return Ae[0]=Be[0],Ae[1]=Be[1],Ae[2]=Be[2],Ae[3]=1,Ae}function re(Ae,Be,Pe,me){return Ae[0]=Be[0],Ae[1]=Be[1],Ae[2]=Be[2],Ae[Pe]=me,Ae}function oe(Ae){for(var Be=j,Pe=0;Pe<2;++Pe)for(var me=0;me<3;++me)Be[Pe][me]=Math.max(Math.min(Ae[Pe][me],1e8),-1e8);return Be}function _e(Ae,Be,Pe,me){var De=Be.axesProject,ce=Be.gl,je=Ae.uniforms,lt=Pe.model||_,pt=Pe.view||_,Vt=Pe.projection||_,ot=Be.axesBounds,ut=oe(Be.clipBounds),Wt;Be.axes&&Be.axes.lastCubeProps?Wt=Be.axes.lastCubeProps.axis:Wt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),je.view=pt,je.projection=Vt,je.screenSize=P,je.highlightId=Be.highlightId,je.highlightScale=Be.highlightScale,je.clipBounds=ut,je.pickGroup=Be.pickId/255,je.pixelRatio=me;for(var Nt=0;Nt<3;++Nt)if(De[Nt]){je.scale=Be.projectScale[Nt],je.opacity=Be.projectOpacity[Nt];for(var $t=G,sr=0;sr<16;++sr)$t[sr]=0;for(var sr=0;sr<4;++sr)$t[5*sr]=1;$t[5*Nt]=0,Wt[Nt]<0?$t[12+Nt]=ot[0][Nt]:$t[12+Nt]=ot[1][Nt],f($t,lt,$t),je.model=$t;var Tr=(Nt+1)%3,fr=(Nt+2)%3,$e=N(A),St=N(z);$e[Tr]=1,St[fr]=1;var Qt=L(Vt,pt,lt,H(O,$e)),Gt=L(Vt,pt,lt,H(U,St));if(Math.abs(Qt[1])>Math.abs(Gt[1])){var _t=Qt;Qt=Gt,Gt=_t,_t=$e,$e=St,St=_t;var It=Tr;Tr=fr,fr=It}Qt[0]<0&&($e[Tr]=-1),Gt[1]>0&&(St[fr]=-1);for(var mt=0,er=0,sr=0;sr<4;++sr)mt+=Math.pow(lt[4*Tr+sr],2),er+=Math.pow(lt[4*fr+sr],2);$e[Tr]/=Math.sqrt(mt),St[fr]/=Math.sqrt(er),je.axes[0]=$e,je.axes[1]=St,je.fragClipBounds[0]=re(Z,ut[0],Nt,-1e8),je.fragClipBounds[1]=re(Z,ut[1],Nt,1e8),Be.vao.bind(),Be.vao.draw(ce.TRIANGLES,Be.vertexCount),Be.lineWidth>0&&(ce.lineWidth(Be.lineWidth*me),Be.vao.draw(ce.LINES,Be.lineVertexCount,Be.vertexCount)),Be.vao.unbind()}}var Ce=[-1e8,-1e8,-1e8],Le=[1e8,1e8,1e8],ge=[Ce,Le];function ie(Ae,Be,Pe,me,De,ce,je){var lt=Pe.gl;if((ce===Pe.projectHasAlpha||je)&&_e(Be,Pe,me,De),ce===Pe.hasAlpha||je){Ae.bind();var pt=Ae.uniforms;pt.model=me.model||_,pt.view=me.view||_,pt.projection=me.projection||_,P[0]=2/lt.drawingBufferWidth,P[1]=2/lt.drawingBufferHeight,pt.screenSize=P,pt.highlightId=Pe.highlightId,pt.highlightScale=Pe.highlightScale,pt.fragClipBounds=ge,pt.clipBounds=Pe.axes.bounds,pt.opacity=Pe.opacity,pt.pickGroup=Pe.pickId/255,pt.pixelRatio=De,Pe.vao.bind(),Pe.vao.draw(lt.TRIANGLES,Pe.vertexCount),Pe.lineWidth>0&&(lt.lineWidth(Pe.lineWidth*De),Pe.vao.draw(lt.LINES,Pe.lineVertexCount,Pe.vertexCount)),Pe.vao.unbind()}}g.draw=function(Ae){var Be=this.useOrtho?this.orthoShader:this.shader;ie(Be,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},g.drawTransparent=function(Ae){var Be=this.useOrtho?this.orthoShader:this.shader;ie(Be,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},g.drawPick=function(Ae){var Be=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(Be,this.pickProjectShader,this,Ae,1,!0,!0)},g.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var Be=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(Be>=this.pointCount||Be<0)return null;var Pe=this.points[Be],me=this._selectResult;me.index=Be;for(var De=0;De<3;++De)me.position[De]=me.dataCoordinate[De]=Pe[De];return me},g.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var Be=Ae.index,Pe=Be&255,me=Be>>8&255,De=Be>>16&255;this.highlightId=[Pe/255,me/255,De/255,0]}};function Se(Ae,Be,Pe,me){var De;E(Ae)?Be<Ae.length?De=Ae[Be]:De=void 0:De=Ae,De=v(De);var ce=!0;s(De)&&(De=\"\\u25BC\",ce=!1),Pe||(Pe={});var je=Pe.family;E(je)&&(je=je[Be]),je||(je=\"normal\");var lt=Pe.weight;E(lt)&&(lt=lt[Be]),lt||(lt=\"normal\");var pt=Pe.style;E(pt)&&(pt=pt[Be]),pt||(pt=\"normal\");var Vt=Pe.variant;E(Vt)&&(Vt=Vt[Be]),Vt||(Vt=\"normal\");var ot=d(De,{family:je,weight:lt,style:pt,variant:Vt},me),ot=d(De,Pe,me);return{mesh:ot[0],lines:ot[1],bounds:ot[2],visible:ce}}g.update=function(Ae){if(Ae=Ae||{},\"perspective\"in Ae&&(this.useOrtho=!Ae.perspective),\"orthographic\"in Ae&&(this.useOrtho=!!Ae.orthographic),\"lineWidth\"in Ae&&(this.lineWidth=Ae.lineWidth),\"project\"in Ae)if(E(Ae.project))this.axesProject=Ae.project;else{var Be=!!Ae.project;this.axesProject=[Be,Be,Be]}if(\"projectScale\"in Ae)if(E(Ae.projectScale))this.projectScale=Ae.projectScale.slice();else{var Pe=+Ae.projectScale;this.projectScale=[Pe,Pe,Pe]}if(this.projectHasAlpha=!1,\"projectOpacity\"in Ae){if(E(Ae.projectOpacity))this.projectOpacity=Ae.projectOpacity.slice();else{var Pe=+Ae.projectOpacity;this.projectOpacity=[Pe,Pe,Pe]}for(var me=0;me<3;++me)this.projectOpacity[me]=C(this.projectOpacity[me]),this.projectOpacity[me]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,\"opacity\"in Ae&&(this.opacity=C(Ae.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var De=Ae.position,ce={family:Ae.font||\"normal\",style:Ae.fontStyle||\"normal\",weight:Ae.fontWeight||\"normal\",variant:Ae.fontVariant||\"normal\"},je=Ae.alignment||[0,0],lt,pt;if(je.length===2)lt=je[0],pt=je[1];else{lt=[],pt=[];for(var me=0;me<je.length;++me)lt[me]=je[me][0],pt[me]=je[me][1]}var Vt=[1/0,1/0,1/0],ot=[-1/0,-1/0,-1/0],ut=Ae.glyph,Wt=Ae.color,Nt=Ae.size,$t=Ae.angle,sr=Ae.lineColor,Tr=-1,fr=0,$e=0,St=0;if(De.length){St=De.length;e:for(var me=0;me<St;++me){for(var Qt=De[me],Gt=0;Gt<3;++Gt)if(isNaN(Qt[Gt])||!isFinite(Qt[Gt]))continue e;var _t=Se(ut,me,ce,this.pixelRatio),It=_t.mesh,mt=_t.lines,er=_t.bounds;fr+=It.cells.length*3,$e+=mt.edges.length*2}}var lr=fr+$e,wr=c.mallocFloat(3*lr),Lr=c.mallocFloat(4*lr),ti=c.mallocFloat(2*lr),Br=c.mallocUint32(lr);if(lr>0){var Vr=0,dt=fr,Ge=[0,0,0,1],Je=[0,0,0,1],We=E(Wt)&&E(Wt[0]),tt=E(sr)&&E(sr[0]);e:for(var me=0;me<St;++me){Tr+=1;for(var Qt=De[me],Gt=0;Gt<3;++Gt){if(isNaN(Qt[Gt])||!isFinite(Qt[Gt]))continue e;ot[Gt]=Math.max(ot[Gt],Qt[Gt]),Vt[Gt]=Math.min(Vt[Gt],Qt[Gt])}var _t=Se(ut,me,ce,this.pixelRatio),It=_t.mesh,mt=_t.lines,er=_t.bounds,xt=_t.visible;if(!xt)Ge=[1,1,1,0];else if(E(Wt)){var Ie;if(We?me<Wt.length?Ie=Wt[me]:Ie=[0,0,0,0]:Ie=Wt,Ie.length===3){for(var Gt=0;Gt<3;++Gt)Ge[Gt]=Ie[Gt];Ge[3]=1}else if(Ie.length===4){for(var Gt=0;Gt<4;++Gt)Ge[Gt]=Ie[Gt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else Ge[0]=Ge[1]=Ge[2]=0,Ge[3]=1;if(!xt)Je=[1,1,1,0];else if(E(sr)){var Ie;if(tt?me<sr.length?Ie=sr[me]:Ie=[0,0,0,0]:Ie=sr,Ie.length===3){for(var Gt=0;Gt<3;++Gt)Je[Gt]=Ie[Gt];Je[Gt]=1}else if(Ie.length===4){for(var Gt=0;Gt<4;++Gt)Je[Gt]=Ie[Gt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else Je[0]=Je[1]=Je[2]=0,Je[3]=1;var xe=.5;xt?E(Nt)?me<Nt.length?xe=+Nt[me]:xe=12:Nt?xe=+Nt:this.useOrtho&&(xe=12):xe=0;var ke=0;E($t)?me<$t.length?ke=+$t[me]:ke=0:$t&&(ke=+$t);for(var vt=Math.cos(ke),ir=Math.sin(ke),Qt=De[me],Gt=0;Gt<3;++Gt)ot[Gt]=Math.max(ot[Gt],Qt[Gt]),Vt[Gt]=Math.min(Vt[Gt],Qt[Gt]);var ar=lt,vr=pt,ar=0;E(lt)?me<lt.length?ar=lt[me]:ar=0:lt&&(ar=lt);var vr=0;E(pt)?me<pt.length?vr=pt[me]:vr=0:pt&&(vr=pt),ar*=ar>0?1-er[0][0]:ar<0?1+er[1][0]:1,vr*=vr>0?1-er[0][1]:vr<0?1+er[1][1]:1;for(var ii=[ar,vr],In=It.cells||[],wi=It.positions||[],Gt=0;Gt<In.length;++Gt)for(var pi=In[Gt],$r=0;$r<3;++$r){for(var di=0;di<3;++di)wr[3*Vr+di]=Qt[di];for(var di=0;di<4;++di)Lr[4*Vr+di]=Ge[di];Br[Vr]=Tr;var ji=wi[pi[$r]];ti[2*Vr]=xe*(vt*ji[0]-ir*ji[1]+ii[0]),ti[2*Vr+1]=xe*(ir*ji[0]+vt*ji[1]+ii[1]),Vr+=1}for(var In=mt.edges,wi=mt.positions,Gt=0;Gt<In.length;++Gt)for(var pi=In[Gt],$r=0;$r<2;++$r){for(var di=0;di<3;++di)wr[3*dt+di]=Qt[di];for(var di=0;di<4;++di)Lr[4*dt+di]=Je[di];Br[dt]=Tr;var ji=wi[pi[$r]];ti[2*dt]=xe*(vt*ji[0]-ir*ji[1]+ii[0]),ti[2*dt+1]=xe*(ir*ji[0]+vt*ji[1]+ii[1]),dt+=1}}}this.bounds=[Vt,ot],this.points=De,this.pointCount=De.length,this.vertexCount=fr,this.lineVertexCount=$e,this.pointBuffer.update(wr),this.colorBuffer.update(Lr),this.glyphBuffer.update(ti),this.idBuffer.update(Br),c.free(wr),c.free(Lr),c.free(ti),c.free(Br)},g.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()};function Ee(Ae){var Be=Ae.gl,Pe=h.createPerspective(Be),me=h.createOrtho(Be),De=h.createProject(Be),ce=h.createPickPerspective(Be),je=h.createPickOrtho(Be),lt=h.createPickProject(Be),pt=l(Be),Vt=l(Be),ot=l(Be),ut=l(Be),Wt=u(Be,[{buffer:pt,size:3,type:Be.FLOAT},{buffer:Vt,size:4,type:Be.FLOAT},{buffer:ot,size:2,type:Be.FLOAT},{buffer:ut,size:4,type:Be.UNSIGNED_BYTE,normalized:!0}]),Nt=new M(Be,Pe,me,De,pt,Vt,ot,ut,Wt,ce,je,lt);return Nt.update(Ae),Nt}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),_=a(u[0],u[1]);return a(v,l[2])-a(_,u[2])||a(v+l[2],h)-a(_+u[2],d);case 4:var b=l[0],p=l[1],k=l[2],E=l[3],T=u[0],L=u[1],x=u[2],C=u[3];return b+p+k+E-(T+L+x+C)||a(b,p,k,E)-a(T,L,x,C,T)||a(b+p,b+k,b+E,p+k,p+E,k+E)-a(T+L,T+x,T+C,L+x,L+C,x+C)||a(b+p+k,b+p+E,b+k+E,p+k+E)-a(T+L+x,T+L+C,T+x+C,L+x+C);default:for(var M=l.slice().sort(o),g=u.slice().sort(o),P=0;P<c;++P)if(f=M[P]-g[P],f)return f;return 0}}},8512:function(i,a,o){\"use strict\";var s=o(665);i.exports=l;function l(u,c,f){typeof u==\"function\"&&(f=!!c,c=u,u=window);var h=s(\"ex\",u),d=function(v){f&&v.preventDefault();var _=v.deltaX||0,b=v.deltaY||0,p=v.deltaZ||0,k=v.deltaMode,E=1;switch(k){case 1:E=h;break;case 2:E=window.innerHeight;break}if(_*=E,b*=E,p*=E,_||b||p)return c(_,b,p,v)};return u.addEventListener(\"wheel\",d),d}},8545:function(i){\"use strict\";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,_=0,b=Math.abs,p=s[v],k=b(p),E=-l[_],T=b(E),L,x;k<T?(x=p,v+=1,v<u&&(p=s[v],k=b(p))):(x=E,_+=1,_<c&&(E=-l[_],T=b(E))),v<u&&k<T||_>=c?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=E,_+=1,_<c&&(E=-l[_],T=b(E)));for(var C=L+x,M=C-L,g=x-M,P=g,A=C,z,O,U,G,Z;v<u&&_<c;)k<T?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=E,_+=1,_<c&&(E=-l[_],T=b(E))),x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z;for(;v<u;)L=p,x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z,v+=1,v<u&&(p=s[v]);for(;_<c;)L=E,x=P,C=L+x,M=C-L,g=x-M,g&&(h[d++]=g),z=A+C,O=z-A,U=z-O,G=C-O,Z=A-U,P=Z+G,A=z,_+=1,_<c&&(E=-l[_]);return P&&(h[d++]=P),A&&(h[d++]=A),d||(h[d++]=0),h.length=d,h}},8572:function(i){\"use strict\";i.exports=function(o){return o<0?-1:o>0?1:0}},8648:function(i,a,o){i.exports=o(783)},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+h*_-d*v,o[1]=f+h*v+d*_,o[2]=s[2],o}},8697:function(i,a,o){\"use strict\";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},8731:function(i,a,o){\"use strict\";i.exports=d;var s=o(8866);function l(v,_,b,p,k,E){this._gl=v,this._wrapper=_,this._index=b,this._locations=p,this._dimension=k,this._constFunc=E}var u=l.prototype;u.pointer=function(_,b,p,k){var E=this,T=E._gl,L=E._locations[E._index];T.vertexAttribPointer(L,E._dimension,_||T.FLOAT,!!b,p||0,k||0),T.enableVertexAttribArray(L)},u.set=function(v,_,b,p){return this._constFunc(this._locations[this._index],v,_,b,p)},Object.defineProperty(u,\"location\",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var c=[function(v,_,b){return b.length===void 0?v.vertexAttrib1f(_,b):v.vertexAttrib1fv(_,b)},function(v,_,b,p){return b.length===void 0?v.vertexAttrib2f(_,b,p):v.vertexAttrib2fv(_,b)},function(v,_,b,p,k){return b.length===void 0?v.vertexAttrib3f(_,b,p,k):v.vertexAttrib3fv(_,b)},function(v,_,b,p,k,E){return b.length===void 0?v.vertexAttrib4f(_,b,p,k,E):v.vertexAttrib4fv(_,b)}];function f(v,_,b,p,k,E,T){var L=c[k],x=new l(v,_,b,p,k,L);Object.defineProperty(E,T,{set:function(C){return v.disableVertexAttribArray(p[b]),L(v,p[b],C),C},get:function(){return x},enumerable:!0})}function h(v,_,b,p,k,E,T){for(var L=new Array(k),x=new Array(k),C=0;C<k;++C)f(v,_,b[C],p,k,L,C),x[C]=L[C];Object.defineProperty(L,\"location\",{set:function(P){if(Array.isArray(P))for(var A=0;A<k;++A)x[A].location=P[A];else for(var A=0;A<k;++A)x[A].location=P+A;return P},get:function(){for(var P=new Array(k),A=0;A<k;++A)P[A]=p[b[A]];return P},enumerable:!0}),L.pointer=function(P,A,z,O){P=P||v.FLOAT,A=!!A,z=z||k*k,O=O||0;for(var U=0;U<k;++U){var G=p[b[U]];v.vertexAttribPointer(G,k,P,A,z,O+U*k),v.enableVertexAttribArray(G)}};var M=new Array(k),g=v[\"vertexAttrib\"+k+\"fv\"];Object.defineProperty(E,T,{set:function(P){for(var A=0;A<k;++A){var z=p[b[A]];if(v.disableVertexAttribArray(z),Array.isArray(P[0]))g.call(v,z,P[A]);else{for(var O=0;O<k;++O)M[O]=P[k*A+O];g.call(v,z,M)}}return P},get:function(){return L},enumerable:!0})}function d(v,_,b,p){for(var k={},E=0,T=b.length;E<T;++E){var L=b[E],x=L.name,C=L.type,M=L.locations;switch(C){case\"bool\":case\"int\":case\"float\":f(v,_,M[0],p,1,k,x);break;default:if(C.indexOf(\"vec\")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s(\"\",\"Invalid data type for attribute \"+x+\": \"+C);f(v,_,M[0],p,g,k,x)}else if(C.indexOf(\"mat\")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s(\"\",\"Invalid data type for attribute \"+x+\": \"+C);h(v,_,M,p,g,k,x)}else throw new s(\"\",\"Unknown data type for attribute \"+x+\": \"+C);break}}return k}},8828:function(i,a){\"use strict\";\"use restrict\";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},8866:function(i){function a(o,s,l){this.shortMessage=s||\"\",this.longMessage=l||\"\",this.rawError=o||\"\",this.message=\"gl-shader: \"+(s||o||\"\")+(l?`\n",
       "`+l:\"\"),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name=\"GLError\",a.prototype.constructor=a,i.exports=a},8902:function(i,a,o){\"use strict\";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=T;function h(L,x,C,M,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=M,this.upperIds=g}function d(L,x,C,M){this.a=L,this.b=x,this.type=C,this.idx=M}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function _(L,x){return l(L.a,L.b,x)}function b(L,x,C,M,g){for(var P=s.lt(x,M,_),A=s.gt(x,M,_),z=P;z<A;++z){for(var O=x[z],U=O.lowerIds,Z=U.length;Z>1&&l(C[U[Z-2]],C[U[Z-1]],M)>0;)L.push([U[Z-1],U[Z-2],g]),Z-=1;U.length=Z,U.push(g);for(var G=O.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],M)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]<x.a[0]?C=l(L.a,L.b,x.a):C=l(x.b,x.a,L.a),C||(x.b[0]<L.b[0]?C=l(L.a,L.b,x.b):C=l(x.b,x.a,L.b),C||L.idx-x.idx)}function k(L,x,C){var M=s.le(L,C,p),g=L[M],P=g.upperIds,A=P[P.length-1];g.upperIds=[A],L.splice(M+1,0,new h(C.a,C.b,C.idx,[A],P))}function E(L,x,C){var M=C.a;C.a=C.b,C.b=M;var g=s.eq(L,C,p),P=L[g],A=L[g-1];A.upperIds=P.upperIds,L.splice(g,1)}function T(L,x){for(var C=L.length,M=x.length,g=[],P=0;P<C;++P)g.push(new d(L[P],null,u,P));for(var P=0;P<M;++P){var A=x[P],z=L[A[0]],O=L[A[1]];z[0]<O[0]?g.push(new d(z,O,f,P),new d(O,z,c,P)):z[0]>O[0]&&g.push(new d(O,z,f,P),new d(z,O,c,P))}g.sort(v);for(var U=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([U,1],[U,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P<j;++P){var N=g[P],H=N.type;H===u?b(Z,G,L,N.a,N.idx):H===f?k(G,L,N):E(G,L,N)}return Z}},8954:function(i,a,o){\"use strict\";i.exports=p;var s=o(3250),l=o(6803).Fw;function u(k,E,T){this.vertices=k,this.adjacent=E,this.boundary=T,this.lastVisited=-1}u.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var E=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=E};function c(k,E,T){this.vertices=k,this.cell=E,this.index=T}function f(k,E){return l(k.vertices,E.vertices)}function h(k){return function(){var E=this.tuple;return k.apply(this,E)}}function d(k){var E=s[k+1];return E||(E=s),h(E)}var v=[];function _(k,E,T){this.dimension=k,this.vertices=E,this.simplices=T,this.interior=T.filter(function(C){return!C.boundary}),this.tuple=new Array(k+1);for(var L=0;L<=k;++L)this.tuple[L]=this.vertices[L];var x=v[k];x||(x=v[k]=d(k)),this.orient=x}var b=_.prototype;b.handleBoundaryDegeneracy=function(k,E){var T=this.dimension,L=this.vertices.length-1,x=this.tuple,C=this.vertices,M=[k];for(k.lastVisited=-L;M.length>0;){k=M.pop();for(var g=k.adjacent,P=0;P<=T;++P){var A=g[P];if(!(!A.boundary||A.lastVisited<=-L)){for(var z=A.vertices,O=0;O<=T;++O){var U=z[O];U<0?x[O]=E:x[O]=C[U]}var G=this.orient();if(G>0)return A;A.lastVisited=-L,G===0&&M.push(A)}}}return null},b.walk=function(k,E){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[M];e:for(;!g.boundary;){for(var P=g.vertices,A=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=T;for(var z=0;z<=L;++z){var O=A[z];if(!(O.lastVisited>=T)){var U=C[z];C[z]=k;var G=this.orient();if(C[z]=U,G<0){g=O;continue e}else O.boundary?O.lastVisited=-T:O.lastVisited=T}}return}return g},b.addPeaks=function(k,E){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=this.interior,g=this.simplices,P=[E];E.lastVisited=T,E.vertices[E.vertices.indexOf(-1)]=T,E.boundary=!1,M.push(E);for(var A=[];P.length>0;){var E=P.pop(),z=E.vertices,O=E.adjacent,U=z.indexOf(T);if(!(U<0)){for(var G=0;G<=L;++G)if(G!==U){var Z=O[G];if(!(!Z.boundary||Z.lastVisited>=T)){var j=Z.vertices;if(Z.lastVisited!==-T){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var re=this.orient();if(re>0){j[N]=T,Z.boundary=!1,M.push(Z),P.push(Z),Z.lastVisited=T;continue}else Z.lastVisited=-T}var oe=Z.adjacent,_e=z.slice(),Ce=O.slice(),Le=new u(_e,Ce,!0);g.push(Le);var ge=oe.indexOf(E);if(!(ge<0)){oe[ge]=Le,Ce[U]=Z,_e[G]=-1,Ce[G]=E,O[G]=Le,Le.flip();for(var H=0;H<=L;++H){var ie=_e[H];if(!(ie<0||ie===T)){for(var Se=new Array(L-1),Ee=0,Ae=0;Ae<=L;++Ae){var Be=_e[Ae];Be<0||Ae===H||(Se[Ee++]=Be)}A.push(new c(Se,Le,H))}}}}}}}A.sort(f);for(var G=0;G+1<A.length;G+=2){var Pe=A[G],me=A[G+1],De=Pe.index,ce=me.index;De<0||ce<0||(Pe.cell.adjacent[Pe.index]=me.cell,me.cell.adjacent[me.index]=Pe.cell)}},b.insert=function(k,E){var T=this.vertices;T.push(k);var L=this.walk(k,E);if(L){for(var x=this.dimension,C=this.tuple,M=0;M<=x;++M){var g=L.vertices[M];g<0?C[M]=k:C[M]=T[g]}var P=this.orient(C);P<0||P===0&&(L=this.handleBoundaryDegeneracy(L,k),!L)||this.addPeaks(k,L)}},b.boundary=function(){for(var k=this.dimension,E=[],T=this.simplices,L=T.length,x=0;x<L;++x){var C=T[x];if(C.boundary){for(var M=new Array(k),g=C.vertices,P=0,A=0,z=0;z<=k;++z)g[z]>=0?M[P++]=g[z]:A=z&1;if(A===(k&1)){var O=M[0];M[0]=M[1],M[1]=O}E.push(M)}}return E};function p(k,E){var T=k.length;if(T===0)throw new Error(\"Must have at least d+1 points\");var L=k[0].length;if(T<=L)throw new Error(\"Must input at least d+1 points\");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error(\"Input not in general position\");for(var M=new Array(L+1),g=0;g<=L;++g)M[g]=g;C<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),A=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var O=M.slice(),U=0;U<=L;++U)U===g&&(O[U]=-1);var G=O[0];O[0]=O[1],O[1]=G;var Z=new u(O,new Array(L+1),!0);A[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var O=A[g].vertices,j=A[g].adjacent,U=0;U<=L;++U){var N=O[U];if(N<0){j[U]=P;continue}for(var H=0;H<=L;++H)A[H].vertices.indexOf(N)<0&&(j[U]=A[H])}for(var re=new _(L,x,z),oe=!!E,g=L+1;g<T;++g)re.insert(k[g],oe);return re.boundary()}},8987:function(i,a,o){\"use strict\";var s=o(7842),l=o(6504);i.exports=u;function u(c,f){for(var h=s(f),d=c.length,v=new Array(d),_=0;_<d;++_)v[_]=l(c[_],h);return v}},9060:function(i,a,o){\"use strict\";var s=o(9405),l=o(2762),u=o(8116),c=o(7766),f=o(6760),h=o(7608),d=o(9618),v=o(6729),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(C,M,g,P,A,z,O,U,G,Z,j){this.gl=C,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=M,this.dirty=!0,this.triShader=g,this.pickShader=P,this.trianglePositions=A,this.triangleVectors=z,this.triangleColors=U,this.triangleUVs=G,this.triangleIds=O,this.triangleVAO=Z,this.triangleCount=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.traceType=j,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=_,this._view=_,this._projection=_,this._resolution=[1,1]}var p=b.prototype;p.isOpaque=function(){return this.opacity>=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var M=v({colormap:C,nshades:256,format:\"rgba\"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var A=M[P],z=0;z<3;++z)g[4*P+z]=A[z];g[4*P+3]=A[3]*255}return d(g,[256,256,4],[4,0,1])}function E(C){for(var M=C.length,g=new Array(M),P=0;P<M;++P)g[P]=C[P][2];return g}p.update=function(C){C=C||{};var M=this.gl;this.dirty=!0,\"lightPosition\"in C&&(this.lightPosition=C.lightPosition),\"opacity\"in C&&(this.opacity=C.opacity),\"ambient\"in C&&(this.ambientLight=C.ambient),\"diffuse\"in C&&(this.diffuseLight=C.diffuse),\"specular\"in C&&(this.specularLight=C.specular),\"roughness\"in C&&(this.roughness=C.roughness),\"fresnel\"in C&&(this.fresnel=C.fresnel),C.tubeScale!==void 0&&(this.tubeScale=C.tubeScale),C.vectorScale!==void 0&&(this.vectorScale=C.vectorScale),C.coneScale!==void 0&&(this.coneScale=C.coneScale),C.coneOffset!==void 0&&(this.coneOffset=C.coneOffset),C.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=M.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=M.LINEAR,this.texture.setPixels(k(C.colormap)),this.texture.generateMipmap());var g=C.cells,P=C.positions,A=C.vectors;if(!(!P||!g||!A)){var z=[],O=[],U=[],G=[],Z=[];this.cells=g,this.positions=P,this.vectors=A;var j=C.meshColor||[1,1,1,1],N=C.vertexIntensity,H=1/0,re=-1/0;if(N)if(C.vertexIntensityBounds)H=+C.vertexIntensityBounds[0],re=+C.vertexIntensityBounds[1];else for(var oe=0;oe<N.length;++oe){var _e=N[oe];H=Math.min(H,_e),re=Math.max(re,_e)}else for(var oe=0;oe<P.length;++oe){var _e=P[oe][2];H=Math.min(H,_e),re=Math.max(re,_e)}N?this.intensity=N:this.intensity=E(P),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var oe=0;oe<P.length;++oe)for(var Ce=P[oe],Le=0;Le<3;++Le)isNaN(Ce[Le])||!isFinite(Ce[Le])||(this.bounds[0][Le]=Math.min(this.bounds[0][Le],Ce[Le]),this.bounds[1][Le]=Math.max(this.bounds[1][Le],Ce[Le]));var ge=0;e:for(var oe=0;oe<g.length;++oe){var ie=g[oe];switch(ie.length){case 3:for(var Le=0;Le<3;++Le)for(var Se=ie[Le],Ce=P[Se],Ee=0;Ee<3;++Ee)if(isNaN(Ce[Ee])||!isFinite(Ce[Ee]))continue e;for(var Le=0;Le<3;++Le){var Se=ie[2-Le],Ce=P[Se];z.push(Ce[0],Ce[1],Ce[2],Ce[3]);var Ae=A[Se];O.push(Ae[0],Ae[1],Ae[2],Ae[3]||0);var Be=j;Be.length===3?U.push(Be[0],Be[1],Be[2],1):U.push(Be[0],Be[1],Be[2],Be[3]);var Pe;N?Pe=[(N[Se]-H)/(re-H),0]:Pe=[(Ce[2]-H)/(re-H),0],G.push(Pe[0],Pe[1]),Z.push(oe)}ge+=1;break;default:break}}this.triangleCount=ge,this.trianglePositions.update(z),this.triangleVectors.update(O),this.triangleColors.update(U),this.triangleUVs.update(G),this.triangleIds.update(new Uint32Array(Z))}},p.drawTransparent=p.draw=function(C){C=C||{};for(var M=this.gl,g=C.model||_,P=C.view||_,A=C.projection||_,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);var U={model:g,view:P,projection:A,inverseModel:_.slice(),clipBounds:z,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,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};U.inverseModel=h(U.inverseModel,U.model),M.disable(M.CULL_FACE),this.texture.bind(0);var G=new Array(16);f(G,U.view,U.model),f(G,U.projection,G),h(G,G);for(var O=0;O<3;++O)U.eyePosition[O]=G[12+O]/G[15];for(var Z=G[15],O=0;O<3;++O)Z+=this.lightPosition[O]*G[4*O+3];for(var O=0;O<3;++O){for(var j=G[12+O],N=0;N<3;++N)j+=G[4*N+O]*this.lightPosition[N];U.lightPosition[O]=j/Z}if(this.triangleCount>0){var H=this.triShader;H.bind(),H.uniforms=U,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var M=this.gl,g=C.model||_,P=C.view||_,A=C.projection||_,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(A),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var U={model:g,view:P,projection:A,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[M],P=this.positions[g[1]].slice(0,3),A={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType===\"cone\"?A.index=Math.floor(g[1]/48):this.traceType===\"streamtube\"&&(A.intensity=this.intensity[g[1]],A.velocity=this.vectors[g[1]].slice(0,3),A.divergence=this.vectors[g[1]][3],A.index=M),A},p.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.triangleIds.dispose()};function T(C,M){var g=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,M){var g=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,M,g){var P=g.shaders;arguments.length===1&&(M=C,C=M.gl);var A=T(C,P),z=L(C,P),O=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=C.LINEAR_MIPMAP_LINEAR,O.magFilter=C.LINEAR;var U=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),re=new b(C,O,A,z,U,G,N,Z,j,H,g.traceType||\"cone\");return re.update(M),re}i.exports=x},9127:function(i,a,o){\"use strict\";i.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9165:function(i,a,o){\"use strict\";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,T){this.gl=p,this.shader=T,this.buffer=k,this.vao=E,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,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,E=this.shader.uniforms;this.shader.bind();var T=E.view=p.view||c,L=E.projection=p.projection||c;E.model=p.model||c,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var x=T[12],C=T[13],M=T[14],g=T[15],P=p._ortho||!1,A=P?2:1,z=A*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*M+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)k.lineWidth(this.lineWidth[O]*this.pixelRatio),E.capSize=this.capSize[O]*z,this.lineCount[O]&&k.drawArrays(k.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function d(p,k){for(var E=0;E<3;++E)p[0][E]=Math.min(p[0][E],k[E]),p[1][E]=Math.max(p[1][E],k[E])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var E=[],T=1;T<=2;++T)for(var L=-1;L<=1;L+=2){var x=(T+k)%3,C=[0,0,0];C[x]=L,E.push(C)}p[k]=E}return p}();function _(p,k,E,T){for(var L=v[T],x=0;x<L.length;++x){var C=L[x];p.push(k[0],k[1],k[2],E[0],E[1],E[2],E[3],C[0],C[1],C[2])}return L.length}h.update=function(p){p=p||{},\"lineWidth\"in p&&(this.lineWidth=p.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),\"capSize\"in p&&(this.capSize=p.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,\"opacity\"in p&&(this.opacity=+p.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=p.color||[[0,0,0],[0,0,0],[0,0,0]],E=p.position,T=p.error;if(Array.isArray(k[0])||(k=[k,k,k]),E&&T){var L=[],x=E.length,C=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var M=0;M<3;++M){this.lineOffset[M]=C;e:for(var g=0;g<x;++g){for(var P=E[g],A=0;A<3;++A)if(isNaN(P[A])||!isFinite(P[A]))continue e;var z=T[g],O=k[M];if(Array.isArray(O[0])&&(O=k[g]),O.length===3?O=[O[0],O[1],O[2],1]:O.length===4&&(O=[O[0],O[1],O[2],O[3]],!this.hasAlpha&&O[3]<1&&(this.hasAlpha=!0)),!(isNaN(z[0][M])||isNaN(z[1][M]))){if(z[0][M]<0){var U=P.slice();U[M]+=z[0][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,U[0],U[1],U[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,U),C+=2+_(L,U,O,M)}if(z[1][M]>0){var U=P.slice();U[M]+=z[1][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,U[0],U[1],U[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,U),C+=2+_(L,U,O,M)}}}this.lineCount[M]=C-this.lineOffset[M]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,E=s(k),T=l(k,[{buffer:E,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,E,T,L);return x.update(p),x}},9215:function(i,a,o){\"use strict\";i.exports=d;var s=o(4769),l=o(2478);function u(v,_,b){return Math.min(_,Math.max(v,b))}function c(v,_,b){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var p=0;p<this.dimension;++p)this.bounds[0][p]=-1/0,this.bounds[1][p]=1/0;this._state=v.slice().reverse(),this._velocity=_.slice().reverse(),this._time=[b],this._scratch=[v.slice(),v.slice(),v.slice(),v.slice(),v.slice()]}var f=c.prototype;f.flush=function(v){var _=l.gt(this._time,v)-1;_<=0||(this._time.splice(0,_),this._state.splice(0,_*this.dimension),this._velocity.splice(0,_*this.dimension))},f.curve=function(v){var _=this._time,b=_.length,p=l.le(_,v),k=this._scratch[0],E=this._state,T=this._velocity,L=this.dimension,x=this.bounds;if(p<0)for(var C=L-1,M=0;M<L;++M,--C)k[M]=E[C];else if(p>=b-1)for(var C=E.length-1,g=v-_[b-1],M=0;M<L;++M,--C)k[M]=E[C]+g*T[C];else{for(var C=L*(p+1)-1,P=_[p],A=_[p+1],z=A-P||1,O=this._scratch[1],U=this._scratch[2],G=this._scratch[3],Z=this._scratch[4],j=!0,M=0;M<L;++M,--C)O[M]=E[C],G[M]=T[C]*z,U[M]=E[C+L],Z[M]=T[C+L]*z,j=j&&O[M]===U[M]&&G[M]===Z[M]&&G[M]===0;if(j)for(var M=0;M<L;++M)k[M]=O[M];else s(O,G,U,Z,(v-P)/z,k)}for(var N=x[0],H=x[1],M=0;M<L;++M)k[M]=u(N[M],H[M],k[M]);return k},f.dcurve=function(v){var _=this._time,b=_.length,p=l.le(_,v),k=this._scratch[0],E=this._state,T=this._velocity,L=this.dimension;if(p>=b-1)for(var x=E.length-1,C=v-_[b-1],M=0;M<L;++M,--x)k[M]=T[x];else{for(var x=L*(p+1)-1,g=_[p],P=_[p+1],A=P-g||1,z=this._scratch[1],O=this._scratch[2],U=this._scratch[3],G=this._scratch[4],Z=!0,M=0;M<L;++M,--x)z[M]=E[x],U[M]=T[x]*A,O[M]=E[x+L],G[M]=T[x+L]*A,Z=Z&&z[M]===O[M]&&U[M]===G[M]&&U[M]===0;if(Z)for(var M=0;M<L;++M)k[M]=0;else{s.derivative(z,U,O,G,(v-g)/A,k);for(var M=0;M<L;++M)k[M]/=A}}return k},f.lastT=function(){var v=this._time;return v[v.length-1]},f.stable=function(){for(var v=this._velocity,_=v.length,b=this.dimension-1;b>=0;--b)if(v[--_])return!1;return!0},f.jump=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1];this._time.push(_,v);for(var C=0;C<2;++C)for(var M=0;M<b;++M)p.push(p[E++]),k.push(0);this._time.push(v);for(var M=b;M>0;--M)p.push(u(L[M-1],x[M-1],arguments[M])),k.push(0)}},f.push=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=v-_,L=this.bounds,x=L[0],C=L[1],M=T>1e-6?1/T:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[E++])*M)}}},f.set=function(v){var _=this.dimension;if(!(v<this.lastT()||arguments.length!==_+1)){var b=this._state,p=this._velocity,k=this.bounds,E=k[0],T=k[1];this._time.push(v);for(var L=_;L>0;--L)b.push(u(E[L-1],T[L-1],arguments[L])),p.push(0)}},f.move=function(v){var _=this.lastT(),b=this.dimension;if(!(v<=_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1],C=v-_,M=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[E++]+P)),k.push(P*M)}}},f.idle=function(v){var _=this.lastT();if(!(v<_)){var b=this.dimension,p=this._state,k=this._velocity,E=p.length-b,T=this.bounds,L=T[0],x=T[1],C=v-_;this._time.push(v);for(var M=b-1;M>=0;--M)p.push(u(L[M],x[M],p[E]+C*k[E])),k.push(0),E+=1}};function h(v){for(var _=new Array(v),b=0;b<v;++b)_[b]=0;return _}function d(v,_,b){switch(arguments.length){case 0:return new c([0],[0],0);case 1:if(typeof v==\"number\"){var p=h(v);return new c(p,p,0)}else return new c(v,h(v.length),0);case 2:if(typeof _==\"number\"){var p=h(v.length);return new c(v,p,+_)}else b=0;case 3:if(v.length!==_.length)throw new Error(\"state and velocity lengths must match\");return new c(v,_,b)}}},9216:function(i){\"use strict\";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\\d+|meego).+mobile|armv7l|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[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!=\"undefined\"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers[\"user-agent\"]==\"string\"&&(c=c.headers[\"user-agent\"]),typeof c!=\"string\")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf(\"Macintosh\")!==-1&&c.indexOf(\"Safari\")!==-1&&(f=!0),f}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},9346:function(i){\"use strict\";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length<h.length&&(a=new Float64Array(h.length),o=new Float64Array(h.length),s=new Float64Array(h.length));for(var v=0;v<h.length;++v)a[v]=u[v]-h[v],o[v]=c[v]-u[v],s[v]=f[v]-u[v];for(var _=0,b=0,p=0,k=0,E=0,T=0,v=0;v<h.length;++v){var L=o[v],x=s[v],C=a[v];_+=L*L,b+=L*x,p+=x*x,k+=C*L,E+=C*x,T+=C*C}var M=Math.abs(_*p-b*b),g=b*E-p*k,P=b*k-_*E,A;if(g+P<=M)if(g<0)P<0&&k<0?(P=0,-k>=_?(g=1,A=_+2*k+T):(g=-k/_,A=k*g+T)):(g=0,E>=0?(P=0,A=T):-E>=p?(P=1,A=p+2*E+T):(P=-E/p,A=E*P+T));else if(P<0)P=0,k>=0?(g=0,A=T):-k>=_?(g=1,A=_+2*k+T):(g=-k/_,A=k*g+T);else{var z=1/M;g*=z,P*=z,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T}else{var O,U,G,Z;g<0?(O=b+k,U=p+E,U>O?(G=U-O,Z=_-2*b+p,G>=Z?(g=1,P=0,A=_+2*k+T):(g=G/Z,P=1-g,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)):(g=0,U<=0?(P=1,A=p+2*E+T):E>=0?(P=0,A=T):(P=-E/p,A=E*P+T))):P<0?(O=b+E,U=_+k,U>O?(G=U-O,Z=_-2*b+p,G>=Z?(P=1,g=0,A=p+2*E+T):(P=G/Z,g=1-P,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)):(P=0,U<=0?(g=1,A=_+2*k+T):k>=0?(g=0,A=T):(g=-k/_,A=k*g+T))):(G=p+E-b-k,G<=0?(g=0,P=1,A=p+2*E+T):(Z=_-2*b+p,G>=Z?(g=1,P=0,A=_+2*k+T):(g=G/Z,P=1-g,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)))}for(var j=1-g-P,v=0;v<h.length;++v)d[v]=j*u[v]+g*c[v]+P*f[v];return A<0?0:A}i.exports=l},9362:function(i){\"use strict\";i.exports=a;function a(o,s,l){var u=o+s,c=u-o,f=u-c,h=s-c,d=o-f;return l?(l[0]=d+h,l[1]=u,l):[d+h,u]}},9366:function(i,a,o){\"use strict\";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join(\"_\"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var _={textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};_.triangles=!0;var b=s(c,_);_.triangles=!1;var p=s(c,_),k,E;if(h&&h!==1){for(k=0;k<b.positions.length;++k)for(E=0;E<b.positions[k].length;++E)b.positions[k][E]/=h;for(k=0;k<p.positions.length;++k)for(E=0;E<p.positions[k].length;++E)p.positions[k][E]/=h}var T=[[1/0,1/0],[-1/0,-1/0]],L=p.positions.length;for(k=0;k<L;++k){var x=p.positions[k];for(E=0;E<2;++E)T[0][E]=Math.min(T[0][E],x[E]),T[1][E]=Math.max(T[1][E],x[E])}return v[c]=[b,p,T]}},9405:function(i,a,o){\"use strict\";var s=o(3327),l=o(8731),u=o(216),c=o(5091),f=o(2145),h=o(8866);function d(p){this.gl=p,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var v=d.prototype;v.bind=function(){this.program||this._relink();var p,k=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),E=this.gl.lastAttribCount;if(k>E)for(p=E;p<k;p++)this.gl.enableVertexAttribArray(p);else if(E>k)for(p=k;p<E;p++)this.gl.disableVertexAttribArray(p);this.gl.lastAttribCount=k,this.gl.useProgram(this.program)},v.dispose=function(){for(var p=this.gl.lastAttribCount,k=0;k<p;k++)this.gl.disableVertexAttribArray(k);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function _(p,k){return p.name<k.name?-1:1}v.update=function(p,k,E,T){if(!k||arguments.length===1){var L=p;p=L.vertex,k=L.fragment,E=L.uniforms,T=L.attributes}var x=this,C=x.gl,M=x._vref;x._vref=c.shader(C,C.VERTEX_SHADER,p),M&&M.dispose(),x.vertShader=x._vref.shader;var g=this._fref;if(x._fref=c.shader(C,C.FRAGMENT_SHADER,k),g&&g.dispose(),x.fragShader=x._fref.shader,!E||!T){var P=C.createProgram();if(C.attachShader(P,x.fragShader),C.attachShader(P,x.vertShader),C.linkProgram(P),!C.getProgramParameter(P,C.LINK_STATUS)){var A=C.getProgramInfoLog(P);throw new h(A,\"Error linking program:\"+A)}E=E||f.uniforms(C,P),T=T||f.attributes(C,P),C.deleteProgram(P)}T=T.slice(),T.sort(_);var z=[],O=[],U=[],G;for(G=0;G<T.length;++G){var Z=T[G];if(Z.type.indexOf(\"mat\")>=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H<j;++H)N[H]=U.length,O.push(Z.name+\"[\"+H+\"]\"),typeof Z.location==\"number\"?U.push(Z.location+H):Array.isArray(Z.location)&&Z.location.length===j&&typeof Z.location[H]==\"number\"?U.push(Z.location[H]|0):U.push(-1);z.push({name:Z.name,type:Z.type,locations:N})}else z.push({name:Z.name,type:Z.type,locations:[U.length]}),O.push(Z.name),typeof Z.location==\"number\"?U.push(Z.location|0):U.push(-1)}var re=0;for(G=0;G<U.length;++G)if(U[G]<0){for(;U.indexOf(re)>=0;)re+=1;U[G]=re}var oe=new Array(E.length);function _e(){x.program=c.program(C,x._vref,x._fref,O,U);for(var Ce=0;Ce<E.length;++Ce)oe[Ce]=C.getUniformLocation(x.program,E[Ce].name)}_e(),x._relink=_e,x.types={uniforms:u(E),attributes:u(T)},x.attributes=l(C,x,z,U),Object.defineProperty(x,\"uniforms\",s(C,x,E,oe))};function b(p,k,E,T,L){var x=new d(p);return x.update(k,E,T,L),x}i.exports=b},9499:function(i,a,o){\"use strict\";i.exports=Be;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),v=o(9994),_=o(9618),b=o(3711),p=o(6760),k=o(7608),E=o(2478),T=o(6199),L=o(990),x=L.createShader,C=L.createContourShader,M=L.createPickShader,g=L.createPickContourShader,P=4*10,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[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(){for(var Pe=0;Pe<3;++Pe){var me=O[Pe],De=(Pe+1)%3,ce=(Pe+2)%3;me[De+0]=1,me[ce+3]=1,me[Pe+6]=1}})();function U(Pe,me,De,ce,je){this.position=Pe,this.index=me,this.uv=De,this.level=ce,this.dataCoordinate=je}var G=256;function Z(Pe,me,De,ce,je,lt,pt,Vt,ot,ut,Wt,Nt,$t,sr,Tr){this.gl=Pe,this.shape=me,this.bounds=De,this.objectOffset=Tr,this.intensityBounds=[],this._shader=ce,this._pickShader=je,this._coordinateBuffer=lt,this._vao=pt,this._colorMap=Vt,this._contourShader=ot,this._contourPickShader=ut,this._contourBuffer=Wt,this._contourVAO=Nt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new U([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=$t,this._dynamicVAO=sr,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.mallocFloat(1024),[0,0]),_(f.mallocFloat(1024),[0,0]),_(f.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.pixelRatio=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 j=Z.prototype;j.genColormap=function(Pe,me){var De=!1,ce=v([h({colormap:Pe,nshades:G,format:\"rgba\"}).map(function(je,lt){var pt=me?N(lt/255,me):je[3];return pt<1&&(De=!0),[je[0],je[1],je[2],255*pt]})]);return d.divseq(ce,255),this.hasAlphaScale=De,ce},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(Pe){this.pickId=Pe};function N(Pe,me){if(!me||!me.length)return 1;for(var De=0;De<me.length;++De){if(me.length<2)return 1;if(me[De][0]===Pe)return me[De][1];if(me[De][0]>Pe&&De>0){var ce=(me[De][0]-Pe)/(me[De][0]-me[De-1][0]);return me[De][1]*(1-ce)+ce*me[De-1][1]}}return 1}var H=[0,0,0],re={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Pe,me){var De,ce,je,lt=me.axes&&me.axes.lastCubeProps.axis||H,pt=me.showSurface,Vt=me.showContour;for(De=0;De<3;++De)for(pt=pt||me.surfaceProject[De],ce=0;ce<3;++ce)Vt=Vt||me.contourProject[De][ce];for(De=0;De<3;++De){var ot=re.projections[De];for(ce=0;ce<16;++ce)ot[ce]=0;for(ce=0;ce<4;++ce)ot[5*ce]=1;ot[5*De]=0,ot[12+De]=me.axesBounds[+(lt[De]>0)][De],p(ot,Pe.model,ot);var ut=re.clipBounds[De];for(je=0;je<2;++je)for(ce=0;ce<3;++ce)ut[je][ce]=Pe.clipBounds[je][ce];ut[0][De]=-1e8,ut[1][De]=1e8}return re.showSurface=pt,re.showContour=Vt,re}var _e={model:A,view:A,projection:A,inverseModel:A.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,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},Ce=A.slice(),Le=[1,0,0,0,1,0,0,0,1];function ge(Pe,me){Pe=Pe||{};var De=this.gl;De.disable(De.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Pe.model||A,ce.view=Pe.view||A,ce.projection=Pe.projection||A,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var je=0;je<2;++je)for(var lt=ce.clipBounds[je],pt=0;pt<3;++pt)lt[pt]=Math.min(Math.max(this.clipBounds[je][pt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Le,ce.vertexColor=this.vertexColor;var Vt=Ce;for(p(Vt,ce.view,ce.model),p(Vt,ce.projection,Vt),k(Vt,Vt),je=0;je<3;++je)ce.eyePosition[je]=Vt[12+je]/Vt[15];var ot=Vt[15];for(je=0;je<3;++je)ot+=this.lightPosition[je]*Vt[4*je+3];for(je=0;je<3;++je){var ut=Vt[12+je];for(pt=0;pt<3;++pt)ut+=Vt[4*pt+je]*this.lightPosition[pt];ce.lightPosition[je]=ut/ot}var Wt=oe(ce,this);if(Wt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(De.TRIANGLES,this._vertexCount),je=0;je<3;++je)!this.surfaceProject[je]||!this.vertexCount||(this._shader.uniforms.model=Wt.projections[je],this._shader.uniforms.clipBounds=Wt.clipBounds[je],this._vao.draw(De.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Wt.showContour){var Nt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Nt.bind(),Nt.uniforms=ce;var $t=this._contourVAO;for($t.bind(),je=0;je<3;++je)for(Nt.uniforms.permutation=O[je],De.lineWidth(this.contourWidth[je]*this.pixelRatio),pt=0;pt<this.contourLevels[je].length;++pt)pt===this.highlightLevel[je]?(Nt.uniforms.contourColor=this.highlightColor[je],Nt.uniforms.contourTint=this.highlightTint[je]):(pt===0||pt-1===this.highlightLevel[je])&&(Nt.uniforms.contourColor=this.contourColor[je],Nt.uniforms.contourTint=this.contourTint[je]),this._contourCounts[je][pt]&&(Nt.uniforms.height=this.contourLevels[je][pt],$t.draw(De.LINES,this._contourCounts[je][pt],this._contourOffsets[je][pt]));for(je=0;je<3;++je)for(Nt.uniforms.model=Wt.projections[je],Nt.uniforms.clipBounds=Wt.clipBounds[je],pt=0;pt<3;++pt)if(this.contourProject[je][pt]){Nt.uniforms.permutation=O[pt],De.lineWidth(this.contourWidth[pt]*this.pixelRatio);for(var sr=0;sr<this.contourLevels[pt].length;++sr)sr===this.highlightLevel[pt]?(Nt.uniforms.contourColor=this.highlightColor[pt],Nt.uniforms.contourTint=this.highlightTint[pt]):(sr===0||sr-1===this.highlightLevel[pt])&&(Nt.uniforms.contourColor=this.contourColor[pt],Nt.uniforms.contourTint=this.contourTint[pt]),this._contourCounts[pt][sr]&&(Nt.uniforms.height=this.contourLevels[pt][sr],$t.draw(De.LINES,this._contourCounts[pt][sr],this._contourOffsets[pt][sr]))}for($t.unbind(),$t=this._dynamicVAO,$t.bind(),je=0;je<3;++je)if(this._dynamicCounts[je]!==0)for(Nt.uniforms.model=ce.model,Nt.uniforms.clipBounds=ce.clipBounds,Nt.uniforms.permutation=O[je],De.lineWidth(this.dynamicWidth[je]*this.pixelRatio),Nt.uniforms.contourColor=this.dynamicColor[je],Nt.uniforms.contourTint=this.dynamicTint[je],Nt.uniforms.height=this.dynamicLevel[je],$t.draw(De.LINES,this._dynamicCounts[je],this._dynamicOffsets[je]),pt=0;pt<3;++pt)this.contourProject[pt][je]&&(Nt.uniforms.model=Wt.projections[pt],Nt.uniforms.clipBounds=Wt.clipBounds[pt],$t.draw(De.LINES,this._dynamicCounts[je],this._dynamicOffsets[je]));$t.unbind()}}j.draw=function(Pe){return ge.call(this,Pe,!1)},j.drawTransparent=function(Pe){return ge.call(this,Pe,!0)};var ie={model:A,view:A,projection:A,inverseModel:A,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(Pe){Pe=Pe||{};var me=this.gl;me.disable(me.CULL_FACE);var De=ie;De.model=Pe.model||A,De.view=Pe.view||A,De.projection=Pe.projection||A,De.shape=this._field[2].shape,De.pickId=this.pickId/255,De.lowerBound=this.bounds[0],De.upperBound=this.bounds[1],De.objectOffset=this.objectOffset,De.permutation=Le;for(var ce=0;ce<2;++ce)for(var je=De.clipBounds[ce],lt=0;lt<3;++lt)je[lt]=Math.min(Math.max(this.clipBounds[ce][lt],-1e8),1e8);var pt=oe(De,this);if(pt.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=De,this._vao.bind(),this._vao.draw(me.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)this.surfaceProject[ce]&&(this._pickShader.uniforms.model=pt.projections[ce],this._pickShader.uniforms.clipBounds=pt.clipBounds[ce],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(pt.showContour){var Vt=this._contourPickShader;Vt.bind(),Vt.uniforms=De;var ot=this._contourVAO;for(ot.bind(),lt=0;lt<3;++lt)for(me.lineWidth(this.contourWidth[lt]*this.pixelRatio),Vt.uniforms.permutation=O[lt],ce=0;ce<this.contourLevels[lt].length;++ce)this._contourCounts[lt][ce]&&(Vt.uniforms.height=this.contourLevels[lt][ce],ot.draw(me.LINES,this._contourCounts[lt][ce],this._contourOffsets[lt][ce]));for(ce=0;ce<3;++ce)for(Vt.uniforms.model=pt.projections[ce],Vt.uniforms.clipBounds=pt.clipBounds[ce],lt=0;lt<3;++lt)if(this.contourProject[ce][lt]){Vt.uniforms.permutation=O[lt],me.lineWidth(this.contourWidth[lt]*this.pixelRatio);for(var ut=0;ut<this.contourLevels[lt].length;++ut)this._contourCounts[lt][ut]&&(Vt.uniforms.height=this.contourLevels[lt][ut],ot.draw(me.LINES,this._contourCounts[lt][ut],this._contourOffsets[lt][ut]))}ot.unbind()}},j.pick=function(Pe){if(!Pe||Pe.id!==this.pickId)return null;var me=this._field[2].shape,De=this._pickResult,ce=me[0]*(Pe.value[0]+(Pe.value[2]>>4)/16)/255,je=Math.floor(ce),lt=ce-je,pt=me[1]*(Pe.value[1]+(Pe.value[2]&15)/16)/255,Vt=Math.floor(pt),ot=pt-Vt;je+=1,Vt+=1;var ut=De.position;ut[0]=ut[1]=ut[2]=0;for(var Wt=0;Wt<2;++Wt)for(var Nt=Wt?lt:1-lt,$t=0;$t<2;++$t)for(var sr=$t?ot:1-ot,Tr=je+Wt,fr=Vt+$t,$e=Nt*sr,St=0;St<3;++St)ut[St]+=this._field[St].get(Tr,fr)*$e;for(var Qt=this._pickResult.level,Gt=0;Gt<3;++Gt)if(Qt[Gt]=E.le(this.contourLevels[Gt],ut[Gt]),Qt[Gt]<0)this.contourLevels[Gt].length>0&&(Qt[Gt]=0);else if(Qt[Gt]<this.contourLevels[Gt].length-1){var _t=this.contourLevels[Gt][Qt[Gt]],It=this.contourLevels[Gt][Qt[Gt]+1];Math.abs(_t-ut[Gt])>Math.abs(It-ut[Gt])&&(Qt[Gt]+=1)}for(De.index[0]=lt<.5?je:je+1,De.index[1]=ot<.5?Vt:Vt+1,De.uv[0]=ce/me[0],De.uv[1]=pt/me[1],St=0;St<3;++St)De.dataCoordinate[St]=this._field[St].get(De.index[0],De.index[1]);return De},j.padField=function(Pe,me){var De=me.shape.slice(),ce=Pe.shape.slice();d.assign(Pe.lo(1,1).hi(De[0],De[1]),me),d.assign(Pe.lo(1).hi(De[0],1),me.hi(De[0],1)),d.assign(Pe.lo(1,ce[1]-1).hi(De[0],1),me.lo(0,De[1]-1).hi(De[0],1)),d.assign(Pe.lo(0,1).hi(1,De[1]),me.hi(1)),d.assign(Pe.lo(ce[0]-1,1).hi(1,De[1]),me.lo(De[0]-1)),Pe.set(0,0,me.get(0,0)),Pe.set(0,ce[1]-1,me.get(0,De[1]-1)),Pe.set(ce[0]-1,0,me.get(De[0]-1,0)),Pe.set(ce[0]-1,ce[1]-1,me.get(De[0]-1,De[1]-1))};function Se(Pe,me){return Array.isArray(Pe)?[me(Pe[0]),me(Pe[1]),me(Pe[2])]:[me(Pe),me(Pe),me(Pe)]}function Ee(Pe){return Array.isArray(Pe)?Pe.length===3?[Pe[0],Pe[1],Pe[2],1]:[Pe[0],Pe[1],Pe[2],Pe[3]]:[0,0,0,1]}function Ae(Pe){if(Array.isArray(Pe)){if(Array.isArray(Pe))return[Ee(Pe[0]),Ee(Pe[1]),Ee(Pe[2])];var me=Ee(Pe);return[me.slice(),me.slice(),me.slice()]}}j.update=function(Pe){Pe=Pe||{},this.objectOffset=Pe.objectOffset||this.objectOffset,this.dirty=!0,\"contourWidth\"in Pe&&(this.contourWidth=Se(Pe.contourWidth,Number)),\"showContour\"in Pe&&(this.showContour=Se(Pe.showContour,Boolean)),\"showSurface\"in Pe&&(this.showSurface=!!Pe.showSurface),\"contourTint\"in Pe&&(this.contourTint=Se(Pe.contourTint,Boolean)),\"contourColor\"in Pe&&(this.contourColor=Ae(Pe.contourColor)),\"contourProject\"in Pe&&(this.contourProject=Se(Pe.contourProject,function(yn){return Se(yn,Boolean)})),\"surfaceProject\"in Pe&&(this.surfaceProject=Pe.surfaceProject),\"dynamicColor\"in Pe&&(this.dynamicColor=Ae(Pe.dynamicColor)),\"dynamicTint\"in Pe&&(this.dynamicTint=Se(Pe.dynamicTint,Number)),\"dynamicWidth\"in Pe&&(this.dynamicWidth=Se(Pe.dynamicWidth,Number)),\"opacity\"in Pe&&(this.opacity=Pe.opacity),\"opacityscale\"in Pe&&(this.opacityscale=Pe.opacityscale),\"colorBounds\"in Pe&&(this.colorBounds=Pe.colorBounds),\"vertexColor\"in Pe&&(this.vertexColor=Pe.vertexColor?1:0),\"colormap\"in Pe&&this._colorMap.setPixels(this.genColormap(Pe.colormap,this.opacityscale));var me=Pe.field||Pe.coords&&Pe.coords[2]||null,De=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),\"field\"in Pe||\"coords\"in Pe){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=_(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var je=this.shape,lt=0;lt<2;++lt)this._field[2].size>this._field[lt].data.length&&(f.freeFloat(this._field[lt].data),this._field[lt].data=f.mallocFloat(this._field[2].size)),this._field[lt]=_(this._field[lt].data,[je[0]+2,je[1]+2]);if(Pe.coords){var pt=Pe.coords;if(!Array.isArray(pt)||pt.length!==3)throw new Error(\"gl-surface: invalid coordinates for x/y\");for(lt=0;lt<2;++lt){var Vt=pt[lt];for($t=0;$t<2;++$t)if(Vt.shape[$t]!==je[$t])throw new Error(\"gl-surface: coords have incorrect shape\");this.padField(this._field[lt],Vt)}}else if(Pe.ticks){var ot=Pe.ticks;if(!Array.isArray(ot)||ot.length!==2)throw new Error(\"gl-surface: invalid ticks\");for(lt=0;lt<2;++lt){var ut=ot[lt];if((Array.isArray(ut)||ut.length)&&(ut=_(ut)),ut.shape[0]!==je[lt])throw new Error(\"gl-surface: invalid tick length\");var Wt=_(ut.data,je);Wt.stride[lt]=ut.stride[0],Wt.stride[lt^1]=0,this.padField(this._field[lt],Wt)}}else{for(lt=0;lt<2;++lt){var Nt=[0,0];Nt[lt]=1,this._field[lt]=_(this._field[lt].data,[je[0]+2,je[1]+2],Nt,0)}this._field[0].set(0,0,0);for(var $t=0;$t<je[0];++$t)this._field[0].set($t+1,0,$t);for(this._field[0].set(je[0]+1,0,je[0]-1),this._field[1].set(0,0,0),$t=0;$t<je[1];++$t)this._field[1].set(0,$t+1,$t);this._field[1].set(0,je[1]+1,je[1]-1)}var sr=this._field,Tr=_(f.mallocFloat(sr[2].size*3*2),[3,je[0]+2,je[1]+2,2]);for(lt=0;lt<3;++lt)T(Tr.pick(lt),sr[lt],\"mirror\");var fr=_(f.mallocFloat(sr[2].size*3),[je[0]+2,je[1]+2,3]);for(lt=0;lt<je[0]+2;++lt)for($t=0;$t<je[1]+2;++$t){var $e=Tr.get(0,lt,$t,0),St=Tr.get(0,lt,$t,1),Qt=Tr.get(1,lt,$t,0),Gt=Tr.get(1,lt,$t,1),_t=Tr.get(2,lt,$t,0),It=Tr.get(2,lt,$t,1),mt=Qt*It-Gt*_t,er=_t*St-It*$e,lr=$e*Gt-St*Qt,wr=Math.sqrt(mt*mt+er*er+lr*lr);wr<1e-8?(wr=Math.max(Math.abs(mt),Math.abs(er),Math.abs(lr)),wr<1e-8?(lr=1,er=mt=0,wr=1):wr=1/wr):wr=1/Math.sqrt(wr),fr.set(lt,$t,0,mt*wr),fr.set(lt,$t,1,er*wr),fr.set(lt,$t,2,lr*wr)}f.free(Tr.data);var Lr=[1/0,1/0,1/0],ti=[-1/0,-1/0,-1/0],Br=1/0,Vr=-1/0,dt=(je[0]-1)*(je[1]-1)*6,Ge=f.mallocFloat(s.nextPow2(10*dt)),Je=0,We=0;for(lt=0;lt<je[0]-1;++lt)e:for($t=0;$t<je[1]-1;++$t){for(var tt=0;tt<2;++tt)for(var xt=0;xt<2;++xt)for(var Ie=0;Ie<3;++Ie){var xe=this._field[Ie].get(1+lt+tt,1+$t+xt);if(isNaN(xe)||!isFinite(xe))continue e}for(Ie=0;Ie<6;++Ie){var ke=lt+z[Ie][0],vt=$t+z[Ie][1],ir=this._field[0].get(ke+1,vt+1),ar=this._field[1].get(ke+1,vt+1);xe=this._field[2].get(ke+1,vt+1),mt=fr.get(ke+1,vt+1,0),er=fr.get(ke+1,vt+1,1),lr=fr.get(ke+1,vt+1,2),Pe.intensity&&(vr=Pe.intensity.get(ke,vt));var vr=Pe.intensity?Pe.intensity.get(ke,vt):xe+this.objectOffset[2];Ge[Je++]=ke,Ge[Je++]=vt,Ge[Je++]=ir,Ge[Je++]=ar,Ge[Je++]=xe,Ge[Je++]=0,Ge[Je++]=vr,Ge[Je++]=mt,Ge[Je++]=er,Ge[Je++]=lr,Lr[0]=Math.min(Lr[0],ir+this.objectOffset[0]),Lr[1]=Math.min(Lr[1],ar+this.objectOffset[1]),Lr[2]=Math.min(Lr[2],xe+this.objectOffset[2]),Br=Math.min(Br,vr),ti[0]=Math.max(ti[0],ir+this.objectOffset[0]),ti[1]=Math.max(ti[1],ar+this.objectOffset[1]),ti[2]=Math.max(ti[2],xe+this.objectOffset[2]),Vr=Math.max(Vr,vr),We+=1}}for(Pe.intensityBounds&&(Br=+Pe.intensityBounds[0],Vr=+Pe.intensityBounds[1]),lt=6;lt<Je;lt+=10)Ge[lt]=(Ge[lt]-Br)/(Vr-Br);this._vertexCount=We,this._coordinateBuffer.update(Ge.subarray(0,Je)),f.freeFloat(Ge),f.free(fr.data),this.bounds=[Lr,ti],this.intensity=Pe.intensity||this._field[2],(this.intensityBounds[0]!==Br||this.intensityBounds[1]!==Vr)&&(De=!0),this.intensityBounds=[Br,Vr]}if(\"levels\"in Pe){var ii=Pe.levels;for(Array.isArray(ii[0])?ii=ii.slice():ii=[[],[],ii],lt=0;lt<3;++lt)ii[lt]=ii[lt].slice(),ii[lt].sort(function(yn,Sn){return yn-Sn});for(lt=0;lt<3;++lt)for($t=0;$t<ii[lt].length;++$t)ii[lt][$t]-=this.objectOffset[lt];e:for(lt=0;lt<3;++lt){if(ii[lt].length!==this.contourLevels[lt].length){De=!0;break}for($t=0;$t<ii[lt].length;++$t)if(ii[lt][$t]!==this.contourLevels[lt][$t]){De=!0;break e}}this.contourLevels=ii}if(De){sr=this._field,je=this.shape;for(var pi=[],$r=0;$r<3;++$r){var di=this.contourLevels[$r],ji=[],In=[],wi=[0,0,0];for(lt=0;lt<di.length;++lt){var On=b(this._field[$r],di[lt]);ji.push(pi.length/5|0),We=0;e:for($t=0;$t<On.cells.length;++$t){var qn=On.cells[$t];for(Ie=0;Ie<2;++Ie){var Fn=On.positions[qn[Ie]],ra=Fn[0],la=Math.floor(ra)|0,Ut=ra-la,wt=Fn[1],rr=Math.floor(wt)|0,nr=wt-rr,Er=!1;t:for(var Xr=0;Xr<3;++Xr){wi[Xr]=0;var ri=($r+Xr+1)%3;for(tt=0;tt<2;++tt){var Qr=tt?Ut:1-Ut;for(ke=Math.min(Math.max(la+tt,0),je[0])|0,xt=0;xt<2;++xt){var Oi=xt?nr:1-nr;if(vt=Math.min(Math.max(rr+xt,0),je[1])|0,Xr<2?xe=this._field[ri].get(ke,vt):xe=(this.intensity.get(ke,vt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(xe)||isNaN(xe)){Er=!0;break t}var $i=Qr*Oi;wi[Xr]+=$i*xe}}}if(!Er)pi.push(wi[0],wi[1],Fn[0],Fn[1],wi[2]),We+=1;else{if(Ie>0){for(var tn=0;tn<5;++tn)pi.pop();We-=1}continue e}}}In.push(We)}this._contourOffsets[$r]=ji,this._contourCounts[$r]=In}var fn=f.mallocFloat(pi.length);for(lt=0;lt<pi.length;++lt)fn[lt]=pi[lt];this._contourBuffer.update(fn),f.freeFloat(fn)}},j.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 Pe=0;Pe<3;++Pe)f.freeFloat(this._field[Pe].data)},j.highlight=function(Pe){var me;if(!Pe){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(me=0;me<3;++me)this.enableHighlight[me]?this.highlightLevel[me]=Pe.level[me]:this.highlightLevel[me]=-1;var De;for(this.snapToData?De=Pe.dataCoordinate:De=Pe.position,me=0;me<3;++me)De[me]-=this.objectOffset[me];if(!((!this.enableDynamic[0]||De[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||De[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||De[2]===this.dynamicLevel[2]))){for(var ce=0,je=this.shape,lt=f.mallocFloat(12*je[0]*je[1]),pt=0;pt<3;++pt){if(!this.enableDynamic[pt]){this.dynamicLevel[pt]=NaN,this._dynamicCounts[pt]=0;continue}this.dynamicLevel[pt]=De[pt];var Vt=(pt+1)%3,ot=(pt+2)%3,ut=this._field[pt],Wt=this._field[Vt],Nt=this._field[ot],$t=b(ut,De[pt]),sr=$t.cells,Tr=$t.positions;for(this._dynamicOffsets[pt]=ce,me=0;me<sr.length;++me)for(var fr=sr[me],$e=0;$e<2;++$e){var St=Tr[fr[$e]],Qt=+St[0],Gt=Qt|0,_t=Math.min(Gt+1,je[0])|0,It=Qt-Gt,mt=1-It,er=+St[1],lr=er|0,wr=Math.min(lr+1,je[1])|0,Lr=er-lr,ti=1-Lr,Br=mt*ti,Vr=mt*Lr,dt=It*ti,Ge=It*Lr,Je=Br*Wt.get(Gt,lr)+Vr*Wt.get(Gt,wr)+dt*Wt.get(_t,lr)+Ge*Wt.get(_t,wr),We=Br*Nt.get(Gt,lr)+Vr*Nt.get(Gt,wr)+dt*Nt.get(_t,lr)+Ge*Nt.get(_t,wr);if(isNaN(Je)||isNaN(We)){$e&&(ce-=1);break}lt[2*ce+0]=Je,lt[2*ce+1]=We,ce+=1}this._dynamicCounts[pt]=ce-this._dynamicOffsets[pt]}this._dynamicBuffer.update(lt.subarray(0,2*ce)),f.freeFloat(lt)}};function Be(Pe){var me=Pe.gl,De=x(me),ce=M(me),je=C(me),lt=g(me),pt=l(me),Vt=u(me,[{buffer:pt,size:4,stride:P,offset:0},{buffer:pt,size:3,stride:P,offset:16},{buffer:pt,size:3,stride:P,offset:28}]),ot=l(me),ut=u(me,[{buffer:ot,size:4,stride:20,offset:0},{buffer:ot,size:1,stride:20,offset:16}]),Wt=l(me),Nt=u(me,[{buffer:Wt,size:2,type:me.FLOAT}]),$t=c(me,1,G,me.RGBA,me.UNSIGNED_BYTE);$t.minFilter=me.LINEAR,$t.magFilter=me.LINEAR;var sr=new Z(me,[0,0],[[0,0,0],[0,0,0]],De,ce,pt,Vt,$t,je,lt,ot,ut,Wt,Nt,[0,0,0]),Tr={levels:[[],[],[]]};for(var fr in Pe)Tr[fr]=Pe[fr];return Tr.colormap=Tr.colormap||\"jet\",sr.update(Tr),sr}},9507:function(i){i.exports=!0},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!=\"undefined\";function u(b,p){return b[0]-p[0]}function c(){var b=this.stride,p=new Array(b.length),k;for(k=0;k<p.length;++k)p[k]=[Math.abs(b[k]),k];p.sort(u);var E=new Array(p.length);for(k=0;k<E.length;++k)E[k]=p[k][1];return E}var f={T:function(b){function p(E){this.data=E}var k=p.prototype;return k.dtype=b,k.index=function(){return-1},k.size=0,k.dimension=-1,k.shape=k.stride=k.order=[],k.lo=k.hi=k.transpose=k.step=function(){return new p(this.data)},k.get=k.set=function(){},k.pick=function(){return null},function(T){return new p(T)}},0:function(b,p){function k(T,L){this.data=T,this.offset=L}var E=k.prototype;return E.dtype=b,E.index=function(){return this.offset},E.dimension=0,E.size=1,E.shape=E.stride=E.order=[],E.lo=E.hi=E.transpose=E.step=function(){return new k(this.data,this.offset)},E.pick=function(){return p(this.data)},E.valueOf=E.get=function(){return b===\"generic\"?this.data.get(this.offset):this.data[this.offset]},E.set=function(L){return b===\"generic\"?this.data.set(this.offset,L):this.data[this.offset]=L},function(L,x,C,M){return new k(L,M)}},1:function(b,p,k){function E(L,x,C,M){this.data=L,this.shape=[x],this.stride=[C],this.offset=M|0}var T=E.prototype;return T.dtype=b,T.dimension=1,Object.defineProperty(T,\"size\",{get:function(){return this.shape[0]}}),T.order=[0],T.set=function(x,C){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*x,C):this.data[this.offset+this.stride[0]*x]=C},T.get=function(x){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*x):this.data[this.offset+this.stride[0]*x]},T.index=function(x){return this.offset+this.stride[0]*x},T.hi=function(x){return new E(this.data,typeof x!=\"number\"||x<0?this.shape[0]:x|0,this.stride[0],this.offset)},T.lo=function(x){var C=this.offset,M=0,g=this.shape[0],P=this.stride[0];return typeof x==\"number\"&&x>=0&&(M=x|0,C+=P*M,g-=M),new E(this.data,g,P,C)},T.step=function(x){var C=this.shape[0],M=this.stride[0],g=this.offset,P=0,A=Math.ceil;return typeof x==\"number\"&&(P=x|0,P<0?(g+=M*(C-1),C=A(-C/P)):C=A(C/P),M*=P),new E(this.data,C,M,g)},T.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,M=this.stride;return new E(this.data,C[x],M[x],this.offset)},T.pick=function(x){var C=[],M=[],g=this.offset;typeof x==\"number\"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),M.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,M,g)},function(x,C,M,g){return new E(x,C[0],M[0],g)}},2:function(b,p,k){function E(L,x,C,M,g,P){this.data=L,this.shape=[x,C],this.stride=[M,g],this.offset=P|0}var T=E.prototype;return T.dtype=b,T.dimension=2,Object.defineProperty(T,\"size\",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,\"order\",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,C,M){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=M},T.get=function(x,C){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},T.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},T.hi=function(x,C){return new E(this.data,typeof x!=\"number\"||x<0?this.shape[0]:x|0,typeof C!=\"number\"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,C){var M=this.offset,g=0,P=this.shape[0],A=this.shape[1],z=this.stride[0],O=this.stride[1];return typeof x==\"number\"&&x>=0&&(g=x|0,M+=z*g,P-=g),typeof C==\"number\"&&C>=0&&(g=C|0,M+=O*g,A-=g),new E(this.data,P,A,z,O,M)},T.step=function(x,C){var M=this.shape[0],g=this.shape[1],P=this.stride[0],A=this.stride[1],z=this.offset,O=0,U=Math.ceil;return typeof x==\"number\"&&(O=x|0,O<0?(z+=P*(M-1),M=U(-M/O)):M=U(M/O),P*=O),typeof C==\"number\"&&(O=C|0,O<0?(z+=A*(g-1),g=U(-g/O)):g=U(g/O),A*=O),new E(this.data,M,g,P,A,z)},T.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var M=this.shape,g=this.stride;return new E(this.data,M[x],M[C],g[x],g[C],this.offset)},T.pick=function(x,C){var M=[],g=[],P=this.offset;typeof x==\"number\"&&x>=0?P=P+this.stride[0]*x|0:(M.push(this.shape[0]),g.push(this.stride[0])),typeof C==\"number\"&&C>=0?P=P+this.stride[1]*C|0:(M.push(this.shape[1]),g.push(this.stride[1]));var A=p[M.length+1];return A(this.data,M,g,P)},function(x,C,M,g){return new E(x,C[0],C[1],M[0],M[1],g)}},3:function(b,p,k){function E(L,x,C,M,g,P,A,z){this.data=L,this.shape=[x,C,M],this.stride=[g,P,A],this.offset=z|0}var T=E.prototype;return T.dtype=b,T.dimension=3,Object.defineProperty(T,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,\"order\",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return x>C?C>M?[2,1,0]:x>M?[1,2,0]:[1,0,2]:x>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),T.set=function(x,C,M,g){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]=g},T.get=function(x,C,M){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]},T.index=function(x,C,M){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M},T.hi=function(x,C,M){return new E(this.data,typeof x!=\"number\"||x<0?this.shape[0]:x|0,typeof C!=\"number\"||C<0?this.shape[1]:C|0,typeof M!=\"number\"||M<0?this.shape[2]:M|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,C,M){var g=this.offset,P=0,A=this.shape[0],z=this.shape[1],O=this.shape[2],U=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x==\"number\"&&x>=0&&(P=x|0,g+=U*P,A-=P),typeof C==\"number\"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof M==\"number\"&&M>=0&&(P=M|0,g+=Z*P,O-=P),new E(this.data,A,z,O,U,G,Z,g)},T.step=function(x,C,M){var g=this.shape[0],P=this.shape[1],A=this.shape[2],z=this.stride[0],O=this.stride[1],U=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x==\"number\"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C==\"number\"&&(Z=C|0,Z<0?(G+=O*(P-1),P=j(-P/Z)):P=j(P/Z),O*=Z),typeof M==\"number\"&&(Z=M|0,Z<0?(G+=U*(A-1),A=j(-A/Z)):A=j(A/Z),U*=Z),new E(this.data,g,P,A,z,O,U,G)},T.transpose=function(x,C,M){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var g=this.shape,P=this.stride;return new E(this.data,g[x],g[C],g[M],P[x],P[C],P[M],this.offset)},T.pick=function(x,C,M){var g=[],P=[],A=this.offset;typeof x==\"number\"&&x>=0?A=A+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C==\"number\"&&C>=0?A=A+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof M==\"number\"&&M>=0?A=A+this.stride[2]*M|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,A)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],M[0],M[1],M[2],g)}},4:function(b,p,k){function E(L,x,C,M,g,P,A,z,O,U){this.data=L,this.shape=[x,C,M,g],this.stride=[P,A,z,O],this.offset=U|0}var T=E.prototype;return T.dtype=b,T.dimension=4,Object.defineProperty(T,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,\"order\",{get:k}),T.set=function(x,C,M,g,P){return b===\"generic\"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]=P},T.get=function(x,C,M,g){return b===\"generic\"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]},T.index=function(x,C,M,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g},T.hi=function(x,C,M,g){return new E(this.data,typeof x!=\"number\"||x<0?this.shape[0]:x|0,typeof C!=\"number\"||C<0?this.shape[1]:C|0,typeof M!=\"number\"||M<0?this.shape[2]:M|0,typeof g!=\"number\"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,C,M,g){var P=this.offset,A=0,z=this.shape[0],O=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x==\"number\"&&x>=0&&(A=x|0,P+=Z*A,z-=A),typeof C==\"number\"&&C>=0&&(A=C|0,P+=j*A,O-=A),typeof M==\"number\"&&M>=0&&(A=M|0,P+=N*A,U-=A),typeof g==\"number\"&&g>=0&&(A=g|0,P+=H*A,G-=A),new E(this.data,z,O,U,G,Z,j,N,H,P)},T.step=function(x,C,M,g){var P=this.shape[0],A=this.shape[1],z=this.shape[2],O=this.shape[3],U=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,re=Math.ceil;return typeof x==\"number\"&&(H=x|0,H<0?(N+=U*(P-1),P=re(-P/H)):P=re(P/H),U*=H),typeof C==\"number\"&&(H=C|0,H<0?(N+=G*(A-1),A=re(-A/H)):A=re(A/H),G*=H),typeof M==\"number\"&&(H=M|0,H<0?(N+=Z*(z-1),z=re(-z/H)):z=re(z/H),Z*=H),typeof g==\"number\"&&(H=g|0,H<0?(N+=j*(O-1),O=re(-O/H)):O=re(O/H),j*=H),new E(this.data,P,A,z,O,U,G,Z,j,N)},T.transpose=function(x,C,M,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,g=g===void 0?3:g|0;var P=this.shape,A=this.stride;return new E(this.data,P[x],P[C],P[M],P[g],A[x],A[C],A[M],A[g],this.offset)},T.pick=function(x,C,M,g){var P=[],A=[],z=this.offset;typeof x==\"number\"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),A.push(this.stride[0])),typeof C==\"number\"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),A.push(this.stride[1])),typeof M==\"number\"&&M>=0?z=z+this.stride[2]*M|0:(P.push(this.shape[2]),A.push(this.stride[2])),typeof g==\"number\"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),A.push(this.stride[3]));var O=p[P.length+1];return O(this.data,P,A,z)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],g)}},5:function(p,k,E){function T(x,C,M,g,P,A,z,O,U,G,Z,j){this.data=x,this.shape=[C,M,g,P,A],this.stride=[z,O,U,G,Z],this.offset=j|0}var L=T.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,\"size\",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,\"order\",{get:E}),L.set=function(C,M,g,P,A,z){return p===\"generic\"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A]=z},L.get=function(C,M,g,P,A){return p===\"generic\"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A]},L.index=function(C,M,g,P,A){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A},L.hi=function(C,M,g,P,A){return new T(this.data,typeof C!=\"number\"||C<0?this.shape[0]:C|0,typeof M!=\"number\"||M<0?this.shape[1]:M|0,typeof g!=\"number\"||g<0?this.shape[2]:g|0,typeof P!=\"number\"||P<0?this.shape[3]:P|0,typeof A!=\"number\"||A<0?this.shape[4]:A|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,M,g,P,A){var z=this.offset,O=0,U=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],re=this.stride[1],oe=this.stride[2],_e=this.stride[3],Ce=this.stride[4];return typeof C==\"number\"&&C>=0&&(O=C|0,z+=H*O,U-=O),typeof M==\"number\"&&M>=0&&(O=M|0,z+=re*O,G-=O),typeof g==\"number\"&&g>=0&&(O=g|0,z+=oe*O,Z-=O),typeof P==\"number\"&&P>=0&&(O=P|0,z+=_e*O,j-=O),typeof A==\"number\"&&A>=0&&(O=A|0,z+=Ce*O,N-=O),new T(this.data,U,G,Z,j,N,H,re,oe,_e,Ce,z)},L.step=function(C,M,g,P,A){var z=this.shape[0],O=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],re=this.stride[3],oe=this.stride[4],_e=this.offset,Ce=0,Le=Math.ceil;return typeof C==\"number\"&&(Ce=C|0,Ce<0?(_e+=j*(z-1),z=Le(-z/Ce)):z=Le(z/Ce),j*=Ce),typeof M==\"number\"&&(Ce=M|0,Ce<0?(_e+=N*(O-1),O=Le(-O/Ce)):O=Le(O/Ce),N*=Ce),typeof g==\"number\"&&(Ce=g|0,Ce<0?(_e+=H*(U-1),U=Le(-U/Ce)):U=Le(U/Ce),H*=Ce),typeof P==\"number\"&&(Ce=P|0,Ce<0?(_e+=re*(G-1),G=Le(-G/Ce)):G=Le(G/Ce),re*=Ce),typeof A==\"number\"&&(Ce=A|0,Ce<0?(_e+=oe*(Z-1),Z=Le(-Z/Ce)):Z=Le(Z/Ce),oe*=Ce),new T(this.data,z,O,U,G,Z,j,N,H,re,oe,_e)},L.transpose=function(C,M,g,P,A){C=C===void 0?0:C|0,M=M===void 0?1:M|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,A=A===void 0?4:A|0;var z=this.shape,O=this.stride;return new T(this.data,z[C],z[M],z[g],z[P],z[A],O[C],O[M],O[g],O[P],O[A],this.offset)},L.pick=function(C,M,g,P,A){var z=[],O=[],U=this.offset;typeof C==\"number\"&&C>=0?U=U+this.stride[0]*C|0:(z.push(this.shape[0]),O.push(this.stride[0])),typeof M==\"number\"&&M>=0?U=U+this.stride[1]*M|0:(z.push(this.shape[1]),O.push(this.stride[1])),typeof g==\"number\"&&g>=0?U=U+this.stride[2]*g|0:(z.push(this.shape[2]),O.push(this.stride[2])),typeof P==\"number\"&&P>=0?U=U+this.stride[3]*P|0:(z.push(this.shape[3]),O.push(this.stride[3])),typeof A==\"number\"&&A>=0?U=U+this.stride[4]*A|0:(z.push(this.shape[4]),O.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,O,U)},function(C,M,g,P){return new T(C,M[0],M[1],M[2],M[3],M[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?\"T\":String(p),E=f[k];return p===-1?E(b):p===0?E(b,v[b][0]):E(b,v[b],c)}function d(b){if(s(b))return\"buffer\";if(l)switch(Object.prototype.toString.call(b)){case\"[object Float64Array]\":return\"float64\";case\"[object Float32Array]\":return\"float32\";case\"[object Int8Array]\":return\"int8\";case\"[object Int16Array]\":return\"int16\";case\"[object Int32Array]\":return\"int32\";case\"[object Uint8ClampedArray]\":return\"uint8_clamped\";case\"[object Uint8Array]\":return\"uint8\";case\"[object Uint16Array]\":return\"uint16\";case\"[object Uint32Array]\":return\"uint32\";case\"[object BigInt64Array]\":return\"bigint64\";case\"[object BigUint64Array]\":return\"biguint64\"}return Array.isArray(b)?\"array\":\"generic\"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function _(b,p,k,E){if(b===void 0){var g=v.array[0];return g([])}else typeof b==\"number\"&&(b=[b]);p===void 0&&(p=[b.length]);var T=p.length;if(k===void 0){k=new Array(T);for(var L=T-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(E===void 0){E=0;for(var L=0;L<T;++L)k[L]<0&&(E-=(p[L]-1)*k[L])}for(var C=d(b),M=v[C];M.length<=T+1;)M.push(h(C,M.length-1));var g=M[T+1];return g(b,p,k,E)}i.exports=_},9921:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3],f=o[4],h=o[5],d=o[6],v=o[7],_=o[8],b=o[9],p=o[10],k=o[11],E=o[12],T=o[13],L=o[14],x=o[15],C=s*h-l*f,M=s*d-u*f,g=s*v-c*f,P=l*d-u*h,A=l*v-c*h,z=u*v-c*d,O=_*T-b*E,U=_*L-p*E,G=_*x-k*E,Z=b*L-p*T,j=b*x-k*T,N=p*x-k*L;return C*N-M*j+g*Z+P*G-A*U+z*O}},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],_=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-_)<=s*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},9977:function(i,a,o){\"use strict\";i.exports=p;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(k,E,T){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(T,2))}function d(k,E,T,L){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(T,2)+Math.pow(L,2))}function v(k,E){var T=E[0],L=E[1],x=E[2],C=E[3],M=d(T,L,x,C);M>1e-6?(k[0]=T/M,k[1]=L/M,k[2]=x/M,k[3]=C/M):(k[0]=k[1]=k[2]=0,k[3]=1)}function _(k,E,T){this.radius=s([T]),this.center=s(E),this.rotation=s(k),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 b=_.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var E=this.computedRotation;v(E,E);var T=this.computedMatrix;u(T,E);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);x[0]=L[0]+M*T[2],x[1]=L[1]+M*T[6],x[2]=L[2]+M*T[10],C[0]=T[1],C[1]=T[5],C[2]=T[9];for(var g=0;g<3;++g){for(var P=0,A=0;A<3;++A)P+=T[g+4*A]*x[A];T[12+g]=-P}},b.getMatrix=function(k,E){this.recalcMatrix(k);var T=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=T[L];return E}return T},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,E,T,L){E=E||0,T=T||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],M=x[5],g=x[9],P=h(C,M,g);C/=P,M/=P,g/=P;var A=x[0],z=x[4],O=x[8],U=A*C+z*M+O*g;A-=C*U,z-=M*U,O-=g*U;var G=h(A,z,O);A/=G,z/=G,O/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*M+N*g,re=Z*A+j*z+N*O;Z-=H*C+re*A,j-=H*M+re*z,N-=H*g+re*O;var oe=h(Z,j,N);Z/=oe,j/=oe,N/=oe;var _e=A*E+C*T,Ce=z*E+M*T,Le=O*E+g*T;this.center.move(k,_e,Ce,Le);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(k,Math.log(ge))},b.rotate=function(k,E,T,L){this.recalcMatrix(k),E=E||0,T=T||0;var x=this.computedMatrix,C=x[0],M=x[4],g=x[8],P=x[1],A=x[5],z=x[9],O=x[2],U=x[6],G=x[10],Z=E*C+T*P,j=E*M+T*A,N=E*g+T*z,H=-(U*N-G*j),re=-(G*Z-O*N),oe=-(O*j-U*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(re,2)-Math.pow(oe,2))),Ce=d(H,re,oe,_e);Ce>1e-6?(H/=Ce,re/=Ce,oe/=Ce,_e/=Ce):(H=re=oe=0,_e=1);var Le=this.computedRotation,ge=Le[0],ie=Le[1],Se=Le[2],Ee=Le[3],Ae=ge*_e+Ee*H+ie*oe-Se*re,Be=ie*_e+Ee*re+Se*H-ge*oe,Pe=Se*_e+Ee*oe+ge*re-ie*H,me=Ee*_e-ge*H-ie*re-Se*oe;if(L){H=O,re=U,oe=G;var De=Math.sin(L)/h(H,re,oe);H*=De,re*=De,oe*=De,_e=Math.cos(E),Ae=Ae*_e+me*H+Be*oe-Pe*re,Be=Be*_e+me*re+Pe*H-Ae*oe,Pe=Pe*_e+me*oe+Ae*re-Be*H,me=me*_e-Ae*H-Be*re-Pe*oe}var ce=d(Ae,Be,Pe,me);ce>1e-6?(Ae/=ce,Be/=ce,Pe/=ce,me/=ce):(Ae=Be=Pe=0,me=1),this.rotation.set(k,Ae,Be,Pe,me)},b.lookAt=function(k,E,T,L){this.recalcMatrix(k),T=T||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,E,T,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var M=0,g=0;g<3;++g)M+=Math.pow(T[g]-E[g],2);this.radius.set(k,.5*Math.log(Math.max(M,1e-6))),this.center.set(k,T[0],T[1],T[2])},b.translate=function(k,E,T,L){this.center.move(k,E||0,T||0,L||0)},b.setMatrix=function(k,E){var T=this.computedRotation;f(T,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),v(T,T),this.rotation.set(k,T[0],T[1],T[2],T[3]);var L=this.computedMatrix;c(L,E);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,M=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,M-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,E){E>0&&this.radius.set(k,Math.log(E))},b.setDistanceLimits=function(k,E){k>0?k=Math.log(k):k=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=E},b.getDistanceLimits=function(k){var E=this.radius.bounds;return k?(k[0]=Math.exp(E[0][0]),k[1]=Math.exp(E[1][0]),k):[Math.exp(E[0][0]),Math.exp(E[1][0])]},b.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]}},b.fromJSON=function(k){var E=this.lastT(),T=k.center;T&&this.center.set(E,T[0],T[1],T[2]);var L=k.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(E,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var E=k.center||[0,0,0],T=k.rotation||[0,0,0,1],L=k.radius||1;E=[].slice.call(E,0,3),T=[].slice.call(T,0,4),v(T,T);var x=new _(T,E,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),(\"eye\"in k||\"up\"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},9994:function(i,a,o){\"use strict\";var s=o(9618),l=o(8277);i.exports=function(c,f){for(var h=[],d=c,v=1;Array.isArray(d);)h.push(d.length),v*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(v),h)),l(f,c),f)}}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis==\"object\")return globalThis;try{return this||new Function(\"return this\")()}catch(i){if(typeof window==\"object\")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);APe.exports=n})()});var TX=ye((egr,SPe)=>{\"use strict\";SPe.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]}});var CPe=ye((tgr,kPe)=>{\"use strict\";var MPe=TX();kPe.exports=fIt;var EPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function fIt(e){var t,r=[],n=1,i;if(typeof e==\"string\")if(e=e.toLowerCase(),MPe[e])r=MPe[e].slice(),i=\"rgb\";else if(e===\"transparent\")n=0,i=\"rgb\",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i=\"rgb\"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(e)){var l=t[1],u=l===\"rgb\",a=l.replace(/a$/,\"\");i=a;var o=a===\"cmyk\"?4:a===\"gray\"?1:3;r=t[2].trim().split(/\\s*[,\\/]\\s*|\\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a===\"rgb\"?parseFloat(h)*255/100:parseFloat(h);if(a[d]===\"h\"){if(/deg$/.test(h))return parseFloat(h);if(EPe[h]!==void 0)return EPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\\s|\\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join(\"\").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i=\"rgb\",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i=\"rgb\",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i=\"hsl\",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i=\"rgb\",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var PPe=ye((rgr,LPe)=>{\"use strict\";var hIt=CPe();LPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=hIt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]===\"h\"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]===\"h\"&&(r=dIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function dIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var rk=ye((igr,IPe)=>{IPe.exports=vIt;function vIt(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var QD=ye((ngr,RPe)=>{RPe.exports=function(e){switch(e){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}});var ox=ye((agr,DPe)=>{\"use strict\";var pIt=PPe(),eF=rk(),gIt=QD();DPe.exports=function(t,r){(r===\"float\"||!r)&&(r=\"array\"),r===\"uint\"&&(r=\"uint8\"),r===\"uint_clamped\"&&(r=\"uint8_clamped\");var n=gIt(r),i=new n(4),a=r!==\"uint8\"&&r!==\"uint8_clamped\";return(!t.length||typeof t==\"string\")&&(t=pIt(t),t[0]/=255,t[1]/=255,t[2]/=255),mIt(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=eF(Math.floor(t[0]*255),0,255),i[1]=eF(Math.floor(t[1]*255),0,255),i[2]=eF(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:eF(Math.floor(t[3]*255),0,255)),i)};function mIt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var n1=ye((ogr,FPe)=>{\"use strict\";var yIt=ox();function _It(e){return e?yIt(e):[0,0,0,1]}FPe.exports=_It});var a1=ye((sgr,VPe)=>{\"use strict\";var NPe=Eo(),xIt=fd(),tF=ox(),rF=tc(),bIt=Ih().defaultLine,zPe=vv().isArrayOrTypedArray,AX=tF(bIt),UPe=1;function OPe(e,t){var r=e;return r[3]*=t,r}function qPe(e){if(NPe(e))return AX;var t=tF(e);return t.length?t:AX}function BPe(e){return NPe(e)?e:UPe}function wIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=zPe(n),a=zPe(t),o=rF.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=rF.makeColorScaleFuncFromTrace(e):l=qPe,i?u=function(v,_){return v[_]===void 0?AX:tF(l(v[_]))}:u=qPe,a?c=function(v,_){return v[_]===void 0?UPe:BPe(v[_])}:c=BPe,i||a)for(var d=0;d<r;d++)f=u(n,d),h=c(t,d),s[d]=OPe(f,h);else s=OPe(tF(n),t);return s}function TIt(e){var t=rF.extractOpts(e),r=t.colorscale;return t.reversescale&&(r=rF.flipScale(t.colorscale)),r.map(function(n){var i=n[0],a=xIt(n[1]),o=a.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}VPe.exports={formatColor:wIt,parseColorScale:TIt}});var SX=ye((lgr,GPe)=>{\"use strict\";GPe.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]}});var iF=ye((ugr,HPe)=>{\"use strict\";HPe.exports={circle:\"\\u25CF\",\"circle-open\":\"\\u25CB\",square:\"\\u25A0\",\"square-open\":\"\\u25A1\",diamond:\"\\u25C6\",\"diamond-open\":\"\\u25C7\",cross:\"+\",x:\"\\u274C\"}});var WPe=ye((cgr,jPe)=>{\"use strict\";var AIt=qa();function MX(e,t,r,n){if(!t||!t.visible)return null;for(var i=AIt.getComponentMethod(\"errorbars\",\"makeComputeError\")(t),a=new Array(e.length),o=0;o<e.length;o++){var s=i(+e[o],o);if(n.type===\"log\"){var l=n.c2l(e[o]),u=e[o]-s[0],c=e[o]+s[1];if(a[o]=[(n.c2l(u,!0)-l)*r,(n.c2l(c,!0)-l)*r],u>0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function SIt(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function MIt(e,t,r){var n=[MX(e.x,e.error_x,t[0],r.xaxis),MX(e.y,e.error_y,t[1],r.yaxis),MX(e.z,e.error_z,t[2],r.zaxis)],i=SIt(n);if(i===0)return null;for(var a=new Array(i),o=0;o<i;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(n[l])for(var u=0;u<2;u++)s[u][l]=n[l][o][u];a[o]=s}return a}jPe.exports=MIt});var tIe=ye((fgr,eIe)=>{\"use strict\";var EIt=zd().gl_line3d,XPe=zd().gl_scatter3d,kIt=zd().gl_error3d,CIt=zd().gl_mesh3d,LIt=zd().delaunay_triangulate,o1=Dr(),$Pe=n1(),nF=a1().formatColor,PIt=O3(),EX=SX(),IIt=iF(),RIt=ho(),DIt=ip().appendArrayPointValue,FIt=WPe();function QPe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\"\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var CX=QPe.prototype;CX.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel=\"\",this.textLabels&&(o1.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function zIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s<e.length;++s){var l=e[s];isNaN(l[n])||!isFinite(l[n])||isNaN(l[i])||!isFinite(l[i])||(a.push([l[n],l[i]]),o.push(s))}var u=LIt(a);for(s=0;s<u.length;++s)for(var c=u[s],f=0;f<c.length;++f)c[f]=o[c[f]];return{positions:e,cells:u,meshColor:t}}function OIt(e){for(var t=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=e[i];a&&a.copy_zstyle!==!1&&e[2].visible!==!1&&(a=e[2]),!(!a||!a.visible)&&(t[i]=a.width/2,r[i]=$Pe(a.color),n[i]=a.thickness)}return{capSize:t,color:r,lineWidth:n}}function ZPe(e){return e==null?0:e.indexOf(\"left\")>-1?-1:e.indexOf(\"right\")>-1?1:0}function YPe(e){return e==null?0:e.indexOf(\"top\")>-1?-1:e.indexOf(\"bottom\")>-1?1:0}function qIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i<e.length;i++)n[i]=[t,r],e[i]&&(n[i][0]=ZPe(e[i]),n[i][1]=YPe(e[i]));else n[0]=ZPe(e),n[1]=YPe(e);return n}function BIt(e,t){return t(e*4)}function NIt(e){return IIt[e]}function kX(e,t,r,n,i){var a=null;if(o1.isArrayOrTypedArray(e)){a=[];for(var o=0;o<t;o++)e[o]===void 0?a[o]=n:a[o]=r(e[o],i)}else a=r(e,o1.identity);return a}function UIt(e,t){var r=[],n=e.fullSceneLayout,i=e.dataScale,a=n.xaxis,o=n.yaxis,s=n.zaxis,l=t.marker,u=t.line,c=t.x||[],f=t.y||[],h=t.z||[],d=c.length,v=t.xcalendar,_=t.ycalendar,b=t.zcalendar,p,k,E,T,L,x;for(L=0;L<d;L++)p=a.d2l(c[L],0,v)*i[0],k=o.d2l(f[L],0,_)*i[1],E=s.d2l(h[L],0,b)*i[2],r[L]=[p,k,E];if(Array.isArray(t.text))x=t.text;else if(o1.isTypedArray(t.text))x=Array.from(t.text);else if(t.text!==void 0)for(x=new Array(d),L=0;L<d;L++)x[L]=t.text;function C(oe,_e){var Ce=n[oe];return RIt.tickText(Ce,Ce.d2l(_e),!0).text}var M=t.texttemplate;if(M){var g=e.fullLayout,P=g._d3locale,A=Array.isArray(M),z=A?Math.min(M.length,d):d,O=A?function(oe){return M[oe]}:function(){return M};for(x=new Array(z),L=0;L<z;L++){var U={x:c[L],y:f[L],z:h[L]},G={xLabel:C(\"xaxis\",c[L]),yLabel:C(\"yaxis\",f[L]),zLabel:C(\"zaxis\",h[L])},Z={};DIt(Z,t,L),x[L]=o1.texttemplateString({data:[Z,U,t._meta],fallback:t.texttemplatefallback,labels:G,locale:P,template:O(L)})}}if(T={position:r,mode:t.mode,text:x},\"line\"in t&&(T.lineColor=nF(u,1,d),T.lineWidth=u.width,T.lineDashes=u.dash),\"marker\"in t){var j=PIt(t);T.scatterColor=nF(l,1,d),T.scatterSize=kX(l.size,d,BIt,20,j),T.scatterMarker=kX(l.symbol,d,NIt,\"\\u25CF\"),T.scatterLineWidth=l.line.width,T.scatterLineColor=nF(l.line,1,d),T.scatterAngle=0}\"textposition\"in t&&(T.textOffset=qIt(t.textposition),T.textColor=nF(t.textfont,1,d),T.textSize=kX(t.textfont.size,d,o1.identity,12),T.textFontFamily=t.textfont.family,T.textFontWeight=t.textfont.weight,T.textFontStyle=t.textfont.style,T.textFontVariant=t.textfont.variant,T.textAngle=0);var N=[\"x\",\"y\",\"z\"];for(T.project=[!1,!1,!1],T.projectScale=[1,1,1],T.projectOpacity=[1,1,1],L=0;L<3;++L){var H=t.projection[N[L]];(T.project[L]=H.show)&&(T.projectOpacity[L]=H.opacity,T.projectScale[L]=H.scale)}T.errorBounds=FIt(t,i,n);var re=OIt([t.error_x,t.error_y,t.error_z]);return T.errorColor=re.color,T.errorLineWidth=re.lineWidth,T.errorCapSize=re.capSize,T.delaunayAxis=t.surfaceaxis,T.delaunayColor=$Pe(t.surfacecolor),T}function KPe(e){if(o1.isArrayOrTypedArray(e)){var t=e[0];return o1.isArrayOrTypedArray(t)&&(e=t),\"rgb(\"+e.slice(0,3).map(function(r){return Math.round(r*255)})+\")\"}return null}function JPe(e){return o1.isArrayOrTypedArray(e)?e.length===4&&typeof e[0]==\"number\"?KPe(e):e.map(KPe):null}CX.update=function(e){var t=this.scene.glplot.gl,r,n,i,a,o=EX.solid;this.data=e;var s=UIt(this.scene,e);\"mode\"in s&&(this.mode=s.mode),\"lineDashes\"in s&&s.lineDashes in EX&&(o=EX[s.lineDashes]),this.color=JPe(s.scatterColor)||JPe(s.lineColor),this.dataPoints=s.position,r={gl:this.scene.glplot.gl,position:s.position,color:s.lineColor,lineWidth:s.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:e.opacity,connectGaps:e.connectgaps},this.mode.indexOf(\"lines\")!==-1?this.linePlot?this.linePlot.update(r):(this.linePlot=EIt(r),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var l=e.opacity;if(e.marker&&e.marker.opacity!==void 0&&(l*=e.marker.opacity),n={gl:this.scene.glplot.gl,position:s.position,color:s.scatterColor,size:s.scatterSize,glyph:s.scatterMarker,opacity:l,orthographic:!0,lineWidth:s.scatterLineWidth,lineColor:s.scatterLineColor,project:s.project,projectScale:s.projectScale,projectOpacity:s.projectOpacity},this.mode.indexOf(\"markers\")!==-1?this.scatterPlot?this.scatterPlot.update(n):(this.scatterPlot=XPe(n),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),a={gl:this.scene.glplot.gl,position:s.position,glyph:s.text,color:s.textColor,size:s.textSize,angle:s.textAngle,alignment:s.textOffset,font:s.textFontFamily,fontWeight:s.textFontWeight,fontStyle:s.textFontStyle,fontVariant:s.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,this.mode.indexOf(\"text\")!==-1?this.textMarkers?this.textMarkers.update(a):(this.textMarkers=XPe(a),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),i={gl:this.scene.glplot.gl,position:s.position,color:s.errorColor,error:s.errorBounds,lineWidth:s.errorLineWidth,capSize:s.errorCapSize,opacity:e.opacity},this.errorBars?s.errorBounds?this.errorBars.update(i):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):s.errorBounds&&(this.errorBars=kIt(i),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),s.delaunayAxis>=0){var u=zIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=CIt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};CX.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function VIt(e,t){var r=new QPe(e,t.uid);return r.update(t),r}eIe.exports=VIt});var DX=ye((hgr,aIe)=>{\"use strict\";var s1=pf(),GIt=ec(),RX=Tu(),LX=df().axisHoverFormat,{hovertemplateAttrs:HIt,texttemplateAttrs:jIt,templatefallbackAttrs:rIe}=Ll(),iIe=Gl(),WIt=SX(),XIt=iF(),$g=Ao().extendFlat,ZIt=mc().overrideAll,nIe=t_(),YIt=s1.line,J2=s1.marker,KIt=J2.line,JIt=$g({width:YIt.width,dash:{valType:\"enumerated\",values:nIe(WIt),dflt:\"solid\"}},RX(\"line\"));function PX(e){return{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}}}var IX=aIe.exports=ZIt({x:s1.x,y:s1.y,z:{valType:\"data_array\"},text:$g({},s1.text,{}),texttemplate:jIt(),texttemplatefallback:rIe({editType:\"calc\"}),hovertext:$g({},s1.hovertext,{}),hovertemplate:HIt(),hovertemplatefallback:rIe(),xhoverformat:LX(\"x\"),yhoverformat:LX(\"y\"),zhoverformat:LX(\"z\"),mode:$g({},s1.mode,{dflt:\"lines+markers\"}),surfaceaxis:{valType:\"enumerated\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\"color\"},projection:{x:PX(\"x\"),y:PX(\"y\"),z:PX(\"z\")},connectgaps:s1.connectgaps,line:JIt,marker:$g({symbol:{valType:\"enumerated\",values:nIe(XIt),dflt:\"circle\",arrayOk:!0},size:$g({},J2.size,{dflt:8}),sizeref:J2.sizeref,sizemin:J2.sizemin,sizemode:J2.sizemode,opacity:$g({},J2.opacity,{arrayOk:!1}),colorbar:J2.colorbar,line:$g({width:$g({},KIt.width,{arrayOk:!1})},RX(\"marker.line\"))},RX(\"marker\")),textposition:$g({},s1.textposition,{dflt:\"top center\"}),textfont:GIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:\"calc\",colorEditType:\"style\",arrayOk:!0,variantValues:[\"normal\",\"small-caps\"]}),opacity:iIe.opacity,hoverinfo:$g({},iIe.hoverinfo)},\"calc\",\"nested\");IX.x.editType=IX.y.editType=IX.z.editType=\"calc+clearAxisTypes\"});var lIe=ye((dgr,sIe)=>{\"use strict\";var oIe=qa(),$It=Dr(),FX=Ru(),QIt=$p(),e8t=D0(),t8t=F0(),r8t=DX();sIe.exports=function(t,r,n,i){function a(d,v){return $It.coerce(t,r,r8t,d,v)}var o=i8t(t,r,a,i);if(!o){r.visible=!1;return}a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),a(\"mode\"),FX.hasMarkers(r)&&QIt(t,r,n,i,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),FX.hasLines(r)&&(a(\"connectgaps\"),e8t(t,r,n,i,a)),FX.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),t8t(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a(\"surfaceaxis\")>=0&&a(\"surfacecolor\",s||l);for(var u=[\"x\",\"y\",\"z\"],c=0;c<3;++c){var f=\"projection.\"+u[c];a(f+\".show\")&&(a(f+\".opacity\"),a(f+\".scale\"))}var h=oIe.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,s||l||n,{axis:\"z\"}),h(t,r,s||l||n,{axis:\"y\",inherit:\"z\"}),h(t,r,s||l||n,{axis:\"x\",inherit:\"z\"})};function i8t(e,t,r,n){var i=0,a=r(\"x\"),o=r(\"y\"),s=r(\"z\"),l=oIe.getComponentMethod(\"calendars\",\"handleTraceDefaults\");return l(e,t,[\"x\",\"y\",\"z\"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var cIe=ye((vgr,uIe)=>{\"use strict\";var n8t=Rm(),a8t=z0();uIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return n8t(n,r),a8t(t,r),n}});var hIe=ye((pgr,fIe)=>{fIe.exports=o8t;function o8t(e,t){if(typeof e!=\"string\")throw new TypeError(\"must specify type string\");if(t=t||{},typeof document==\"undefined\"&&!t.canvas)return null;var r=t.canvas||document.createElement(\"canvas\");typeof t.width==\"number\"&&(r.width=t.width),typeof t.height==\"number\"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf(\"webgl\")===0&&a.push(\"experimental-\"+e);for(var o=0;o<a.length;o++)if(i=r.getContext(a[o],n),i)return i}catch(s){i=null}return i||null}});var vIe=ye((ggr,dIe)=>{var s8t=hIe();dIe.exports=function(t){return s8t(\"webgl\",t)}});var zX=ye((mgr,gIe)=>{\"use strict\";var pIe=ka(),l8t=function(){};gIe.exports=function(t){for(var r in t)typeof t[r]==\"function\"&&(t[r]=l8t);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement(\"div\");n.className=\"no-webgl\",n.style.cursor=\"pointer\",n.style.fontSize=\"24px\",n.style.color=pIe.defaults[0],n.style.position=\"absolute\",n.style.left=n.style.top=\"0px\",n.style.width=n.style.height=\"100%\",n.style[\"background-color\"]=pIe.lightLine,n.style[\"z-index\"]=30;var i=document.createElement(\"p\");return i.textContent=\"WebGL is not supported by your browser - visit https://get.webgl.org for more info\",i.style.position=\"relative\",i.style.top=\"50%\",i.style.left=\"50%\",i.style.height=\"30%\",i.style.width=\"50%\",i.style.margin=\"-15% 0 0 -25%\",n.appendChild(i),t.container.appendChild(n),t.container.style.background=\"#FFFFFF\",t.container.onclick=function(){window.open(\"https://get.webgl.org\")},!1}});var _Ie=ye((ygr,yIe)=>{\"use strict\";var $2=n1(),u8t=Dr(),c8t=[\"xaxis\",\"yaxis\",\"zaxis\"];function mIe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickFontWeight=[\"normal\",\"normal\",\"normal\",\"normal\"],this.tickFontStyle=[\"normal\",\"normal\",\"normal\",\"normal\"],this.tickFontVariant=[\"normal\",\"normal\",\"normal\",\"normal\"],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=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"Open Sans\",\"Open Sans\",\"Open Sans\"],this.labelSize=[20,20,20],this.labelFontWeight=[\"normal\",\"normal\",\"normal\",\"normal\"],this.labelFontStyle=[\"normal\",\"normal\",\"normal\",\"normal\"],this.labelFontVariant=[\"normal\",\"normal\",\"normal\",\"normal\"],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()}var f8t=mIe.prototype;f8t.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[c8t[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?u8t.templateString(i.title.text,e._meta):i.title.text,\"font\"in i.title&&(i.title.font.color&&(r.labelColor[n]=$2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),\"showline\"in i&&(r.lineEnable[n]=i.showline),\"linecolor\"in i&&(r.lineColor[n]=$2(i.linecolor)),\"linewidth\"in i&&(r.lineWidth[n]=i.linewidth),\"showgrid\"in i&&(r.gridEnable[n]=i.showgrid),\"gridcolor\"in i&&(r.gridColor[n]=$2(i.gridcolor)),\"gridwidth\"in i&&(r.gridWidth[n]=i.gridwidth),i.type===\"log\"?r.zeroEnable[n]=!1:\"zeroline\"in i&&(r.zeroEnable[n]=i.zeroline),\"zerolinecolor\"in i&&(r.zeroLineColor[n]=$2(i.zerolinecolor)),\"zerolinewidth\"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),\"ticks\"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,\"ticklen\"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),\"tickcolor\"in i&&(r.lineTickColor[n]=$2(i.tickcolor)),\"tickwidth\"in i&&(r.lineTickWidth[n]=i.tickwidth),\"tickangle\"in i&&(r.tickAngle[n]=i.tickangle===\"auto\"?-3600:Math.PI*-i.tickangle/180),\"showticklabels\"in i&&(r.tickEnable[n]=i.showticklabels),\"tickfont\"in i&&(i.tickfont.color&&(r.tickColor[n]=$2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),\"mirror\"in i?[\"ticks\",\"all\",\"allticks\"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,\"showbackground\"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=$2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function h8t(e,t){var r=new mIe;return r.merge(e,t),r}yIe.exports=h8t});var wIe=ye((_gr,bIe)=>{\"use strict\";var d8t=n1(),v8t=[\"xaxis\",\"yaxis\",\"zaxis\"];function xIe(){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]}var p8t=xIe.prototype;p8t.merge=function(e){for(var t=0;t<3;++t){var r=e[v8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=d8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function g8t(e){var t=new xIe;return t.merge(e),t}bIe.exports=g8t});var SIe=ye((xgr,AIe)=>{\"use strict\";AIe.exports=b8t;var TIe=ho(),m8t=Dr(),y8t=[\"xaxis\",\"yaxis\",\"zaxis\"],_8t=[0,0,0];function x8t(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;t[r]=i}return t}function b8t(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,n=e.fullSceneLayout,i=[[],[],[]],a=0;a<3;++a){var o=n[y8t[a]];if(o._length=(r[a].hi-r[a].lo)*r[a].pixelsPerDataUnit/e.dataScale[a],Math.abs(o._length)===1/0||isNaN(o._length))i[a]=[];else{o._input_range=o.range.slice(),o.range[0]=r[a].lo/e.dataScale[a],o.range[1]=r[a].hi/e.dataScale[a],o._m=1/(e.dataScale[a]*r[a].pixelsPerDataUnit),o.range[0]===o.range[1]&&(o.range[0]-=1,o.range[1]+=1);var s=o.tickmode;if(o.tickmode===\"auto\"){o.tickmode=\"linear\";var l=o.nticks||m8t.constrain(o._length/40,4,9);TIe.autoTicks(o,Math.abs(o.range[1]-o.range[0])/l)}for(var u=TIe.calcTicks(o,{msUTC:!0}),c=0;c<u.length;++c)u[c].x=u[c].x*e.dataScale[a],o.type===\"date\"&&(u[c].text=u[c].text.replace(/\\<br\\>/g,\" \"));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){_8t[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=x8t(i)}});var IIe=ye((bgr,PIe)=>{\"use strict\";var kIe=zd().gl_plot3d,w8t=kIe.createCamera,MIe=kIe.createScene,T8t=vIe(),A8t=UL(),sF=qa(),cp=Dr(),oF=cp.preserveDrawingBuffer(),lF=ho(),Qg=vf(),S8t=n1(),M8t=zX(),E8t=XU(),k8t=_Ie(),C8t=wIe(),L8t=SIe(),P8t=Mg().applyAutorangeOptions,ik,aF,CIe=!1;function LIe(e,t){var r=document.createElement(\"div\"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");i.style.position=\"absolute\",i.style.top=i.style.left=\"0px\",i.style.width=i.style.height=\"100%\",i.style[\"z-index\"]=20,i.style[\"pointer-events\"]=\"none\",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position=\"absolute\",r.style.top=r.style.left=\"0px\",r.style.width=r.style.height=\"100%\",n.appendChild(r),this.fullLayout=t,this.id=e.id||\"scene\",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=k8t(t,t[this.id]),this.spikeOptions=C8t(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=sF.getComponentMethod(\"annotations3d\",\"convert\"),this.drawAnnotations=sF.getComponentMethod(\"annotations3d\",\"draw\"),this.initializeGLPlot()}var Sv=LIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:oF,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!aF&&(ik=document.createElement(\"canvas\"),aF=T8t({canvas:ik,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!aF))throw new Error(\"error creating static canvas/context for image server\");t.gl=aF,t.canvas=ik}return t};var EIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=MIe(t)}catch(n){if(e.staticMode||!EIe||oF)r=!1;else{cp.warn([\"webgl setup failed possibly due to\",\"false preserveDrawingBuffer config.\",\"The mobile/tablet device may not be detected by is-mobile module.\",\"Enabling preserveDrawingBuffer in second attempt to create webgl scene...\"].join(\" \"));try{oF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=MIe(t)}catch(i){oF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return EIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type===\"orthographic\";e.camera=w8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:\"orbit\"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return M8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+\".camera\"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+\".aspectratio\"]=e.glplot.getAspectratio(),n[e.id].aspectmode!==\"manual\"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+\".aspectmode\"]=\"manual\")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit(\"plotly_relayout\",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener(\"mouseup\",function(){a(e)}),e.glplot.canvas.addEventListener(\"touchstart\",function(){CIe=!0}),e.glplot.canvas.addEventListener(\"wheel\",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},A8t?{passive:!1}:!1),e.glplot.canvas.addEventListener(\"mousemove\",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit(\"plotly_relayouting\",o)}}),e.staticMode||e.glplot.canvas.addEventListener(\"webglcontextlost\",function(o){r&&r.emit&&r.emit(\"plotly_webglcontextlost\",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+s+\" \"+l),n.setAttributeNS(null,\"width\",s),n.setAttributeNS(null,\"height\",l),L8t(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h<u.length;++h)r=e.traces[u[h]],r.data.hoverinfo!==\"skip\"&&r.handlePick(f)&&(c=r),r.setContourLevels&&r.setContourLevels();function d(P,A,z){var O=e.fullSceneLayout[P+\"axis\"];return O.type!==\"log\"&&(A=O.d2l(A)),lF.hoverLabelText(O,A,z)}if(c!==null){var v=E8t(e.glplot.cameraParams,f.dataCoordinate);r=c.data;var _=t._fullData[r.index],b=f.index,p={xLabel:d(\"x\",f.traceCoordinate[0],r.xhoverformat),yLabel:d(\"y\",f.traceCoordinate[1],r.yhoverformat),zLabel:d(\"z\",f.traceCoordinate[2],r.zhoverformat)},k=Qg.castHoverinfo(_,e.fullLayout,b),E=(k||\"\").split(\"+\"),T=k&&k===\"all\";!_.hovertemplate&&!T&&(E.indexOf(\"x\")===-1&&(p.xLabel=void 0),E.indexOf(\"y\")===-1&&(p.yLabel=void 0),E.indexOf(\"z\")===-1&&(p.zLabel=void 0),E.indexOf(\"text\")===-1&&(f.textLabel=void 0),E.indexOf(\"name\")===-1&&(c.name=void 0));var L,x=[];r.type===\"cone\"||r.type===\"streamtube\"?(p.uLabel=d(\"x\",f.traceCoordinate[3],r.uhoverformat),(T||E.indexOf(\"u\")!==-1)&&x.push(\"u: \"+p.uLabel),p.vLabel=d(\"y\",f.traceCoordinate[4],r.vhoverformat),(T||E.indexOf(\"v\")!==-1)&&x.push(\"v: \"+p.vLabel),p.wLabel=d(\"z\",f.traceCoordinate[5],r.whoverformat),(T||E.indexOf(\"w\")!==-1)&&x.push(\"w: \"+p.wLabel),p.normLabel=f.traceCoordinate[6].toPrecision(3),(T||E.indexOf(\"norm\")!==-1)&&x.push(\"norm: \"+p.normLabel),r.type===\"streamtube\"&&(p.divergenceLabel=f.traceCoordinate[7].toPrecision(3),(T||E.indexOf(\"divergence\")!==-1)&&x.push(\"divergence: \"+p.divergenceLabel)),f.textLabel&&x.push(f.textLabel),L=x.join(\"<br>\")):r.type===\"isosurface\"||r.type===\"volume\"?(p.valueLabel=lF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push(\"value: \"+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join(\"<br>\")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:b};Qg.appendArrayPointValue(C,_,b),r._module.eventData&&(C=_._module.eventData(C,f,_,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Qg.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Qg.castHoverOption(_,b,\"bgcolor\")||c.color,borderColor:Qg.castHoverOption(_,b,\"bordercolor\"),fontFamily:Qg.castHoverOption(_,b,\"font.family\"),fontSize:Qg.castHoverOption(_,b,\"font.size\"),fontColor:Qg.castHoverOption(_,b,\"font.color\"),nameLength:Qg.castHoverOption(_,b,\"namelength\"),textAlign:Qg.castHoverOption(_,b,\"align\"),hovertemplate:cp.castOption(_,b,\"hovertemplate\"),hovertemplateLabels:cp.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||CIe)?t.emit(\"plotly_click\",M):t.emit(\"plotly_hover\",M),this.oldEventData=M}else Qg.loneUnhover(n),this.oldEventData&&t.emit(\"plotly_unhover\",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){cp.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nk=[\"xaxis\",\"yaxis\",\"zaxis\"];function I8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=nk[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+\"calendar\"],c=t[\"_\"+o+\"length\"];if(!cp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(cp.isArrayOrTypedArray(l[h]))for(var d=0;d<l[h].length;++d)f=s.d2l(l[h][d],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f));else f=s.d2l(l[h],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f))}}function R8t(e,t){for(var r=e.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=nk[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var u=n[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(t[0][i]=Math.min(t[0][i],c),t[1][i]=Math.max(t[1][i],c))}}}Sv.plot=function(e,t,r){var n=this;if(n.plotArgs=[e,t,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=t[n.id],f=r[n.id];n.fullLayout=t,n.fullSceneLayout=c,n.axesOptions.merge(t,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(S8t(c.bgcolor)),n.setConvert(l),e?Array.isArray(e)||(e=[e]):e=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&I8t(this,i,h);R8t(this,h);var d=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=d,n.convertAnnotations(this),o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&(a=n.traces[i.uid],a?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var v=Object.keys(n.traces);e:for(o=0;o<v.length;++o){for(s=0;s<e.length;++s)if(e[s].uid===v[o]&&e[s].visible===!0&&e[s]._length!==0)continue e;a=n.traces[v[o]],a.dispose(),delete n.traces[v[o]]}n.glplot.objects.sort(function(oe,_e){return oe._trace.data.index-_e._trace.data.index});var _=[[0,0,0],[0,0,0]],b=[],p={};for(o=0;o<3;++o){l=c[nk[o]],u=l.type,u in p?(p[u].acc*=d[o],p[u].count+=1):p[u]={acc:d[o],count:1};var k;if(l.autorange){_[0][o]=1/0,_[1][o]=-1/0;var E=n.glplot.objects,T=n.fullSceneLayout.annotations||[],L=l._name.charAt(0);for(s=0;s<E.length;s++){var x=E[s],C=x.bounds,M=x._trace.data._pad||0;x.constructor.name===\"ErrorBars\"&&l._lowerLogErrorBound?_[0][o]=Math.min(_[0][o],l._lowerLogErrorBound):_[0][o]=Math.min(_[0][o],C[0][o]/d[o]-M),_[1][o]=Math.max(_[1][o],C[1][o]/d[o]+M)}for(s=0;s<T.length;s++){var g=T[s];if(g.visible){var P=l.r2l(g[L]);_[0][o]=Math.min(_[0][o],P),_[1][o]=Math.max(_[1][o],P)}}if(\"rangemode\"in l&&l.rangemode===\"tozero\"&&(_[0][o]=Math.min(_[0][o],0),_[1][o]=Math.max(_[1][o],0)),_[0][o]>_[1][o])_[0][o]=-1,_[1][o]=1;else{var A=_[1][o]-_[0][o];_[0][o]-=A/32,_[1][o]+=A/32}if(k=[_[0][o],_[1][o]],k=P8t(k,l),_[0][o]=k[0],_[1][o]=k[1],l.isReversed()){var z=_[0][o];_[0][o]=_[1][o],_[1][o]=z}}else k=l.range,_[0][o]=l.r2l(k[0]),_[1][o]=l.r2l(k[1]);_[0][o]===_[1][o]&&(_[0][o]-=1,_[1][o]+=1),b[o]=_[1][o]-_[0][o],l.range=[_[0][o],_[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var O,U=c.aspectmode;if(U===\"cube\")O=[1,1,1];else if(U===\"manual\"){var G=c.aspectratio;O=[G.x,G.y,G.z]}else if(U===\"auto\"||U===\"data\"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[nk[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}U===\"data\"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?O=Z:O=[1,1,1]}else throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");c.aspectratio.x=f.aspectratio.x=O[0],c.aspectratio.y=f.aspectratio.y=O[1],c.aspectratio.z=f.aspectratio.z=O[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var re=n.container.style;re.position=\"absolute\",re.left=H.l+N.x[0]*H.w+\"px\",re.top=H.t+(1-N.y[1])*H.h+\"px\",re.width=H.w*(N.x[1]-N.x[0])+\"px\",re.height=H.h*(N.y[1]-N.y[0])+\"px\"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener(\"wheel\",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function D8t(e){return[[e.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]]}function F8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?\"orthographic\":\"perspective\"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),F8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,D8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type===\"orthographic\",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=cp.nestedProperty(e,t.id+\".camera\"),i=n.get();function a(u,c,f,h){var d=[\"up\",\"center\",\"eye\"],v=[\"x\",\"y\",\"z\"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=cp.nestedProperty(e,t.id+\".aspectratio\"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=cp.nestedProperty(e,t.id+\".camera\"),a=i.get(),h[t.id+\".camera\"]=a),c&&(o=t.glplot.getAspectratio(),s=cp.nestedProperty(e,t.id+\".aspectratio\"),l=s.get(),h[t.id+\".aspectratio\"]=l),sF.call(\"_storeDirectGUIEdit\",e,r._preGUI,h),u){i.set(n);var d=cp.nestedProperty(r,t.id+\".camera\");d.set(n)}if(c){s.set(o);var v=cp.nestedProperty(r,t.id+\".aspectratio\");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e===\"orbit\")n.mode=\"orbit\",n.keyBindingMode=\"rotate\";else if(e===\"turntable\"){n.up=[0,0,1],n.mode=\"turntable\",n.keyBindingMode=\"rotate\";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+\".camera.up\",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;sF.call(\"_storeDirectGUIEdit\",d,a._preGUI,h),o.up=f,cp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function z8t(e,t,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<t;++a)for(var o=0;o<4;++o){var s=4*(t*n+a)+o,l=4*(t*i+a)+o,u=e[s];e[s]=e[l],e[l]=u}}function O8t(e,t,r){for(var n=0;n<r;++n)for(var i=0;i<t;++i){var a=4*(t*n+i),o=e[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e=\"png\"),t.staticMode&&t.container.appendChild(ik),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),z8t(a,n,i),O8t(a,n,i);var o=document.createElement(\"canvas\");o.width=n,o.height=i;var s=o.getContext(\"2d\",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case\"jpeg\":u=o.toDataURL(\"image/jpeg\");break;case\"webp\":u=o.toDataURL(\"image/webp\");break;default:u=o.toDataURL(\"image/png\")}return t.staticMode&&t.container.removeChild(ik),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nk[t]];lF.setConvert(r,e.fullLayout),r.setScale=cp.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},lF.setConvert(e._mockAxis,r)};PIe.exports=LIe});var DIe=ye((wgr,RIe)=>{\"use strict\";RIe.exports={scene:{valType:\"subplotid\",dflt:\"scene\",editType:\"calc+clearAxisTypes\"}}});var qX=ye((Tgr,FIe)=>{\"use strict\";var q8t=ka(),xs=Rd(),OX=Ao().extendFlat,B8t=mc().overrideAll;FIe.exports=B8t({visible:xs.visible,showspikes:{valType:\"boolean\",dflt:!0},spikesides:{valType:\"boolean\",dflt:!0},spikethickness:{valType:\"number\",min:0,dflt:2},spikecolor:{valType:\"color\",dflt:q8t.defaultLine},showbackground:{valType:\"boolean\",dflt:!1},backgroundcolor:{valType:\"color\",dflt:\"rgba(204, 204, 204, 0.5)\"},showaxeslabels:{valType:\"boolean\",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:OX({},xs.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:\"plot\"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:OX({},xs.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:OX({},xs.gridcolor,{dflt:\"rgb(204, 204, 204)\"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},\"plot\",\"from-root\")});var VX=ye((Agr,zIe)=>{\"use strict\";var BX=qX(),N8t=Cc().attributes,NX=Ao().extendFlat,U8t=Dr().counterRegex;function UX(e,t,r){return{x:{valType:\"number\",dflt:e,editType:\"camera\"},y:{valType:\"number\",dflt:t,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}zIe.exports={_arrayAttrRegexps:[U8t(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:NX(UX(0,0,1),{}),center:NX(UX(0,0,0),{}),eye:NX(UX(1.25,1.25,1.25),{}),projection:{type:{valType:\"enumerated\",values:[\"perspective\",\"orthographic\"],dflt:\"perspective\",editType:\"calc\"},editType:\"calc\"},editType:\"camera\"},domain:N8t({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:BX,yaxis:BX,zaxis:BX,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"plot\"}});var NIe=ye((Sgr,BIe)=>{\"use strict\";var V8t=fd().mix,OIe=Dr(),G8t=vl(),H8t=qX(),j8t=PU(),W8t=f4(),qIe=[\"xaxis\",\"yaxis\",\"zaxis\"],X8t=100*136/187;BIe.exports=function(t,r,n){var i,a;function o(u,c){return OIe.coerce(i,a,H8t,u,c)}for(var s=0;s<qIe.length;s++){var l=qIe[s];i=t[l]||{},a=G8t.newContainer(r,l),a._id=l[0]+n.scene,a._name=l,j8t(i,a,o,n),W8t(i,a,o,{font:n.font,letter:l[0],data:n.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:n.bgColor,calendar:n.calendar},n.fullLayout),o(\"gridcolor\",V8t(a.color,n.bgColor,X8t).toRgbString()),o(\"title.text\",l[0]),a.setScale=OIe.noop,o(\"showspikes\")&&(o(\"spikesides\"),o(\"spikethickness\"),o(\"spikecolor\",a.color)),o(\"showaxeslabels\"),o(\"showbackground\")&&o(\"backgroundcolor\")}}});var HIe=ye((Mgr,GIe)=>{\"use strict\";var Z8t=Dr(),Y8t=ka(),K8t=qa(),J8t=O_(),$8t=NIe(),UIe=VX(),Q8t=Id().getSubplotData,VIe=\"gl3d\";GIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=Z8t.validate(t[o],UIe[o]);if(s)return t[o]}}J8t(t,r,n,{type:VIe,attributes:UIe,handleDefaults:eRt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function eRt(e,t,r,n){for(var i=r(\"bgcolor\"),a=Y8t.combine(i,n.paper_bgcolor),o=[\"up\",\"center\",\"eye\"],s=0;s<o.length;s++)r(\"camera.\"+o[s]+\".x\"),r(\"camera.\"+o[s]+\".y\"),r(\"camera.\"+o[s]+\".z\");r(\"camera.projection.type\");var l=!!r(\"aspectratio.x\")&&!!r(\"aspectratio.y\")&&!!r(\"aspectratio.z\"),u=l?\"manual\":\"auto\",c=r(\"aspectmode\",u);l||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},c===\"manual\"&&(t.aspectmode=\"auto\"),e.aspectmode=t.aspectmode);var f=Q8t(n.fullData,VIe,n.id);$8t(e,t,{font:n.font,scene:n.id,data:f,bgColor:a,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),K8t.getComponentMethod(\"annotations3d\",\"handleDefaults\")(e,t,n);var h=n.getDfltFromLayout(\"dragmode\");if(h!==!1&&!h)if(h=\"orbit\",e.camera&&e.camera.up){var d=e.camera.up.x,v=e.camera.up.y,_=e.camera.up.z;_!==0&&(!d||!v||!_||_/Math.sqrt(d*d+v*v+_*_)>.999)&&(h=\"turntable\")}else h=\"turntable\";r(\"dragmode\",h),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}});var sx=ye(fp=>{\"use strict\";var tRt=mc().overrideAll,rRt=W1(),iRt=IIe(),nRt=Id().getSubplotData,aRt=Dr(),oRt=Wp(),XA=\"gl3d\",GX=\"scene\";fp.name=XA;fp.attr=GX;fp.idRoot=GX;fp.idRegex=fp.attrRegex=aRt.counterRegex(\"scene\");fp.attributes=DIe();fp.layoutAttributes=VX();fp.baseLayoutAttrOverrides=tRt({hoverlabel:rRt.hoverlabel},\"plot\",\"nested\");fp.supplyLayoutDefaults=HIe();fp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[XA],a=0;a<i.length;a++){var o=i[a],s=nRt(n,XA,o),l=r[o],u=l.camera,c=l._scene;c||(c=new iRt({id:o,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:u},r),l._scene=c),c.viewInitial||(c.viewInitial={up:{x:u.up.x,y:u.up.y,z:u.up.z},eye:{x:u.eye.x,y:u.eye.y,z:u.eye.z},center:{x:u.center.x,y:u.center.y,z:u.center.z}}),c.plot(s,r,t.layout)}};fp.clean=function(e,t,r,n){for(var i=n._subplots[XA]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\".annotation-\"+o).remove())}};fp.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[XA],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._scene,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:oRt.svg,\"xlink:href\":l,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:\"none\"}),s.destroy()}};fp.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var r=t.slice(5);return r===\"1\"&&(r=\"\"),GX+r}};fp.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[XA],n=0;n<r.length;n++){var i=t[r[n]]._scene;i.updateFx(t.dragmode,t.hovermode)}}});var WIe=ye((kgr,jIe)=>{\"use strict\";jIe.exports={plot:tIe(),attributes:DX(),markerSymbols:iF(),supplyDefaults:lIe(),colorbar:[{container:\"marker\",min:\"cmin\",max:\"cmax\"},{container:\"line\",min:\"cmin\",max:\"cmax\"}],calc:cIe(),moduleType:\"trace\",name:\"scatter3d\",basePlotModule:sx(),categories:[\"gl3d\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var ZIe=ye((Cgr,XIe)=>{\"use strict\";XIe.exports=WIe()});var ak=ye((Lgr,JIe)=>{\"use strict\";var YIe=ka(),sRt=Tu(),HX=df().axisHoverFormat,{hovertemplateAttrs:lRt,templatefallbackAttrs:uRt}=Ll(),KIe=Gl(),jX=Ao().extendFlat,cRt=mc().overrideAll;function WX(e){return{valType:\"boolean\",dflt:!1}}function XX(e){return{show:{valType:\"boolean\",dflt:!1},start:{valType:\"number\",dflt:null,editType:\"plot\"},end:{valType:\"number\",dflt:null,editType:\"plot\"},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\"},project:{x:WX(\"x\"),y:WX(\"y\"),z:WX(\"z\")},color:{valType:\"color\",dflt:YIe.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:YIe.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var ZX=JIe.exports=cRt(jX({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:lRt(),hovertemplatefallback:uRt(),xhoverformat:HX(\"x\"),yhoverformat:HX(\"y\"),zhoverformat:HX(\"z\"),connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},surfacecolor:{valType:\"data_array\"}},sRt(\"\",{colorAttr:\"z or surfacecolor\",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:\"calc\"}),{contours:{x:XX(\"x\"),y:XX(\"y\"),z:XX(\"z\")},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05,description:\"Represents the level that incident rays are reflected in a single direction, causing shine.\"},roughness:{valType:\"number\",min:0,max:1,dflt:.5,description:\"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine.\"},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},opacityscale:{valType:\"any\",editType:\"calc\"},hoverinfo:jX({},KIe.hoverinfo),showlegend:jX({},KIe.showlegend,{dflt:!1})}),\"calc\",\"nested\");ZX.x.editType=ZX.y.editType=ZX.z.editType=\"calc+clearAxisTypes\"});var KX=ye((Pgr,e8e)=>{\"use strict\";var fRt=qa(),$Ie=Dr(),hRt=td(),dRt=ak(),YX=.1;function vRt(e,t){for(var r=[],n=32,i=0;i<n;i++){var a=i/(n-1),o=t+(1-t)*(1-Math.pow(Math.sin(e*a*Math.PI),2));r.push([a,Math.max(0,Math.min(1,o))])}return r}function pRt(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var n=e[r];if(n.length!==2||+n[0]<t)return!1;t=+n[0]}return!0}function gRt(e,t,r,n){var i,a;function o(b,p){return $Ie.coerce(e,t,dRt,b,p)}var s=o(\"x\"),l=o(\"y\"),u=o(\"z\");if(!u||!u.length||s&&s.length<1||l&&l.length<1){t.visible=!1;return}t._xlength=Array.isArray(s)&&$Ie.isArrayOrTypedArray(s[0])?u.length:u[0].length,t._ylength=u.length;var c=fRt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");c(e,t,[\"x\",\"y\",\"z\"],n),o(\"text\"),o(\"hovertext\"),o(\"hovertemplate\"),o(\"hovertemplatefallback\"),o(\"xhoverformat\"),o(\"yhoverformat\"),o(\"zhoverformat\"),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"hidesurface\",\"connectgaps\",\"opacity\"].forEach(function(b){o(b)});var f=o(\"surfacecolor\"),h=[\"x\",\"y\",\"z\"];for(i=0;i<3;++i){var d=\"contours.\"+h[i],v=o(d+\".show\"),_=o(d+\".highlight\");if(v||_)for(a=0;a<3;++a)o(d+\".project.\"+h[a]);v&&(o(d+\".color\"),o(d+\".width\"),o(d+\".usecolormap\")),_&&(o(d+\".highlightcolor\"),o(d+\".highlightwidth\")),o(d+\".start\"),o(d+\".end\"),o(d+\".size\")}hRt(e,t,n,o,{prefix:\"\",cLetter:\"c\"}),QIe(e,t,n,o),t._length=null}function QIe(e,t,r,n){var i=n(\"opacityscale\");i===\"max\"?t.opacityscale=[[0,YX],[1,1]]:i===\"min\"?t.opacityscale=[[0,1],[1,YX]]:i===\"extremes\"?t.opacityscale=vRt(1,YX):pRt(i)||(t.opacityscale=void 0)}e8e.exports={supplyDefaults:gRt,opacityscaleDefaults:QIe}});var i8e=ye((Igr,r8e)=>{\"use strict\";var t8e=gv();r8e.exports=function(t,r){r.surfacecolor?t8e(t,r,{vals:r.surfacecolor,containerStr:\"\",cLetter:\"c\"}):t8e(t,r,{vals:r.z,containerStr:\"\",cLetter:\"c\"})}});var u8e=ye((Rgr,l8e)=>{\"use strict\";var mRt=zd().gl_surface3d,ZA=zd().ndarray,yRt=zd().ndarray_linear_interpolate.d2,_Rt=c8(),xRt=f8(),ok=Dr().isArrayOrTypedArray,bRt=a1().parseColorScale,n8e=n1(),wRt=tc().extractOpts;function o8e(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var em=o8e.prototype;em.getXat=function(e,t,r,n){var i=ok(this.data.x)?ok(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};em.getYat=function(e,t,r,n){var i=ok(this.data.y)?ok(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};em.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};em.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return ok(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel=\"\",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function TRt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var YA=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function ARt(e,t){if(e<t)return 0;for(var r=0;Math.floor(e%t)===0;)e/=t,r++;return r}function JX(e){for(var t=[],r=0;r<YA.length;r++){var n=YA[r];t.push(ARt(e,n))}return t}function SRt(e){for(var t=JX(e),r=e,n=0;n<YA.length;n++)if(t[n]>0){r=YA[n];break}return r}function MRt(e,t){if(!(e<1||t<1)){for(var r=JX(e),n=JX(t),i=1,a=0;a<YA.length;a++)i*=Math.pow(YA[a],Math.max(r[a],n[a]));return i}}function ERt(e){if(e.length!==0){for(var t=1,r=0;r<e.length;r++)t=MRt(t,e[r]);return t}}em.calcXnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getXat(t-1,0),i=this.getXat(t,0);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};em.calcYnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getYat(0,t-1),i=this.getYat(0,t);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};var s8e=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],a8e=s8e[9],uF=s8e[13];em.estimateScale=function(e,t){for(var r=t===0?this.calcXnums(e):this.calcYnums(e),n=1+ERt(r);n<a8e;)n*=2;for(;n>uF;)n--,n/=SRt(n),n++,n<a8e&&(n=uF);var i=Math.round(n/e);return i>1?i:1};function kRt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function CRt(e,t,r){return LRt(e,t,kRt,r),e}function LRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s<a;s++)for(var l=0;l<o;l++)r(i,[s,l],n),e.set(s,l,yRt(t,i[0],i[1]));return e}em.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],i=e[0].shape[1],a=Math.floor(e[0].shape[0]*t+1)|0,o=Math.floor(e[0].shape[1]*r+1)|0,s=1+n+1,l=1+i+1,u=ZA(new Float32Array(s*l),[s,l]),c=[1/t,0,0,0,1/r,0,0,0,1],f=0;f<e.length;++f){this.surface.padField(u,e[f]);var h=ZA(new Float32Array(a*o),[a,o]);CRt(h,u,c),e[f]=h}};function PRt(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}r===!1&&e.push(t)}em.setContourLevels=function(){var e=[[],[],[]],t=[!1,!1,!1],r=!1,n,i,a;for(n=0;n<3;++n)if(this.showContour[n]&&(r=!0,this.contourSize[n]>0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];i<this.contourEnd[n];i+=this.contourSize[n])a=i*this.scene.dataScale[n],PRt(e[n],a);if(r){var o=[[],[],[]];for(n=0;n<3;++n)this.showContour[n]&&(o[n]=t[n]?e[n]:this.scene.contourLevels[n]);this.surface.update({levels:o})}};em.update=function(e){var t=this.scene,r=t.fullSceneLayout,n=this.surface,i=bRt(e),a=t.dataScale,o=e.z[0].length,s=e._ylength,l=t.contourLevels;this.data=e;var u,c,f,h,d=[];for(u=0;u<3;u++)for(d[u]=[],c=0;c<o;c++)d[u][c]=[];for(c=0;c<o;c++)for(f=0;f<s;f++)d[0][c][f]=this.getXat(c,f,e.xcalendar,r.xaxis),d[1][c][f]=this.getYat(c,f,e.ycalendar,r.yaxis),d[2][c][f]=this.getZat(c,f,e.zcalendar,r.zaxis);if(e.connectgaps)for(e._emptypoints=xRt(d[2]),_Rt(d[2],e._emptypoints),e._interpolatedZ=[],c=0;c<o;c++)for(e._interpolatedZ[c]=[],f=0;f<s;f++)e._interpolatedZ[c][f]=d[2][c][f];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h==null?d[u][c][f]=NaN:h=d[u][c][f]*=a[u];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(this.minValues[u]>h&&(this.minValues[u]=h),this.maxValues[u]<h&&(this.maxValues[u]=h));for(u=0;u<3;u++)this.objectOffset[u]=.5*(this.minValues[u]+this.maxValues[u]);for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(d[u][c][f]-=this.objectOffset[u]);var v=[ZA(new Float32Array(o*s),[o,s]),ZA(new Float32Array(o*s),[o,s]),ZA(new Float32Array(o*s),[o,s])];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)v[u].set(c,f,d[u][c][f]);d=[];var _={colormap:i,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!e.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],opacityscale:e.opacityscale,opacity:e.opacity},b=wRt(e);if(_.intensityBounds=[b.min,b.max],e.surfacecolor){var p=ZA(new Float32Array(o*s),[o,s]);for(c=0;c<o;c++)for(f=0;f<s;f++)p.set(c,f,e.surfacecolor[f][c]);v.push(p)}else _.intensityBounds[0]*=a[2],_.intensityBounds[1]*=a[2];(uF<v[0].shape[0]||uF<v[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(v[0].shape[0],0),this.dataScaleY=this.estimateScale(v[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(v)),e.surfacecolor&&(_.intensity=v.pop());var k=[!0,!0,!0],E=[\"x\",\"y\",\"z\"];for(u=0;u<3;++u){var T=e.contours[E[u]];k[u]=T.highlight,_.showContour[u]=T.show||T.highlight,_.showContour[u]&&(_.contourProject[u]=[T.project.x,T.project.y,T.project.z],T.show?(this.showContour[u]=!0,_.levels[u]=l[u],n.highlightColor[u]=_.contourColor[u]=n8e(T.color),T.usecolormap?n.highlightTint[u]=_.contourTint[u]=0:n.highlightTint[u]=_.contourTint[u]=1,_.contourWidth[u]=T.width,this.contourStart[u]=T.start,this.contourEnd[u]=T.end,this.contourSize[u]=T.size):(this.showContour[u]=!1,this.contourStart[u]=null,this.contourEnd[u]=null,this.contourSize[u]=0),T.highlight&&(_.dynamicColor[u]=n8e(T.highlightcolor),_.dynamicWidth[u]=T.highlightwidth))}TRt(i)&&(_.vertexColor=!0),_.objectOffset=this.objectOffset,_.coords=v,n.update(_),n.visible=e.visible,n.enableDynamic=k,n.enableHighlight=k,n.snapToData=!0,\"lighting\"in e&&(n.ambientLight=e.lighting.ambient,n.diffuseLight=e.lighting.diffuse,n.specularLight=e.lighting.specular,n.roughness=e.lighting.roughness,n.fresnel=e.lighting.fresnel),\"lightposition\"in e&&(n.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z])};em.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function IRt(e,t){var r=e.glplot.gl,n=mRt({gl:r}),i=new o8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}l8e.exports=IRt});var f8e=ye((Dgr,c8e)=>{\"use strict\";c8e.exports={attributes:ak(),supplyDefaults:KX().supplyDefaults,colorbar:{min:\"cmin\",max:\"cmax\"},calc:i8e(),plot:u8e(),moduleType:\"trace\",name:\"surface\",basePlotModule:sx(),categories:[\"gl3d\",\"2dMap\",\"showLegend\"],meta:{}}});var d8e=ye((Fgr,h8e)=>{\"use strict\";h8e.exports=f8e()});var KA=ye((zgr,p8e)=>{\"use strict\";var RRt=Tu(),$X=df().axisHoverFormat,{hovertemplateAttrs:DRt,templatefallbackAttrs:FRt}=Ll(),lx=ak(),v8e=Gl(),ux=Ao().extendFlat;p8e.exports=ux({x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:DRt({editType:\"calc\"}),hovertemplatefallback:FRt({editType:\"calc\"}),xhoverformat:$X(\"x\"),yhoverformat:$X(\"y\"),zhoverformat:$X(\"z\"),delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},intensitymode:{valType:\"enumerated\",values:[\"vertex\",\"cell\"],dflt:\"vertex\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"}},RRt(\"\",{colorAttr:\"`intensity`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:lx.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:ux({},lx.contours.x.show,{}),color:lx.contours.x.color,width:lx.contours.x.width,editType:\"calc\"},lightposition:{x:ux({},lx.lightposition.x,{dflt:1e5}),y:ux({},lx.lightposition.y,{dflt:1e5}),z:ux({},lx.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:ux({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\",description:\"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry.\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\",description:\"Epsilon for face normals calculation avoids math issues arising from degenerate geometry.\"},editType:\"calc\"},lx.lighting),hoverinfo:ux({},v8e.hoverinfo,{editType:\"calc\"}),showlegend:ux({},v8e.showlegend,{dflt:!1})})});var fF=ye((Ogr,m8e)=>{\"use strict\";var zRt=Tu(),cF=df().axisHoverFormat,{hovertemplateAttrs:ORt,templatefallbackAttrs:qRt}=Ll(),sk=KA(),g8e=Gl(),QX=Ao().extendFlat,BRt=mc().overrideAll;function eZ(e){return{show:{valType:\"boolean\",dflt:!1},locations:{valType:\"data_array\",dflt:[]},fill:{valType:\"number\",min:0,max:1,dflt:1}}}function tZ(e){return{show:{valType:\"boolean\",dflt:!0},fill:{valType:\"number\",min:0,max:1,dflt:1}}}var JA=m8e.exports=BRt(QX({x:{valType:\"data_array\"},y:{valType:\"data_array\"},z:{valType:\"data_array\"},value:{valType:\"data_array\"},isomin:{valType:\"number\"},isomax:{valType:\"number\"},surface:{show:{valType:\"boolean\",dflt:!0},count:{valType:\"integer\",dflt:2,min:1},fill:{valType:\"number\",min:0,max:1,dflt:1},pattern:{valType:\"flaglist\",flags:[\"A\",\"B\",\"C\",\"D\",\"E\"],extras:[\"all\",\"odd\",\"even\"],dflt:\"all\"}},spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:.15}},slices:{x:eZ(\"x\"),y:eZ(\"y\"),z:eZ(\"z\")},caps:{x:tZ(\"x\"),y:tZ(\"y\"),z:tZ(\"z\")},text:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0},hovertemplate:ORt(),hovertemplatefallback:qRt(),xhoverformat:cF(\"x\"),yhoverformat:cF(\"y\"),zhoverformat:cF(\"z\"),valuehoverformat:cF(\"value\",1),showlegend:QX({},g8e.showlegend,{dflt:!1})},zRt(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{opacity:sk.opacity,lightposition:sk.lightposition,lighting:sk.lighting,flatshading:sk.flatshading,contour:sk.contour,hoverinfo:QX({},g8e.hoverinfo)}),\"calc\",\"nested\");JA.flatshading.dflt=!0;JA.lighting.facenormalsepsilon.dflt=0;JA.x.editType=JA.y.editType=JA.z.editType=JA.value.editType=\"calc+clearAxisTypes\"});var rZ=ye((qgr,_8e)=>{\"use strict\";var NRt=Dr(),URt=qa(),VRt=fF(),GRt=td();function HRt(e,t,r,n){function i(a,o){return NRt.coerce(e,t,VRt,a,o)}y8e(e,t,r,n,i)}function y8e(e,t,r,n,i){var a=i(\"isomin\"),o=i(\"isomax\");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i(\"x\"),l=i(\"y\"),u=i(\"z\"),c=i(\"value\");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=URt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");f(e,t,[\"x\",\"y\",\"z\"],n),i(\"valuehoverformat\"),[\"x\",\"y\",\"z\"].forEach(function(_){i(_+\"hoverformat\");var b=\"caps.\"+_,p=i(b+\".show\");p&&i(b+\".fill\");var k=\"slices.\"+_,E=i(k+\".show\");E&&(i(k+\".fill\"),i(k+\".locations\"))});var h=i(\"spaceframe.show\");h&&i(\"spaceframe.fill\");var d=i(\"surface.show\");d&&(i(\"surface.count\"),i(\"surface.fill\"),i(\"surface.pattern\"));var v=i(\"contour.show\");v&&(i(\"contour.color\"),i(\"contour.width\")),[\"text\",\"hovertext\",\"hovertemplate\",\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"opacity\"].forEach(function(_){i(_)}),GRt(e,t,n,i,{prefix:\"\",cLetter:\"c\"}),t._length=null}_8e.exports={supplyDefaults:HRt,supplyIsoDefaults:y8e}});var hF=ye((Bgr,b8e)=>{\"use strict\";var nZ=Dr(),jRt=gv();function WRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=Jm(t.u,t._len),t._v=Jm(t.v,t._len),t._w=Jm(t.w,t._len),t._x=Jm(t.x,t._len),t._y=Jm(t.y,t._len),t._z=Jm(t.z,t._len);var r=x8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=Jm(t.starts.x||[]),a=Jm(t.starts.y||[]),o=Jm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u<t._len;u++){var c=t._u[u],f=t._v[u],h=t._w[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}for(jRt(e,t,{vals:[l,s],containerStr:\"\",cLetter:\"c\"}),u=0;u<n;u++){var v=i[u];r.xMax=Math.max(r.xMax,v),r.xMin=Math.min(r.xMin,v);var _=a[u];r.yMax=Math.max(r.yMax,_),r.yMin=Math.min(r.yMin,_);var b=o[u];r.zMax=Math.max(r.zMax,b),r.zMin=Math.min(r.zMin,b)}t._slen=n,t._normMax=s,t._xbnds=[r.xMin,r.xMax],t._ybnds=[r.yMin,r.yMax],t._zbnds=[r.zMin,r.zMax]}function x8e(e){var t=e._x,r=e._y,n=e._z,i=e._len,a,o,s,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,d=1/0,v=\"\",_,b,p,k,E,T,L,x,C;for(i&&(k=t[0],T=r[0],x=n[0]),i>1&&(E=t[i-1],L=r[i-1],C=n[i-1]),a=0;a<i;a++)l=Math.max(l,t[a]),u=Math.min(u,t[a]),c=Math.max(c,r[a]),f=Math.min(f,r[a]),h=Math.max(h,n[a]),d=Math.min(d,n[a]),!_&&t[a]!==k&&(_=!0,v+=\"x\"),!b&&r[a]!==T&&(b=!0,v+=\"y\"),!p&&n[a]!==x&&(p=!0,v+=\"z\");_||(v+=\"x\"),b||(v+=\"y\"),p||(v+=\"z\");var M=iZ(e._x),g=iZ(e._y),P=iZ(e._z);v=v.replace(\"x\",(k>E?\"-\":\"+\")+\"x\"),v=v.replace(\"y\",(T>L?\"-\":\"+\")+\"y\"),v=v.replace(\"z\",(x>C?\"-\":\"+\")+\"z\");var A=function(){i=0,M=[],g=[],P=[]};(!i||i<M.length*g.length*P.length)&&A();var z=function(Be){return Be===\"x\"?t:Be===\"y\"?r:n},O=function(Be){return Be===\"x\"?M:Be===\"y\"?g:P},U=function(Be){return Be[i-1]<Be[0]?-1:1},G=z(v[1]),Z=z(v[3]),j=z(v[5]),N=O(v[1]).length,H=O(v[3]).length,re=O(v[5]).length,oe=!1,_e=function(Be,Pe,me){return N*(H*Be+Pe)+me},Ce=U(z(v[1])),Le=U(z(v[3])),ge=U(z(v[5]));for(a=0;a<re-1;a++){for(o=0;o<H-1;o++){for(s=0;s<N-1;s++){var ie=_e(a,o,s),Se=_e(a,o,s+1),Ee=_e(a,o+1,s),Ae=_e(a+1,o,s);if((!(G[ie]*Ce<G[Se]*Ce)||!(Z[ie]*Le<Z[Ee]*Le)||!(j[ie]*ge<j[Ae]*ge))&&(oe=!0),oe)break}if(oe)break}if(oe)break}return oe&&(nZ.warn(\"Encountered arbitrary coordinates! Unable to input data grid.\"),A()),{xMin:u,yMin:f,zMin:d,xMax:l,yMax:c,zMax:h,Xs:M,Ys:g,Zs:P,len:i,fill:v}}function iZ(e){return nZ.distinctVals(e).vals}function Jm(e,t){if(t===void 0&&(t=e.length),nZ.isTypedArray(e))return e.subarray(0,t);for(var r=[],n=0;n<t;n++)r[n]=+e[n];return r}b8e.exports={calc:WRt,filter:Jm,processGrid:x8e}});var aZ=ye((Ngr,w8e)=>{\"use strict\";var XRt=gv(),ZRt=hF().processGrid,dF=hF().filter;w8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=dF(r.x,r._len),r._y=dF(r.y,r._len),r._z=dF(r.z,r._len),r._value=dF(r.value,r._len);var n=ZRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o<r._len;o++){var s=r._value[o];i=Math.min(i,s),a=Math.max(a,s)}r._minValues=i,r._maxValues=a,r._vMin=r.isomin===void 0||r.isomin===null?i:r.isomin,r._vMax=r.isomax===void 0||r.isomax===null?a:r.isomax,XRt(t,r,{vals:[r._vMin,r._vMax],containerStr:\"\",cLetter:\"c\"})}});var $A=ye((Ugr,T8e)=>{\"use strict\";T8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o<i;o++)a[o]=[t[o],r[o],n[o]];return a}});var vF=ye((Vgr,E8e)=>{\"use strict\";var YRt=zd().gl_mesh3d,KRt=a1().parseColorScale,JRt=Dr().isArrayOrTypedArray,$Rt=n1(),QRt=tc().extractOpts,A8e=$A(),lk=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n<e&&e<=i)return{id:r,distRatio:(i-e)/(i-n)}}return{id:0,distRatio:0}};function S8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.data=null,this.showContour=!1}var oZ=S8e.prototype;oZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=lk(r,this.data._Xs).id,l=lk(n,this.data._Ys).id,u=lk(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return JRt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};oZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=M8e(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=A8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=A8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:$Rt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=QRt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=KRt(e),this.mesh.update(o)};oZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var eDt=[\"xyz\",\"xzy\",\"yxz\",\"yzx\",\"zxy\",\"zyx\"];function M8e(e){e._meshI=[],e._meshJ=[],e._meshK=[];var t=e.surface.show,r=e.spaceframe.show,n=e.surface.fill,i=e.spaceframe.fill,a=!1,o=!1,s=0,l,u,c=e._Xs,f=e._Ys,h=e._Zs,d=c.length,v=f.length,_=h.length,b=eDt.indexOf(e._gridFill.replace(/-/g,\"\").replace(/\\+/g,\"\")),p=function(Qt,Gt,_t){switch(b){case 5:return _t+_*Gt+_*v*Qt;case 4:return _t+_*Qt+_*d*Gt;case 3:return Gt+v*_t+v*_*Qt;case 2:return Gt+v*Qt+v*d*_t;case 1:return Qt+d*_t+d*_*Gt;default:return Qt+d*Gt+d*v*_t}},k=e._minValues,E=e._maxValues,T=e._vMin,L=e._vMax,x,C,M,g;function P(Qt,Gt,_t){for(var It=g.length,mt=u;mt<It;mt++)if(Qt===x[mt]&&Gt===C[mt]&&_t===M[mt])return mt;return-1}function A(){u=l}function z(){x=[],C=[],M=[],g=[],l=0,A()}function O(Qt,Gt,_t,It){return x.push(Qt),C.push(Gt),M.push(_t),g.push(It),l++,l-1}function U(Qt,Gt,_t){return e._meshI.push(Qt),e._meshJ.push(Gt),e._meshK.push(_t),s++,s-1}function G(Qt,Gt,_t){for(var It=[],mt=0;mt<Qt.length;mt++)It[mt]=(Qt[mt]+Gt[mt]+_t[mt])/3;return It}function Z(Qt,Gt,_t){for(var It=[],mt=0;mt<Qt.length;mt++)It[mt]=Qt[mt]*(1-_t)+_t*Gt[mt];return It}var j;function N(Qt){j=Qt}function H(Qt,Gt){var _t=Qt[0],It=Qt[1],mt=Qt[2],er=G(_t,It,mt),lr=Math.sqrt(1-j),wr=Z(er,_t,lr),Lr=Z(er,It,lr),ti=Z(er,mt,lr),Br=Gt[0],Vr=Gt[1],dt=Gt[2];return{xyzv:[[_t,It,Lr],[Lr,wr,_t],[It,mt,ti],[ti,Lr,It],[mt,_t,wr],[wr,ti,mt]],abc:[[Br,Vr,-1],[-1,-1,Br],[Vr,dt,-1],[-1,-1,Vr],[dt,Br,-1],[-1,-1,dt]]}}function re(Qt,Gt){return Qt===\"all\"||Qt===null?!0:Qt.indexOf(Gt)>-1}function oe(Qt,Gt){return Qt===null?Gt:Qt}function _e(Qt,Gt,_t){A();var It=[Gt],mt=[_t];if(j>=1)It=[Gt],mt=[_t];else if(j>0){var er=H(Gt,_t);It=er.xyzv,mt=er.abc}for(var lr=0;lr<It.length;lr++){Gt=It[lr],_t=mt[lr];for(var wr=[],Lr=0;Lr<3;Lr++){var ti=Gt[Lr][0],Br=Gt[Lr][1],Vr=Gt[Lr][2],dt=Gt[Lr][3],Ge=_t[Lr]>-1?_t[Lr]:P(ti,Br,Vr);Ge>-1?wr[Lr]=Ge:wr[Lr]=O(ti,Br,Vr,oe(Qt,dt))}U(wr[0],wr[1],wr[2])}}function Ce(Qt,Gt,_t){var It=function(mt,er,lr){_e(Qt,[Gt[mt],Gt[er],Gt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(2,3,0)}function Le(Qt,Gt,_t){var It=function(mt,er,lr){_e(Qt,[Gt[mt],Gt[er],Gt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(3,0,1),It(2,3,0),It(1,2,3)}function ge(Qt,Gt,_t,It){var mt=Qt[3];mt<_t&&(mt=_t),mt>It&&(mt=It);for(var er=(Qt[3]-mt)/(Qt[3]-Gt[3]+1e-9),lr=[],wr=0;wr<4;wr++)lr[wr]=(1-er)*Qt[wr]+er*Gt[wr];return lr}function ie(Qt,Gt,_t){return Qt>=Gt&&Qt<=_t}function Se(Qt){var Gt=.001*(L-T);return Qt>=T-Gt&&Qt<=L+Gt}function Ee(Qt){for(var Gt=[],_t=0;_t<4;_t++){var It=Qt[_t];Gt.push([e._x[It],e._y[It],e._z[It],e._value[It]])}return Gt}var Ae=3;function Be(Qt,Gt,_t,It,mt,er){er||(er=1),_t=[-1,-1,-1];var lr=!1,wr=[ie(Gt[0][3],It,mt),ie(Gt[1][3],It,mt),ie(Gt[2][3],It,mt)];if(!wr[0]&&!wr[1]&&!wr[2])return!1;var Lr=function(Br,Vr,dt){return Se(Vr[0][3])&&Se(Vr[1][3])&&Se(Vr[2][3])?(_e(Br,Vr,dt),!0):er<Ae?Be(Br,Vr,dt,T,L,++er):!1};if(wr[0]&&wr[1]&&wr[2])return Lr(Qt,Gt,_t)||lr;var ti=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Br){if(wr[Br[0]]&&wr[Br[1]]&&!wr[Br[2]]){var Vr=Gt[Br[0]],dt=Gt[Br[1]],Ge=Gt[Br[2]],Je=ge(Ge,Vr,It,mt),We=ge(Ge,dt,It,mt);lr=Lr(Qt,[We,Je,Vr],[-1,-1,_t[Br[0]]])||lr,lr=Lr(Qt,[Vr,dt,We],[_t[Br[0]],_t[Br[1]],-1])||lr,ti=!0}}),ti||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Br){if(wr[Br[0]]&&!wr[Br[1]]&&!wr[Br[2]]){var Vr=Gt[Br[0]],dt=Gt[Br[1]],Ge=Gt[Br[2]],Je=ge(dt,Vr,It,mt),We=ge(Ge,Vr,It,mt);lr=Lr(Qt,[We,Je,Vr],[-1,-1,_t[Br[0]]])||lr,ti=!0}}),lr}function Pe(Qt,Gt,_t,It){var mt=!1,er=Ee(Gt),lr=[ie(er[0][3],_t,It),ie(er[1][3],_t,It),ie(er[2][3],_t,It),ie(er[3][3],_t,It)];if(!lr[0]&&!lr[1]&&!lr[2]&&!lr[3])return mt;if(lr[0]&&lr[1]&&lr[2]&&lr[3])return o&&(mt=Le(Qt,er,Gt)||mt),mt;var wr=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Lr){if(lr[Lr[0]]&&lr[Lr[1]]&&lr[Lr[2]]&&!lr[Lr[3]]){var ti=er[Lr[0]],Br=er[Lr[1]],Vr=er[Lr[2]],dt=er[Lr[3]];if(o)mt=_e(Qt,[ti,Br,Vr],[Gt[Lr[0]],Gt[Lr[1]],Gt[Lr[2]]])||mt;else{var Ge=ge(dt,ti,_t,It),Je=ge(dt,Br,_t,It),We=ge(dt,Vr,_t,It);mt=_e(null,[Ge,Je,We],[-1,-1,-1])||mt}wr=!0}}),wr||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(Lr){if(lr[Lr[0]]&&lr[Lr[1]]&&!lr[Lr[2]]&&!lr[Lr[3]]){var ti=er[Lr[0]],Br=er[Lr[1]],Vr=er[Lr[2]],dt=er[Lr[3]],Ge=ge(Vr,ti,_t,It),Je=ge(Vr,Br,_t,It),We=ge(dt,Br,_t,It),tt=ge(dt,ti,_t,It);o?(mt=_e(Qt,[ti,tt,Ge],[Gt[Lr[0]],-1,-1])||mt,mt=_e(Qt,[Br,Je,We],[Gt[Lr[1]],-1,-1])||mt):mt=Ce(null,[Ge,Je,We,tt],[-1,-1,-1,-1])||mt,wr=!0}}),wr)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Lr){if(lr[Lr[0]]&&!lr[Lr[1]]&&!lr[Lr[2]]&&!lr[Lr[3]]){var ti=er[Lr[0]],Br=er[Lr[1]],Vr=er[Lr[2]],dt=er[Lr[3]],Ge=ge(Br,ti,_t,It),Je=ge(Vr,ti,_t,It),We=ge(dt,ti,_t,It);o?(mt=_e(Qt,[ti,Ge,Je],[Gt[Lr[0]],-1,-1])||mt,mt=_e(Qt,[ti,Je,We],[Gt[Lr[0]],-1,-1])||mt,mt=_e(Qt,[ti,We,Ge],[Gt[Lr[0]],-1,-1])||mt):mt=_e(null,[Ge,Je,We],[-1,-1,-1])||mt,wr=!0}}),mt}function me(Qt,Gt,_t,It,mt,er,lr,wr,Lr,ti,Br){var Vr=!1;return a&&(re(Qt,\"A\")&&(Vr=Pe(null,[Gt,_t,It,er],ti,Br)||Vr),re(Qt,\"B\")&&(Vr=Pe(null,[_t,It,mt,Lr],ti,Br)||Vr),re(Qt,\"C\")&&(Vr=Pe(null,[_t,er,lr,Lr],ti,Br)||Vr),re(Qt,\"D\")&&(Vr=Pe(null,[It,er,wr,Lr],ti,Br)||Vr),re(Qt,\"E\")&&(Vr=Pe(null,[_t,It,er,Lr],ti,Br)||Vr)),o&&(Vr=Pe(Qt,[_t,It,er,Lr],ti,Br)||Vr),Vr}function De(Qt,Gt,_t,It,mt,er,lr,wr){return[wr[0]===!0?!0:Be(Qt,Ee([Gt,_t,It]),[Gt,_t,It],er,lr),wr[1]===!0?!0:Be(Qt,Ee([It,mt,Gt]),[It,mt,Gt],er,lr)]}function ce(Qt,Gt,_t,It,mt,er,lr,wr,Lr){return wr?De(Qt,Gt,_t,mt,It,er,lr,Lr):De(Qt,_t,mt,It,Gt,er,lr,Lr)}function je(Qt,Gt,_t,It,mt,er,lr){var wr=!1,Lr,ti,Br,Vr,dt=function(){wr=Be(Qt,[Lr,ti,Br],[-1,-1,-1],mt,er)||wr,wr=Be(Qt,[Br,Vr,Lr],[-1,-1,-1],mt,er)||wr},Ge=lr[0],Je=lr[1],We=lr[2];return Ge&&(Lr=Z(Ee([p(Gt,_t-0,It-0)])[0],Ee([p(Gt-1,_t-0,It-0)])[0],Ge),ti=Z(Ee([p(Gt,_t-0,It-1)])[0],Ee([p(Gt-1,_t-0,It-1)])[0],Ge),Br=Z(Ee([p(Gt,_t-1,It-1)])[0],Ee([p(Gt-1,_t-1,It-1)])[0],Ge),Vr=Z(Ee([p(Gt,_t-1,It-0)])[0],Ee([p(Gt-1,_t-1,It-0)])[0],Ge),dt()),Je&&(Lr=Z(Ee([p(Gt-0,_t,It-0)])[0],Ee([p(Gt-0,_t-1,It-0)])[0],Je),ti=Z(Ee([p(Gt-0,_t,It-1)])[0],Ee([p(Gt-0,_t-1,It-1)])[0],Je),Br=Z(Ee([p(Gt-1,_t,It-1)])[0],Ee([p(Gt-1,_t-1,It-1)])[0],Je),Vr=Z(Ee([p(Gt-1,_t,It-0)])[0],Ee([p(Gt-1,_t-1,It-0)])[0],Je),dt()),We&&(Lr=Z(Ee([p(Gt-0,_t-0,It)])[0],Ee([p(Gt-0,_t-0,It-1)])[0],We),ti=Z(Ee([p(Gt-0,_t-1,It)])[0],Ee([p(Gt-0,_t-1,It-1)])[0],We),Br=Z(Ee([p(Gt-1,_t-1,It)])[0],Ee([p(Gt-1,_t-1,It-1)])[0],We),Vr=Z(Ee([p(Gt-1,_t-0,It)])[0],Ee([p(Gt-1,_t-0,It-1)])[0],We),dt()),wr}function lt(Qt,Gt,_t,It,mt,er,lr,wr,Lr,ti,Br,Vr){var dt=Qt;return Vr?(a&&Qt===\"even\"&&(dt=null),me(dt,Gt,_t,It,mt,er,lr,wr,Lr,ti,Br)):(a&&Qt===\"odd\"&&(dt=null),me(dt,Lr,wr,lr,er,mt,It,_t,Gt,ti,Br))}function pt(Qt,Gt,_t,It,mt){for(var er=[],lr=0,wr=0;wr<Gt.length;wr++)for(var Lr=Gt[wr],ti=1;ti<_;ti++)for(var Br=1;Br<v;Br++)er.push(ce(Qt,p(Lr,Br-1,ti-1),p(Lr,Br-1,ti),p(Lr,Br,ti-1),p(Lr,Br,ti),_t,It,(Lr+Br+ti)%2,mt&&mt[lr]?mt[lr]:[])),lr++;return er}function Vt(Qt,Gt,_t,It,mt){for(var er=[],lr=0,wr=0;wr<Gt.length;wr++)for(var Lr=Gt[wr],ti=1;ti<d;ti++)for(var Br=1;Br<_;Br++)er.push(ce(Qt,p(ti-1,Lr,Br-1),p(ti,Lr,Br-1),p(ti-1,Lr,Br),p(ti,Lr,Br),_t,It,(ti+Lr+Br)%2,mt&&mt[lr]?mt[lr]:[])),lr++;return er}function ot(Qt,Gt,_t,It,mt){for(var er=[],lr=0,wr=0;wr<Gt.length;wr++)for(var Lr=Gt[wr],ti=1;ti<v;ti++)for(var Br=1;Br<d;Br++)er.push(ce(Qt,p(Br-1,ti-1,Lr),p(Br-1,ti,Lr),p(Br,ti-1,Lr),p(Br,ti,Lr),_t,It,(Br+ti+Lr)%2,mt&&mt[lr]?mt[lr]:[])),lr++;return er}function ut(Qt,Gt,_t){for(var It=1;It<_;It++)for(var mt=1;mt<v;mt++)for(var er=1;er<d;er++)lt(Qt,p(er-1,mt-1,It-1),p(er-1,mt-1,It),p(er-1,mt,It-1),p(er-1,mt,It),p(er,mt-1,It-1),p(er,mt-1,It),p(er,mt,It-1),p(er,mt,It),Gt,_t,(er+mt+It)%2)}function Wt(Qt,Gt,_t){o=!0,ut(Qt,Gt,_t),o=!1}function Nt(Qt,Gt,_t){a=!0,ut(Qt,Gt,_t),a=!1}function $t(Qt,Gt,_t,It,mt,er){for(var lr=[],wr=0,Lr=0;Lr<Gt.length;Lr++)for(var ti=Gt[Lr],Br=1;Br<_;Br++)for(var Vr=1;Vr<v;Vr++)lr.push(je(Qt,ti,Vr,Br,_t,It,mt[Lr],er&&er[wr]?er[wr]:[])),wr++;return lr}function sr(Qt,Gt,_t,It,mt,er){for(var lr=[],wr=0,Lr=0;Lr<Gt.length;Lr++)for(var ti=Gt[Lr],Br=1;Br<d;Br++)for(var Vr=1;Vr<_;Vr++)lr.push(je(Qt,Br,ti,Vr,_t,It,mt[Lr],er&&er[wr]?er[wr]:[])),wr++;return lr}function Tr(Qt,Gt,_t,It,mt,er){for(var lr=[],wr=0,Lr=0;Lr<Gt.length;Lr++)for(var ti=Gt[Lr],Br=1;Br<v;Br++)for(var Vr=1;Vr<d;Vr++)lr.push(je(Qt,Vr,Br,ti,_t,It,mt[Lr],er&&er[wr]?er[wr]:[])),wr++;return lr}function fr(Qt,Gt){for(var _t=[],It=Qt;It<Gt;It++)_t.push(It);return _t}function $e(){for(var Qt=0;Qt<d;Qt++)for(var Gt=0;Gt<v;Gt++)for(var _t=0;_t<_;_t++){var It=p(Qt,Gt,_t);O(e._x[It],e._y[It],e._z[It],e._value[It])}}function St(){z(),$e();var Qt=null;if(r&&i&&(N(i),Wt(Qt,T,L)),t&&n){N(n);for(var Gt=e.surface.pattern,_t=e.surface.count,It=0;It<_t;It++){var mt=_t===1?.5:It/(_t-1),er=(1-mt)*T+mt*L,lr=Math.abs(er-k),wr=Math.abs(er-E),Lr=lr>wr?[k,er]:[er,E];Nt(Gt,Lr[0],Lr[1])}}var ti=[[Math.min(T,E),Math.max(T,E)],[Math.min(k,L),Math.max(k,L)]];[\"x\",\"y\",\"z\"].forEach(function(Br){for(var Vr=[],dt=0;dt<ti.length;dt++){var Ge=0,Je=ti[dt][0],We=ti[dt][1],tt=e.slices[Br];if(tt.show&&tt.fill){N(tt.fill);var xt=[],Ie=[],xe=[];if(tt.locations.length)for(var ke=0;ke<tt.locations.length;ke++){var vt=lk(tt.locations[ke],Br===\"x\"?c:Br===\"y\"?f:h);vt.distRatio===0?xt.push(vt.id):vt.id>0&&(Ie.push(vt.id),Br===\"x\"?xe.push([vt.distRatio,0,0]):Br===\"y\"?xe.push([0,vt.distRatio,0]):xe.push([0,0,vt.distRatio]))}else Br===\"x\"?xt=fr(1,d-1):Br===\"y\"?xt=fr(1,v-1):xt=fr(1,_-1);Ie.length>0&&(Br===\"x\"?Vr[Ge]=$t(Qt,Ie,Je,We,xe,Vr[Ge]):Br===\"y\"?Vr[Ge]=sr(Qt,Ie,Je,We,xe,Vr[Ge]):Vr[Ge]=Tr(Qt,Ie,Je,We,xe,Vr[Ge]),Ge++),xt.length>0&&(Br===\"x\"?Vr[Ge]=pt(Qt,xt,Je,We,Vr[Ge]):Br===\"y\"?Vr[Ge]=Vt(Qt,xt,Je,We,Vr[Ge]):Vr[Ge]=ot(Qt,xt,Je,We,Vr[Ge]),Ge++)}var ir=e.caps[Br];ir.show&&ir.fill&&(N(ir.fill),Br===\"x\"?Vr[Ge]=pt(Qt,[0,d-1],Je,We,Vr[Ge]):Br===\"y\"?Vr[Ge]=Vt(Qt,[0,v-1],Je,We,Vr[Ge]):Vr[Ge]=ot(Qt,[0,_-1],Je,We,Vr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=M,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return St(),e}function tDt(e,t){var r=e.glplot.gl,n=YRt({gl:r}),i=new S8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}E8e.exports={findNearestOnAxis:lk,generateIsoMeshes:M8e,createIsosurfaceTrace:tDt}});var C8e=ye((Ggr,k8e)=>{\"use strict\";k8e.exports={attributes:fF(),supplyDefaults:rZ().supplyDefaults,calc:aZ(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:vF().createIsosurfaceTrace,moduleType:\"trace\",name:\"isosurface\",basePlotModule:sx(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var P8e=ye((Hgr,L8e)=>{\"use strict\";L8e.exports=C8e()});var lZ=ye((jgr,R8e)=>{\"use strict\";var rDt=Tu(),xh=fF(),iDt=ak(),I8e=Gl(),sZ=Ao().extendFlat,nDt=mc().overrideAll,pF=R8e.exports=nDt(sZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:\"boolean\",dflt:!1},fill:{valType:\"number\",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback},rDt(\"\",{colorAttr:\"`value`\",showScaleDflt:!0,editTypeOverride:\"calc\"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:iDt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:sZ({},I8e.hoverinfo),showlegend:sZ({},I8e.showlegend,{dflt:!1})}),\"calc\",\"nested\");pF.x.editType=pF.y.editType=pF.z.editType=pF.value.editType=\"calc+clearAxisTypes\"});var F8e=ye((Wgr,D8e)=>{\"use strict\";var aDt=Dr(),oDt=lZ(),sDt=rZ().supplyIsoDefaults,lDt=KX().opacityscaleDefaults;D8e.exports=function(t,r,n,i){function a(o,s){return aDt.coerce(t,r,oDt,o,s)}sDt(t,r,n,i,a),lDt(t,r,i,a)}});var B8e=ye((Xgr,q8e)=>{\"use strict\";var uDt=zd().gl_mesh3d,cDt=a1().parseColorScale,fDt=Dr().isArrayOrTypedArray,hDt=n1(),dDt=tc().extractOpts,z8e=$A(),uZ=vF().findNearestOnAxis,vDt=vF().generateIsoMeshes;function O8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.data=null,this.showContour=!1}var cZ=O8e.prototype;cZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=uZ(r,this.data._Xs).id,l=uZ(n,this.data._Ys).id,u=uZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return fDt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};cZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=vDt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=z8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=z8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:hDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=dDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=cDt(e),this.mesh.update(o)};cZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function pDt(e,t){var r=e.glplot.gl,n=uDt({gl:r}),i=new O8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}q8e.exports=pDt});var U8e=ye((Zgr,N8e)=>{\"use strict\";N8e.exports={attributes:lZ(),supplyDefaults:F8e(),calc:aZ(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:B8e(),moduleType:\"trace\",name:\"volume\",basePlotModule:sx(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var G8e=ye((Ygr,V8e)=>{\"use strict\";V8e.exports=U8e()});var W8e=ye((Kgr,j8e)=>{\"use strict\";var gDt=qa(),H8e=Dr(),mDt=td(),yDt=KA();j8e.exports=function(t,r,n,i){function a(c,f){return H8e.coerce(t,r,yDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&H8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o([\"x\",\"y\",\"z\"]);if(!s){r.visible=!1;return}if(o([\"i\",\"j\",\"k\"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=gDt.getComponentMethod(\"calendars\",\"handleTraceDefaults\");l(t,r,[\"x\",\"y\",\"z\"],i),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"flatshading\",\"alphahull\",\"delaunayaxis\",\"opacity\"].forEach(function(c){a(c)});var u=a(\"contour.show\");u&&(a(\"contour.color\"),a(\"contour.width\")),\"intensity\"in t?(a(\"intensity\"),a(\"intensitymode\"),mDt(t,r,i,a,{prefix:\"\",cLetter:\"c\"})):(r.showscale=!1,\"facecolor\"in t?a(\"facecolor\"):\"vertexcolor\"in t?a(\"vertexcolor\"):a(\"color\",n)),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var Z8e=ye((Jgr,X8e)=>{\"use strict\";var _Dt=gv();X8e.exports=function(t,r){r.intensity&&_Dt(t,r,{vals:r.intensity,containerStr:\"\",cLetter:\"c\"})}});var Q8e=ye(($gr,$8e)=>{\"use strict\";var xDt=zd().gl_mesh3d,bDt=zd().delaunay_triangulate,wDt=zd().alpha_shape,TDt=zd().convex_hull,ADt=a1().parseColorScale,SDt=Dr().isArrayOrTypedArray,vZ=n1(),MDt=tc().extractOpts,Y8e=$A();function J8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}var pZ=J8e.prototype;pZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return SDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function K8e(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=vZ(e[n]);return t}function fZ(e,t,r,n){for(var i=[],a=t.length,o=0;o<a;o++)i[o]=e.d2l(t[o],0,n)*r;return i}function hZ(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=Math.round(e[n]);return t}function EDt(e,t){for(var r=[\"x\",\"y\",\"z\"].indexOf(e),n=[],i=t.length,a=0;a<i;a++)n[a]=[t[a][(r+1)%3],t[a][(r+2)%3]];return bDt(n)}function dZ(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n]<=-.5||e[n]>=t-.5)return!1;return!0}pZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=Y8e(fZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),fZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),fZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!dZ(e.i,n)||!dZ(e.j,n)||!dZ(e.k,n))return;a=Y8e(hZ(e.i),hZ(e.j),hZ(e.k))}else e.alphahull===0?a=TDt(i):e.alphahull>0?a=wDt(e.alphahull,i):a=EDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:vZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=MDt(e);this.color=\"#fff\";var l=e.intensitymode;o[l+\"Intensity\"]=e.intensity,o[l+\"IntensityBounds\"]=[s.min,s.max],o.colormap=ADt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=K8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=K8e(e.facecolor)):(this.color=e.color,o.meshColor=vZ(e.color));this.mesh.update(o)};pZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function kDt(e,t){var r=e.glplot.gl,n=xDt({gl:r}),i=new J8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}$8e.exports=kDt});var tRe=ye((Qgr,eRe)=>{\"use strict\";eRe.exports={attributes:KA(),supplyDefaults:W8e(),calc:Z8e(),colorbar:{min:\"cmin\",max:\"cmax\"},plot:Q8e(),moduleType:\"trace\",name:\"mesh3d\",basePlotModule:sx(),categories:[\"gl3d\",\"showLegend\"],meta:{}}});var iRe=ye((emr,rRe)=>{\"use strict\";rRe.exports=tRe()});var mZ=ye((tmr,aRe)=>{\"use strict\";var CDt=Tu(),QA=df().axisHoverFormat,{hovertemplateAttrs:LDt,templatefallbackAttrs:PDt}=Ll(),IDt=KA(),nRe=Gl(),gZ=Ao().extendFlat,gF={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"scaled\",\"absolute\",\"raw\"],editType:\"calc\",dflt:\"scaled\"},sizeref:{valType:\"number\",editType:\"calc\",min:0},anchor:{valType:\"enumerated\",editType:\"calc\",values:[\"tip\",\"tail\",\"cm\",\"center\"],dflt:\"cm\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:LDt({editType:\"calc\"},{keys:[\"norm\"]}),hovertemplatefallback:PDt({editType:\"calc\"}),uhoverformat:QA(\"u\",1),vhoverformat:QA(\"v\",1),whoverformat:QA(\"w\",1),xhoverformat:QA(\"x\"),yhoverformat:QA(\"y\"),zhoverformat:QA(\"z\"),showlegend:gZ({},nRe.showlegend,{dflt:!1})};gZ(gF,CDt(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));var RDt=[\"opacity\",\"lightposition\",\"lighting\"];RDt.forEach(function(e){gF[e]=IDt[e]});gF.hoverinfo=gZ({},nRe.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"});aRe.exports=gF});var sRe=ye((rmr,oRe)=>{\"use strict\";var DDt=Dr(),FDt=td(),zDt=mZ();oRe.exports=function(t,r,n,i){function a(d,v){return DDt.coerce(t,r,zDt,d,v)}var o=a(\"u\"),s=a(\"v\"),l=a(\"w\"),u=a(\"x\"),c=a(\"y\"),f=a(\"z\");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a(\"sizemode\");a(\"sizeref\",h===\"raw\"?1:.5),a(\"anchor\"),a(\"lighting.ambient\"),a(\"lighting.diffuse\"),a(\"lighting.specular\"),a(\"lighting.roughness\"),a(\"lighting.fresnel\"),a(\"lightposition.x\"),a(\"lightposition.y\"),a(\"lightposition.z\"),FDt(t,r,i,a,{prefix:\"\",cLetter:\"c\"}),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"uhoverformat\"),a(\"vhoverformat\"),a(\"whoverformat\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var uRe=ye((imr,lRe)=>{\"use strict\";var ODt=gv();lRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=n[u],f=i[u],h=a[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}r._len=o,r._normMax=s,ODt(t,r,{vals:[l,s],containerStr:\"\",cLetter:\"c\"})}});var vRe=ye((nmr,dRe)=>{\"use strict\";var qDt=zd().gl_cone3d,BDt=zd().gl_cone3d.createConeMesh,NDt=Dr().simpleMap,UDt=a1().parseColorScale,VDt=tc().extractOpts,GDt=Dr().isArrayOrTypedArray,cRe=$A();function fRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var yZ=fRe.prototype;yZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return GDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var HDt={xaxis:0,yaxis:1,zaxis:2},jDt={tip:1,tail:0,cm:.25,center:.5},WDt={tip:1,tail:1,cm:.75,center:.5};function hRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[HDt[f]];return NDt(c,function(v){return h.d2l(v)*d})}i.vectors=cRe(a(t.u,\"xaxis\"),a(t.v,\"yaxis\"),a(t.w,\"zaxis\"),t._len),i.positions=cRe(a(t.x,\"xaxis\"),a(t.y,\"yaxis\"),a(t.z,\"zaxis\"),t._len);var o=VDt(t);i.colormap=UDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=jDt[t.anchor];var s=t.sizemode;s===\"scaled\"?i.coneSize=t.sizeref||.5:s===\"absolute\"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s===\"raw\"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=qDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=WDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}yZ.update=function(e){this.data=e;var t=hRe(this.scene,e);this.mesh.update(t)};yZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function XDt(e,t){var r=e.glplot.gl,n=hRe(e,t),i=BDt(r,n),a=new fRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}dRe.exports=XDt});var gRe=ye((amr,pRe)=>{\"use strict\";pRe.exports={moduleType:\"trace\",name:\"cone\",basePlotModule:sx(),categories:[\"gl3d\",\"showLegend\"],attributes:mZ(),supplyDefaults:sRe(),colorbar:{min:\"cmin\",max:\"cmax\"},calc:uRe(),plot:vRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var yRe=ye((omr,mRe)=>{\"use strict\";mRe.exports=gRe()});var xZ=ye((smr,xRe)=>{\"use strict\";var ZDt=Tu(),e5=df().axisHoverFormat,{hovertemplateAttrs:YDt,templatefallbackAttrs:KDt}=Ll(),JDt=KA(),_Re=Gl(),_Z=Ao().extendFlat,mF={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},u:{valType:\"data_array\",editType:\"calc\"},v:{valType:\"data_array\",editType:\"calc\"},w:{valType:\"data_array\",editType:\"calc\"},starts:{x:{valType:\"data_array\",editType:\"calc\"},y:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},maxdisplayed:{valType:\"integer\",min:0,dflt:1e3,editType:\"calc\"},sizeref:{valType:\"number\",editType:\"calc\",min:0,dflt:1},text:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",editType:\"calc\"},hovertemplate:YDt({editType:\"calc\"},{keys:[\"tubex\",\"tubey\",\"tubez\",\"tubeu\",\"tubev\",\"tubew\",\"norm\",\"divergence\"]}),hovertemplatefallback:KDt({editType:\"calc\"}),uhoverformat:e5(\"u\",1),vhoverformat:e5(\"v\",1),whoverformat:e5(\"w\",1),xhoverformat:e5(\"x\"),yhoverformat:e5(\"y\"),zhoverformat:e5(\"z\"),showlegend:_Z({},_Re.showlegend,{dflt:!1})};_Z(mF,ZDt(\"\",{colorAttr:\"u/v/w norm\",showScaleDflt:!0,editTypeOverride:\"calc\"}));var $Dt=[\"opacity\",\"lightposition\",\"lighting\"];$Dt.forEach(function(e){mF[e]=JDt[e]});mF.hoverinfo=_Z({},_Re.hoverinfo,{editType:\"calc\",flags:[\"x\",\"y\",\"z\",\"u\",\"v\",\"w\",\"norm\",\"divergence\",\"text\",\"name\"],dflt:\"x+y+z+norm+text+name\"});xRe.exports=mF});var wRe=ye((lmr,bRe)=>{\"use strict\";var QDt=Dr(),eFt=td(),tFt=xZ();bRe.exports=function(t,r,n,i){function a(h,d){return QDt.coerce(t,r,tFt,h,d)}var o=a(\"u\"),s=a(\"v\"),l=a(\"w\"),u=a(\"x\"),c=a(\"y\"),f=a(\"z\");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a(\"starts.x\"),a(\"starts.y\"),a(\"starts.z\"),a(\"maxdisplayed\"),a(\"sizeref\"),a(\"lighting.ambient\"),a(\"lighting.diffuse\"),a(\"lighting.specular\"),a(\"lighting.roughness\"),a(\"lighting.fresnel\"),a(\"lightposition.x\"),a(\"lightposition.y\"),a(\"lightposition.z\"),eFt(t,r,i,a,{prefix:\"\",cLetter:\"c\"}),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"uhoverformat\"),a(\"vhoverformat\"),a(\"whoverformat\"),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"zhoverformat\"),r._length=null}});var LRe=ye((umr,CRe)=>{\"use strict\";var SRe=zd().gl_streamtube3d,rFt=SRe.createTubeMesh,iFt=Dr(),nFt=a1().parseColorScale,aFt=tc().extractOpts,TRe=$A(),MRe={xaxis:0,yaxis:1,zaxis:2};function ERe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var wZ=ERe.prototype;wZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[MRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],\"xaxis\"),n(i[1],\"yaxis\"),n(i[2],\"zaxis\"),n(a[0],\"xaxis\"),n(a[1],\"yaxis\"),n(a[2],\"zaxis\"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ARe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function bZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function kRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,O){var U=r[O],G=n[MRe[O]];return iFt.simpleMap(z,function(Z){return U.d2l(Z)*G})}if(a.vectors=TRe(o(t._u,\"xaxis\"),o(t._v,\"yaxis\"),o(t._w,\"zaxis\"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,\"xaxis\"),l=o(t._Ys,\"yaxis\"),u=o(t._Zs,\"zaxis\");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=TRe(o(t._startsX,\"xaxis\"),o(t._startsY,\"yaxis\"),o(t._startsZ,\"zaxis\"));else{for(var f=l[0],h=ARe(s),d=ARe(u),v=new Array(h.length*d.length),_=0,b=0;b<h.length;b++)for(var p=0;p<d.length;p++)v[_++]=[h[b],f,d[p]];a.startingPositions=v}a.colormap=nFt(t),a.tubeSize=t.sizeref,a.maxLength=t.maxdisplayed;var k=o(t._xbnds,\"xaxis\"),E=o(t._ybnds,\"yaxis\"),T=o(t._zbnds,\"zaxis\"),L=bZ(s),x=bZ(l),C=bZ(u),M=[[k[0]-L[0],E[0]-x[0],T[0]-C[0]],[k[1]+L[1],E[1]+x[1],T[1]+C[1]]],g=SRe(a,M),P=aFt(t);g.vertexIntensityBounds=[P.min/t._normMax,P.max/t._normMax];var A=t.lightposition;return g.lightPosition=[A.x,A.y,A.z],g.ambient=t.lighting.ambient,g.diffuse=t.lighting.diffuse,g.specular=t.lighting.specular,g.roughness=t.lighting.roughness,g.fresnel=t.lighting.fresnel,g.opacity=t.opacity,t._pad=g.tubeScale*t.sizeref*2,g}wZ.update=function(e){this.data=e;var t=kRe(this.scene,e);this.mesh.update(t)};wZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function oFt(e,t){var r=e.glplot.gl,n=kRe(e,t),i=rFt(r,n),a=new ERe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}CRe.exports=oFt});var IRe=ye((cmr,PRe)=>{\"use strict\";PRe.exports={moduleType:\"trace\",name:\"streamtube\",basePlotModule:sx(),categories:[\"gl3d\",\"showLegend\"],attributes:xZ(),supplyDefaults:wRe(),colorbar:{min:\"cmin\",max:\"cmax\"},calc:hF().calc,plot:LRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var DRe=ye((fmr,RRe)=>{\"use strict\";RRe.exports=IRe()});var ew=ye((dmr,BRe)=>{\"use strict\";var{hovertemplateAttrs:sFt,texttemplateAttrs:lFt,templatefallbackAttrs:FRe}=Ll(),uFt=Pg(),$m=pf(),cFt=Gl(),zRe=Tu(),fFt=Pd().dash,Q2=Ao().extendFlat,hFt=mc().overrideAll,rg=$m.marker,ORe=$m.line,qRe=rg.line,hmr=[\"The library used by the *country names* `locationmode` option is changing in an upcoming version.\",\"Country names in existing plots may not work in the new version.\"].join(\" \");BRe.exports=hFt({lon:{valType:\"data_array\"},lat:{valType:\"data_array\"},locations:{valType:\"data_array\"},locationmode:{valType:\"enumerated\",values:[\"ISO-3\",\"USA-states\",\"country names\",\"geojson-id\"],dflt:\"ISO-3\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:{valType:\"string\",editType:\"calc\",dflt:\"id\"},mode:Q2({},$m.mode,{dflt:\"markers\"}),text:Q2({},$m.text,{}),texttemplate:lFt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"location\",\"text\"]}),texttemplatefallback:FRe({editType:\"plot\"}),hovertext:Q2({},$m.hovertext,{}),textfont:$m.textfont,textposition:$m.textposition,line:{color:ORe.color,width:ORe.width,dash:fFt},connectgaps:$m.connectgaps,marker:Q2({symbol:rg.symbol,opacity:rg.opacity,angle:rg.angle,angleref:Q2({},rg.angleref,{values:[\"previous\",\"up\",\"north\"]}),standoff:rg.standoff,size:rg.size,sizeref:rg.sizeref,sizemin:rg.sizemin,sizemode:rg.sizemode,colorbar:rg.colorbar,line:Q2({width:qRe.width,dash:qRe.dash},zRe(\"marker.line\")),gradient:rg.gradient},zRe(\"marker\")),fill:{valType:\"enumerated\",values:[\"none\",\"toself\"],dflt:\"none\"},fillcolor:uFt(),selected:$m.selected,unselected:$m.unselected,hoverinfo:Q2({},cFt.hoverinfo,{flags:[\"lon\",\"lat\",\"location\",\"text\",\"name\"]}),hovertemplate:sFt(),hovertemplatefallback:FRe()},\"calc\",\"nested\")});var URe=ye((vmr,NRe)=>{\"use strict\";var yF=Dr(),TZ=Ru(),dFt=$p(),vFt=D0(),pFt=F0(),gFt=Fg(),mFt=ew(),yFt=[\"The library used by the *country names* `locationmode` option is changing in the next major version.\",\"Some country names in existing plots may not work in the new version.\",\"To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.\"].join(\" \");NRe.exports=function(t,r,n,i){function a(d,v){return yF.coerce(t,r,mFt,d,v)}var o=a(\"locations\"),s;if(o&&o.length){var l=a(\"geojson\"),u;(typeof l==\"string\"&&l!==\"\"||yF.isPlainObject(l))&&(u=\"geojson-id\");var c=a(\"locationmode\",u);c===\"country names\"&&yF.warn(yFt),c===\"geojson-id\"&&a(\"featureidkey\"),s=o.length}else{var f=a(\"lon\")||[],h=a(\"lat\")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"mode\"),TZ.hasMarkers(r)&&dFt(t,r,n,i,a,{gradient:!0}),TZ.hasLines(r)&&(vFt(t,r,n,i,a),a(\"connectgaps\")),TZ.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),pFt(t,r,i,a)),a(\"fill\"),r.fill!==\"none\"&&gFt(t,r,n,a),yF.coerceSelectionMarkerOpacity(r,a)}});var HRe=ye((pmr,GRe)=>{\"use strict\";var VRe=ho();GRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=VRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=VRe.tickText(o,o.c2l(s[1]),!0).text,i}});var _F=ye((gmr,ZRe)=>{\"use strict\";var AZ=Eo(),jRe=fs().BADNUM,_Ft=z0(),xFt=Rm(),bFt=O0(),wFt=Dr().isArrayOrTypedArray,WRe=Dr()._;function XRe(e){return e&&typeof e==\"string\"}ZRe.exports=function(t,r){var n=wFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return XRe(h)||AZ(h)}:o=XRe;for(var s=0;s<i;s++){var l=a[s]={};if(n){var u=r.locations[s];l.loc=o(u)?u:null}else{var c=r.lon[s],f=r.lat[s];AZ(c)&&AZ(f)?l.lonlat=[+c,+f]:l.lonlat=[jRe,jRe]}}return xFt(a,r),_Ft(t,r),bFt(a,r),i&&(a[0].t={labels:{lat:WRe(t,\"lat:\")+\" \",lon:WRe(t,\"lon:\")+\" \"}}),a}});var uk=ye(Mv=>{\"use strict\";Mv.projNames={airy:\"airy\",aitoff:\"aitoff\",\"albers usa\":\"albersUsa\",albers:\"albers\",august:\"august\",\"azimuthal equal area\":\"azimuthalEqualArea\",\"azimuthal equidistant\":\"azimuthalEquidistant\",baker:\"baker\",bertin1953:\"bertin1953\",boggs:\"boggs\",bonne:\"bonne\",bottomley:\"bottomley\",bromley:\"bromley\",collignon:\"collignon\",\"conic conformal\":\"conicConformal\",\"conic equal area\":\"conicEqualArea\",\"conic equidistant\":\"conicEquidistant\",craig:\"craig\",craster:\"craster\",\"cylindrical equal area\":\"cylindricalEqualArea\",\"cylindrical stereographic\":\"cylindricalStereographic\",eckert1:\"eckert1\",eckert2:\"eckert2\",eckert3:\"eckert3\",eckert4:\"eckert4\",eckert5:\"eckert5\",eckert6:\"eckert6\",eisenlohr:\"eisenlohr\",\"equal earth\":\"equalEarth\",equirectangular:\"equirectangular\",fahey:\"fahey\",\"foucaut sinusoidal\":\"foucautSinusoidal\",foucaut:\"foucaut\",ginzburg4:\"ginzburg4\",ginzburg5:\"ginzburg5\",ginzburg6:\"ginzburg6\",ginzburg8:\"ginzburg8\",ginzburg9:\"ginzburg9\",gnomonic:\"gnomonic\",\"gringorten quincuncial\":\"gringortenQuincuncial\",gringorten:\"gringorten\",guyou:\"guyou\",hammer:\"hammer\",hill:\"hill\",homolosine:\"homolosine\",hufnagel:\"hufnagel\",hyperelliptical:\"hyperelliptical\",kavrayskiy7:\"kavrayskiy7\",lagrange:\"lagrange\",larrivee:\"larrivee\",laskowski:\"laskowski\",loximuthal:\"loximuthal\",mercator:\"mercator\",miller:\"miller\",mollweide:\"mollweide\",\"mt flat polar parabolic\":\"mtFlatPolarParabolic\",\"mt flat polar quartic\":\"mtFlatPolarQuartic\",\"mt flat polar sinusoidal\":\"mtFlatPolarSinusoidal\",\"natural earth\":\"naturalEarth\",\"natural earth1\":\"naturalEarth1\",\"natural earth2\":\"naturalEarth2\",\"nell hammer\":\"nellHammer\",nicolosi:\"nicolosi\",orthographic:\"orthographic\",patterson:\"patterson\",\"peirce quincuncial\":\"peirceQuincuncial\",polyconic:\"polyconic\",\"rectangular polyconic\":\"rectangularPolyconic\",robinson:\"robinson\",satellite:\"satellite\",\"sinu mollweide\":\"sinuMollweide\",sinusoidal:\"sinusoidal\",stereographic:\"stereographic\",times:\"times\",\"transverse mercator\":\"transverseMercator\",\"van der grinten\":\"vanDerGrinten\",\"van der grinten2\":\"vanDerGrinten2\",\"van der grinten3\":\"vanDerGrinten3\",\"van der grinten4\":\"vanDerGrinten4\",wagner4:\"wagner4\",wagner6:\"wagner6\",wiechel:\"wiechel\",\"winkel tripel\":\"winkel3\",winkel3:\"winkel3\"};Mv.axesNames=[\"lonaxis\",\"lataxis\"];Mv.lonaxisSpan={orthographic:180,\"azimuthal equal area\":360,\"azimuthal equidistant\":360,\"conic conformal\":180,gnomonic:160,stereographic:180,\"transverse mercator\":180,\"*\":360};Mv.lataxisSpan={\"conic conformal\":150,stereographic:179.5,\"*\":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\"equirectangular\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\"albers usa\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\"conic conformal\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\"mercator\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\"mercator\",projRotate:[0,0,0]},\"north america\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\"conic conformal\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\"south america\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\"mercator\",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:\"equirectangular\",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:\"equirectangular\",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor=\"#F0DC82\";Mv.waterColor=\"#3399FF\";Mv.locationmodeToLayer={\"ISO-3\":\"countries\",\"USA-states\":\"subunits\",\"country names\":\"countries\"};Mv.sphereSVG={type:\"Sphere\"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=[\"bg\",\"ocean\",\"land\",\"lakes\",\"subunits\",\"countries\",\"coastlines\",\"rivers\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"frontplot\"];Mv.layersForChoropleth=[\"bg\",\"ocean\",\"land\",\"subunits\",\"countries\",\"coastlines\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"rivers\",\"lakes\",\"frontplot\"];Mv.layerNameToAdjective={ocean:\"ocean\",land:\"land\",lakes:\"lake\",subunits:\"subunit\",countries:\"country\",coastlines:\"coastline\",rivers:\"river\",frame:\"frame\"}});var SZ=ye((xF,YRe)=>{(function(e,t){typeof xF==\"object\"&&typeof YRe!=\"undefined\"?t(xF):(e=e||self,t(e.topojson=e.topojson||{}))})(xF,function(e){\"use strict\";function t(E){return E}function r(E){if(E==null)return t;var T,L,x=E.scale[0],C=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,A){A||(T=L=0);var z=2,O=P.length,U=new Array(O);for(U[0]=(T+=P[0])*x+M,U[1]=(L+=P[1])*C+g;z<O;)U[z]=P[z],++z;return U}}function n(E){var T=r(E.transform),L,x=1/0,C=x,M=-x,g=-x;function P(z){z=T(z),z[0]<x&&(x=z[0]),z[0]>M&&(M=z[0]),z[1]<C&&(C=z[1]),z[1]>g&&(g=z[1])}function A(z){switch(z.type){case\"GeometryCollection\":z.geometries.forEach(A);break;case\"Point\":P(z.coordinates);break;case\"MultiPoint\":z.coordinates.forEach(P);break}}E.arcs.forEach(function(z){for(var O=-1,U=z.length,G;++O<U;)G=T(z[O],O),G[0]<x&&(x=G[0]),G[0]>M&&(M=G[0]),G[1]<C&&(C=G[1]),G[1]>g&&(g=G[1])});for(L in E.objects)A(E.objects[L]);return[x,C,M,g]}function i(E,T){for(var L,x=E.length,C=x-T;C<--x;)L=E[C],E[C++]=E[x],E[x]=L}function a(E,T){return typeof T==\"string\"&&(T=E.objects[T]),T.type===\"GeometryCollection\"?{type:\"FeatureCollection\",features:T.geometries.map(function(L){return o(E,L)})}:o(E,T)}function o(E,T){var L=T.id,x=T.bbox,C=T.properties==null?{}:T.properties,M=s(E,T);return L==null&&x==null?{type:\"Feature\",properties:C,geometry:M}:x==null?{type:\"Feature\",id:L,properties:C,geometry:M}:{type:\"Feature\",id:L,bbox:x,properties:C,geometry:M}}function s(E,T){var L=r(E.transform),x=E.arcs;function C(O,U){U.length&&U.pop();for(var G=x[O<0?~O:O],Z=0,j=G.length;Z<j;++Z)U.push(L(G[Z],Z));O<0&&i(U,j)}function M(O){return L(O)}function g(O){for(var U=[],G=0,Z=O.length;G<Z;++G)C(O[G],U);return U.length<2&&U.push(U[0]),U}function P(O){for(var U=g(O);U.length<4;)U.push(U[0]);return U}function A(O){return O.map(P)}function z(O){var U=O.type,G;switch(U){case\"GeometryCollection\":return{type:U,geometries:O.geometries.map(z)};case\"Point\":G=M(O.coordinates);break;case\"MultiPoint\":G=O.coordinates.map(M);break;case\"LineString\":G=g(O.arcs);break;case\"MultiLineString\":G=O.arcs.map(g);break;case\"Polygon\":G=A(O.arcs);break;case\"MultiPolygon\":G=O.arcs.map(A);break;default:return null}return{type:U,coordinates:G}}return z(T)}function l(E,T){var L={},x={},C={},M=[],g=-1;T.forEach(function(z,O){var U=E.arcs[z<0?~z:z],G;U.length<3&&!U[1][0]&&!U[1][1]&&(G=T[++g],T[g]=z,T[O]=G)}),T.forEach(function(z){var O=P(z),U=O[0],G=O[1],Z,j;if(Z=C[U])if(delete C[Z.end],Z.push(z),Z.end=G,j=x[G]){delete x[j.start];var N=j===Z?Z:Z.concat(j);x[N.start=Z.start]=C[N.end=j.end]=N}else x[Z.start]=C[Z.end]=Z;else if(Z=x[G])if(delete x[Z.start],Z.unshift(z),Z.start=U,j=C[U]){delete C[j.end];var H=j===Z?Z:j.concat(Z);x[H.start=j.start]=C[H.end=Z.end]=H}else x[Z.start]=C[Z.end]=Z;else Z=[z],x[Z.start=U]=C[Z.end=G]=Z});function P(z){var O=E.arcs[z<0?~z:z],U=O[0],G;return E.transform?(G=[0,0],O.forEach(function(Z){G[0]+=Z[0],G[1]+=Z[1]})):G=O[O.length-1],z<0?[G,U]:[U,G]}function A(z,O){for(var U in z){var G=z[U];delete O[G.start],delete G.start,delete G.end,G.forEach(function(Z){L[Z<0?~Z:Z]=1}),M.push(G)}}return A(C,x),A(x,C),T.forEach(function(z){L[z<0?~z:z]||M.push([z])}),M}function u(E){return s(E,c.apply(this,arguments))}function c(E,T,L){var x,C,M;if(arguments.length>1)x=f(E,T,L);else for(C=0,x=new Array(M=E.arcs.length);C<M;++C)x[C]=C;return{type:\"MultiLineString\",arcs:l(E,x)}}function f(E,T,L){var x=[],C=[],M;function g(U){var G=U<0?~U:U;(C[G]||(C[G]=[])).push({i:U,g:M})}function P(U){U.forEach(g)}function A(U){U.forEach(P)}function z(U){U.forEach(A)}function O(U){switch(M=U,U.type){case\"GeometryCollection\":U.geometries.forEach(O);break;case\"LineString\":P(U.arcs);break;case\"MultiLineString\":case\"Polygon\":A(U.arcs);break;case\"MultiPolygon\":z(U.arcs);break}}return O(T),C.forEach(L==null?function(U){x.push(U[0].i)}:function(U){L(U[0].g,U[U.length-1].g)&&x.push(U[0].i)}),x}function h(E){for(var T=-1,L=E.length,x,C=E[L-1],M=0;++T<L;)x=C,C=E[T],M+=x[0]*C[1]-x[1]*C[0];return Math.abs(M)}function d(E){return s(E,v.apply(this,arguments))}function v(E,T){var L={},x=[],C=[];T.forEach(M);function M(A){switch(A.type){case\"GeometryCollection\":A.geometries.forEach(M);break;case\"Polygon\":g(A.arcs);break;case\"MultiPolygon\":A.arcs.forEach(g);break}}function g(A){A.forEach(function(z){z.forEach(function(O){(L[O=O<0?~O:O]||(L[O]=[])).push(A)})}),x.push(A)}function P(A){return h(s(E,{type:\"Polygon\",arcs:[A]}).coordinates[0])}return x.forEach(function(A){if(!A._){var z=[],O=[A];for(A._=1,C.push(z);A=O.pop();)z.push(A),A.forEach(function(U){U.forEach(function(G){L[G<0?~G:G].forEach(function(Z){Z._||(Z._=1,O.push(Z))})})})}}),x.forEach(function(A){delete A._}),{type:\"MultiPolygon\",arcs:C.map(function(A){var z=[],O;if(A.forEach(function(N){N.forEach(function(H){H.forEach(function(re){L[re<0?~re:re].length<2&&z.push(re)})})}),z=l(E,z),(O=z.length)>1)for(var U=1,G=P(z[0]),Z,j;U<O;++U)(Z=P(z[U]))>G&&(j=z[0],z[0]=z[U],z[U]=j,G=Z);return z}).filter(function(A){return A.length>0})}}function _(E,T){for(var L=0,x=E.length;L<x;){var C=L+x>>>1;E[C]<T?L=C+1:x=C}return L}function b(E){var T={},L=E.map(function(){return[]});function x(N,H){N.forEach(function(re){re<0&&(re=~re);var oe=T[re];oe?oe.push(H):T[re]=[H]})}function C(N,H){N.forEach(function(re){x(re,H)})}function M(N,H){N.type===\"GeometryCollection\"?N.geometries.forEach(function(re){M(re,H)}):N.type in g&&g[N.type](N.arcs,H)}var g={LineString:x,MultiLineString:C,Polygon:C,MultiPolygon:function(N,H){N.forEach(function(re){C(re,H)})}};E.forEach(M);for(var P in T)for(var A=T[P],z=A.length,O=0;O<z;++O)for(var U=O+1;U<z;++U){var G=A[O],Z=A[U],j;(j=L[G])[P=_(j,Z)]!==Z&&j.splice(P,0,Z),(j=L[Z])[P=_(j,G)]!==G&&j.splice(P,0,G)}return L}function p(E){if(E==null)return t;var T,L,x=E.scale[0],C=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,A){A||(T=L=0);var z=2,O=P.length,U=new Array(O),G=Math.round((P[0]-M)/x),Z=Math.round((P[1]-g)/C);for(U[0]=G-T,T=G,U[1]=Z-L,L=Z;z<O;)U[z]=P[z],++z;return U}}function k(E,T){if(E.transform)throw new Error(\"already quantized\");if(!T||!T.scale){if(!((g=Math.floor(T))>=2))throw new Error(\"n must be \\u22652\");A=E.bbox||n(E);var L=A[0],x=A[1],C=A[2],M=A[3],g;T={scale:[C-L?(C-L)/(g-1):1,M-x?(M-x)/(g-1):1],translate:[L,x]}}else A=E.bbox;var P=p(T),A,z,O=E.objects,U={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case\"GeometryCollection\":H={type:\"GeometryCollection\",geometries:N.geometries.map(Z)};break;case\"Point\":H={type:\"Point\",coordinates:G(N.coordinates)};break;case\"MultiPoint\":H={type:\"MultiPoint\",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,re=1,oe=N.length,_e,Ce=new Array(oe);for(Ce[0]=P(N[0],0);++H<oe;)((_e=P(N[H],H))[0]||_e[1])&&(Ce[re++]=_e);return re===1&&(Ce[re++]=[0,0]),Ce.length=re,Ce}for(z in O)U[z]=Z(O[z]);return{type:\"Topology\",bbox:A,transform:T,objects:U,arcs:E.arcs.map(j)}}e.bbox=n,e.feature=a,e.merge=d,e.mergeArcs=v,e.mesh=u,e.meshArcs=c,e.neighbors=b,e.quantize=k,e.transform=r,e.untransform=p,Object.defineProperty(e,\"__esModule\",{value:!0})})});var bF=ye((ymr,KRe)=>{\"use strict\";var MZ=KRe.exports={},TFt=uk().locationmodeToLayer,AFt=SZ().feature;MZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,\"-\"),\"_\",e.resolution.toString(),\"m\"].join(\"\")};MZ.getTopojsonPath=function(e,t){return e+=e.endsWith(\"/\")?\"\":\"/\",`${e}${t}.json`};MZ.getTopojsonFeatures=function(e,t){var r=TFt[e.locationmode],n=t.objects[r];return AFt(t,n).features}});var cx=ye(ck=>{\"use strict\";var SFt=fs().BADNUM;ck.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a<e.length;a++){var o=e[a],s=o.lonlat;s[0]!==SFt?i.push(s):!r&&i.length>0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};ck.makeLine=function(e){return e.length===1?{type:\"LineString\",coordinates:e[0]}:{type:\"MultiLineString\",coordinates:e}};ck.makePolygon=function(e){if(e.length===1)return{type:\"Polygon\",coordinates:e};for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=[e[r]];return{type:\"MultiPolygon\",coordinates:t}};ck.makeBlank=function(){return{type:\"Point\",coordinates:[]}}});var $Re=ye((xmr,JRe)=>{JRe.exports={AFG:\"afghan\",ALA:\"\\\\b\\\\wland\",ALB:\"albania\",DZA:\"algeria\",ASM:\"^(?=.*americ).*samoa\",AND:\"andorra\",AGO:\"angola\",AIA:\"anguill?a\",ATA:\"antarctica\",ATG:\"antigua\",ARG:\"argentin\",ARM:\"armenia\",ABW:\"^(?!.*bonaire).*\\\\baruba\",AUS:\"australia\",AUT:\"^(?!.*hungary).*austria|\\\\baustri.*\\\\bemp\",AZE:\"azerbaijan\",BHS:\"bahamas\",BHR:\"bahrain\",BGD:\"bangladesh|^(?=.*east).*paki?stan\",BRB:\"barbados\",BLR:\"belarus|byelo\",BEL:\"^(?!.*luxem).*belgium\",BLZ:\"belize|^(?=.*british).*honduras\",BEN:\"benin|dahome\",BMU:\"bermuda\",BTN:\"bhutan\",BOL:\"bolivia\",BES:\"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\\\bbes.?islands\",BIH:\"herzegovina|bosnia\",BWA:\"botswana|bechuana\",BVT:\"bouvet\",BRA:\"brazil\",IOT:\"british.?indian.?ocean\",BRN:\"brunei\",BGR:\"bulgaria\",BFA:\"burkina|\\\\bfaso|upper.?volta\",BDI:\"burundi\",CPV:\"verde\",KHM:\"cambodia|kampuchea|khmer\",CMR:\"cameroon\",CAN:\"canada\",CYM:\"cayman\",CAF:\"\\\\bcentral.african.republic\",TCD:\"\\\\bchad\",CHL:\"\\\\bchile\",CHN:\"^(?!.*\\\\bmac)(?!.*\\\\bhong)(?!.*\\\\btai)(?!.*\\\\brep).*china|^(?=.*peo)(?=.*rep).*china\",CXR:\"christmas\",CCK:\"\\\\bcocos|keeling\",COL:\"colombia\",COM:\"comoro\",COG:\"^(?!.*\\\\bdem)(?!.*\\\\bd[\\\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\\\bcongo\",COK:\"\\\\bcook\",CRI:\"costa.?rica\",CIV:\"ivoire|ivory\",HRV:\"croatia\",CUB:\"\\\\bcuba\",CUW:\"^(?!.*bonaire).*\\\\bcura(c|\\xE7)ao\",CYP:\"cyprus\",CSK:\"czechoslovakia\",CZE:\"^(?=.*rep).*czech|czechia|bohemia\",COD:\"\\\\bdem.*congo|congo.*\\\\bdem|congo.*\\\\bd[\\\\.]?r|\\\\bd[\\\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc\",DNK:\"denmark\",DJI:\"djibouti\",DMA:\"dominica(?!n)\",DOM:\"dominican.rep\",ECU:\"ecuador\",EGY:\"egypt\",SLV:\"el.?salvador\",GNQ:\"guine.*eq|eq.*guine|^(?=.*span).*guinea\",ERI:\"eritrea\",EST:\"estonia\",ETH:\"ethiopia|abyssinia\",FLK:\"falkland|malvinas\",FRO:\"faroe|faeroe\",FJI:\"fiji\",FIN:\"finland\",FRA:\"^(?!.*\\\\bdep)(?!.*martinique).*france|french.?republic|\\\\bgaul\",GUF:\"^(?=.*french).*guiana\",PYF:\"french.?polynesia|tahiti\",ATF:\"french.?southern\",GAB:\"gabon\",GMB:\"gambia\",GEO:\"^(?!.*south).*georgia\",DDR:\"german.?democratic.?republic|democratic.?republic.*germany|east.germany\",DEU:\"^(?!.*east).*germany|^(?=.*\\\\bfed.*\\\\brep).*german\",GHA:\"ghana|gold.?coast\",GIB:\"gibraltar\",GRC:\"greece|hellenic|hellas\",GRL:\"greenland\",GRD:\"grenada\",GLP:\"guadeloupe\",GUM:\"\\\\bguam\",GTM:\"guatemala\",GGY:\"guernsey\",GIN:\"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea\",GNB:\"bissau|^(?=.*portu).*guinea\",GUY:\"guyana|british.?guiana\",HTI:\"haiti\",HMD:\"heard.*mcdonald\",VAT:\"holy.?see|vatican|papal.?st\",HND:\"^(?!.*brit).*honduras\",HKG:\"hong.?kong\",HUN:\"^(?!.*austr).*hungary\",ISL:\"iceland\",IND:\"india(?!.*ocea)\",IDN:\"indonesia\",IRN:\"\\\\biran|persia\",IRQ:\"\\\\biraq|mesopotamia\",IRL:\"(^ireland)|(^republic.*ireland)\",IMN:\"^(?=.*isle).*\\\\bman\",ISR:\"israel\",ITA:\"italy\",JAM:\"jamaica\",JPN:\"japan\",JEY:\"jersey\",JOR:\"jordan\",KAZ:\"kazak\",KEN:\"kenya|british.?east.?africa|east.?africa.?prot\",KIR:\"kiribati\",PRK:\"^(?=.*democrat|people|north|d.*p.*.r).*\\\\bkorea|dprk|korea.*(d.*p.*r)\",KWT:\"kuwait\",KGZ:\"kyrgyz|kirghiz\",LAO:\"\\\\blaos?\\\\b\",LVA:\"latvia\",LBN:\"lebanon\",LSO:\"lesotho|basuto\",LBR:\"liberia\",LBY:\"libya\",LIE:\"liechtenstein\",LTU:\"lithuania\",LUX:\"^(?!.*belg).*luxem\",MAC:\"maca(o|u)\",MDG:\"madagascar|malagasy\",MWI:\"malawi|nyasa\",MYS:\"malaysia\",MDV:\"maldive\",MLI:\"\\\\bmali\\\\b\",MLT:\"\\\\bmalta\",MHL:\"marshall\",MTQ:\"martinique\",MRT:\"mauritania\",MUS:\"mauritius\",MYT:\"\\\\bmayotte\",MEX:\"\\\\bmexic\",FSM:\"fed.*micronesia|micronesia.*fed\",MCO:\"monaco\",MNG:\"mongolia\",MNE:\"^(?!.*serbia).*montenegro\",MSR:\"montserrat\",MAR:\"morocco|\\\\bmaroc\",MOZ:\"mozambique\",MMR:\"myanmar|burma\",NAM:\"namibia\",NRU:\"nauru\",NPL:\"nepal\",NLD:\"^(?!.*\\\\bant)(?!.*\\\\bcarib).*netherlands\",ANT:\"^(?=.*\\\\bant).*(nether|dutch)\",NCL:\"new.?caledonia\",NZL:\"new.?zealand\",NIC:\"nicaragua\",NER:\"\\\\bniger(?!ia)\",NGA:\"nigeria\",NIU:\"niue\",NFK:\"norfolk\",MNP:\"mariana\",NOR:\"norway\",OMN:\"\\\\boman|trucial\",PAK:\"^(?!.*east).*paki?stan\",PLW:\"palau\",PSE:\"palestin|\\\\bgaza|west.?bank\",PAN:\"panama\",PNG:\"papua|new.?guinea\",PRY:\"paraguay\",PER:\"peru\",PHL:\"philippines\",PCN:\"pitcairn\",POL:\"poland\",PRT:\"portugal\",PRI:\"puerto.?rico\",QAT:\"qatar\",KOR:\"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\\\bkorea(?!.*d.*p.*r)\",MDA:\"moldov|b(a|e)ssarabia\",REU:\"r(e|\\xE9)union\",ROU:\"r(o|u|ou)mania\",RUS:\"\\\\brussia|soviet.?union|u\\\\.?s\\\\.?s\\\\.?r|socialist.?republics\",RWA:\"rwanda\",BLM:\"barth(e|\\xE9)lemy\",SHN:\"helena\",KNA:\"kitts|\\\\bnevis\",LCA:\"\\\\blucia\",MAF:\"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)\",SPM:\"miquelon\",VCT:\"vincent\",WSM:\"^(?!.*amer).*samoa\",SMR:\"san.?marino\",STP:\"\\\\bs(a|\\xE3)o.?tom(e|\\xE9)\",SAU:\"\\\\bsa\\\\w*.?arabia\",SEN:\"senegal\",SRB:\"^(?!.*monte).*serbia\",SYC:\"seychell\",SLE:\"sierra\",SGP:\"singapore\",SXM:\"^(?!.*martin)(?!.*saba).*maarten\",SVK:\"^(?!.*cze).*slovak\",SVN:\"slovenia\",SLB:\"solomon\",SOM:\"somali\",ZAF:\"south.africa|s\\\\\\\\..?africa\",SGS:\"south.?georgia|sandwich\",SSD:\"\\\\bs\\\\w*.?sudan\",ESP:\"spain\",LKA:\"sri.?lanka|ceylon\",SDN:\"^(?!.*\\\\bs(?!u)).*sudan\",SUR:\"surinam|dutch.?guiana\",SJM:\"svalbard\",SWZ:\"swaziland\",SWE:\"sweden\",CHE:\"switz|swiss\",SYR:\"syria\",TWN:\"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china\",TJK:\"tajik\",THA:\"thailand|\\\\bsiam\",MKD:\"macedonia|fyrom\",TLS:\"^(?=.*leste).*timor|^(?=.*east).*timor\",TGO:\"togo\",TKL:\"tokelau\",TON:\"tonga\",TTO:\"trinidad|tobago\",TUN:\"tunisia\",TUR:\"turkey\",TKM:\"turkmen\",TCA:\"turks\",TUV:\"tuvalu\",UGA:\"uganda\",UKR:\"ukrain\",ARE:\"emirates|^u\\\\.?a\\\\.?e\\\\.?$|united.?arab.?em\",GBR:\"united.?kingdom|britain|^u\\\\.?k\\\\.?$\",TZA:\"tanzania\",USA:\"united.?states\\\\b(?!.*islands)|\\\\bu\\\\.?s\\\\.?a\\\\.?\\\\b|^\\\\s*u\\\\.?s\\\\.?\\\\b(?!.*islands)\",UMI:\"minor.?outlying.?is\",URY:\"uruguay\",UZB:\"uzbek\",VUT:\"vanuatu|new.?hebrides\",VEN:\"venezuela\",VNM:\"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam\",VGB:\"^(?=.*\\\\bu\\\\.?\\\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin\",VIR:\"^(?=.*\\\\bu\\\\.?\\\\s?s).*virgin|^(?=.*states).*virgin\",WLF:\"futuna|wallis\",ESH:\"western.sahara\",YEM:\"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YMD:\"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\\\bp\\\\.?d\\\\.?r).*yemen\",YUG:\"yugoslavia\",ZMB:\"zambia|northern.?rhodesia\",EAZ:\"zanzibar\",ZWE:\"zimbabwe|^(?!.*northern).*rhodesia\"}});var AF=ye(ic=>{\"use strict\";Object.defineProperty(ic,\"__esModule\",{value:!0});var Op=63710088e-1,kZ={centimeters:Op*100,centimetres:Op*100,degrees:360/(2*Math.PI),feet:Op*3.28084,inches:Op*39.37,kilometers:Op/1e3,kilometres:Op/1e3,meters:Op,metres:Op,miles:Op/1609.344,millimeters:Op*1e3,millimetres:Op*1e3,nauticalmiles:Op/1852,radians:1,yards:Op*1.0936},EZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function fx(e,t,r={}){let n={type:\"Feature\"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function MFt(e,t,r={}){switch(e){case\"Point\":return CZ(t).geometry;case\"LineString\":return PZ(t).geometry;case\"Polygon\":return LZ(t).geometry;case\"MultiPoint\":return eDe(t).geometry;case\"MultiLineString\":return QRe(t).geometry;case\"MultiPolygon\":return tDe(t).geometry;default:throw new Error(e+\" is invalid\")}}function CZ(e,t,r={}){if(!e)throw new Error(\"coordinates is required\");if(!Array.isArray(e))throw new Error(\"coordinates must be an Array\");if(e.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!wF(e[0])||!wF(e[1]))throw new Error(\"coordinates must contain numbers\");return fx({type:\"Point\",coordinates:e},t,r)}function EFt(e,t,r={}){return TF(e.map(n=>CZ(n,t)),r)}function LZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");if(i[i.length-1].length!==i[0].length)throw new Error(\"First and last Position are not equivalent.\");for(let a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error(\"First and last Position are not equivalent.\")}return fx({type:\"Polygon\",coordinates:e},t,r)}function kFt(e,t,r={}){return TF(e.map(n=>LZ(n,t)),r)}function PZ(e,t,r={}){if(e.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return fx({type:\"LineString\",coordinates:e},t,r)}function CFt(e,t,r={}){return TF(e.map(n=>PZ(n,t)),r)}function TF(e,t={}){let r={type:\"FeatureCollection\"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function QRe(e,t,r={}){return fx({type:\"MultiLineString\",coordinates:e},t,r)}function eDe(e,t,r={}){return fx({type:\"MultiPoint\",coordinates:e},t,r)}function tDe(e,t,r={}){return fx({type:\"MultiPolygon\",coordinates:e},t,r)}function LFt(e,t,r={}){return fx({type:\"GeometryCollection\",geometries:e},t,r)}function PFt(e,t=0){if(t&&!(t>=0))throw new Error(\"precision must be a positive number\");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function rDe(e,t=\"kilometers\"){let r=kZ[t];if(!r)throw new Error(t+\" units is invalid\");return e*r}function IZ(e,t=\"kilometers\"){let r=kZ[t];if(!r)throw new Error(t+\" units is invalid\");return e/r}function IFt(e,t){return iDe(IZ(e,t))}function RFt(e){let t=e%360;return t<0&&(t+=360),t}function DFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function iDe(e){return e%(2*Math.PI)*180/Math.PI}function FFt(e){return e%360*Math.PI/180}function zFt(e,t=\"kilometers\",r=\"kilometers\"){if(!(e>=0))throw new Error(\"length must be a positive number\");return rDe(IZ(e,t),r)}function OFt(e,t=\"meters\",r=\"kilometers\"){if(!(e>=0))throw new Error(\"area must be a positive number\");let n=EZ[t];if(!n)throw new Error(\"invalid original units\");let i=EZ[r];if(!i)throw new Error(\"invalid final units\");return e/n*i}function wF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function qFt(e){return e!==null&&typeof e==\"object\"&&!Array.isArray(e)}function BFt(e){if(!e)throw new Error(\"bbox is required\");if(!Array.isArray(e))throw new Error(\"bbox must be an Array\");if(e.length!==4&&e.length!==6)throw new Error(\"bbox must be an Array of 4 or 6 numbers\");e.forEach(t=>{if(!wF(t))throw new Error(\"bbox must only contain numbers\")})}function NFt(e){if(!e)throw new Error(\"id is required\");if([\"string\",\"number\"].indexOf(typeof e)===-1)throw new Error(\"id must be a number or a string\")}ic.areaFactors=EZ;ic.azimuthToBearing=DFt;ic.bearingToAzimuth=RFt;ic.convertArea=OFt;ic.convertLength=zFt;ic.degreesToRadians=FFt;ic.earthRadius=Op;ic.factors=kZ;ic.feature=fx;ic.featureCollection=TF;ic.geometry=MFt;ic.geometryCollection=LFt;ic.isNumber=wF;ic.isObject=qFt;ic.lengthToDegrees=IFt;ic.lengthToRadians=IZ;ic.lineString=PZ;ic.lineStrings=CFt;ic.multiLineString=QRe;ic.multiPoint=eDe;ic.multiPolygon=tDe;ic.point=CZ;ic.points=EFt;ic.polygon=LZ;ic.polygons=kFt;ic.radiansToDegrees=iDe;ic.radiansToLength=rDe;ic.round=PFt;ic.validateBBox=BFt;ic.validateId=NFt});var MF=ye(Od=>{\"use strict\";Object.defineProperty(Od,\"__esModule\",{value:!0});var Wv=AF();function fk(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d===\"FeatureCollection\",_=d===\"Feature\",b=v?e.features.length:1,p=0;p<b;p++){u=v?e.features[p].geometry:_?e.geometry:e,h=u?u.type===\"GeometryCollection\":!1,s=h?u.geometries.length:1;for(var k=0;k<s;k++){var E=0,T=0;if(o=h?u.geometries[k]:u,o!==null){l=o.coordinates;var L=o.type;switch(c=r&&(L===\"Polygon\"||L===\"MultiPolygon\")?1:0,L){case null:break;case\"Point\":if(t(l,f,p,E,T)===!1)return!1;f++,E++;break;case\"LineString\":case\"MultiPoint\":for(n=0;n<l.length;n++){if(t(l[n],f,p,E,T)===!1)return!1;f++,L===\"MultiPoint\"&&E++}L===\"LineString\"&&E++;break;case\"Polygon\":case\"MultiLineString\":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],f,p,E,T)===!1)return!1;f++}L===\"MultiLineString\"&&E++,L===\"Polygon\"&&T++}L===\"Polygon\"&&E++;break;case\"MultiPolygon\":for(n=0;n<l.length;n++){for(T=0,i=0;i<l[n].length;i++){for(a=0;a<l[n][i].length-c;a++){if(t(l[n][i][a],f,p,E,T)===!1)return!1;f++}T++}E++}break;case\"GeometryCollection\":for(n=0;n<o.geometries.length;n++)if(fk(o.geometries[n],t,r)===!1)return!1;break;default:throw new Error(\"Unknown Geometry Type\")}}}}}function UFt(e,t,r,n){var i=r;return fk(e,function(a,o,s,l,u){o===0&&r===void 0?i=a:i=t(i,a,o,s,l,u)},n),i}function nDe(e,t){var r;switch(e.type){case\"FeatureCollection\":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case\"Feature\":t(e.properties,0);break}}function VFt(e,t,r){var n=r;return nDe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function aDe(e,t){if(e.type===\"Feature\")t(e,0);else if(e.type===\"FeatureCollection\")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}function GFt(e,t,r){var n=r;return aDe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function HFt(e){var t=[];return fk(e,function(r){t.push(r)}),t}function RZ(e,t){var r,n,i,a,o,s,l,u,c,f,h=0,d=e.type===\"FeatureCollection\",v=e.type===\"Feature\",_=d?e.features.length:1;for(r=0;r<_;r++){for(s=d?e.features[r].geometry:v?e.geometry:e,u=d?e.features[r].properties:v?e.properties:{},c=d?e.features[r].bbox:v?e.bbox:void 0,f=d?e.features[r].id:v?e.id:void 0,l=s?s.type===\"GeometryCollection\":!1,o=l?s.geometries.length:1,i=0;i<o;i++){if(a=l?s.geometries[i]:s,a===null){if(t(null,h,u,c,f)===!1)return!1;continue}switch(a.type){case\"Point\":case\"LineString\":case\"MultiPoint\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":{if(t(a,h,u,c,f)===!1)return!1;break}case\"GeometryCollection\":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],h,u,c,f)===!1)return!1;break}default:throw new Error(\"Unknown Geometry Type\")}}h++}}function jFt(e,t,r){var n=r;return RZ(e,function(i,a,o,s,l){a===0&&r===void 0?n=i:n=t(n,i,a,o,s,l)}),n}function SF(e,t){RZ(e,function(r,n,i,a,o){var s=r===null?null:r.type;switch(s){case null:case\"Point\":case\"LineString\":case\"Polygon\":return t(Wv.feature.call(void 0,r,i,{bbox:a,id:o}),n,0)===!1?!1:void 0}var l;switch(s){case\"MultiPoint\":l=\"Point\";break;case\"MultiLineString\":l=\"LineString\";break;case\"MultiPolygon\":l=\"Polygon\";break}for(var u=0;u<r.coordinates.length;u++){var c=r.coordinates[u],f={type:l,coordinates:c};if(t(Wv.feature.call(void 0,f,i),n,u)===!1)return!1}})}function WFt(e,t,r){var n=r;return SF(e,function(i,a,o){a===0&&o===0&&r===void 0?n=i:n=t(n,i,a,o)}),n}function oDe(e,t){SF(e,function(r,n,i){var a=0;if(r.geometry){var o=r.geometry.type;if(!(o===\"Point\"||o===\"MultiPoint\")){var s,l=0,u=0,c=0;if(fk(r,function(f,h,d,v,_){if(s===void 0||n>l||v>u||_>c){s=f,l=n,u=v,c=_,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,_,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function XFt(e,t,r){var n=r,i=!1;return oDe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function sDe(e,t){if(!e)throw new Error(\"geojson is required\");SF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case\"LineString\":if(t(r,n,i,0,0)===!1)return!1;break;case\"Polygon\":for(var s=0;s<o.length;s++)if(t(Wv.lineString.call(void 0,o[s],r.properties),n,i,s)===!1)return!1;break}}})}function ZFt(e,t,r){var n=r;return sDe(e,function(i,a,o,s){a===0&&r===void 0?n=i:n=t(n,i,a,o,s)}),n}function YFt(e,t){if(t=t||{},!Wv.isObject.call(void 0,t))throw new Error(\"options is invalid\");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,o=t.properties,s;switch(e.type){case\"FeatureCollection\":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case\"Feature\":o=o||e.properties,s=e.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":s=e;break;default:throw new Error(\"geojson is invalid\")}if(s===null)return null;var l=s.coordinates;switch(s.type){case\"Point\":case\"MultiPoint\":return null;case\"LineString\":return a<0&&(a=l.length+a-1),Wv.lineString.call(void 0,[l[a],l[a+1]],o,t);case\"Polygon\":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),Wv.lineString.call(void 0,[l[i][a],l[i][a+1]],o,t);case\"MultiLineString\":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a-1),Wv.lineString.call(void 0,[l[n][a],l[n][a+1]],o,t);case\"MultiPolygon\":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a-1),Wv.lineString.call(void 0,[l[n][i][a],l[n][i][a+1]],o,t)}throw new Error(\"geojson is invalid\")}function KFt(e,t){if(t=t||{},!Wv.isObject.call(void 0,t))throw new Error(\"options is invalid\");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,o=t.properties,s;switch(e.type){case\"FeatureCollection\":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case\"Feature\":o=o||e.properties,s=e.geometry;break;case\"Point\":case\"MultiPoint\":return null;case\"LineString\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":s=e;break;default:throw new Error(\"geojson is invalid\")}if(s===null)return null;var l=s.coordinates;switch(s.type){case\"Point\":return Wv.point.call(void 0,l,o,t);case\"MultiPoint\":return n<0&&(n=l.length+n),Wv.point.call(void 0,l[n],o,t);case\"LineString\":return a<0&&(a=l.length+a),Wv.point.call(void 0,l[a],o,t);case\"Polygon\":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Wv.point.call(void 0,l[i][a],o,t);case\"MultiLineString\":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a),Wv.point.call(void 0,l[n][a],o,t);case\"MultiPolygon\":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a),Wv.point.call(void 0,l[n][i][a],o,t)}throw new Error(\"geojson is invalid\")}Od.coordAll=HFt;Od.coordEach=fk;Od.coordReduce=UFt;Od.featureEach=aDe;Od.featureReduce=GFt;Od.findPoint=KFt;Od.findSegment=YFt;Od.flattenEach=SF;Od.flattenReduce=WFt;Od.geomEach=RZ;Od.geomReduce=jFt;Od.lineEach=sDe;Od.lineReduce=ZFt;Od.propEach=nDe;Od.propReduce=VFt;Od.segmentEach=oDe;Od.segmentReduce=XFt});var hDe=ye(EF=>{\"use strict\";Object.defineProperty(EF,\"__esModule\",{value:!0});var lDe=AF(),JFt=MF();function fDe(e){return JFt.geomReduce.call(void 0,e,(t,r)=>t+$Ft(r),0)}function $Ft(e){let t=0,r;switch(e.type){case\"Polygon\":return uDe(e.coordinates);case\"MultiPolygon\":for(r=0;r<e.coordinates.length;r++)t+=uDe(e.coordinates[r]);return t;case\"Point\":case\"MultiPoint\":case\"LineString\":case\"MultiLineString\":return 0}return 0}function uDe(e){let t=0;if(e&&e.length>0){t+=Math.abs(cDe(e[0]));for(let r=1;r<e.length;r++)t-=Math.abs(cDe(e[r]))}return t}var QFt=lDe.earthRadius*lDe.earthRadius/2,DZ=Math.PI/180;function cDe(e){let t=e.length-1;if(t<=2)return 0;let r=0,n=0;for(;n<t;){let i=e[n],a=e[n+1===t?0:n+1],o=e[n+2>=t?(n+2)%t:n+2],s=i[0]*DZ,l=a[1]*DZ,u=o[0]*DZ;r+=(u-s)*Math.sin(l),n++}return r*QFt}var ezt=fDe;EF.area=fDe;EF.default=ezt});var vDe=ye(kF=>{\"use strict\";Object.defineProperty(kF,\"__esModule\",{value:!0});var tzt=AF(),rzt=MF();function dDe(e,t={}){let r=0,n=0,i=0;return rzt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),tzt.point.call(void 0,[r/i,n/i],t.properties)}var izt=dDe;kF.centroid=dDe;kF.default=izt});var gDe=ye(CF=>{\"use strict\";Object.defineProperty(CF,\"__esModule\",{value:!0});var nzt=MF();function pDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return nzt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]<n[0]&&(r[2]=n[0]),r[3]<n[1]&&(r[3]=n[1])}),r}var azt=pDe;CF.bbox=pDe;CF.default=azt});var hx=ye((Mmr,bDe)=>{\"use strict\";var ozt=Oa(),_De=$Re(),{area:szt}=hDe(),{centroid:lzt}=vDe(),{bbox:uzt}=gDe(),mDe=ZS(),t5=K1(),czt=Ty(),fzt=FS(),LF=FM(),yDe=Object.keys(_De),hzt={\"ISO-3\":mDe,\"USA-states\":mDe,\"country names\":dzt};function dzt(e){for(var t=0;t<yDe.length;t++){var r=yDe[t],n=new RegExp(_De[r]);if(n.test(e.trim().toLowerCase()))return r}return t5.log(\"Unrecognized country name: \"+e+\".\"),!1}function vzt(e,t,r){if(!t||typeof t!=\"string\")return!1;var n=hzt[e](t),i,a,o;if(n){if(e===\"USA-states\")for(i=[],o=0;o<r.length;o++)a=r[o],a.properties&&a.properties.gu&&a.properties.gu===\"USA\"&&i.push(a);else i=r;for(o=0;o<i.length;o++)if(a=i[o],a.id===n)return a;t5.log([\"Location with id\",n,\"does not have a matching topojson feature at this resolution.\"].join(\" \"))}return!1}function pzt(e){var t=e.geometry,r=t.coordinates,n=e.id,i=[],a,o,s,l;function u(c){for(var f=0;f<c.length-1;f++)if(c[f][0]>0&&c[f+1][0]<0)return f;return null}switch(n===\"RUS\"||n===\"FJI\"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;l<c.length;l++)f[l]=[c[l][0]<0?c[l][0]+360:c[l][0],c[l][1]];i.push(LF.tester(f))}:n===\"ATA\"?a=function(c){var f=u(c);if(f===null)return i.push(LF.tester(c));var h=new Array(c.length+1),d=0;for(l=0;l<c.length;l++)l>f?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=LF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(LF.tester(c))},t.type){case\"MultiPolygon\":for(o=0;o<r.length;o++)for(s=0;s<r[o].length;s++)a(r[o][s]);break;case\"Polygon\":for(o=0;o<r.length;o++)a(r[o]);break}return i}function xDe(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},n=typeof t==\"string\"?r[t]:t;return czt(n)?n:(t5.error(\"Oops ... something went wrong when fetching \"+t),!1)}function gzt(e){var t=e[0].trace,r=xDe(t);if(!r)return!1;var n={},i=[],a;for(a=0;a<t._length;a++){var o=e[a];(o.loc||o.loc===0)&&(n[o.loc]=o)}function s(c){var f=fzt(c,t.featureidkey||\"id\").get(),h=n[f];if(h){var d=c.geometry;if(d.type===\"Polygon\"||d.type===\"MultiPolygon\"){var v={type:\"Feature\",id:f,geometry:d,properties:{}};v.geometry.coordinates.length>0?v.properties.ct=mzt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else t5.log([\"Location\",h.loc,\"does not have a valid GeoJSON geometry.\",\"Traces with locationmode *geojson-id* only support\",\"*Polygon* and *MultiPolygon* geometries.\"].join(\" \"))}delete n[f]}switch(r.type){case\"FeatureCollection\":var l=r.features;for(a=0;a<l.length;a++)s(l[a]);break;case\"Feature\":s(r);break;default:return t5.warn([\"Invalid GeoJSON type\",(r.type||\"none\")+\".\",\"Traces with locationmode *geojson-id* only support\",\"*FeatureCollection* and *Feature* types.\"].join(\" \")),!1}for(var u in n)t5.log([\"Location *\"+u+\"*\",\"does not have a matching feature with id-key\",\"*\"+t.featureidkey+\"*.\"].join(\" \"));return i}function mzt(e){var t=e.geometry,r;if(t.type===\"MultiPolygon\")for(var n=t.coordinates,i=0,a=0;a<n.length;a++){var o={type:\"Polygon\",coordinates:n[a]},s=szt(o);s>i&&(i=s,r=o)}else r=t;return lzt(r).geometry.coordinates}function yzt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){ozt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL \"'+l+'\" does not exist.':\"Unexpected error while fetching from \"+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!==\"pending\")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c(\"Unexpected error while fetching from \"+l);f++},50)})}for(var a=0;a<e.length;a++){var o=e[a][0].trace,s=o.geojson;typeof s==\"string\"&&(t[s]?t[s]===\"pending\"&&r.push(i(s)):(t[s]=\"pending\",r.push(n(s))))}return r}function _zt(e){return uzt(e)}bDe.exports={locationToFeature:vzt,feature2polygons:pzt,getTraceGeojson:xDe,extractTraceFeature:gzt,fetchTraceGeoData:yzt,computeBbox:_zt}});var FZ=ye((Emr,ADe)=>{\"use strict\";var xzt=Oa(),bzt=So(),wDe=ka(),TDe=sp(),wzt=TDe.stylePoints,Tzt=TDe.styleText;ADe.exports=function(t,r){r&&Azt(t,r)};function Azt(e,t){var r=t[0].trace,n=t[0].node3;n.style(\"opacity\",t[0].trace.opacity),wzt(n,r,e),Tzt(n,r,e),n.selectAll(\"path.js-line\").style(\"fill\",\"none\").each(function(i){var a=xzt.select(this),o=i.trace,s=o.line||{};a.call(wDe.stroke,s.color).call(bzt.dashLine,s.dash||\"\",s.width||0),o.fill!==\"none\"&&a.call(wDe.fill,o.fillcolor)})}});var BZ=ye((kmr,EDe)=>{\"use strict\";var SDe=Oa(),IF=Dr(),Szt=bF().getTopojsonFeatures,zZ=cx(),PF=hx(),MDe=Mg().findExtremes,qZ=fs().BADNUM,Mzt=q0().calcMarkerSize,OZ=Ru(),Ezt=FZ();function kzt(e,t,r){var n=t.layers.frontplot.select(\".scatterlayer\"),i=IF.makeTraceGroups(n,r,\"trace scattergeo\");function a(o,s){o.lonlat[0]===qZ&&SDe.select(s).remove()}i.selectAll(\"*\").remove(),i.each(function(o){var s=SDe.select(this),l=o[0].trace;if(OZ.hasLines(l)||l.fill!==\"none\"){var u=zZ.calcTraceToLineCoords(o),c=l.fill!==\"none\"?zZ.makePolygon(u):zZ.makeLine(u);s.selectAll(\"path.js-line\").data([{geojson:c,trace:l}]).enter().append(\"path\").classed(\"js-line\",!0).style(\"stroke-miterlimit\",2)}OZ.hasMarkers(l)&&s.selectAll(\"path.point\").data(IF.identity).enter().append(\"path\").classed(\"point\",!0).each(function(f){a(f,this)}),OZ.hasText(l)&&s.selectAll(\"g\").data(IF.identity).enter().append(\"g\").append(\"text\").each(function(f){a(f,this)}),Ezt(e,o)})}function Czt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(IF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l===\"geojson-id\"?PF.extractTraceFeature(e):Szt(r,i.topojson);for(o=0;o<a;o++){s=e[o];var c=l===\"geojson-id\"?s.fOut:PF.locationToFeature(l,s.loc,u);s.lonlat=c?c.properties.ct:[qZ,qZ]}}var f={padded:!0},h,d;if(n.fitbounds===\"geojson\"&&r.locationmode===\"geojson-id\"){var v=PF.computeBbox(PF.getTraceGeojson(r));h=[v[0],v[2]],d=[v[1],v[3]]}else{for(h=new Array(a),d=new Array(a),o=0;o<a;o++)s=e[o],h[o]=s.lonlat[0],d[o]=s.lonlat[1];f.ppad=Mzt(r,a)}r._extremes.lon=MDe(n.lonaxis._ax,h,f),r._extremes.lat=MDe(n.lataxis._ax,d,f)}EDe.exports={calcGeoJSON:Czt,plot:kzt}});var CDe=ye((Cmr,kDe)=>{\"use strict\";var Lzt=vf(),Pzt=fs().BADNUM,Izt=gT(),Rzt=Dr().fillText,Dzt=ew();kDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var E=k.lonlat;if(E[0]===Pzt||u(E))return 1/0;var T=c(E),L=c([r,n]),x=Math.abs(T[0]-L[0]),C=Math.abs(T[1]-L[1]),M=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-M,1-3/M)}if(Lzt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],_=h.mrc||1;t.x0=v[0]-_,t.x1=v[0]+_,t.y0=v[1]-_,t.y1=v[1]+_,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=Izt(a,h),t.extraText=Fzt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Fzt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i===\"all\"?Dzt.hoverinfo.flags:i.split(\"+\"),o=a.indexOf(\"location\")!==-1&&Array.isArray(e.locations),s=a.indexOf(\"lon\")!==-1,l=a.indexOf(\"lat\")!==-1,u=a.indexOf(\"text\")!==-1,c=[];function f(h){return h+\"\\xB0\"}return o?c.push(t.loc):s&&l?c.push(\"(\"+f(r.latLabel)+\", \"+f(r.lonLabel)+\")\"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&Rzt(t,e,c),c.join(\"<br>\")}});var PDe=ye((Lmr,LDe)=>{\"use strict\";LDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var DDe=ye((Pmr,RDe)=>{\"use strict\";var IDe=Ru(),zzt=fs().BADNUM;RDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!IDe.hasMarkers(s)&&!IDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h<n.length;h++)n[h].selected=0;else for(h=0;h<n.length;h++)l=n[h],u=l.lonlat,u[0]!==zzt&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,h,t)?(o.push({pointNumber:h,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var hk=ye((RF,FDe)=>{(function(e,t){t(typeof RF==\"object\"&&typeof FDe!=\"undefined\"?RF:e.d3=e.d3||{})})(RF,function(e){\"use strict\";function t(Ee,Ae){return Ee<Ae?-1:Ee>Ae?1:Ee>=Ae?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Ae,Be,Pe,me){for(Pe==null&&(Pe=0),me==null&&(me=Ae.length);Pe<me;){var De=Pe+me>>>1;Ee(Ae[De],Be)<0?Pe=De+1:me=De}return Pe},right:function(Ae,Be,Pe,me){for(Pe==null&&(Pe=0),me==null&&(me=Ae.length);Pe<me;){var De=Pe+me>>>1;Ee(Ae[De],Be)>0?me=De:Pe=De+1}return Pe}}}function n(Ee){return function(Ae,Be){return t(Ee(Ae),Be)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Ae){Ae==null&&(Ae=l);for(var Be=0,Pe=Ee.length-1,me=Ee[0],De=new Array(Pe<0?0:Pe);Be<Pe;)De[Be]=Ae(me,me=Ee[++Be]);return De}function l(Ee,Ae){return[Ee,Ae]}function u(Ee,Ae,Be){var Pe=Ee.length,me=Ae.length,De=new Array(Pe*me),ce,je,lt,pt;for(Be==null&&(Be=l),ce=lt=0;ce<Pe;++ce)for(pt=Ee[ce],je=0;je<me;++je,++lt)De[lt]=Be(pt,Ae[je]);return De}function c(Ee,Ae){return Ae<Ee?-1:Ae>Ee?1:Ae>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,Ae){var Be=Ee.length,Pe=0,me=-1,De=0,ce,je,lt=0;if(Ae==null)for(;++me<Be;)isNaN(ce=f(Ee[me]))||(je=ce-De,De+=je/++Pe,lt+=je*(ce-De));else for(;++me<Be;)isNaN(ce=f(Ae(Ee[me],me,Ee)))||(je=ce-De,De+=je/++Pe,lt+=je*(ce-De));if(Pe>1)return lt/(Pe-1)}function d(Ee,Ae){var Be=h(Ee,Ae);return Be&&Math.sqrt(Be)}function v(Ee,Ae){var Be=Ee.length,Pe=-1,me,De,ce;if(Ae==null){for(;++Pe<Be;)if((me=Ee[Pe])!=null&&me>=me)for(De=ce=me;++Pe<Be;)(me=Ee[Pe])!=null&&(De>me&&(De=me),ce<me&&(ce=me))}else for(;++Pe<Be;)if((me=Ae(Ee[Pe],Pe,Ee))!=null&&me>=me)for(De=ce=me;++Pe<Be;)(me=Ae(Ee[Pe],Pe,Ee))!=null&&(De>me&&(De=me),ce<me&&(ce=me));return[De,ce]}var _=Array.prototype,b=_.slice,p=_.map;function k(Ee){return function(){return Ee}}function E(Ee){return Ee}function T(Ee,Ae,Be){Ee=+Ee,Ae=+Ae,Be=(me=arguments.length)<2?(Ae=Ee,Ee=0,1):me<3?1:+Be;for(var Pe=-1,me=Math.max(0,Math.ceil((Ae-Ee)/Be))|0,De=new Array(me);++Pe<me;)De[Pe]=Ee+Pe*Be;return De}var L=Math.sqrt(50),x=Math.sqrt(10),C=Math.sqrt(2);function M(Ee,Ae,Be){var Pe,me=-1,De,ce,je;if(Ae=+Ae,Ee=+Ee,Be=+Be,Ee===Ae&&Be>0)return[Ee];if((Pe=Ae<Ee)&&(De=Ee,Ee=Ae,Ae=De),(je=g(Ee,Ae,Be))===0||!isFinite(je))return[];if(je>0)for(Ee=Math.ceil(Ee/je),Ae=Math.floor(Ae/je),ce=new Array(De=Math.ceil(Ae-Ee+1));++me<De;)ce[me]=(Ee+me)*je;else for(Ee=Math.floor(Ee*je),Ae=Math.ceil(Ae*je),ce=new Array(De=Math.ceil(Ee-Ae+1));++me<De;)ce[me]=(Ee-me)/je;return Pe&&ce.reverse(),ce}function g(Ee,Ae,Be){var Pe=(Ae-Ee)/Math.max(0,Be),me=Math.floor(Math.log(Pe)/Math.LN10),De=Pe/Math.pow(10,me);return me>=0?(De>=L?10:De>=x?5:De>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(De>=L?10:De>=x?5:De>=C?2:1)}function P(Ee,Ae,Be){var Pe=Math.abs(Ae-Ee)/Math.max(0,Be),me=Math.pow(10,Math.floor(Math.log(Pe)/Math.LN10)),De=Pe/me;return De>=L?me*=10:De>=x?me*=5:De>=C&&(me*=2),Ae<Ee?-me:me}function A(Ee){return Math.ceil(Math.log(Ee.length)/Math.LN2)+1}function z(){var Ee=E,Ae=v,Be=A;function Pe(me){var De,ce=me.length,je,lt=new Array(ce);for(De=0;De<ce;++De)lt[De]=Ee(me[De],De,me);var pt=Ae(lt),Vt=pt[0],ot=pt[1],ut=Be(lt,Vt,ot);Array.isArray(ut)||(ut=P(Vt,ot,ut),ut=T(Math.ceil(Vt/ut)*ut,ot,ut));for(var Wt=ut.length;ut[0]<=Vt;)ut.shift(),--Wt;for(;ut[Wt-1]>ot;)ut.pop(),--Wt;var Nt=new Array(Wt+1),$t;for(De=0;De<=Wt;++De)$t=Nt[De]=[],$t.x0=De>0?ut[De-1]:Vt,$t.x1=De<Wt?ut[De]:ot;for(De=0;De<ce;++De)je=lt[De],Vt<=je&&je<=ot&&Nt[a(ut,je,0,Wt)].push(me[De]);return Nt}return Pe.value=function(me){return arguments.length?(Ee=typeof me==\"function\"?me:k(me),Pe):Ee},Pe.domain=function(me){return arguments.length?(Ae=typeof me==\"function\"?me:k([me[0],me[1]]),Pe):Ae},Pe.thresholds=function(me){return arguments.length?(Be=typeof me==\"function\"?me:Array.isArray(me)?k(b.call(me)):k(me),Pe):Be},Pe}function O(Ee,Ae,Be){if(Be==null&&(Be=f),!!(Pe=Ee.length)){if((Ae=+Ae)<=0||Pe<2)return+Be(Ee[0],0,Ee);if(Ae>=1)return+Be(Ee[Pe-1],Pe-1,Ee);var Pe,me=(Pe-1)*Ae,De=Math.floor(me),ce=+Be(Ee[De],De,Ee),je=+Be(Ee[De+1],De+1,Ee);return ce+(je-ce)*(me-De)}}function U(Ee,Ae,Be){return Ee=p.call(Ee,f).sort(t),Math.ceil((Be-Ae)/(2*(O(Ee,.75)-O(Ee,.25))*Math.pow(Ee.length,-1/3)))}function G(Ee,Ae,Be){return Math.ceil((Be-Ae)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function Z(Ee,Ae){var Be=Ee.length,Pe=-1,me,De;if(Ae==null){for(;++Pe<Be;)if((me=Ee[Pe])!=null&&me>=me)for(De=me;++Pe<Be;)(me=Ee[Pe])!=null&&me>De&&(De=me)}else for(;++Pe<Be;)if((me=Ae(Ee[Pe],Pe,Ee))!=null&&me>=me)for(De=me;++Pe<Be;)(me=Ae(Ee[Pe],Pe,Ee))!=null&&me>De&&(De=me);return De}function j(Ee,Ae){var Be=Ee.length,Pe=Be,me=-1,De,ce=0;if(Ae==null)for(;++me<Be;)isNaN(De=f(Ee[me]))?--Pe:ce+=De;else for(;++me<Be;)isNaN(De=f(Ae(Ee[me],me,Ee)))?--Pe:ce+=De;if(Pe)return ce/Pe}function N(Ee,Ae){var Be=Ee.length,Pe=-1,me,De=[];if(Ae==null)for(;++Pe<Be;)isNaN(me=f(Ee[Pe]))||De.push(me);else for(;++Pe<Be;)isNaN(me=f(Ae(Ee[Pe],Pe,Ee)))||De.push(me);return O(De.sort(t),.5)}function H(Ee){for(var Ae=Ee.length,Be,Pe=-1,me=0,De,ce;++Pe<Ae;)me+=Ee[Pe].length;for(De=new Array(me);--Ae>=0;)for(ce=Ee[Ae],Be=ce.length;--Be>=0;)De[--me]=ce[Be];return De}function re(Ee,Ae){var Be=Ee.length,Pe=-1,me,De;if(Ae==null){for(;++Pe<Be;)if((me=Ee[Pe])!=null&&me>=me)for(De=me;++Pe<Be;)(me=Ee[Pe])!=null&&De>me&&(De=me)}else for(;++Pe<Be;)if((me=Ae(Ee[Pe],Pe,Ee))!=null&&me>=me)for(De=me;++Pe<Be;)(me=Ae(Ee[Pe],Pe,Ee))!=null&&De>me&&(De=me);return De}function oe(Ee,Ae){for(var Be=Ae.length,Pe=new Array(Be);Be--;)Pe[Be]=Ee[Ae[Be]];return Pe}function _e(Ee,Ae){if(Be=Ee.length){var Be,Pe=0,me=0,De,ce=Ee[me];for(Ae==null&&(Ae=t);++Pe<Be;)(Ae(De=Ee[Pe],ce)<0||Ae(ce,ce)!==0)&&(ce=De,me=Pe);if(Ae(ce,ce)===0)return me}}function Ce(Ee,Ae,Be){for(var Pe=(Be==null?Ee.length:Be)-(Ae=Ae==null?0:+Ae),me,De;Pe;)De=Math.random()*Pe--|0,me=Ee[Pe+Ae],Ee[Pe+Ae]=Ee[De+Ae],Ee[De+Ae]=me;return Ee}function Le(Ee,Ae){var Be=Ee.length,Pe=-1,me,De=0;if(Ae==null)for(;++Pe<Be;)(me=+Ee[Pe])&&(De+=me);else for(;++Pe<Be;)(me=+Ae(Ee[Pe],Pe,Ee))&&(De+=me);return De}function ge(Ee){if(!(De=Ee.length))return[];for(var Ae=-1,Be=re(Ee,ie),Pe=new Array(Be);++Ae<Be;)for(var me=-1,De,ce=Pe[Ae]=new Array(De);++me<De;)ce[me]=Ee[me][Ae];return Pe}function ie(Ee){return Ee.length}function Se(){return ge(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=v,e.histogram=z,e.thresholdFreedmanDiaconis=U,e.thresholdScott=G,e.thresholdSturges=A,e.max=Z,e.mean=j,e.median=N,e.merge=H,e.min=re,e.pairs=s,e.permute=oe,e.quantile=O,e.range=T,e.scan=_e,e.shuffle=Ce,e.sum=Le,e.ticks=M,e.tickIncrement=g,e.tickStep=P,e.transpose=ge,e.variance=h,e.zip=Se,Object.defineProperty(e,\"__esModule\",{value:!0})})});var NZ=ye((DF,zDe)=>{(function(e,t){typeof DF==\"object\"&&typeof zDe!=\"undefined\"?t(DF,hk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(DF,function(e,t){\"use strict\";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(At){a(i,At,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(At,Xt,Cr){var Ar=At.s=Xt+Cr,Kr=Ar-Xt,ki=Ar-Kr;At.t=Xt-ki+(Cr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,_=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,E=Math.exp,T=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(At){return At>0?1:At<0?-1:0},M=Math.sqrt,g=Math.tan;function P(At){return At>1?0:At<-1?l:Math.acos(At)}function A(At){return At>1?u:At<-1?-u:Math.asin(At)}function z(At){return(At=x(At/2))*At}function O(){}function U(At,Xt){At&&Z.hasOwnProperty(At.type)&&Z[At.type](At,Xt)}var G={Feature:function(At,Xt){U(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar<Kr;)U(Cr[Ar].geometry,Xt)}},Z={Sphere:function(At,Xt){Xt.sphere()},Point:function(At,Xt){At=At.coordinates,Xt.point(At[0],At[1],At[2])},MultiPoint:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)At=Cr[Ar],Xt.point(At[0],At[1],At[2])},LineString:function(At,Xt){j(At.coordinates,Xt,0)},MultiLineString:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)j(Cr[Ar],Xt,0)},Polygon:function(At,Xt){N(At.coordinates,Xt)},MultiPolygon:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)N(Cr[Ar],Xt)},GeometryCollection:function(At,Xt){for(var Cr=At.geometries,Ar=-1,Kr=Cr.length;++Ar<Kr;)U(Cr[Ar],Xt)}};function j(At,Xt,Cr){var Ar=-1,Kr=At.length-Cr,ki;for(Xt.lineStart();++Ar<Kr;)ki=At[Ar],Xt.point(ki[0],ki[1],ki[2]);Xt.lineEnd()}function N(At,Xt){var Cr=-1,Ar=At.length;for(Xt.polygonStart();++Cr<Ar;)j(At[Cr],Xt,1);Xt.polygonEnd()}function H(At,Xt){At&&G.hasOwnProperty(At.type)?G[At.type](At,Xt):U(At,Xt)}var re=r(),oe=r(),_e,Ce,Le,ge,ie,Se={point:O,lineStart:O,lineEnd:O,polygonStart:function(){re.reset(),Se.lineStart=Ee,Se.lineEnd=Ae},polygonEnd:function(){var At=+re;oe.add(At<0?f+At:At),this.lineStart=this.lineEnd=this.point=O},sphere:function(){oe.add(f)}};function Ee(){Se.point=Be}function Ae(){Pe(_e,Ce)}function Be(At,Xt){Se.point=Pe,_e=At,Ce=Xt,At*=d,Xt*=d,Le=At,ge=p(Xt=Xt/2+c),ie=x(Xt)}function Pe(At,Xt){At*=d,Xt*=d,Xt=Xt/2+c;var Cr=At-Le,Ar=Cr>=0?1:-1,Kr=Ar*Cr,ki=p(Xt),Xi=x(Xt),dn=ie*Xi,wn=ge*ki+dn*p(Kr),Nn=dn*Ar*x(Kr);re.add(b(Nn,wn)),Le=At,ge=ki,ie=Xi}function me(At){return oe.reset(),H(At,Se),oe*2}function De(At){return[b(At[1],At[0]),A(At[2])]}function ce(At){var Xt=At[0],Cr=At[1],Ar=p(Cr);return[Ar*p(Xt),Ar*x(Xt),x(Cr)]}function je(At,Xt){return At[0]*Xt[0]+At[1]*Xt[1]+At[2]*Xt[2]}function lt(At,Xt){return[At[1]*Xt[2]-At[2]*Xt[1],At[2]*Xt[0]-At[0]*Xt[2],At[0]*Xt[1]-At[1]*Xt[0]]}function pt(At,Xt){At[0]+=Xt[0],At[1]+=Xt[1],At[2]+=Xt[2]}function Vt(At,Xt){return[At[0]*Xt,At[1]*Xt,At[2]*Xt]}function ot(At){var Xt=M(At[0]*At[0]+At[1]*At[1]+At[2]*At[2]);At[0]/=Xt,At[1]/=Xt,At[2]/=Xt}var ut,Wt,Nt,$t,sr,Tr,fr,$e,St=r(),Qt,Gt,_t={point:It,lineStart:er,lineEnd:lr,polygonStart:function(){_t.point=wr,_t.lineStart=Lr,_t.lineEnd=ti,St.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),_t.point=It,_t.lineStart=er,_t.lineEnd=lr,re<0?(ut=-(Nt=180),Wt=-($t=90)):St>o?$t=90:St<-o&&(Wt=-90),Gt[0]=ut,Gt[1]=Nt},sphere:function(){ut=-(Nt=180),Wt=-($t=90)}};function It(At,Xt){Qt.push(Gt=[ut=At,Nt=At]),Xt<Wt&&(Wt=Xt),Xt>$t&&($t=Xt)}function mt(At,Xt){var Cr=ce([At*d,Xt*d]);if($e){var Ar=lt($e,Cr),Kr=[Ar[1],-Ar[0],0],ki=lt(Kr,Ar);ot(ki),ki=De(ki);var Xi=At-sr,dn=Xi>0?1:-1,wn=ki[0]*h*dn,Nn,Yi=v(Xi)>180;Yi^(dn*sr<wn&&wn<dn*At)?(Nn=ki[1]*h,Nn>$t&&($t=Nn)):(wn=(wn+360)%360-180,Yi^(dn*sr<wn&&wn<dn*At)?(Nn=-ki[1]*h,Nn<Wt&&(Wt=Nn)):(Xt<Wt&&(Wt=Xt),Xt>$t&&($t=Xt))),Yi?At<sr?Br(ut,At)>Br(ut,Nt)&&(Nt=At):Br(At,Nt)>Br(ut,Nt)&&(ut=At):Nt>=ut?(At<ut&&(ut=At),At>Nt&&(Nt=At)):At>sr?Br(ut,At)>Br(ut,Nt)&&(Nt=At):Br(At,Nt)>Br(ut,Nt)&&(ut=At)}else Qt.push(Gt=[ut=At,Nt=At]);Xt<Wt&&(Wt=Xt),Xt>$t&&($t=Xt),$e=Cr,sr=At}function er(){_t.point=mt}function lr(){Gt[0]=ut,Gt[1]=Nt,_t.point=It,$e=null}function wr(At,Xt){if($e){var Cr=At-sr;St.add(v(Cr)>180?Cr+(Cr>0?360:-360):Cr)}else Tr=At,fr=Xt;Se.point(At,Xt),mt(At,Xt)}function Lr(){Se.lineStart()}function ti(){wr(Tr,fr),Se.lineEnd(),v(St)>o&&(ut=-(Nt=180)),Gt[0]=ut,Gt[1]=Nt,$e=null}function Br(At,Xt){return(Xt-=At)<0?Xt+360:Xt}function Vr(At,Xt){return At[0]-Xt[0]}function dt(At,Xt){return At[0]<=At[1]?At[0]<=Xt&&Xt<=At[1]:Xt<At[0]||At[1]<Xt}function Ge(At){var Xt,Cr,Ar,Kr,ki,Xi,dn;if($t=Nt=-(ut=Wt=1/0),Qt=[],H(At,_t),Cr=Qt.length){for(Qt.sort(Vr),Xt=1,Ar=Qt[0],ki=[Ar];Xt<Cr;++Xt)Kr=Qt[Xt],dt(Ar,Kr[0])||dt(Ar,Kr[1])?(Br(Ar[0],Kr[1])>Br(Ar[0],Ar[1])&&(Ar[1]=Kr[1]),Br(Kr[0],Ar[1])>Br(Ar[0],Ar[1])&&(Ar[0]=Kr[0])):ki.push(Ar=Kr);for(Xi=-1/0,Cr=ki.length-1,Xt=0,Ar=ki[Cr];Xt<=Cr;Ar=Kr,++Xt)Kr=ki[Xt],(dn=Br(Ar[1],Kr[0]))>Xi&&(Xi=dn,ut=Kr[0],Nt=Ar[1])}return Qt=Gt=null,ut===1/0||Wt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ut,Wt],[Nt,$t]]}var Je,We,tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi,$r,di,ji,In={sphere:O,point:wi,lineStart:qn,lineEnd:la,polygonStart:function(){In.lineStart=Ut,In.lineEnd=wt},polygonEnd:function(){In.lineStart=qn,In.lineEnd=la}};function wi(At,Xt){At*=d,Xt*=d;var Cr=p(Xt);On(Cr*p(At),Cr*x(At),x(Xt))}function On(At,Xt,Cr){++Je,tt+=(At-tt)/Je,xt+=(Xt-xt)/Je,Ie+=(Cr-Ie)/Je}function qn(){In.point=Fn}function Fn(At,Xt){At*=d,Xt*=d;var Cr=p(Xt);$r=Cr*p(At),di=Cr*x(At),ji=x(Xt),In.point=ra,On($r,di,ji)}function ra(At,Xt){At*=d,Xt*=d;var Cr=p(Xt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Xt),Xi=b(M((Xi=di*ki-ji*Kr)*Xi+(Xi=ji*Ar-$r*ki)*Xi+(Xi=$r*Kr-di*Ar)*Xi),$r*Ar+di*Kr+ji*ki);We+=Xi,xe+=Xi*($r+($r=Ar)),ke+=Xi*(di+(di=Kr)),vt+=Xi*(ji+(ji=ki)),On($r,di,ji)}function la(){In.point=wi}function Ut(){In.point=rr}function wt(){nr(ii,pi),In.point=wi}function rr(At,Xt){ii=At,pi=Xt,At*=d,Xt*=d,In.point=nr;var Cr=p(Xt);$r=Cr*p(At),di=Cr*x(At),ji=x(Xt),On($r,di,ji)}function nr(At,Xt){At*=d,Xt*=d;var Cr=p(Xt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Xt),Xi=di*ki-ji*Kr,dn=ji*Ar-$r*ki,wn=$r*Kr-di*Ar,Nn=M(Xi*Xi+dn*dn+wn*wn),Yi=A(Nn),Qi=Nn&&-Yi/Nn;ir+=Qi*Xi,ar+=Qi*dn,vr+=Qi*wn,We+=Yi,xe+=Yi*($r+($r=Ar)),ke+=Yi*(di+(di=Kr)),vt+=Yi*(ji+(ji=ki)),On($r,di,ji)}function Er(At){Je=We=tt=xt=Ie=xe=ke=vt=ir=ar=vr=0,H(At,In);var Xt=ir,Cr=ar,Ar=vr,Kr=Xt*Xt+Cr*Cr+Ar*Ar;return Kr<s&&(Xt=xe,Cr=ke,Ar=vt,We<o&&(Xt=tt,Cr=xt,Ar=Ie),Kr=Xt*Xt+Cr*Cr+Ar*Ar,Kr<s)?[NaN,NaN]:[b(Cr,Xt)*h,A(Ar/M(Kr))*h]}function Xr(At){return function(){return At}}function ri(At,Xt){function Cr(Ar,Kr){return Ar=At(Ar,Kr),Xt(Ar[0],Ar[1])}return At.invert&&Xt.invert&&(Cr.invert=function(Ar,Kr){return Ar=Xt.invert(Ar,Kr),Ar&&At.invert(Ar[0],Ar[1])}),Cr}function Qr(At,Xt){return[v(At)>l?At+Math.round(-At/f)*f:At,Xt]}Qr.invert=Qr;function Oi(At,Xt,Cr){return(At%=f)?Xt||Cr?ri(tn(At),fn(Xt,Cr)):tn(At):Xt||Cr?fn(Xt,Cr):Qr}function $i(At){return function(Xt,Cr){return Xt+=At,[Xt>l?Xt-f:Xt<-l?Xt+f:Xt,Cr]}}function tn(At){var Xt=$i(At);return Xt.invert=$i(-At),Xt}function fn(At,Xt){var Cr=p(At),Ar=x(At),Kr=p(Xt),ki=x(Xt);function Xi(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Cr+Yi*Ar;return[b(Qi*Kr-Fi*ki,Yi*Cr-on*Ar),A(Fi*Kr+Qi*ki)]}return Xi.invert=function(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Kr-Qi*ki;return[b(Qi*Kr+on*ki,Yi*Cr+Fi*Ar),A(Fi*Cr-Yi*Ar)]},Xi}function yn(At){At=Oi(At[0]*d,At[1]*d,At.length>2?At[2]*d:0);function Xt(Cr){return Cr=At(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr}return Xt.invert=function(Cr){return Cr=At.invert(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr},Xt}function Sn(At,Xt,Cr,Ar,Kr,ki){if(Cr){var Xi=p(Xt),dn=x(Xt),wn=Ar*Cr;Kr==null?(Kr=Xt+Ar*f,ki=Xt-wn/2):(Kr=Ba(Xi,Kr),ki=Ba(Xi,ki),(Ar>0?Kr<ki:Kr>ki)&&(Kr+=Ar*f));for(var Nn,Yi=Kr;Ar>0?Yi>ki:Yi<ki;Yi-=wn)Nn=De([Xi,-dn*p(Yi),-dn*x(Yi)]),At.point(Nn[0],Nn[1])}}function Ba(At,Xt){Xt=ce(Xt),Xt[0]-=At,ot(Xt);var Cr=P(-Xt[1]);return((-Xt[2]<0?-Cr:Cr)+f-o)%f}function ua(){var At=Xr([0,0]),Xt=Xr(90),Cr=Xr(6),Ar,Kr,ki={point:Xi};function Xi(wn,Nn){Ar.push(wn=Kr(wn,Nn)),wn[0]*=h,wn[1]*=h}function dn(){var wn=At.apply(this,arguments),Nn=Xt.apply(this,arguments)*d,Yi=Cr.apply(this,arguments)*d;return Ar=[],Kr=Oi(-wn[0]*d,-wn[1]*d,0).invert,Sn(ki,Nn,Yi,1),wn={type:\"Polygon\",coordinates:[Ar]},Ar=Kr=null,wn}return dn.center=function(wn){return arguments.length?(At=typeof wn==\"function\"?wn:Xr([+wn[0],+wn[1]]),dn):At},dn.radius=function(wn){return arguments.length?(Xt=typeof wn==\"function\"?wn:Xr(+wn),dn):Xt},dn.precision=function(wn){return arguments.length?(Cr=typeof wn==\"function\"?wn:Xr(+wn),dn):Cr},dn}function ma(){var At=[],Xt;return{point:function(Cr,Ar,Kr){Xt.push([Cr,Ar,Kr])},lineStart:function(){At.push(Xt=[])},lineEnd:O,rejoin:function(){At.length>1&&At.push(At.pop().concat(At.shift()))},result:function(){var Cr=At;return At=[],Xt=null,Cr}}}function Wa(At,Xt){return v(At[0]-Xt[0])<o&&v(At[1]-Xt[1])<o}function Fa(At,Xt,Cr,Ar){this.x=At,this.z=Xt,this.o=Cr,this.e=Ar,this.v=!1,this.n=this.p=null}function Xo(At,Xt,Cr,Ar,Kr){var ki=[],Xi=[],dn,wn;if(At.forEach(function(Qn){if(!((Ca=Qn.length-1)<=0)){var Ca,Ra=Qn[0],La=Qn[Ca],Na;if(Wa(Ra,La)){if(!Ra[2]&&!La[2]){for(Kr.lineStart(),dn=0;dn<Ca;++dn)Kr.point((Ra=Qn[dn])[0],Ra[1]);Kr.lineEnd();return}La[0]+=2*o}ki.push(Na=new Fa(Ra,Qn,null,!0)),Xi.push(Na.o=new Fa(Ra,null,Na,!1)),ki.push(Na=new Fa(La,Qn,null,!1)),Xi.push(Na.o=new Fa(La,null,Na,!0))}}),!!ki.length){for(Xi.sort(Xt),da(ki),da(Xi),dn=0,wn=Xi.length;dn<wn;++dn)Xi[dn].e=Cr=!Cr;for(var Nn=ki[0],Yi,Qi;;){for(var on=Nn,Fi=!0;on.v;)if((on=on.n)===Nn)return;Yi=on.z,Kr.lineStart();do{if(on.v=on.o.v=!0,on.e){if(Fi)for(dn=0,wn=Yi.length;dn<wn;++dn)Kr.point((Qi=Yi[dn])[0],Qi[1]);else Ar(on.x,on.n.x,1,Kr);on=on.n}else{if(Fi)for(Yi=on.p.z,dn=Yi.length-1;dn>=0;--dn)Kr.point((Qi=Yi[dn])[0],Qi[1]);else Ar(on.x,on.p.x,-1,Kr);on=on.p}on=on.o,Yi=on.z,Fi=!Fi}while(!on.v);Kr.lineEnd()}}}function da(At){if(Xt=At.length){for(var Xt,Cr=0,Ar=At[0],Kr;++Cr<Xt;)Ar.n=Kr=At[Cr],Kr.p=Ar,Ar=Kr;Ar.n=Kr=At[0],Kr.p=Ar}}var Wn=r();function Ha(At){return v(At[0])<=l?At[0]:C(At[0])*((v(At[0])+l)%f-l)}function vo(At,Xt){var Cr=Ha(Xt),Ar=Xt[1],Kr=x(Ar),ki=[x(Cr),-p(Cr),0],Xi=0,dn=0;Wn.reset(),Kr===1?Ar=u+o:Kr===-1&&(Ar=-u-o);for(var wn=0,Nn=At.length;wn<Nn;++wn)if(Qi=(Yi=At[wn]).length)for(var Yi,Qi,on=Yi[Qi-1],Fi=Ha(on),Qn=on[1]/2+c,Ca=x(Qn),Ra=p(Qn),La=0;La<Qi;++La,Fi=Yn,Ca=Ka,Ra=bo,on=Na){var Na=Yi[La],Yn=Ha(Na),Dn=Na[1]/2+c,Ka=x(Dn),bo=p(Dn),Zo=Yn-Fi,Ss=Zo>=0?1:-1,as=Ss*Zo,ws=as>l,Ho=Ca*Ka;if(Wn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Xi+=ws?Zo+Ss*f:Zo,ws^Fi>=Cr^Yn>=Cr){var ml=lt(ce(on),ce(Na));ot(ml);var Ws=lt(ki,ml);ot(Ws);var Ls=(ws^Zo>=0?-1:1)*A(Ws[2]);(Ar>Ls||Ar===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Zo>=0?1:-1)}}return(Xi<-o||Xi<o&&Wn<-o)^dn&1}function jn(At,Xt,Cr,Ar){return function(Kr){var ki=Xt(Kr),Xi=ma(),dn=Xt(Xi),wn=!1,Nn,Yi,Qi,on={point:Fi,lineStart:Ca,lineEnd:Ra,polygonStart:function(){on.point=La,on.lineStart=Na,on.lineEnd=Yn,Yi=[],Nn=[]},polygonEnd:function(){on.point=Fi,on.lineStart=Ca,on.lineEnd=Ra,Yi=t.merge(Yi);var Dn=vo(Nn,Ar);Yi.length?(wn||(Kr.polygonStart(),wn=!0),Xo(Yi,kr,Dn,Cr,Kr)):Dn&&(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),Cr(null,null,1,Kr),Kr.lineEnd()),wn&&(Kr.polygonEnd(),wn=!1),Yi=Nn=null},sphere:function(){Kr.polygonStart(),Kr.lineStart(),Cr(null,null,1,Kr),Kr.lineEnd(),Kr.polygonEnd()}};function Fi(Dn,Ka){At(Dn,Ka)&&Kr.point(Dn,Ka)}function Qn(Dn,Ka){ki.point(Dn,Ka)}function Ca(){on.point=Qn,ki.lineStart()}function Ra(){on.point=Fi,ki.lineEnd()}function La(Dn,Ka){Qi.push([Dn,Ka]),dn.point(Dn,Ka)}function Na(){dn.lineStart(),Qi=[]}function Yn(){La(Qi[0][0],Qi[0][1]),dn.lineEnd();var Dn=dn.clean(),Ka=Xi.result(),bo,Zo=Ka.length,Ss,as,ws;if(Qi.pop(),Nn.push(Qi),Qi=null,!!Zo){if(Dn&1){if(as=Ka[0],(Ss=as.length-1)>0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo<Ss;++bo)Kr.point((ws=as[bo])[0],ws[1]);Kr.lineEnd()}return}Zo>1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Mt))}}return on}}function Mt(At){return At.length>1}function kr(At,Xt){return((At=At.x)[0]<0?At[1]-u-o:u-At[1])-((Xt=Xt.x)[0]<0?Xt[1]-u-o:u-Xt[1])}var Jr=jn(function(){return!0},vi,An,[-l,-u]);function vi(At){var Xt=NaN,Cr=NaN,Ar=NaN,Kr;return{lineStart:function(){At.lineStart(),Kr=1},point:function(ki,Xi){var dn=ki>0?l:-l,wn=v(ki-Xt);v(wn-l)<o?(At.point(Xt,Cr=(Cr+Xi)/2>0?u:-u),At.point(Ar,Cr),At.lineEnd(),At.lineStart(),At.point(dn,Cr),At.point(ki,Cr),Kr=0):Ar!==dn&&wn>=l&&(v(Xt-Ar)<o&&(Xt-=Ar*o),v(ki-dn)<o&&(ki-=dn*o),Cr=hn(Xt,Cr,ki,Xi),At.point(Ar,Cr),At.lineEnd(),At.lineStart(),At.point(dn,Cr),Kr=0),At.point(Xt=ki,Cr=Xi),Ar=dn},lineEnd:function(){At.lineEnd(),Xt=Cr=NaN},clean:function(){return 2-Kr}}}function hn(At,Xt,Cr,Ar){var Kr,ki,Xi=x(At-Cr);return v(Xi)>o?_((x(Xt)*(ki=p(Ar))*x(Cr)-x(Ar)*(Kr=p(Xt))*x(At))/(Kr*ki*Xi)):(Xt+Ar)/2}function An(At,Xt,Cr,Ar){var Kr;if(At==null)Kr=Cr*u,Ar.point(-l,Kr),Ar.point(0,Kr),Ar.point(l,Kr),Ar.point(l,0),Ar.point(l,-Kr),Ar.point(0,-Kr),Ar.point(-l,-Kr),Ar.point(-l,0),Ar.point(-l,Kr);else if(v(At[0]-Xt[0])>o){var ki=At[0]<Xt[0]?l:-l;Kr=Cr*ki/2,Ar.point(-ki,Kr),Ar.point(0,Kr),Ar.point(ki,Kr)}else Ar.point(Xt[0],Xt[1])}function Mn(At){var Xt=p(At),Cr=6*d,Ar=Xt>0,Kr=v(Xt)>o;function ki(Yi,Qi,on,Fi){Sn(Fi,At,Cr,on,Yi,Qi)}function Xi(Yi,Qi){return p(Yi)*p(Qi)>Xt}function dn(Yi){var Qi,on,Fi,Qn,Ca;return{lineStart:function(){Qn=Fi=!1,Ca=1},point:function(Ra,La){var Na=[Ra,La],Yn,Dn=Xi(Ra,La),Ka=Ar?Dn?0:Nn(Ra,La):Dn?Nn(Ra+(Ra<0?l:-l),La):0;if(!Qi&&(Qn=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Yn=wn(Qi,Na),(!Yn||Wa(Qi,Yn)||Wa(Na,Yn))&&(Na[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Yn=wn(Na,Qi),Yi.point(Yn[0],Yn[1])):(Yn=wn(Qi,Na),Yi.point(Yn[0],Yn[1],2),Yi.lineEnd()),Qi=Yn;else if(Kr&&Qi&&Ar^Dn){var bo;!(Ka&on)&&(bo=wn(Na,Qi,!0))&&(Ca=0,Ar?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!Qi||!Wa(Qi,Na))&&Yi.point(Na[0],Na[1]),Qi=Na,Fi=Dn,on=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),Qi=null},clean:function(){return Ca|(Qn&&Fi)<<1}}}function wn(Yi,Qi,on){var Fi=ce(Yi),Qn=ce(Qi),Ca=[1,0,0],Ra=lt(Fi,Qn),La=je(Ra,Ra),Na=Ra[0],Yn=La-Na*Na;if(!Yn)return!on&&Yi;var Dn=Xt*La/Yn,Ka=-Xt*Na/Yn,bo=lt(Ca,Ra),Zo=Vt(Ca,Dn),Ss=Vt(Ra,Ka);pt(Zo,Ss);var as=bo,ws=je(Zo,as),Ho=je(as,as),ml=ws*ws-Ho*(je(Zo,Zo)-1);if(!(ml<0)){var Ws=M(ml),Ls=Vt(as,(-ws-Ws)/Ho);if(pt(Ls,Zo),Ls=De(Ls),!on)return Ls;var va=Yi[0],no=Qi[0],ys=Yi[1],rs=Qi[1],Ql;no<va&&(Ql=va,va=no,no=Ql);var Cu=no-va,Yu=v(Cu-l)<o,Nc=Yu||Cu<o;if(!Yu&&rs<ys&&(Ql=ys,ys=rs,rs=Ql),Nc?Yu?ys+rs>0^Ls[1]<(v(Ls[0]-va)<o?ys:rs):ys<=Ls[1]&&Ls[1]<=rs:Cu>l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Vt(as,(-ws+Ws)/Ho);return pt(pu,Zo),[Ls,De(pu)]}}}function Nn(Yi,Qi){var on=Ar?At:l-At,Fi=0;return Yi<-on?Fi|=1:Yi>on&&(Fi|=2),Qi<-on?Fi|=4:Qi>on&&(Fi|=8),Fi}return jn(Xi,dn,ki,Ar?[0,-At]:[-l,At-l])}function Li(At,Xt,Cr,Ar,Kr,ki){var Xi=At[0],dn=At[1],wn=Xt[0],Nn=Xt[1],Yi=0,Qi=1,on=wn-Xi,Fi=Nn-dn,Qn;if(Qn=Cr-Xi,!(!on&&Qn>0)){if(Qn/=on,on<0){if(Qn<Yi)return;Qn<Qi&&(Qi=Qn)}else if(on>0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}if(Qn=Kr-Xi,!(!on&&Qn<0)){if(Qn/=on,on<0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}else if(on>0){if(Qn<Yi)return;Qn<Qi&&(Qi=Qn)}if(Qn=Ar-dn,!(!Fi&&Qn>0)){if(Qn/=Fi,Fi<0){if(Qn<Yi)return;Qn<Qi&&(Qi=Qn)}else if(Fi>0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}if(Qn=ki-dn,!(!Fi&&Qn<0)){if(Qn/=Fi,Fi<0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}else if(Fi>0){if(Qn<Yi)return;Qn<Qi&&(Qi=Qn)}return Yi>0&&(At[0]=Xi+Yi*on,At[1]=dn+Yi*Fi),Qi<1&&(Xt[0]=Xi+Qi*on,Xt[1]=dn+Qi*Fi),!0}}}}}var _n=1e9,ya=-_n;function $n(At,Xt,Cr,Ar){function Kr(Nn,Yi){return At<=Nn&&Nn<=Cr&&Xt<=Yi&&Yi<=Ar}function ki(Nn,Yi,Qi,on){var Fi=0,Qn=0;if(Nn==null||(Fi=Xi(Nn,Qi))!==(Qn=Xi(Yi,Qi))||wn(Nn,Yi)<0^Qi>0)do on.point(Fi===0||Fi===3?At:Cr,Fi>1?Ar:Xt);while((Fi=(Fi+Qi+4)%4)!==Qn);else on.point(Yi[0],Yi[1])}function Xi(Nn,Yi){return v(Nn[0]-At)<o?Yi>0?0:3:v(Nn[0]-Cr)<o?Yi>0?2:1:v(Nn[1]-Xt)<o?Yi>0?1:0:Yi>0?3:2}function dn(Nn,Yi){return wn(Nn.x,Yi.x)}function wn(Nn,Yi){var Qi=Xi(Nn,1),on=Xi(Yi,1);return Qi!==on?Qi-on:Qi===0?Yi[1]-Nn[1]:Qi===1?Nn[0]-Yi[0]:Qi===2?Nn[1]-Yi[1]:Yi[0]-Nn[0]}return function(Nn){var Yi=Nn,Qi=ma(),on,Fi,Qn,Ca,Ra,La,Na,Yn,Dn,Ka,bo,Zo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;no<ys;++no)for(var rs=Fi[no],Ql=1,Cu=rs.length,Yu=rs[0],Nc,pu,Uc=Yu[0],xu=Yu[1];Ql<Cu;++Ql)Nc=Uc,pu=xu,Yu=rs[Ql],Uc=Yu[0],xu=Yu[1],pu<=Ar?xu>Ar&&(Uc-Nc)*(Ar-pu)>(xu-pu)*(At-Nc)&&++va:xu<=Ar&&(Uc-Nc)*(Ar-pu)<(xu-pu)*(At-Nc)&&--va;return va}function ws(){Yi=Qi,on=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(on=t.merge(on)).length;(no||ys)&&(Nn.polygonStart(),no&&(Nn.lineStart(),ki(null,null,1,Nn),Nn.lineEnd()),ys&&Xo(on,dn,va,ki,Nn),Nn.polygonEnd()),Yi=Nn,on=Fi=Qn=null}function ml(){Zo.point=Ls,Fi&&Fi.push(Qn=[]),Ka=!0,Dn=!1,Na=Yn=NaN}function Ws(){on&&(Ls(Ca,Ra),La&&Dn&&Qi.rejoin(),on.push(Qi.result())),Zo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&Qn.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Na=Math.max(ya,Math.min(_n,Na)),Yn=Math.max(ya,Math.min(_n,Yn))],Ql=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];Li(rs,Ql,At,Xt,Cr,Ar)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point(Ql[0],Ql[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Na=va,Yn=no,Dn=ys}return Zo}}function Ma(){var At=0,Xt=0,Cr=960,Ar=500,Kr,ki,Xi;return Xi={stream:function(dn){return Kr&&ki===dn?Kr:Kr=$n(At,Xt,Cr,Ar)(ki=dn)},extent:function(dn){return arguments.length?(At=+dn[0][0],Xt=+dn[0][1],Cr=+dn[1][0],Ar=+dn[1][1],Kr=ki=null,Xi):[[At,Xt],[Cr,Ar]]}}}var _o=r(),No,po,Lo,ko={sphere:O,point:O,lineStart:Ds,lineEnd:O,polygonStart:O,polygonEnd:O};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=O}function ll(At,Xt){At*=d,Xt*=d,No=At,po=x(Xt),Lo=p(Xt),ko.point=ul}function ul(At,Xt){At*=d,Xt*=d;var Cr=x(Xt),Ar=p(Xt),Kr=v(At-No),ki=p(Kr),Xi=x(Kr),dn=Ar*Xi,wn=Lo*Cr-po*Ar*ki,Nn=po*Cr+Lo*Ar*ki;_o.add(b(M(dn*dn+wn*wn),Nn)),No=At,po=Cr,Lo=Ar}function zl(At){return _o.reset(),H(At,ko),+_o}var us=[null,null],il={type:\"LineString\",coordinates:us};function As(At,Xt){return us[0]=At,us[1]=Xt,zl(il)}var cl={Feature:function(At,Xt){return zs(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar<Kr;)if(zs(Cr[Ar].geometry,Xt))return!0;return!1}},Ks={Sphere:function(){return!0},Point:function(At,Xt){return Io(At.coordinates,Xt)},MultiPoint:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)if(Io(Cr[Ar],Xt))return!0;return!1},LineString:function(At,Xt){return ls(At.coordinates,Xt)},MultiLineString:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)if(ls(Cr[Ar],Xt))return!0;return!1},Polygon:function(At,Xt){return Yl(At.coordinates,Xt)},MultiPolygon:function(At,Xt){for(var Cr=At.coordinates,Ar=-1,Kr=Cr.length;++Ar<Kr;)if(Yl(Cr[Ar],Xt))return!0;return!1},GeometryCollection:function(At,Xt){for(var Cr=At.geometries,Ar=-1,Kr=Cr.length;++Ar<Kr;)if(zs(Cr[Ar],Xt))return!0;return!1}};function zs(At,Xt){return At&&Ks.hasOwnProperty(At.type)?Ks[At.type](At,Xt):!1}function Io(At,Xt){return As(At,Xt)===0}function ls(At,Xt){for(var Cr,Ar,Kr,ki=0,Xi=At.length;ki<Xi;ki++){if(Ar=As(At[ki],Xt),Ar===0||ki>0&&(Kr=As(At[ki],At[ki-1]),Kr>0&&Cr<=Kr&&Ar<=Kr&&(Cr+Ar-Kr)*(1-Math.pow((Cr-Ar)/Kr,2))<s*Kr))return!0;Cr=Ar}return!1}function Yl(At,Xt){return!!vo(At.map(Su),nc(Xt))}function Su(At){return At=At.map(nc),At.pop(),At}function nc(At){return[At[0]*d,At[1]*d]}function bs(At,Xt){return(At&&cl.hasOwnProperty(At.type)?cl[At.type]:zs)(At,Xt)}function Rn(At,Xt,Cr){var Ar=t.range(At,Xt-o,Cr).concat(Xt);return function(Kr){return Ar.map(function(ki){return[Kr,ki]})}}function _a(At,Xt,Cr){var Ar=t.range(At,Xt-o,Cr).concat(Xt);return function(Kr){return Ar.map(function(ki){return[ki,Kr]})}}function Vu(){var At,Xt,Cr,Ar,Kr,ki,Xi,dn,wn=10,Nn=wn,Yi=90,Qi=360,on,Fi,Qn,Ca,Ra=2.5;function La(){return{type:\"MultiLineString\",coordinates:Na()}}function Na(){return t.range(k(Ar/Yi)*Yi,Cr,Yi).map(Qn).concat(t.range(k(dn/Qi)*Qi,Xi,Qi).map(Ca)).concat(t.range(k(Xt/wn)*wn,At,wn).filter(function(Yn){return v(Yn%Yi)>o}).map(on)).concat(t.range(k(ki/Nn)*Nn,Kr,Nn).filter(function(Yn){return v(Yn%Qi)>o}).map(Fi))}return La.lines=function(){return Na().map(function(Yn){return{type:\"LineString\",coordinates:Yn}})},La.outline=function(){return{type:\"Polygon\",coordinates:[Qn(Ar).concat(Ca(Xi).slice(1),Qn(Cr).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Yn){return arguments.length?La.extentMajor(Yn).extentMinor(Yn):La.extentMinor()},La.extentMajor=function(Yn){return arguments.length?(Ar=+Yn[0][0],Cr=+Yn[1][0],dn=+Yn[0][1],Xi=+Yn[1][1],Ar>Cr&&(Yn=Ar,Ar=Cr,Cr=Yn),dn>Xi&&(Yn=dn,dn=Xi,Xi=Yn),La.precision(Ra)):[[Ar,dn],[Cr,Xi]]},La.extentMinor=function(Yn){return arguments.length?(Xt=+Yn[0][0],At=+Yn[1][0],ki=+Yn[0][1],Kr=+Yn[1][1],Xt>At&&(Yn=Xt,Xt=At,At=Yn),ki>Kr&&(Yn=ki,ki=Kr,Kr=Yn),La.precision(Ra)):[[Xt,ki],[At,Kr]]},La.step=function(Yn){return arguments.length?La.stepMajor(Yn).stepMinor(Yn):La.stepMinor()},La.stepMajor=function(Yn){return arguments.length?(Yi=+Yn[0],Qi=+Yn[1],La):[Yi,Qi]},La.stepMinor=function(Yn){return arguments.length?(wn=+Yn[0],Nn=+Yn[1],La):[wn,Nn]},La.precision=function(Yn){return arguments.length?(Ra=+Yn,on=Rn(ki,Kr,90),Fi=_a(Xt,At,Ra),Qn=Rn(dn,Xi,90),Ca=_a(Ar,Cr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ol(){return Vu()()}function xo(At,Xt){var Cr=At[0]*d,Ar=At[1]*d,Kr=Xt[0]*d,ki=Xt[1]*d,Xi=p(Ar),dn=x(Ar),wn=p(ki),Nn=x(ki),Yi=Xi*p(Cr),Qi=Xi*x(Cr),on=wn*p(Kr),Fi=wn*x(Kr),Qn=2*A(M(z(ki-Ar)+Xi*wn*z(Kr-Cr))),Ca=x(Qn),Ra=Qn?function(La){var Na=x(La*=Qn)/Ca,Yn=x(Qn-La)/Ca,Dn=Yn*Yi+Na*on,Ka=Yn*Qi+Na*Fi,bo=Yn*dn+Na*Nn;return[b(Ka,Dn)*h,b(bo,M(Dn*Dn+Ka*Ka))*h]}:function(){return[Cr*h,Ar*h]};return Ra.distance=Qn,Ra}function Kl(At){return At}var Ns=r(),Hl=r(),ac,aa,Oo,qo,ql={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ql.lineStart=Pc,ql.lineEnd=Vf},polygonEnd:function(){ql.lineStart=ql.lineEnd=ql.point=O,Ns.add(v(Hl)),Hl.reset()},result:function(){var At=Ns/2;return Ns.reset(),At}};function Pc(){ql.point=Do}function Do(At,Xt){ql.point=rf,ac=Oo=At,aa=qo=Xt}function rf(At,Xt){Hl.add(qo*At-Oo*Xt),Oo=At,qo=Xt}function Vf(){rf(ac,aa)}var pl=1/0,Zc=pl,Jl=-pl,Os=Jl,yu={point:oc,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var At=[[pl,Zc],[Jl,Os]];return Jl=Os=-(Zc=pl=1/0),At}};function oc(At,Xt){At<pl&&(pl=At),At>Jl&&(Jl=At),Xt<Zc&&(Zc=Xt),Xt>Os&&(Os=Xt)}var Cf=0,sc=0,jh=0,Lf=0,cs=0,nf=0,Gf=0,$l=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:qs,polygonStart:function(){Go.lineStart=od,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=qs},result:function(){var At=fl?[Gf/fl,$l/fl]:nf?[Lf/nf,cs/nf]:jh?[Cf/jh,sc/jh]:[NaN,NaN];return Cf=sc=jh=Lf=cs=nf=Gf=$l=fl=0,At}};function ps(At,Xt){Cf+=At,sc+=Xt,++jh}function uc(){Go.point=xl}function xl(At,Xt){Go.point=Gu,ps(Es=At,Hs=Xt)}function Gu(At,Xt){var Cr=At-Es,Ar=Xt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Xt)/2,nf+=Kr,ps(Es=At,Hs=Xt)}function qs(){Go.point=ps}function od(){Go.point=sd}function Po(){Ko(lc,Fu)}function sd(At,Xt){Go.point=Ko,ps(lc=Es=At,Fu=Hs=Xt)}function Ko(At,Xt){var Cr=At-Es,Ar=Xt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Xt)/2,nf+=Kr,Kr=Hs*At-Es*Xt,Gf+=Kr*(Es+At),$l+=Kr*(Hs+Xt),fl+=Kr*3,ps(Es=At,Hs=Xt)}function Pa(At){this._context=At}Pa.prototype={_radius:4.5,pointRadius:function(At){return this._radius=At,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._context.moveTo(At,Xt),this._point=1;break}case 1:{this._context.lineTo(At,Xt);break}default:{this._context.moveTo(At+this._radius,Xt),this._context.arc(At,Xt,this._radius,0,f);break}}},result:O};var af=r(),Hu,bl,Hf,Ic,yf,Bl={point:O,lineStart:function(){Bl.point=Ah},lineEnd:function(){Hu&&Qf(bl,Hf),Bl.point=O},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var At=+af;return af.reset(),At}};function Ah(At,Xt){Bl.point=Qf,bl=Ic=At,Hf=yf=Xt}function Qf(At,Xt){Ic-=At,yf-=Xt,af.add(M(Ic*Ic+yf*yf)),Ic=At,yf=Xt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(At){return(At=+At)!==this._radius&&(this._radius=At,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push(\"Z\"),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._string.push(\"M\",At,\",\",Xt),this._point=1;break}case 1:{this._string.push(\"L\",At,\",\",Xt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push(\"M\",At,\",\",Xt,this._circle);break}}},result:function(){if(this._string.length){var At=this._string.join(\"\");return this._string=[],At}else return null}};function Yc(At){return\"m0,\"+At+\"a\"+At+\",\"+At+\" 0 1,1 0,\"+-2*At+\"a\"+At+\",\"+At+\" 0 1,1 0,\"+2*At+\"z\"}function eh(At,Xt){var Cr=4.5,Ar,Kr;function ki(Xi){return Xi&&(typeof Cr==\"function\"&&Kr.pointRadius(+Cr.apply(this,arguments)),H(Xi,Ar(Kr))),Kr.result()}return ki.area=function(Xi){return H(Xi,Ar(ql)),ql.result()},ki.measure=function(Xi){return H(Xi,Ar(Bl)),Bl.result()},ki.bounds=function(Xi){return H(Xi,Ar(yu)),yu.result()},ki.centroid=function(Xi){return H(Xi,Ar(Go)),Go.result()},ki.projection=function(Xi){return arguments.length?(Ar=Xi==null?(At=null,Kl):(At=Xi).stream,ki):At},ki.context=function(Xi){return arguments.length?(Kr=Xi==null?(Xt=null,new _f):new Pa(Xt=Xi),typeof Cr!=\"function\"&&Kr.pointRadius(Cr),ki):Xt},ki.pointRadius=function(Xi){return arguments.length?(Cr=typeof Xi==\"function\"?Xi:(Kr.pointRadius(+Xi),+Xi),ki):Cr},ki.projection(At).context(Xt)}function th(At){return{stream:ju(At)}}function ju(At){return function(Xt){var Cr=new jf;for(var Ar in At)Cr[Ar]=At[Ar];return Cr.stream=Xt,Cr}}function jf(){}jf.prototype={constructor:jf,point:function(At,Xt){this.stream.point(At,Xt)},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()}};function cc(At,Xt,Cr){var Ar=At.clipExtent&&At.clipExtent();return At.scale(150).translate([0,0]),Ar!=null&&At.clipExtent(null),H(Cr,At.stream(yu)),Xt(yu.result()),Ar!=null&&At.clipExtent(Ar),At}function of(At,Xt,Cr){return cc(At,function(Ar){var Kr=Xt[1][0]-Xt[0][0],ki=Xt[1][1]-Xt[0][1],Xi=Math.min(Kr/(Ar[1][0]-Ar[0][0]),ki/(Ar[1][1]-Ar[0][1])),dn=+Xt[0][0]+(Kr-Xi*(Ar[1][0]+Ar[0][0]))/2,wn=+Xt[0][1]+(ki-Xi*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*Xi).translate([dn,wn])},Cr)}function Nl(At,Xt,Cr){return of(At,[[0,0],Xt],Cr)}function Kc(At,Xt,Cr){return cc(At,function(Ar){var Kr=+Xt,ki=Kr/(Ar[1][0]-Ar[0][0]),Xi=(Kr-ki*(Ar[1][0]+Ar[0][0]))/2,dn=-ki*Ar[0][1];At.scale(150*ki).translate([Xi,dn])},Cr)}function Rc(At,Xt,Cr){return cc(At,function(Ar){var Kr=+Xt,ki=Kr/(Ar[1][1]-Ar[0][1]),Xi=-ki*Ar[0][0],dn=(Kr-ki*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*ki).translate([Xi,dn])},Cr)}var gs=16,Wf=p(30*d);function Wh(At,Xt){return+Xt?sf(At,Xt):rh(At)}function rh(At){return ju({point:function(Xt,Cr){Xt=At(Xt,Cr),this.stream.point(Xt[0],Xt[1])}})}function sf(At,Xt){function Cr(Ar,Kr,ki,Xi,dn,wn,Nn,Yi,Qi,on,Fi,Qn,Ca,Ra){var La=Nn-Ar,Na=Yi-Kr,Yn=La*La+Na*Na;if(Yn>4*Xt&&Ca--){var Dn=Xi+on,Ka=dn+Fi,bo=wn+Qn,Zo=M(Dn*Dn+Ka*Ka+bo*bo),Ss=A(bo/=Zo),as=v(v(bo)-1)<o||v(ki-Qi)<o?(ki+Qi)/2:b(Ka,Dn),ws=At(as,Ss),Ho=ws[0],ml=ws[1],Ws=Ho-Ar,Ls=ml-Kr,va=Na*Ws-La*Ls;(va*va/Yn>Xt||v((La*Ws+Na*Ls)/Yn-.5)>.3||Xi*on+dn*Fi+wn*Qn<Wf)&&(Cr(Ar,Kr,ki,Xi,dn,wn,Ho,ml,as,Dn/=Zo,Ka/=Zo,bo,Ca,Ra),Ra.point(Ho,ml),Cr(Ho,ml,as,Dn,Ka,bo,Nn,Yi,Qi,on,Fi,Qn,Ca,Ra))}}return function(Ar){var Kr,ki,Xi,dn,wn,Nn,Yi,Qi,on,Fi,Qn,Ca,Ra={point:La,lineStart:Na,lineEnd:Dn,polygonStart:function(){Ar.polygonStart(),Ra.lineStart=Ka},polygonEnd:function(){Ar.polygonEnd(),Ra.lineStart=Na}};function La(Ss,as){Ss=At(Ss,as),Ar.point(Ss[0],Ss[1])}function Na(){Qi=NaN,Ra.point=Yn,Ar.lineStart()}function Yn(Ss,as){var ws=ce([Ss,as]),Ho=At(Ss,as);Cr(Qi,on,Yi,Fi,Qn,Ca,Qi=Ho[0],on=Ho[1],Yi=Ss,Fi=ws[0],Qn=ws[1],Ca=ws[2],gs,Ar),Ar.point(Qi,on)}function Dn(){Ra.point=La,Ar.lineEnd()}function Ka(){Na(),Ra.point=bo,Ra.lineEnd=Zo}function bo(Ss,as){Yn(Kr=Ss,as),ki=Qi,Xi=on,dn=Fi,wn=Qn,Nn=Ca,Ra.point=Yn}function Zo(){Cr(Qi,on,Yi,Fi,Qn,Ca,ki,Xi,Kr,dn,wn,Nn,gs,Ar),Ra.lineEnd=Dn,Dn()}return Ra}}var Sh=ju({point:function(At,Xt){this.stream.point(At*d,Xt*d)}});function Mu(At){return ju({point:function(Xt,Cr){var Ar=At(Xt,Cr);return this.stream.point(Ar[0],Ar[1])}})}function ih(At,Xt,Cr,Ar,Kr){function ki(Xi,dn){return Xi*=Ar,dn*=Kr,[Xt+At*Xi,Cr-At*dn]}return ki.invert=function(Xi,dn){return[(Xi-Xt)/At*Ar,(Cr-dn)/At*Kr]},ki}function js(At,Xt,Cr,Ar,Kr,ki){var Xi=p(ki),dn=x(ki),wn=Xi*At,Nn=dn*At,Yi=Xi/At,Qi=dn/At,on=(dn*Cr-Xi*Xt)/At,Fi=(dn*Xt+Xi*Cr)/At;function Qn(Ca,Ra){return Ca*=Ar,Ra*=Kr,[wn*Ca-Nn*Ra+Xt,Cr-Nn*Ca-wn*Ra]}return Qn.invert=function(Ca,Ra){return[Ar*(Yi*Ca-Qi*Ra+on),Kr*(Fi-Qi*Ca-Yi*Ra)]},Qn}function Eu(At){return Dc(function(){return At})()}function Dc(At){var Xt,Cr=150,Ar=480,Kr=250,ki=0,Xi=0,dn=0,wn=0,Nn=0,Yi,Qi=0,on=1,Fi=1,Qn=null,Ca=Jr,Ra=null,La,Na,Yn,Dn=Kl,Ka=.5,bo,Zo,Ss,as,ws;function Ho(va){return Ss(va[0]*d,va[1]*d)}function ml(va){return va=Ss.invert(va[0],va[1]),va&&[va[0]*h,va[1]*h]}Ho.stream=function(va){return as&&ws===va?as:as=Sh(Mu(Yi)(Ca(bo(Dn(ws=va)))))},Ho.preclip=function(va){return arguments.length?(Ca=va,Qn=void 0,Ls()):Ca},Ho.postclip=function(va){return arguments.length?(Dn=va,Ra=La=Na=Yn=null,Ls()):Dn},Ho.clipAngle=function(va){return arguments.length?(Ca=+va?Mn(Qn=va*d):(Qn=null,Jr),Ls()):Qn*h},Ho.clipExtent=function(va){return arguments.length?(Dn=va==null?(Ra=La=Na=Yn=null,Kl):$n(Ra=+va[0][0],La=+va[0][1],Na=+va[1][0],Yn=+va[1][1]),Ls()):Ra==null?null:[[Ra,La],[Na,Yn]]},Ho.scale=function(va){return arguments.length?(Cr=+va,Ws()):Cr},Ho.translate=function(va){return arguments.length?(Ar=+va[0],Kr=+va[1],Ws()):[Ar,Kr]},Ho.center=function(va){return arguments.length?(ki=va[0]%360*d,Xi=va[1]%360*d,Ws()):[ki*h,Xi*h]},Ho.rotate=function(va){return arguments.length?(dn=va[0]%360*d,wn=va[1]%360*d,Nn=va.length>2?va[2]%360*d:0,Ws()):[dn*h,wn*h,Nn*h]},Ho.angle=function(va){return arguments.length?(Qi=va%360*d,Ws()):Qi*h},Ho.reflectX=function(va){return arguments.length?(on=va?-1:1,Ws()):on<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Wh(Zo,Ka=va*va),Ls()):M(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Cr,0,0,on,Fi,Qi).apply(null,Xt(ki,Xi)),no=(Qi?js:ih)(Cr,Ar-va[0],Kr-va[1],on,Fi,Qi);return Yi=Oi(dn,wn,Nn),Zo=ri(Xt,no),Ss=ri(Yi,Zo),bo=Wh(Zo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Xt=At.apply(this,arguments),Ho.invert=Xt.invert&&ml,Ws()}}function ks(At){var Xt=0,Cr=l/3,Ar=Dc(At),Kr=Ar(Xt,Cr);return Kr.parallels=function(ki){return arguments.length?Ar(Xt=ki[0]*d,Cr=ki[1]*d):[Xt*h,Cr*h]},Kr}function bc(At){var Xt=p(At);function Cr(Ar,Kr){return[Ar*Xt,x(Kr)/Xt]}return Cr.invert=function(Ar,Kr){return[Ar/Xt,A(Kr*Xt)]},Cr}function hu(At,Xt){var Cr=x(At),Ar=(Cr+x(Xt))/2;if(v(Ar)<o)return bc(At);var Kr=1+Cr*(2*Ar-Cr),ki=M(Kr)/Ar;function Xi(dn,wn){var Nn=M(Kr-2*Ar*x(wn))/Ar;return[Nn*x(dn*=Ar),ki-Nn*p(dn)]}return Xi.invert=function(dn,wn){var Nn=ki-wn,Yi=b(dn,v(Nn))*C(Nn);return Nn*Ar<0&&(Yi-=l*C(dn)*C(Nn)),[Yi/Ar,A((Kr-(dn*dn+Nn*Nn)*Ar*Ar)/(2*Ar))]},Xi}function _u(){return ks(hu).scale(155.424).center([0,33.6442])}function nl(){return _u().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function nh(At){var Xt=At.length;return{point:function(Cr,Ar){for(var Kr=-1;++Kr<Xt;)At[Kr].point(Cr,Ar)},sphere:function(){for(var Cr=-1;++Cr<Xt;)At[Cr].sphere()},lineStart:function(){for(var Cr=-1;++Cr<Xt;)At[Cr].lineStart()},lineEnd:function(){for(var Cr=-1;++Cr<Xt;)At[Cr].lineEnd()},polygonStart:function(){for(var Cr=-1;++Cr<Xt;)At[Cr].polygonStart()},polygonEnd:function(){for(var Cr=-1;++Cr<Xt;)At[Cr].polygonEnd()}}}function Mh(){var At,Xt,Cr=nl(),Ar,Kr=_u().rotate([154,0]).center([-2,58.5]).parallels([55,65]),ki,Xi=_u().rotate([157,0]).center([-3,19.9]).parallels([8,18]),dn,wn,Nn={point:function(on,Fi){wn=[on,Fi]}};function Yi(on){var Fi=on[0],Qn=on[1];return wn=null,Ar.point(Fi,Qn),wn||(ki.point(Fi,Qn),wn)||(dn.point(Fi,Qn),wn)}Yi.invert=function(on){var Fi=Cr.scale(),Qn=Cr.translate(),Ca=(on[0]-Qn[0])/Fi,Ra=(on[1]-Qn[1])/Fi;return(Ra>=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Xi:Cr).invert(on)},Yi.stream=function(on){return At&&Xt===on?At:At=nh([Cr.stream(Xt=on),Kr.stream(on),Xi.stream(on)])},Yi.precision=function(on){return arguments.length?(Cr.precision(on),Kr.precision(on),Xi.precision(on),Qi()):Cr.precision()},Yi.scale=function(on){return arguments.length?(Cr.scale(on),Kr.scale(on*.35),Xi.scale(on),Yi.translate(Cr.translate())):Cr.scale()},Yi.translate=function(on){if(!arguments.length)return Cr.translate();var Fi=Cr.scale(),Qn=+on[0],Ca=+on[1];return Ar=Cr.translate(on).clipExtent([[Qn-.455*Fi,Ca-.238*Fi],[Qn+.455*Fi,Ca+.238*Fi]]).stream(Nn),ki=Kr.translate([Qn-.307*Fi,Ca+.201*Fi]).clipExtent([[Qn-.425*Fi+o,Ca+.12*Fi+o],[Qn-.214*Fi-o,Ca+.234*Fi-o]]).stream(Nn),dn=Xi.translate([Qn-.205*Fi,Ca+.212*Fi]).clipExtent([[Qn-.214*Fi+o,Ca+.166*Fi+o],[Qn-.115*Fi-o,Ca+.234*Fi-o]]).stream(Nn),Qi()},Yi.fitExtent=function(on,Fi){return of(Yi,on,Fi)},Yi.fitSize=function(on,Fi){return Nl(Yi,on,Fi)},Yi.fitWidth=function(on,Fi){return Kc(Yi,on,Fi)},Yi.fitHeight=function(on,Fi){return Rc(Yi,on,Fi)};function Qi(){return At=Xt=null,Yi}return Yi.scale(1070)}function zu(At){return function(Xt,Cr){var Ar=p(Xt),Kr=p(Cr),ki=At(Ar*Kr);return[ki*Kr*x(Xt),ki*x(Cr)]}}function Fc(At){return function(Xt,Cr){var Ar=M(Xt*Xt+Cr*Cr),Kr=At(Ar),ki=x(Kr),Xi=p(Kr);return[b(Xt*ki,Ar*Xi),A(Ar&&Cr*ki/Ar)]}}var wc=zu(function(At){return M(2/(1+At))});wc.invert=Fc(function(At){return 2*A(At/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(At){return(At=P(At))&&At/x(At)});xf.invert=Fc(function(At){return At});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function Ou(At,Xt){return[At,T(g((u+Xt)/2))]}Ou.invert=function(At,Xt){return[At,2*_(E(Xt))-u]};function bf(){return jl(Ou).scale(961/f)}function jl(At){var Xt=Eu(At),Cr=Xt.center,Ar=Xt.scale,Kr=Xt.translate,ki=Xt.clipExtent,Xi=null,dn,wn,Nn;Xt.scale=function(Qi){return arguments.length?(Ar(Qi),Yi()):Ar()},Xt.translate=function(Qi){return arguments.length?(Kr(Qi),Yi()):Kr()},Xt.center=function(Qi){return arguments.length?(Cr(Qi),Yi()):Cr()},Xt.clipExtent=function(Qi){return arguments.length?(Qi==null?Xi=dn=wn=Nn=null:(Xi=+Qi[0][0],dn=+Qi[0][1],wn=+Qi[1][0],Nn=+Qi[1][1]),Yi()):Xi==null?null:[[Xi,dn],[wn,Nn]]};function Yi(){var Qi=l*Ar(),on=Xt(yn(Xt.rotate()).invert([0,0]));return ki(Xi==null?[[on[0]-Qi,on[1]-Qi],[on[0]+Qi,on[1]+Qi]]:At===Ou?[[Math.max(on[0]-Qi,Xi),dn],[Math.min(on[0]+Qi,wn),Nn]]:[[Xi,Math.max(on[1]-Qi,dn)],[wn,Math.min(on[1]+Qi,Nn)]])}return Yi()}function lf(At){return g((u+At)/2)}function Xh(At,Xt){var Cr=p(At),Ar=At===Xt?x(At):T(Cr/p(Xt))/T(lf(Xt)/lf(At)),Kr=Cr*L(lf(At),Ar)/Ar;if(!Ar)return Ou;function ki(Xi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(lf(dn),Ar);return[wn*x(Ar*Xi),Kr-wn*p(Ar*Xi)]}return ki.invert=function(Xi,dn){var wn=Kr-dn,Nn=C(Ar)*M(Xi*Xi+wn*wn),Yi=b(Xi,v(wn))*C(wn);return wn*Ar<0&&(Yi-=l*C(Xi)*C(wn)),[Yi/Ar,2*_(L(Kr/Nn,1/Ar))-u]},ki}function If(){return ks(Xh).scale(109.5).parallels([30,30])}function Cs(At,Xt){return[At,Xt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(At,Xt){var Cr=p(At),Ar=At===Xt?x(At):(Cr-p(Xt))/(Xt-At),Kr=Cr/Ar+At;if(v(Ar)<o)return Cs;function ki(Xi,dn){var wn=Kr-dn,Nn=Ar*Xi;return[wn*x(Nn),Kr-wn*p(Nn)]}return ki.invert=function(Xi,dn){var wn=Kr-dn,Nn=b(Xi,v(wn))*C(wn);return wn*Ar<0&&(Nn-=l*C(Xi)*C(wn)),[Nn/Ar,Kr-C(Ar)*M(Xi*Xi+wn*wn)]},ki}function Xf(){return ks(ku).scale(131.154).center([0,13.9389])}var Us=1.340264,wf=-.081106,zc=893e-6,Wu=.003796,Rf=M(3)/2,Xu=12;function uf(At,Xt){var Cr=A(Rf*x(Xt)),Ar=Cr*Cr,Kr=Ar*Ar*Ar;return[At*p(Cr)/(Rf*(Us+3*wf*Ar+Kr*(7*zc+9*Wu*Ar))),Cr*(Us+wf*Ar+Kr*(zc+Wu*Ar))]}uf.invert=function(At,Xt){for(var Cr=Xt,Ar=Cr*Cr,Kr=Ar*Ar*Ar,ki=0,Xi,dn,wn;ki<Xu&&(dn=Cr*(Us+wf*Ar+Kr*(zc+Wu*Ar))-Xt,wn=Us+3*wf*Ar+Kr*(7*zc+9*Wu*Ar),Cr-=Xi=dn/wn,Ar=Cr*Cr,Kr=Ar*Ar*Ar,!(v(Xi)<s));++ki);return[Rf*At*(Us+3*wf*Ar+Kr*(7*zc+9*Wu*Ar))/p(Cr),A(x(Cr)/Rf)]};function Zf(){return Eu(uf).scale(177.158)}function Wl(At,Xt){var Cr=p(Xt),Ar=p(At)*Cr;return[Cr*x(At)/Ar,x(Xt)/Ar]}Wl.invert=Fc(_);function ah(){return Eu(Wl).scale(144.049).clipAngle(60)}function Zu(){var At=1,Xt=0,Cr=0,Ar=1,Kr=1,ki=0,Xi,dn,wn=null,Nn,Yi,Qi,on=1,Fi=1,Qn=ju({point:function(Dn,Ka){var bo=Yn([Dn,Ka]);this.stream.point(bo[0],bo[1])}}),Ca=Kl,Ra,La;function Na(){return on=At*Ar,Fi=At*Kr,Ra=La=null,Yn}function Yn(Dn){var Ka=Dn[0]*on,bo=Dn[1]*Fi;if(ki){var Zo=bo*Xi-Ka*dn;Ka=Ka*Xi+bo*dn,bo=Zo}return[Ka+Xt,bo+Cr]}return Yn.invert=function(Dn){var Ka=Dn[0]-Xt,bo=Dn[1]-Cr;if(ki){var Zo=bo*Xi+Ka*dn;Ka=Ka*Xi-bo*dn,bo=Zo}return[Ka/on,bo/Fi]},Yn.stream=function(Dn){return Ra&&La===Dn?Ra:Ra=Qn(Ca(La=Dn))},Yn.postclip=function(Dn){return arguments.length?(Ca=Dn,wn=Nn=Yi=Qi=null,Na()):Ca},Yn.clipExtent=function(Dn){return arguments.length?(Ca=Dn==null?(wn=Nn=Yi=Qi=null,Kl):$n(wn=+Dn[0][0],Nn=+Dn[0][1],Yi=+Dn[1][0],Qi=+Dn[1][1]),Na()):wn==null?null:[[wn,Nn],[Yi,Qi]]},Yn.scale=function(Dn){return arguments.length?(At=+Dn,Na()):At},Yn.translate=function(Dn){return arguments.length?(Xt=+Dn[0],Cr=+Dn[1],Na()):[Xt,Cr]},Yn.angle=function(Dn){return arguments.length?(ki=Dn%360*d,dn=x(ki),Xi=p(ki),Na()):ki*h},Yn.reflectX=function(Dn){return arguments.length?(Ar=Dn?-1:1,Na()):Ar<0},Yn.reflectY=function(Dn){return arguments.length?(Kr=Dn?-1:1,Na()):Kr<0},Yn.fitExtent=function(Dn,Ka){return of(Yn,Dn,Ka)},Yn.fitSize=function(Dn,Ka){return Nl(Yn,Dn,Ka)},Yn.fitWidth=function(Dn,Ka){return Kc(Yn,Dn,Ka)},Yn.fitHeight=function(Dn,Ka){return Rc(Yn,Dn,Ka)},Yn}function Oc(At,Xt){var Cr=Xt*Xt,Ar=Cr*Cr;return[At*(.8707-.131979*Cr+Ar*(-.013791+Ar*(.003971*Cr-.001529*Ar))),Xt*(1.007226+Cr*(.015085+Ar*(-.044475+.028874*Cr-.005916*Ar)))]}Oc.invert=function(At,Xt){var Cr=Xt,Ar=25,Kr;do{var ki=Cr*Cr,Xi=ki*ki;Cr-=Kr=(Cr*(1.007226+ki*(.015085+Xi*(-.044475+.028874*ki-.005916*Xi)))-Xt)/(1.007226+ki*(.015085*3+Xi*(-.044475*7+.028874*9*ki-.005916*11*Xi)))}while(v(Kr)>o&&--Ar>0);return[At/(.8707+(ki=Cr*Cr)*(-.131979+ki*(-.013791+ki*ki*ki*(.003971-.001529*ki)))),Cr]};function Tc(){return Eu(Oc).scale(175.295)}function wl(At,Xt){return[p(Xt)*x(At),x(Xt)]}wl.invert=Fc(A);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function qc(At,Xt){var Cr=p(Xt),Ar=1+p(At)*Cr;return[Cr*x(At)/Ar,x(Xt)/Ar]}qc.invert=Fc(function(At){return 2*_(At)});function cf(){return Eu(qc).scale(250).clipAngle(142)}function fc(At,Xt){return[T(g((u+Xt)/2)),-At]}fc.invert=function(At,Xt){return[-Xt,2*_(E(At))-u]};function Bc(){var At=jl(fc),Xt=At.center,Cr=At.rotate;return At.center=function(Ar){return arguments.length?Xt([-Ar[1],Ar[0]]):(Ar=Xt(),[Ar[1],-Ar[0]])},At.rotate=function(Ar){return arguments.length?Cr([Ar[0],Ar[1],Ar.length>2?Ar[2]+90:90]):(Ar=Cr(),[Ar[0],Ar[1],Ar[2]-90])},Cr([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Mh,e.geoArea=me,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=Er,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=Mn,e.geoClipExtent=Ma,e.geoClipRectangle=$n,e.geoConicConformal=If,e.geoConicConformalRaw=Xh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Xf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Zf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=Ol,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=Ou,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=Oc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=qc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,\"__esModule\",{value:!0})})});var qDe=ye((FF,ODe)=>{(function(e,t){typeof FF==\"object\"&&typeof ODe!=\"undefined\"?t(FF,NZ(),hk()):t(e.d3=e.d3||{},e.d3,e.d3)})(FF,function(e,t,r){\"use strict\";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},_=Math.sin,b=Math.tan,p=1e-6,k=1e-12,E=Math.PI,T=E/2,L=E/4,x=Math.SQRT1_2,C=G(2),M=G(E),g=E*2,P=180/E,A=E/180;function z(ve){return ve?ve/Math.sin(ve):1}function O(ve){return ve>1?T:ve<-1?-T:Math.asin(ve)}function U(ve){return ve>1?0:ve<-1?E:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function re(ve){return u(ve+G(ve*ve-1))}function oe(ve){var be=b(ve/2),Re=2*u(o(ve/2))/(be*be);function qe(et,Xe){var it=o(et),Ft=o(Xe),Ht=_(Xe),tr=Ft*it,dr=-((1-tr?u((1+tr)/2)/(1-tr):-.5)+Re/(1+tr));return[dr*Ft*_(et),dr*Ht]}return qe.invert=function(et,Xe){var it=G(et*et+Xe*Xe),Ft=-ve/2,Ht=50,tr;if(!it)return[0,0];do{var dr=Ft/2,Sr=o(dr),Or=_(dr),Wr=Or/Sr,ni=-u(n(Sr));Ft-=tr=(2/Wr*ni-Re*Wr-it)/(-ni/(Or*Or)+1-Re/(2*Sr*Sr))*(Sr<0?.7:1)}while(n(tr)>p&&--Ht>0);var Pi=_(Ft);return[a(et*Pi,it*o(Ft)),O(Xe*Pi/it)]},qe}function _e(){var ve=T,be=t.geoProjectionMutator(oe),Re=be(ve);return Re.radius=function(qe){return arguments.length?be(ve=qe*A):ve*P},Re.scale(179.976).clipAngle(147)}function Ce(ve,be){var Re=o(be),qe=z(U(Re*o(ve/=2)));return[2*Re*_(ve)*qe,_(be)*qe]}Ce.invert=function(ve,be){if(!(ve*ve+4*be*be>E*E+p)){var Re=ve,qe=be,et=25;do{var Xe=_(Re),it=_(Re/2),Ft=o(Re/2),Ht=_(qe),tr=o(qe),dr=_(2*qe),Sr=Ht*Ht,Or=tr*tr,Wr=it*it,ni=1-Or*Ft*Ft,Pi=ni?U(tr*Ft)*G(cn=1/ni):cn=0,cn,ln=2*Pi*tr*it-ve,Cn=Pi*Ht-be,Kn=cn*(Or*Wr+Pi*tr*Ft*Sr),Aa=cn*(.5*Xe*dr-Pi*2*Ht*it),fa=cn*.25*(dr*it-Pi*Ht*Or*Xe),$a=cn*(Sr*Ft+Pi*Wr*tr),Co=Aa*fa-$a*Kn;if(!Co)break;var Qa=(Cn*Aa-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;Re-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[Re,qe]}};function Le(){return t.geoProjection(Ce).scale(152.63)}function ge(ve){var be=_(ve),Re=o(ve),qe=ve>=0?1:-1,et=b(qe*ve),Xe=(1+be-Re)/2;function it(Ft,Ht){var tr=o(Ht),dr=o(Ft/=2);return[(1+tr)*_(Ft),(qe*Ht>-a(dr,et)-.001?0:-qe*10)+Xe+_(Ht)*Re-(1+tr)*be*dr]}return it.invert=function(Ft,Ht){var tr=0,dr=0,Sr=50;do{var Or=o(tr),Wr=_(tr),ni=o(dr),Pi=_(dr),cn=1+ni,ln=cn*Wr-Ft,Cn=Xe+Pi*Re-cn*be*Or-Ht,Kn=cn*Or/2,Aa=-Wr*Pi,fa=be*cn*Wr/2,$a=Re*ni+be*Or*Pi,Co=Aa*fa-$a*Kn,Qa=(Cn*Aa-ln*$a)/Co/2,mo=(ln*fa-Cn*Kn)/Co;n(mo)>2&&(mo/=2),tr-=Qa,dr-=mo}while((n(Qa)>p||n(mo)>p)&&--Sr>0);return qe*dr>-a(o(tr),et)-.001?[tr*2,dr]:null},it}function ie(){var ve=20*A,be=ve>=0?1:-1,Re=b(be*ve),qe=t.geoProjectionMutator(ge),et=qe(ve),Xe=et.stream;return et.parallel=function(it){return arguments.length?(Re=b((be=(ve=it*A)>=0?1:-1)*ve),qe(ve)):ve*P},et.stream=function(it){var Ft=et.rotate(),Ht=Xe(it),tr=(et.rotate([0,0]),Xe(it)),dr=et.precision();return et.rotate(Ft),Ht.sphere=function(){tr.polygonStart(),tr.lineStart();for(var Sr=be*-180;be*Sr<180;Sr+=be*90)tr.point(Sr,be*90);if(ve)for(;be*(Sr-=3*be*dr)>=-180;)tr.point(Sr,be*-a(o(Sr*A/2),Re)*P);tr.lineEnd(),tr.polygonEnd()},Ht},et.scale(218.695).center([0,28.0974])}function Se(ve,be){var Re=b(be/2),qe=G(1-Re*Re),et=1+qe*o(ve/=2),Xe=_(ve)*qe/et,it=Re/et,Ft=Xe*Xe,Ht=it*it;return[4/3*Xe*(3+Ft-3*Ht),4/3*it*(3+3*Ft-Ht)]}Se.invert=function(ve,be){if(ve*=3/8,be*=3/8,!ve&&n(be)>1)return null;var Re=ve*ve,qe=be*be,et=1+Re+qe,Xe=G((et-G(et*et-4*be*be))/2),it=O(Xe)/3,Ft=Xe?re(n(be/Xe))/3:H(n(ve))/3,Ht=o(it),tr=N(Ft),dr=tr*tr-Ht*Ht;return[v(ve)*2*a(j(Ft)*Ht,.25-dr),v(be)*2*a(tr*_(it),.25+dr)]};function Ee(){return t.geoProjection(Se).scale(66.1603)}var Ae=G(8),Be=u(1+C);function Pe(ve,be){var Re=n(be);return Re<L?[ve,u(b(L+be/2))]:[ve*o(Re)*(2*C-1/_(Re)),v(be)*(2*C*(Re-L)-u(b(Re/2)))]}Pe.invert=function(ve,be){if((Xe=n(be))<Be)return[ve,2*i(s(be))-T];var Re=L,qe=25,et,Xe;do{var it=o(Re/2),Ft=b(Re/2);Re-=et=(Ae*(Re-L)-u(Ft)-Xe)/(Ae-it*it/(2*Ft))}while(n(et)>k&&--qe>0);return[ve/(o(Re)*(Ae-1/_(Re))),v(be)*Re]};function me(){return t.geoProjection(Pe).scale(112.314)}function De(ve){var be=2*E/ve;function Re(qe,et){var Xe=t.geoAzimuthalEquidistantRaw(qe,et);if(n(qe)>T){var it=a(Xe[1],Xe[0]),Ft=G(Xe[0]*Xe[0]+Xe[1]*Xe[1]),Ht=be*d((it-T)/be)+T,tr=a(_(it-=Ht),2-o(it));it=Ht+O(E/Ft*_(tr))-tr,Xe[0]=Ft*o(it),Xe[1]=Ft*_(it)}return Xe}return Re.invert=function(qe,et){var Xe=G(qe*qe+et*et);if(Xe>T){var it=a(et,qe),Ft=be*d((it-T)/be)+T,Ht=it>Ft?-1:1,tr=Xe*o(Ft-it),dr=1/b(Ht*U((tr-E)/G(E*(E-2*tr)+Xe*Xe)));it=Ft+2*i((dr+Ht*G(dr*dr-3))/3),qe=Xe*o(it),et=Xe*_(it)}return t.geoAzimuthalEquidistantRaw.invert(qe,et)},Re}function ce(){var ve=5,be=t.geoProjectionMutator(De),Re=be(ve),qe=Re.stream,et=.01,Xe=-o(et*A),it=_(et*A);return Re.lobes=function(Ft){return arguments.length?be(ve=+Ft):ve},Re.stream=function(Ft){var Ht=Re.rotate(),tr=qe(Ft),dr=(Re.rotate([0,0]),qe(Ft));return Re.rotate(Ht),tr.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Sr=0,Or=360/ve,Wr=2*E/ve,ni=90-180/ve,Pi=T;Sr<ve;++Sr,ni-=Or,Pi-=Wr)dr.point(a(it*o(Pi),Xe)*P,O(it*_(Pi))*P),ni<-90?(dr.point(-90,-180-ni-et),dr.point(-90,-180-ni+et)):(dr.point(90,ni+et),dr.point(90,ni-et));dr.lineEnd(),dr.polygonEnd()},tr},Re.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function je(ve,be){if(arguments.length<2&&(be=ve),be===1)return t.geoAzimuthalEqualAreaRaw;if(be===1/0)return lt;function Re(qe,et){var Xe=t.geoAzimuthalEqualAreaRaw(qe/be,et);return Xe[0]*=ve,Xe}return Re.invert=function(qe,et){var Xe=t.geoAzimuthalEqualAreaRaw.invert(qe/ve,et);return Xe[0]*=be,Xe},Re}function lt(ve,be){return[ve*o(be)/o(be/=2),2*_(be)]}lt.invert=function(ve,be){var Re=2*O(be/2);return[ve*o(Re/2)/o(Re),Re]};function pt(){var ve=2,be=t.geoProjectionMutator(je),Re=be(ve);return Re.coefficient=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(169.529)}function Vt(ve,be,Re){var qe=100,et,Xe,it;Re=Re===void 0?0:+Re,be=+be;do Xe=ve(Re),it=ve(Re+p),Xe===it&&(it=Xe+p),Re-=et=-1*p*(Xe-be)/(Xe-it);while(qe-- >0&&n(et)>p);return qe<0?NaN:Re}function ot(ve,be,Re){return be===void 0&&(be=40),Re===void 0&&(Re=k),function(qe,et,Xe,it){var Ft,Ht,tr;Xe=Xe===void 0?0:+Xe,it=it===void 0?0:+it;for(var dr=0;dr<be;dr++){var Sr=ve(Xe,it),Or=Sr[0]-qe,Wr=Sr[1]-et;if(n(Or)<Re&&n(Wr)<Re)break;var ni=Or*Or+Wr*Wr;if(ni>Ft){Xe-=Ht/=2,it-=tr/=2;continue}Ft=ni;var Pi=(Xe>0?-1:1)*Re,cn=(it>0?-1:1)*Re,ln=ve(Xe+Pi,it),Cn=ve(Xe,it+cn),Kn=(ln[0]-Sr[0])/Pi,Aa=(ln[1]-Sr[1])/Pi,fa=(Cn[0]-Sr[0])/cn,$a=(Cn[1]-Sr[1])/cn,Co=$a*Kn-Aa*fa,Qa=(n(Co)<.5?.5:1)/Co;if(Ht=(Wr*fa-Or*$a)*Qa,tr=(Or*Aa-Wr*Kn)*Qa,Xe+=Ht,it+=tr,n(Ht)<Re&&n(tr)<Re)break}return[Xe,it]}}function ut(){var ve=je(1.68,2),be=1.4,Re=12;function qe(et,Xe){if(et+Xe<-be){var it=(et-Xe+1.6)*(et+Xe+be)/8;et+=it,Xe-=.8*it*_(Xe+E/2)}var Ft=ve(et,Xe),Ht=(1-o(et*Xe))/Re;return Ft[1]<0&&(Ft[0]*=1+Ht),Ft[1]>0&&(Ft[1]*=1+Ht/1.5*Ft[0]*Ft[0]),Ft}return qe.invert=ot(qe),qe}function Wt(){return t.geoProjection(ut()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Nt(ve,be){var Re=ve*_(be),qe=30,et;do be-=et=(be+_(be)-Re)/(1+o(be));while(n(et)>p&&--qe>0);return be/2}function $t(ve,be,Re){function qe(et,Xe){return[ve*et*o(Xe=Nt(Re,Xe)),be*_(Xe)]}return qe.invert=function(et,Xe){return Xe=O(Xe/be),[et/(ve*o(Xe)),O((2*Xe+_(2*Xe))/Re)]},qe}var sr=$t(C/T,C,E);function Tr(){return t.geoProjection(sr).scale(169.529)}var fr=2.00276,$e=1.11072;function St(ve,be){var Re=Nt(E,be);return[fr*ve/(1/o(be)+$e/o(Re)),(be+C*_(Re))/fr]}St.invert=function(ve,be){var Re=fr*be,qe=be<0?-L:L,et=25,Xe,it;do it=Re-C*_(qe),qe-=Xe=(_(2*qe)+2*qe-E*_(it))/(2*o(2*qe)+2+E*o(it)*C*o(qe));while(n(Xe)>p&&--et>0);return it=Re-C*_(qe),[ve*(1/o(it)+$e/o(qe))/fr,it]};function Qt(){return t.geoProjection(St).scale(160.857)}function Gt(ve){var be=0,Re=t.geoProjectionMutator(ve),qe=Re(be);return qe.parallel=function(et){return arguments.length?Re(be=et*A):be*P},qe}function _t(ve,be){return[ve*o(be),be]}_t.invert=function(ve,be){return[ve/o(be),be]};function It(){return t.geoProjection(_t).scale(152.63)}function mt(ve){if(!ve)return _t;var be=1/b(ve);function Re(qe,et){var Xe=be+ve-et,it=Xe&&qe*o(et)/Xe;return[Xe*_(it),be-Xe*o(it)]}return Re.invert=function(qe,et){var Xe=G(qe*qe+(et=be-et)*et),it=be+ve-Xe;return[Xe/o(it)*a(qe,et),it]},Re}function er(){return Gt(mt).scale(123.082).center([0,26.1441]).parallel(45)}function lr(ve){function be(Re,qe){var et=T-qe,Xe=et&&Re*ve*_(et)/et;return[et*_(Xe)/ve,T-et*o(Xe)]}return be.invert=function(Re,qe){var et=Re*ve,Xe=T-qe,it=G(et*et+Xe*Xe),Ft=a(et,Xe);return[(it?it/_(it):1)*Ft/ve,T-it]},be}function wr(){var ve=.5,be=t.geoProjectionMutator(lr),Re=be(ve);return Re.fraction=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(158.837)}var Lr=$t(1,4/E,E);function ti(){return t.geoProjection(Lr).scale(152.63)}function Br(ve,be,Re,qe,et,Xe){var it=o(Xe),Ft;if(n(ve)>1||n(Xe)>1)Ft=U(Re*et+be*qe*it);else{var Ht=_(ve/2),tr=_(Xe/2);Ft=2*O(G(Ht*Ht+be*qe*tr*tr))}return n(Ft)>p?[Ft,a(qe*_(Xe),be*et-Re*qe*it)]:[0,0]}function Vr(ve,be,Re){return U((ve*ve+be*be-Re*Re)/(2*ve*be))}function dt(ve){return ve-2*E*l((ve+E)/(2*E))}function Ge(ve,be,Re){for(var qe=[[ve[0],ve[1],_(ve[1]),o(ve[1])],[be[0],be[1],_(be[1]),o(be[1])],[Re[0],Re[1],_(Re[1]),o(Re[1])]],et=qe[2],Xe,it=0;it<3;++it,et=Xe)Xe=qe[it],et.v=Br(Xe[1]-et[1],et[3],et[2],Xe[3],Xe[2],Xe[0]-et[0]),et.point=[0,0];var Ft=Vr(qe[0].v[0],qe[2].v[0],qe[1].v[0]),Ht=Vr(qe[0].v[0],qe[1].v[0],qe[2].v[0]),tr=E-Ft;qe[2].point[1]=0,qe[0].point[0]=-(qe[1].point[0]=qe[0].v[0]/2);var dr=[qe[2].point[0]=qe[0].point[0]+qe[2].v[0]*o(Ft),2*(qe[0].point[1]=qe[1].point[1]=qe[2].v[0]*_(Ft))];function Sr(Or,Wr){var ni=_(Wr),Pi=o(Wr),cn=new Array(3),ln;for(ln=0;ln<3;++ln){var Cn=qe[ln];if(cn[ln]=Br(Wr-Cn[1],Cn[3],Cn[2],Pi,ni,Or-Cn[0]),!cn[ln][0])return Cn.point;cn[ln][1]=dt(cn[ln][1]-Cn.v[1])}var Kn=dr.slice();for(ln=0;ln<3;++ln){var Aa=ln==2?0:ln+1,fa=Vr(qe[ln].v[0],cn[ln][0],cn[Aa][0]);cn[ln][1]<0&&(fa=-fa),ln?ln==1?(fa=Ht-fa,Kn[0]-=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa)):(fa=tr-fa,Kn[0]+=cn[ln][0]*o(fa),Kn[1]+=cn[ln][0]*_(fa)):(Kn[0]+=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa))}return Kn[0]/=3,Kn[1]/=3,Kn}return Sr}function Je(ve){return ve[0]*=A,ve[1]*=A,ve}function We(){return tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function tt(ve,be,Re){var qe=t.geoCentroid({type:\"MultiPoint\",coordinates:[ve,be,Re]}),et=[-qe[0],-qe[1]],Xe=t.geoRotation(et),it=Ge(Je(Xe(ve)),Je(Xe(be)),Je(Xe(Re)));it.invert=ot(it);var Ft=t.geoProjection(it).rotate(et),Ht=Ft.center;return delete Ft.rotate,Ft.center=function(tr){return arguments.length?Ht(Xe(tr)):Xe.invert(Ht())},Ft.clipAngle(90)}function xt(ve,be){var Re=G(1-_(be));return[2/M*ve*Re,M*(1-Re)]}xt.invert=function(ve,be){var Re=(Re=be/M-1)*Re;return[Re>0?ve*G(E/Re)/2:0,O(1-Re)]};function Ie(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function xe(ve){var be=b(ve);function Re(qe,et){return[qe,(qe?qe/_(qe):1)*(_(et)*o(qe)-be*o(et))]}return Re.invert=be?function(qe,et){qe&&(et*=_(qe)/qe);var Xe=o(qe);return[qe,2*a(G(Xe*Xe+be*be-et*et)-Xe,be-et)]}:function(qe,et){return[qe,O(qe?et*b(qe)/qe:et)]},Re}function ke(){return Gt(xe).scale(249.828).clipAngle(90)}var vt=G(3);function ir(ve,be){return[vt*ve*(2*o(2*be/3)-1)/M,vt*M*_(be/3)]}ir.invert=function(ve,be){var Re=3*O(be/(vt*M));return[M*ve/(vt*(2*o(2*Re/3)-1)),Re]};function ar(){return t.geoProjection(ir).scale(156.19)}function vr(ve){var be=o(ve);function Re(qe,et){return[qe*be,_(et)/be]}return Re.invert=function(qe,et){return[qe/be,O(et*be)]},Re}function ii(){return Gt(vr).parallel(38.58).scale(195.044)}function pi(ve){var be=o(ve);function Re(qe,et){return[qe*be,(1+be)*b(et/2)]}return Re.invert=function(qe,et){return[qe/be,i(et/(1+be))*2]},Re}function $r(){return Gt(pi).scale(124.75)}function di(ve,be){var Re=G(8/(3*E));return[Re*ve*(1-n(be)/E),Re*be]}di.invert=function(ve,be){var Re=G(8/(3*E)),qe=be/Re;return[ve/(Re*(1-n(qe)/E)),qe]};function ji(){return t.geoProjection(di).scale(165.664)}function In(ve,be){var Re=G(4-3*_(n(be)));return[2/G(6*E)*ve*Re,v(be)*G(2*E/3)*(2-Re)]}In.invert=function(ve,be){var Re=2-n(be)/G(2*E/3);return[ve*G(6*E)/(2*Re),v(be)*O((4-Re*Re)/3)]};function wi(){return t.geoProjection(In).scale(165.664)}function On(ve,be){var Re=G(E*(4+E));return[2/Re*ve*(1+G(1-4*be*be/(E*E))),4/Re*be]}On.invert=function(ve,be){var Re=G(E*(4+E))/2;return[ve*Re/(1+G(1-be*be*(4+E)/(4*E))),be*Re/2]};function qn(){return t.geoProjection(On).scale(180.739)}function Fn(ve,be){var Re=(2+T)*_(be);be/=2;for(var qe=0,et=1/0;qe<10&&n(et)>p;qe++){var Xe=o(be);be-=et=(be+_(be)*(Xe+2)-Re)/(2*Xe*(1+Xe))}return[2/G(E*(4+E))*ve*(1+o(be)),2*G(E/(4+E))*_(be)]}Fn.invert=function(ve,be){var Re=be*G((4+E)/E)/2,qe=O(Re),et=o(qe);return[ve/(2/G(E*(4+E))*(1+et)),O((qe+Re*(et+2))/(2+T))]};function ra(){return t.geoProjection(Fn).scale(180.739)}function la(ve,be){return[ve*(1+o(be))/G(2+E),2*be/G(2+E)]}la.invert=function(ve,be){var Re=G(2+E),qe=be*Re/2;return[Re*ve/(1+o(qe)),qe]};function Ut(){return t.geoProjection(la).scale(173.044)}function wt(ve,be){for(var Re=(1+T)*_(be),qe=0,et=1/0;qe<10&&n(et)>p;qe++)be-=et=(be+_(be)-Re)/(1+o(be));return Re=G(2+E),[ve*(1+o(be))/Re,2*be/Re]}wt.invert=function(ve,be){var Re=1+T,qe=G(Re/2);return[ve*2*qe/(1+o(be*=qe)),O((be+_(be))/Re)]};function rr(){return t.geoProjection(wt).scale(173.044)}var nr=3+2*C;function Er(ve,be){var Re=_(ve/=2),qe=o(ve),et=G(o(be)),Xe=o(be/=2),it=_(be)/(Xe+C*qe*et),Ft=G(2/(1+it*it)),Ht=G((C*Xe+(qe+Re)*et)/(C*Xe+(qe-Re)*et));return[nr*(Ft*(Ht-1/Ht)-2*u(Ht)),nr*(Ft*it*(Ht+1/Ht)-2*i(it))]}Er.invert=function(ve,be){if(!(Xe=Se.invert(ve/1.2,be*1.065)))return null;var Re=Xe[0],qe=Xe[1],et=20,Xe;ve/=nr,be/=nr;do{var it=Re/2,Ft=qe/2,Ht=_(it),tr=o(it),dr=_(Ft),Sr=o(Ft),Or=o(qe),Wr=G(Or),ni=dr/(Sr+C*tr*Wr),Pi=ni*ni,cn=G(2/(1+Pi)),ln=C*Sr+(tr+Ht)*Wr,Cn=C*Sr+(tr-Ht)*Wr,Kn=ln/Cn,Aa=G(Kn),fa=Aa-1/Aa,$a=Aa+1/Aa,Co=cn*fa-2*u(Aa)-ve,Qa=cn*ni*$a-2*i(ni)-be,mo=dr&&x*Wr*Ht*Pi/dr,Bo=(C*tr*Sr+Wr)/(2*(Sr+C*tr*Wr)*(Sr+C*tr*Wr)*Wr),Ps=-.5*ni*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*Sr+C*Wr*(tr-Ht))*To*Aa,hl=(C*tr*Sr*Wr+Or)/To,Ul=-(C*Ht*dr)/(Wr*To),Lu=fa*Ts-2*hl/Aa+cn*(hl+hl/Kn),au=fa*wo-2*Ul/Aa+cn*(Ul+Ul/Kn),Js=ni*$a*Ts-2*mo/(1+Pi)+cn*$a*mo+cn*ni*(hl-hl/Kn),eu=ni*$a*wo-2*Bo/(1+Pi)+cn*$a*Bo+cn*ni*(Ul-Ul/Kn),dc=au*Js-eu*Lu;if(!dc)break;var Tl=(Qa*au-Co*eu)/dc,Al=(Co*Js-Qa*Lu)/dc;Re-=Tl,qe=c(-T,f(T,qe-Al))}while((n(Tl)>p||n(Al)>p)&&--et>0);return n(n(qe)-T)<p?[0,qe]:et&&[Re,qe]};function Xr(){return t.geoProjection(Er).scale(62.5271)}var ri=o(35*A);function Qr(ve,be){var Re=b(be/2);return[ve*ri*G(1-Re*Re),(1+ri)*Re]}Qr.invert=function(ve,be){var Re=be/(1+ri);return[ve&&ve/(ri*G(1-Re*Re)),2*i(Re)]};function Oi(){return t.geoProjection(Qr).scale(137.152)}function $i(ve,be){var Re=be/2,qe=o(Re);return[2*ve/M*o(be)*qe*qe,M*b(Re)]}$i.invert=function(ve,be){var Re=i(be/M),qe=o(Re),et=2*Re;return[ve*M/2/(o(et)*qe*qe),et]};function tn(){return t.geoProjection($i).scale(135.264)}function fn(ve){var be=1-ve,Re=Xe(E,0)[0]-Xe(-E,0)[0],qe=Xe(0,T)[1]-Xe(0,-T)[1],et=G(2*qe/Re);function Xe(Ht,tr){var dr=o(tr),Sr=_(tr);return[dr/(be+ve*dr)*Ht,be*tr+ve*Sr]}function it(Ht,tr){var dr=Xe(Ht,tr);return[dr[0]*et,dr[1]/et]}function Ft(Ht){return it(0,Ht)[1]}return it.invert=function(Ht,tr){var dr=Vt(Ft,tr),Sr=Ht/et*(ve+be/o(dr));return[Sr,dr]},it}function yn(){var ve=.5,be=t.geoProjectionMutator(fn),Re=be(ve);return Re.alpha=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(168.725)}function Sn(ve){return[ve[0]/2,O(b(ve[1]/2*A))*P]}function Ba(ve){return[ve[0]*2,2*i(_(ve[1]*A))*P]}function ua(ve){ve==null&&(ve=t.geoOrthographic);var be=ve(),Re=t.geoEquirectangular().scale(P).precision(0).clipAngle(null).translate([0,0]);function qe(Xe){return be(Sn(Xe))}be.invert&&(qe.invert=function(Xe){return Ba(be.invert(Xe))}),qe.stream=function(Xe){var it=be.stream(Xe),Ft=Re.stream({point:function(Ht,tr){it.point(Ht/2,O(b(-tr/2*A))*P)},lineStart:function(){it.lineStart()},lineEnd:function(){it.lineEnd()},polygonStart:function(){it.polygonStart()},polygonEnd:function(){it.polygonEnd()}});return Ft.sphere=it.sphere,Ft};function et(Xe){qe[Xe]=function(){return arguments.length?(be[Xe].apply(be,arguments),qe):be[Xe]()}}return qe.rotate=function(Xe){return arguments.length?(Re.rotate(Xe),qe):Re.rotate()},qe.center=function(Xe){return arguments.length?(be.center(Sn(Xe)),qe):Ba(be.center())},et(\"angle\"),et(\"clipAngle\"),et(\"clipExtent\"),et(\"fitExtent\"),et(\"fitHeight\"),et(\"fitSize\"),et(\"fitWidth\"),et(\"scale\"),et(\"translate\"),et(\"precision\"),qe.scale(249.5)}function ma(ve,be){var Re=2*E/be,qe=ve*ve;function et(Xe,it){var Ft=t.geoAzimuthalEquidistantRaw(Xe,it),Ht=Ft[0],tr=Ft[1],dr=Ht*Ht+tr*tr;if(dr>qe){var Sr=G(dr),Or=a(tr,Ht),Wr=Re*d(Or/Re),ni=Or-Wr,Pi=ve*o(ni),cn=(ve*_(ni)-ni*_(Pi))/(T-Pi),ln=Wa(ni,cn),Cn=(E-ve)/Fa(ln,Pi,E);Ht=Sr;var Kn=50,Aa;do Ht-=Aa=(ve+Fa(ln,Pi,Ht)*Cn-Sr)/(ln(Ht)*Cn);while(n(Aa)>p&&--Kn>0);tr=ni*_(Ht),Ht<T&&(tr-=cn*(Ht-T));var fa=_(Wr),$a=o(Wr);Ft[0]=Ht*$a-tr*fa,Ft[1]=Ht*fa+tr*$a}return Ft}return et.invert=function(Xe,it){var Ft=Xe*Xe+it*it;if(Ft>qe){var Ht=G(Ft),tr=a(it,Xe),dr=Re*d(tr/Re),Sr=tr-dr;Xe=Ht*o(Sr),it=Ht*_(Sr);for(var Or=Xe-T,Wr=_(Xe),ni=it/Wr,Pi=Xe<T?1/0:0,cn=10;;){var ln=ve*_(ni),Cn=ve*o(ni),Kn=_(Cn),Aa=T-Cn,fa=(ln-ni*Kn)/Aa,$a=Wa(ni,fa);if(n(Pi)<k||!--cn)break;ni-=Pi=(ni*Wr-fa*Or-it)/(Wr-Or*2*(Aa*(Cn+ni*ln*o(Cn)-Kn)-ln*(ln-ni*Kn))/(Aa*Aa))}Ht=ve+Fa($a,Cn,Xe)*(E-ve)/Fa($a,Cn,E),tr=dr+ni,Xe=Ht*o(tr),it=Ht*_(tr)}return t.geoAzimuthalEquidistantRaw.invert(Xe,it)},et}function Wa(ve,be){return function(Re){var qe=ve*o(Re);return Re<T&&(qe-=be),G(1+qe*qe)}}function Fa(ve,be,Re){for(var qe=50,et=(Re-be)/qe,Xe=ve(be)+ve(Re),it=1,Ft=be;it<qe;++it)Xe+=2*ve(Ft+=et);return Xe*.5*et}function Xo(){var ve=6,be=30*A,Re=o(be),qe=_(be),et=t.geoProjectionMutator(ma),Xe=et(be,ve),it=Xe.stream,Ft=.01,Ht=-o(Ft*A),tr=_(Ft*A);return Xe.radius=function(dr){return arguments.length?(Re=o(be=dr*A),qe=_(be),et(be,ve)):be*P},Xe.lobes=function(dr){return arguments.length?et(be,ve=+dr):ve},Xe.stream=function(dr){var Sr=Xe.rotate(),Or=it(dr),Wr=(Xe.rotate([0,0]),it(dr));return Xe.rotate(Sr),Or.sphere=function(){Wr.polygonStart(),Wr.lineStart();for(var ni=0,Pi=2*E/ve,cn=0;ni<ve;++ni,cn-=Pi)Wr.point(a(tr*o(cn),Ht)*P,O(tr*_(cn))*P),Wr.point(a(qe*o(cn-Pi/2),Re)*P,O(qe*_(cn-Pi/2))*P);Wr.lineEnd(),Wr.polygonEnd()},Or},Xe.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function da(ve,be,Re,qe,et,Xe,it,Ft){arguments.length<8&&(Ft=0);function Ht(tr,dr){if(!dr)return[ve*tr/E,0];var Sr=dr*dr,Or=ve+Sr*(be+Sr*(Re+Sr*qe)),Wr=dr*(et-1+Sr*(Xe-Ft+Sr*it)),ni=(Or*Or+Wr*Wr)/(2*Wr),Pi=tr*O(Or/ni)/E;return[ni*_(Pi),dr*(1+Sr*Ft)+ni*(1-o(Pi))]}return Ht.invert=function(tr,dr){var Sr=E*tr/ve,Or=dr,Wr,ni,Pi=50;do{var cn=Or*Or,ln=ve+cn*(be+cn*(Re+cn*qe)),Cn=Or*(et-1+cn*(Xe-Ft+cn*it)),Kn=ln*ln+Cn*Cn,Aa=2*Cn,fa=Kn/Aa,$a=fa*fa,Co=O(ln/fa)/E,Qa=Sr*Co,mo=ln*ln,Bo=(2*be+cn*(4*Re+cn*6*qe))*Or,Ps=et+cn*(3*Xe+cn*5*it),Ts=2*(ln*Bo+Cn*(Ps-1)),wo=2*(Ps-1),To=(Ts*Aa-Kn*wo)/(Aa*Aa),hl=o(Qa),Ul=_(Qa),Lu=fa*hl,au=fa*Ul,Js=Sr/E*(1/G(1-mo/$a))*(Bo*fa-ln*To)/$a,eu=au-tr,dc=Or*(1+cn*Ft)+fa-Lu-dr,Tl=To*Ul+Lu*Js,Al=Lu*Co,X=1+To-(To*hl-au*Js),se=au*Co,Te=Tl*se-X*Al;if(!Te)break;Sr-=Wr=(dc*Tl-eu*X)/Te,Or-=ni=(eu*se-dc*Al)/Te}while((n(Wr)>p||n(ni)>p)&&--Pi>0);return[Sr,Or]},Ht}var Wn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(Wn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function jn(){return t.geoProjection(vo).scale(153.93)}var Mt=da(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kr(){return t.geoProjection(Mt).scale(130.945)}function Jr(ve,be){var Re=ve*ve,qe=be*be;return[ve*(1-.162388*qe)*(.87-952426e-9*Re*Re),be*(1+qe/12)]}Jr.invert=function(ve,be){var Re=ve,qe=be,et=50,Xe;do{var it=qe*qe;qe-=Xe=(qe*(1+it/12)-be)/(1+it/4)}while(n(Xe)>p&&--et>0);et=50,ve/=1-.162388*it;do{var Ft=(Ft=Re*Re)*Ft;Re-=Xe=(Re*(.87-952426e-9*Ft)-ve)/(.87-.00476213*Ft)}while(n(Xe)>p&&--et>0);return[Re,qe]};function vi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function An(){return t.geoProjection(hn).scale(131.087)}function Mn(ve){var be=ve(T,0)[0]-ve(-T,0)[0];function Re(qe,et){var Xe=qe>0?-.5:.5,it=ve(qe+Xe*E,et);return it[0]-=Xe*be,it}return ve.invert&&(Re.invert=function(qe,et){var Xe=qe>0?-.5:.5,it=ve.invert(qe+Xe*be,et),Ft=it[0]-Xe*E;return Ft<-E?Ft+=2*E:Ft>E&&(Ft-=2*E),it[0]=Ft,it}),Re}function Li(ve,be){var Re=v(ve),qe=v(be),et=o(be),Xe=o(ve)*et,it=_(ve)*et,Ft=_(qe*be);ve=n(a(it,Ft)),be=O(Xe),n(ve-T)>p&&(ve%=T);var Ht=_n(ve>E/4?T-ve:ve,be);return ve>E/4&&(Ft=Ht[0],Ht[0]=-Ht[1],Ht[1]=-Ft),Ht[0]*=Re,Ht[1]*=-qe,Ht}Li.invert=function(ve,be){n(ve)>1&&(ve=v(ve)*2-ve),n(be)>1&&(be=v(be)*2-be);var Re=v(ve),qe=v(be),et=-Re*ve,Xe=-qe*be,it=Xe/et<1,Ft=ya(it?Xe:et,it?et:Xe),Ht=Ft[0],tr=Ft[1],dr=o(tr);return it&&(Ht=-T-Ht),[Re*(a(_(Ht)*dr,-_(tr))+E),qe*O(o(Ht)*dr)]};function _n(ve,be){if(be===T)return[0,0];var Re=_(be),qe=Re*Re,et=qe*qe,Xe=1+et,it=1+3*et,Ft=1-et,Ht=O(1/G(Xe)),tr=Ft+qe*Xe*Ht,dr=(1-Re)/tr,Sr=G(dr),Or=dr*Xe,Wr=G(Or),ni=Sr*Ft,Pi,cn;if(ve===0)return[0,-(ni+qe*Wr)];var ln=o(be),Cn=1/ln,Kn=2*Re*ln,Aa=(-3*qe+Ht*it)*Kn,fa=(-tr*ln-(1-Re)*Aa)/(tr*tr),$a=.5*fa/Sr,Co=Ft*$a-2*qe*Sr*Kn,Qa=qe*Xe*fa+dr*it*Kn,mo=-Cn*Kn,Bo=-Cn*Qa,Ps=-2*Cn*Co,Ts=4*ve/E,wo;if(ve>.222*E||be<E/4&&ve>.175*E){if(Pi=(ni+qe*G(Or*(1+et)-ni*ni))/(1+et),ve>E/4)return[Pi,Pi];var To=Pi,hl=.5*Pi;Pi=.5*(hl+To),cn=50;do{var Ul=G(Or-Pi*Pi),Lu=Pi*(Ps+mo*Ul)+Bo*O(Pi/Wr)-Ts;if(!Lu)break;Lu<0?hl=Pi:To=Pi,Pi=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Pi=p,cn=25;do{var au=Pi*Pi,Js=G(Or-au),eu=Ps+mo*Js,dc=Pi*eu+Bo*O(Pi/Wr)-Ts,Tl=eu+(Bo-mo*au)/Js;Pi-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Pi,-ni-qe*G(Or-Pi*Pi)]}function ya(ve,be){for(var Re=0,qe=1,et=.5,Xe=50;;){var it=et*et,Ft=G(et),Ht=O(1/G(1+it)),tr=1-it+et*(1+it)*Ht,dr=(1-Ft)/tr,Sr=G(dr),Or=dr*(1+it),Wr=Sr*(1-it),ni=Or-ve*ve,Pi=G(ni),cn=be+Wr+et*Pi;if(n(qe-Re)<k||--Xe===0||cn===0)break;cn>0?Re=et:qe=et,et=.5*(Re+qe)}if(!Xe)return null;var ln=O(Ft),Cn=o(ln),Kn=1/Cn,Aa=2*Ft*Cn,fa=(-3*et+Ht*(1+3*it))*Aa,$a=(-tr*Cn-(1-Ft)*fa)/(tr*tr),Co=.5*$a/Sr,Qa=(1-it)*Co-2*et*Sr*Aa,mo=-2*Kn*Qa,Bo=-Kn*Aa,Ps=-Kn*(et*(1+it)*$a+dr*(1+3*it)*Aa);return[E/4*(ve*(mo+Bo*Pi)+Ps*O(ve/G(Or))),ln]}function $n(){return t.geoProjection(Mn(Li)).scale(239.75)}function Ma(ve,be,Re){var qe,et,Xe;return ve?(qe=_o(ve,Re),be?(et=_o(be,1-Re),Xe=et[1]*et[1]+Re*qe[0]*qe[0]*et[0]*et[0],[[qe[0]*et[2]/Xe,qe[1]*qe[2]*et[0]*et[1]/Xe],[qe[1]*et[1]/Xe,-qe[0]*qe[2]*et[0]*et[2]/Xe],[qe[2]*et[1]*et[2]/Xe,-Re*qe[0]*qe[1]*et[0]/Xe]]):[[qe[0],0],[qe[1],0],[qe[2],0]]):(et=_o(be,1-Re),[[0,et[0]/et[1]],[1/et[1],0],[et[2]/et[1],0]])}function _o(ve,be){var Re,qe,et,Xe,it;if(be<p)return Xe=_(ve),qe=o(ve),Re=be*(ve-Xe*qe)/4,[Xe-Re*qe,qe+Re*Xe,1-be*Xe*Xe/2,ve-Re];if(be>=1-p)return Re=(1-be)/4,qe=N(ve),Xe=Z(ve),et=1/qe,it=qe*j(ve),[Xe+Re*(it-ve)/(qe*qe),et-Re*Xe*et*(it-ve),et+Re*Xe*et*(it+ve),2*i(s(ve))-T+Re*(it-ve)/qe];var Ft=[1,0,0,0,0,0,0,0,0],Ht=[G(be),0,0,0,0,0,0,0,0],tr=0;for(qe=G(1-be),it=1;n(Ht[tr]/Ft[tr])>p&&tr<8;)Re=Ft[tr++],Ht[tr]=(Re-qe)/2,Ft[tr]=(Re+qe)/2,qe=G(Re*qe),it*=2;et=it*Ft[tr]*ve;do Xe=Ht[tr]*_(qe=et)/Ft[tr],et=(O(Xe)+et)/2;while(--tr);return[_(et),Xe=o(et),Xe/o(et-qe),et]}function No(ve,be,Re){var qe=n(ve),et=n(be),Xe=j(et);if(qe){var it=1/_(qe),Ft=1/(b(qe)*b(qe)),Ht=-(Ft+Re*(Xe*Xe*it*it)-1+Re),tr=(Re-1)*Ft,dr=(-Ht+G(Ht*Ht-4*tr))/2;return[po(i(1/G(dr)),Re)*v(ve),po(i(G((dr/Ft-1)/Re)),1-Re)*v(be)]}return[0,po(i(Xe),1-Re)*v(be)]}function po(ve,be){if(!be)return ve;if(be===1)return u(b(ve/2+L));for(var Re=1,qe=G(1-be),et=G(be),Xe=0;n(et)>p;Xe++){if(ve%E){var it=i(qe*b(ve)/Re);it<0&&(it+=E),ve+=it+~~(ve/E)*E}else ve+=ve;et=(Re+qe)/2,qe=G(Re*qe),et=((Re=et)-qe)/2}return ve/(h(2,Xe)*Re)}function Lo(ve,be){var Re=(C-1)/(C+1),qe=G(1-Re*Re),et=po(T,qe*qe),Xe=-1,it=u(b(E/4+n(be)/2)),Ft=s(Xe*it)/G(Re),Ht=ko(Ft*o(Xe*ve),Ft*_(Xe*ve)),tr=No(Ht[0],Ht[1],qe*qe);return[-tr[1],(be>=0?1:-1)*(.5*et-tr[0])]}function ko(ve,be){var Re=ve*ve,qe=be+1,et=1-Re-be*be;return[.5*((ve>=0?T:-T)-a(et,2*ve)),-.25*u(et*et+4*Re)+.5*u(qe*qe+Re)]}function Ds(ve,be){var Re=be[0]*be[0]+be[1]*be[1];return[(ve[0]*be[0]+ve[1]*be[1])/Re,(ve[1]*be[0]-ve[0]*be[1])/Re]}Lo.invert=function(ve,be){var Re=(C-1)/(C+1),qe=G(1-Re*Re),et=po(T,qe*qe),Xe=-1,it=Ma(.5*et-be,-ve,qe*qe),Ft=Ds(it[0],it[1]),Ht=a(Ft[1],Ft[0])/Xe;return[Ht,2*i(s(.5/Xe*u(Re*Ft[0]*Ft[0]+Re*Ft[1]*Ft[1])))-T]};function Fs(){return t.geoProjection(Mn(Lo)).scale(151.496)}function ll(ve){var be=_(ve),Re=o(ve),qe=ul(ve);qe.invert=ul(-ve);function et(Xe,it){var Ft=qe(Xe,it);Xe=Ft[0],it=Ft[1];var Ht=_(it),tr=o(it),dr=o(Xe),Sr=U(be*Ht+Re*tr*dr),Or=_(Sr),Wr=n(Or)>p?Sr/Or:1;return[Wr*Re*_(Xe),(n(Xe)>T?Wr:-Wr)*(be*tr-Re*Ht*dr)]}return et.invert=function(Xe,it){var Ft=G(Xe*Xe+it*it),Ht=-_(Ft),tr=o(Ft),dr=Ft*tr,Sr=-it*Ht,Or=Ft*be,Wr=G(dr*dr+Sr*Sr-Or*Or),ni=a(dr*Or+Sr*Wr,Sr*Or-dr*Wr),Pi=(Ft>T?-1:1)*a(Xe*Ht,Ft*o(ni)*tr+it*_(ni)*Ht);return qe.invert(Pi,ni)},et}function ul(ve){var be=_(ve),Re=o(ve);return function(qe,et){var Xe=o(et),it=o(qe)*Xe,Ft=_(qe)*Xe,Ht=_(et);return[a(Ft,it*Re-Ht*be),O(Ht*Re+it*be)]}}function zl(){var ve=0,be=t.geoProjectionMutator(ll),Re=be(ve),qe=Re.rotate,et=Re.stream,Xe=t.geoCircle();return Re.parallel=function(it){if(!arguments.length)return ve*P;var Ft=Re.rotate();return be(ve=it*A).rotate(Ft)},Re.rotate=function(it){return arguments.length?(qe.call(Re,[it[0],it[1]-ve*P]),Xe.center([-it[0],-it[1]]),Re):(it=qe.call(Re),it[1]+=ve*P,it)},Re.stream=function(it){return it=et(it),it.sphere=function(){it.polygonStart();var Ft=.01,Ht=Xe.radius(90-Ft)().coordinates[0],tr=Ht.length-1,dr=-1,Sr;for(it.lineStart();++dr<tr;)it.point((Sr=Ht[dr])[0],Sr[1]);for(it.lineEnd(),Ht=Xe.radius(90+Ft)().coordinates[0],tr=Ht.length-1,it.lineStart();--dr>=0;)it.point((Sr=Ht[dr])[0],Sr[1]);it.lineEnd(),it.polygonEnd()},it},Re.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=O(1-1/us)*P,As=vr(0);function cl(ve){var be=il*A,Re=xt(E,be)[0]-xt(-E,be)[0],qe=As(0,be)[1],et=xt(0,be)[1],Xe=M-et,it=g/ve,Ft=4/g,Ht=qe+Xe*Xe*4/g;function tr(dr,Sr){var Or,Wr=n(Sr);if(Wr>be){var ni=f(ve-1,c(0,l((dr+E)/it)));dr+=E*(ve-1)/ve-ni*it,Or=xt(dr,Wr),Or[0]=Or[0]*g/Re-g*(ve-1)/(2*ve)+ni*g/ve,Or[1]=qe+(Or[1]-et)*4*Xe/g,Sr<0&&(Or[1]=-Or[1])}else Or=As(dr,Sr);return Or[0]*=Ft,Or[1]/=Ht,Or}return tr.invert=function(dr,Sr){dr/=Ft,Sr*=Ht;var Or=n(Sr);if(Or>qe){var Wr=f(ve-1,c(0,l((dr+E)/it)));dr=(dr+E*(ve-1)/ve-Wr*it)*Re/g;var ni=xt.invert(dr,.25*(Or-qe)*g/Xe+et);return ni[0]-=E*(ve-1)/ve-Wr*it,Sr<0&&(ni[1]=-ni[1]),ni}return As.invert(dr,Sr)},tr}function Ks(ve,be){return[ve,be&1?90-p:il]}function zs(ve,be){return[ve,be&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var be=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:\"Polygon\",coordinates:[ve===180?be.map(Io):be]}}function Yl(){var ve=4,be=t.geoProjectionMutator(cl),Re=be(ve),qe=Re.stream;return Re.lobes=function(et){return arguments.length?be(ve=+et):ve},Re.stream=function(et){var Xe=Re.rotate(),it=qe(et),Ft=(Re.rotate([0,0]),qe(et));return Re.rotate(Xe),it.sphere=function(){t.geoStream(ls(180/ve),Ft)},it},Re.scale(239.75)}function Su(ve){var be=1+ve,Re=_(1/be),qe=O(Re),et=2*G(E/(Xe=E+4*qe*be)),Xe,it=.5*et*(be+G(ve*(2+ve))),Ft=ve*ve,Ht=be*be;function tr(dr,Sr){var Or=1-_(Sr),Wr,ni;if(Or&&Or<2){var Pi=T-Sr,cn=25,ln;do{var Cn=_(Pi),Kn=o(Pi),Aa=qe+a(Cn,be-Kn),fa=1+Ht-2*be*Kn;Pi-=ln=(Pi-Ft*qe-be*Cn+fa*Aa-.5*Or*Xe)/(2*be*Cn*Aa)}while(n(ln)>k&&--cn>0);Wr=et*G(fa),ni=dr*Aa/E}else Wr=et*(ve+Or),ni=dr*qe/E;return[Wr*_(ni),it-Wr*o(ni)]}return tr.invert=function(dr,Sr){var Or=dr*dr+(Sr-=it)*Sr,Wr=(1+Ht-Or/(et*et))/(2*be),ni=U(Wr),Pi=_(ni),cn=qe+a(Pi,be-Wr);return[O(dr/G(Or))*E/cn,O(1-2*(ni-Ft*qe-be*Pi+(1+Ht-2*be*Wr)*cn)/Xe)]},tr}function nc(){var ve=1,be=t.geoProjectionMutator(Su),Re=be(ve);return Re.ratio=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,be){return be>-bs?(ve=sr(ve,be),ve[1]+=Rn,ve):_t(ve,be)}_a.invert=function(ve,be){return be>-bs?sr.invert(ve,be-Rn):_t.invert(ve,be)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ol(ve,be){return n(be)>bs?(ve=sr(ve,be),ve[1]-=be>0?Rn:-Rn,ve):_t(ve,be)}Ol.invert=function(ve,be){return n(be)>bs?sr.invert(ve,be+(be>0?Rn:-Rn)):_t.invert(ve,be)};function xo(){return t.geoProjection(Ol).scale(152.63)}function Kl(ve,be,Re,qe){var et=G(4*E/(2*Re+(1+ve-be/2)*_(2*Re)+(ve+be)/2*_(4*Re)+be/2*_(6*Re))),Xe=G(qe*_(Re)*G((1+ve*o(2*Re)+be*o(4*Re))/(1+ve+be))),it=Re*Ht(1);function Ft(Sr){return G(1+ve*o(2*Sr)+be*o(4*Sr))}function Ht(Sr){var Or=Sr*Re;return(2*Or+(1+ve-be/2)*_(2*Or)+(ve+be)/2*_(4*Or)+be/2*_(6*Or))/Re}function tr(Sr){return Ft(Sr)*_(Sr)}var dr=function(Sr,Or){var Wr=Re*Vt(Ht,it*_(Or)/Re,Or/E);isNaN(Wr)&&(Wr=Re*v(Or));var ni=et*Ft(Wr);return[ni*Xe*Sr/E*o(Wr),ni/Xe*_(Wr)]};return dr.invert=function(Sr,Or){var Wr=Vt(tr,Or*Xe/et);return[Sr*E/(o(Wr)*et*Xe*Ft(Wr)),O(Re*Ht(Wr/Re)/it)]},Re===0&&(et=G(qe/E),dr=function(Sr,Or){return[Sr*et,_(Or)/et]},dr.invert=function(Sr,Or){return[Sr/et,O(Or*et)]}),dr}function Ns(){var ve=1,be=0,Re=45*A,qe=2,et=t.geoProjectionMutator(Kl),Xe=et(ve,be,Re,qe);return Xe.a=function(it){return arguments.length?et(ve=+it,be,Re,qe):ve},Xe.b=function(it){return arguments.length?et(ve,be=+it,Re,qe):be},Xe.psiMax=function(it){return arguments.length?et(ve,be,Re=+it*A,qe):Re*P},Xe.ratio=function(it){return arguments.length?et(ve,be,Re,qe=+it):qe},Xe.scale(180.739)}function Hl(ve,be,Re,qe,et,Xe,it,Ft,Ht,tr,dr){if(dr.nanEncountered)return NaN;var Sr,Or,Wr,ni,Pi,cn,ln,Cn,Kn,Aa;if(Sr=Re-be,Or=ve(be+Sr*.25),Wr=ve(Re-Sr*.25),isNaN(Or)){dr.nanEncountered=!0;return}if(isNaN(Wr)){dr.nanEncountered=!0;return}return ni=Sr*(qe+4*Or+et)/12,Pi=Sr*(et+4*Wr+Xe)/12,cn=ni+Pi,Aa=(cn-it)/15,tr>Ht?(dr.maxDepthCount++,cn+Aa):Math.abs(Aa)<Ft?cn+Aa:(ln=be+Sr*.5,Cn=Hl(ve,be,ln,qe,Or,et,ni,Ft*.5,Ht,tr+1,dr),isNaN(Cn)?(dr.nanEncountered=!0,NaN):(Kn=Hl(ve,ln,Re,et,Wr,Xe,Pi,Ft*.5,Ht,tr+1,dr),isNaN(Kn)?(dr.nanEncountered=!0,NaN):Cn+Kn))}function ac(ve,be,Re,qe,et){var Xe={maxDepthCount:0,nanEncountered:!1};qe===void 0&&(qe=1e-8),et===void 0&&(et=20);var it=ve(be),Ft=ve(.5*(be+Re)),Ht=ve(Re),tr=(it+4*Ft+Ht)*(Re-be)/6,dr=Hl(ve,be,Re,it,Ft,Ht,tr,qe,et,1,Xe);return dr}function aa(ve,be,Re){function qe(Wr){return ve+(1-ve)*h(1-h(Wr,be),1/be)}function et(Wr){return ac(qe,0,Wr,1e-4)}for(var Xe=1/et(1),it=1e3,Ft=(1+1e-8)*Xe,Ht=[],tr=0;tr<=it;tr++)Ht.push(et(tr/it)*Ft);function dr(Wr){var ni=0,Pi=it,cn=it>>1;do Ht[cn]>Wr?Pi=cn:ni=cn,cn=ni+Pi>>1;while(cn>ni);var ln=Ht[cn+1]-Ht[cn];return ln&&(ln=(Wr-Ht[cn+1])/ln),(cn+1+ln)/it}var Sr=2*dr(1)/E*Xe/Re,Or=function(Wr,ni){var Pi=dr(n(_(ni))),cn=qe(Pi)*Wr;return Pi/=Sr,[cn,ni>=0?Pi:-Pi]};return Or.invert=function(Wr,ni){var Pi;return ni*=Sr,n(ni)<1&&(Pi=v(ni)*O(et(n(ni))*Xe)),[Wr/qe(n(ni)),Pi]},Or}function Oo(){var ve=0,be=2.5,Re=1.183136,qe=t.geoProjectionMutator(aa),et=qe(ve,be,Re);return et.alpha=function(Xe){return arguments.length?qe(ve=+Xe,be,Re):ve},et.k=function(Xe){return arguments.length?qe(ve,be=+Xe,Re):be},et.gamma=function(Xe){return arguments.length?qe(ve,be,Re=+Xe):Re},et.scale(152.63)}function qo(ve,be){return n(ve[0]-be[0])<p&&n(ve[1]-be[1])<p}function ql(ve,be){for(var Re=-1,qe=ve.length,et=ve[0],Xe,it,Ft,Ht=[];++Re<qe;){Xe=ve[Re],it=(Xe[0]-et[0])/be,Ft=(Xe[1]-et[1])/be;for(var tr=0;tr<be;++tr)Ht.push([et[0]+tr*it,et[1]+tr*Ft]);et=Xe}return Ht.push(Xe),Ht}function Pc(ve){var be=[],Re,qe,et,Xe,it,Ft,Ht,tr=ve[0].length;for(Ht=0;Ht<tr;++Ht)Re=ve[0][Ht],qe=Re[0][0],et=Re[0][1],Xe=Re[1][1],it=Re[2][0],Ft=Re[2][1],be.push(ql([[qe+p,et+p],[qe+p,Xe-p],[it-p,Xe-p],[it-p,Ft+p]],30));for(Ht=ve[1].length-1;Ht>=0;--Ht)Re=ve[1][Ht],qe=Re[0][0],et=Re[0][1],Xe=Re[1][1],it=Re[2][0],Ft=Re[2][1],be.push(ql([[it-p,Ft-p],[it-p,Xe+p],[qe+p,Xe+p],[qe+p,et-p]],30));return{type:\"Polygon\",coordinates:[r.merge(be)]}}function Do(ve,be,Re){var qe,et;function Xe(Ht,tr){for(var dr=tr<0?-1:1,Sr=be[+(tr<0)],Or=0,Wr=Sr.length-1;Or<Wr&&Ht>Sr[Or][2][0];++Or);var ni=ve(Ht-Sr[Or][1][0],tr);return ni[0]+=ve(Sr[Or][1][0],dr*tr>dr*Sr[Or][0][1]?Sr[Or][0][1]:tr)[0],ni}Re?Xe.invert=Re(Xe):ve.invert&&(Xe.invert=function(Ht,tr){for(var dr=et[+(tr<0)],Sr=be[+(tr<0)],Or=0,Wr=dr.length;Or<Wr;++Or){var ni=dr[Or];if(ni[0][0]<=Ht&&Ht<ni[1][0]&&ni[0][1]<=tr&&tr<ni[1][1]){var Pi=ve.invert(Ht-ve(Sr[Or][1][0],0)[0],tr);return Pi[0]+=Sr[Or][1][0],qo(Xe(Pi[0],Pi[1]),[Ht,tr])?Pi:null}}});var it=t.geoProjection(Xe),Ft=it.stream;return it.stream=function(Ht){var tr=it.rotate(),dr=Ft(Ht),Sr=(it.rotate([0,0]),Ft(Ht));return it.rotate(tr),dr.sphere=function(){t.geoStream(qe,Sr)},dr},it.lobes=function(Ht){return arguments.length?(qe=Pc(Ht),be=Ht.map(function(tr){return tr.map(function(dr){return[[dr[0][0]*A,dr[0][1]*A],[dr[1][0]*A,dr[1][1]*A],[dr[2][0]*A,dr[2][1]*A]]})}),et=be.map(function(tr){return tr.map(function(dr){var Sr=ve(dr[0][0],dr[0][1])[0],Or=ve(dr[2][0],dr[2][1])[0],Wr=ve(dr[1][0],dr[0][1])[1],ni=ve(dr[1][0],dr[1][1])[1],Pi;return Wr>ni&&(Pi=Wr,Wr=ni,ni=Pi),[[Sr,Wr],[Or,ni]]})}),it):be.map(function(tr){return tr.map(function(dr){return[[dr[0][0]*P,dr[0][1]*P],[dr[1][0]*P,dr[1][1]*P],[dr[2][0]*P,dr[2][1]*P]]})})},be!=null&&it.lobes(be),it}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vf(){return Do(St,rf).scale(160.857)}var pl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(Ol,pl).scale(152.63)}var Jl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Os(){return Do(sr,Jl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(sr,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,ot).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Lf(){return Do(_t,jh).scale(152.63).rotate([-20,0])}function cs(ve,be){return[3/g*ve*G(E*E/3-be*be),be]}cs.invert=function(ve,be){return[g/3*ve/G(E*E/3-be*be),be]};function nf(){return t.geoProjection(cs).scale(158.837)}function Gf(ve){function be(Re,qe){if(n(n(qe)-T)<p)return[0,qe<0?-2:2];var et=_(qe),Xe=h((1+et)/(1-et),ve/2),it=.5*(Xe+1/Xe)+o(Re*=ve);return[2*_(Re)/it,(Xe-1/Xe)/it]}return be.invert=function(Re,qe){var et=n(qe);if(n(et-2)<p)return Re?null:[0,v(qe)*T];if(et>2)return null;Re/=2,qe/=2;var Xe=Re*Re,it=qe*qe,Ft=2*qe/(1+Xe+it);return Ft=h((1+Ft)/(1-Ft),1/ve),[a(2*Re,1-Xe-it)/ve,O((Ft-1)/(Ft+1))]},be}function $l(){var ve=.5,be=t.geoProjectionMutator(Gf),Re=be(ve);return Re.spacing=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(124.75)}var fl=E/C;function lc(ve,be){return[ve*(1+G(o(be)))/2,be/(o(be/2)*o(ve/6))]}lc.invert=function(ve,be){var Re=n(ve),qe=n(be),et=p,Xe=T;qe<fl?Xe*=qe/fl:et+=6*U(fl/qe);for(var it=0;it<25;it++){var Ft=_(Xe),Ht=G(o(Xe)),tr=_(Xe/2),dr=o(Xe/2),Sr=_(et/6),Or=o(et/6),Wr=.5*et*(1+Ht)-Re,ni=Xe/(dr*Or)-qe,Pi=Ht?-.25*et*Ft/Ht:0,cn=.5*(1+Ht),ln=(1+.5*Xe*tr/dr)/(dr*Or),Cn=Xe/dr*(Sr/6)/(Or*Or),Kn=Pi*Cn-ln*cn,Aa=(Wr*Cn-ni*cn)/Kn,fa=(ni*Pi-Wr*ln)/Kn;if(Xe-=Aa,et-=fa,n(Aa)<p&&n(fa)<p)break}return[ve<0?-et:et,be<0?-Xe:Xe]};function Fu(){return t.geoProjection(lc).scale(97.2672)}function Es(ve,be){var Re=ve*ve,qe=be*be;return[ve*(.975534+qe*(-.119161+Re*-.0143059+qe*-.0547009)),be*(1.00384+Re*(.0802894+qe*-.02855+Re*199025e-9)+qe*(.0998909+qe*-.0491032))]}Es.invert=function(ve,be){var Re=v(ve)*E,qe=be/2,et=50;do{var Xe=Re*Re,it=qe*qe,Ft=Re*qe,Ht=Re*(.975534+it*(-.119161+Xe*-.0143059+it*-.0547009))-ve,tr=qe*(1.00384+Xe*(.0802894+it*-.02855+Xe*199025e-9)+it*(.0998909+it*-.0491032))-be,dr=.975534-it*(.119161+3*Xe*.0143059+it*.0547009),Sr=-Ft*(2*.119161+4*.0547009*it+2*.0143059*Xe),Or=Ft*(2*.0802894+4*199025e-9*Xe+2*-.02855*it),Wr=1.00384+Xe*(.0802894+199025e-9*Xe)+it*(3*(.0998909-.02855*Xe)-5*.0491032*it),ni=Sr*Or-Wr*dr,Pi=(tr*Sr-Ht*Wr)/ni,cn=(Ht*Or-tr*dr)/ni;Re-=Pi,qe-=cn}while((n(Pi)>p||n(cn)>p)&&--et>0);return et&&[Re,qe]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,be){return[_(ve)/o(be),b(be)*o(ve)]}Go.invert=function(ve,be){var Re=ve*ve,qe=be*be,et=qe+1,Xe=Re+et,it=ve?x*G((Xe-G(Xe*Xe-4*Re))/Re):1/G(et);return[O(ve*it),v(be)*U(it)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var be=o(ve),Re=b(L+ve/2);function qe(et,Xe){var it=Xe-ve,Ft=n(it)<p?et*be:n(Ft=L+Xe/2)<p||n(n(Ft)-T)<p?0:et*it/u(b(Ft)/Re);return[Ft,it]}return qe.invert=function(et,Xe){var it,Ft=Xe+ve;return[n(Xe)<p?et/be:n(it=L+Ft/2)<p||n(n(it)-T)<p?0:et*u(b(it)/Re)/Xe,Ft]},qe}function xl(){return Gt(uc).parallel(40).scale(158.837)}function Gu(ve,be){return[ve,1.25*u(b(L+.4*be))]}Gu.invert=function(ve,be){return[ve,2.5*i(s(.8*be))-.625*E]};function qs(){return t.geoProjection(Gu).scale(108.318)}function od(ve){var be=ve.length-1;function Re(qe,et){for(var Xe=o(et),it=2/(1+Xe*o(qe)),Ft=it*Xe*_(qe),Ht=it*_(et),tr=be,dr=ve[tr],Sr=dr[0],Or=dr[1],Wr;--tr>=0;)dr=ve[tr],Sr=dr[0]+Ft*(Wr=Sr)-Ht*Or,Or=dr[1]+Ft*Or+Ht*Wr;return Sr=Ft*(Wr=Sr)-Ht*Or,Or=Ft*Or+Ht*Wr,[Sr,Or]}return Re.invert=function(qe,et){var Xe=20,it=qe,Ft=et;do{for(var Ht=be,tr=ve[Ht],dr=tr[0],Sr=tr[1],Or=0,Wr=0,ni;--Ht>=0;)tr=ve[Ht],Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=tr[0]+it*(ni=dr)-Ft*Sr,Sr=tr[1]+it*Sr+Ft*ni;Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=it*(ni=dr)-Ft*Sr-qe,Sr=it*Sr+Ft*ni-et;var Pi=Or*Or+Wr*Wr,cn,ln;it-=cn=(dr*Or+Sr*Wr)/Pi,Ft-=ln=(Sr*Or-dr*Wr)/Pi}while(n(cn)+n(ln)>p*p&&--Xe>0);if(Xe){var Cn=G(it*it+Ft*Ft),Kn=2*i(Cn*.5),Aa=_(Kn);return[a(it*Aa,Cn*o(Kn)),Cn?O(Ft*Aa/Cn):0]}},Re}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],sd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ko=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(sd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return Bl(Ko,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,be){var Re=t.geoProjection(od(ve)).rotate(be).clipAngle(90),qe=t.geoRotation(be),et=Re.center;return delete Re.rotate,Re.center=function(Xe){return arguments.length?et(qe(Xe)):qe.invert(et())},Re}var Ah=G(6),Qf=G(7);function _f(ve,be){var Re=O(7*_(be)/(3*Ah));return[Ah*ve*(2*o(2*Re/3)-1)/Qf,9*_(Re/3)/Qf]}_f.invert=function(ve,be){var Re=3*O(be*Qf/9);return[ve*Qf/(Ah*(2*o(2*Re/3)-1)),O(_(Re)*3*Ah/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,be){for(var Re=(1+x)*_(be),qe=be,et=0,Xe;et<25&&(qe-=Xe=(_(qe/2)+_(qe)-Re)/(.5*o(qe/2)+o(qe)),!(n(Xe)<p));et++);return[ve*(1+2*o(qe)/o(qe/2))/(3*C),2*G(3)*_(qe/2)/G(2+C)]}eh.invert=function(ve,be){var Re=be*G(2+C)/(2*G(3)),qe=2*O(Re);return[3*C*ve/(1+2*o(qe)/o(qe/2)),O((Re+_(qe))/(1+x))]};function th(){return t.geoProjection(eh).scale(188.209)}function ju(ve,be){for(var Re=G(6/(4+E)),qe=(1+E/4)*_(be),et=be/2,Xe=0,it;Xe<25&&(et-=it=(et/2+_(et)-qe)/(.5+o(et)),!(n(it)<p));Xe++);return[Re*(.5+o(et))*ve/1.5,Re*et]}ju.invert=function(ve,be){var Re=G(6/(4+E)),qe=be/Re;return n(n(qe)-T)<p&&(qe=qe<0?-T:T),[1.5*ve/(Re*(.5+o(qe))),O((qe/2+_(qe))/(1+E/4))]};function jf(){return t.geoProjection(ju).scale(166.518)}function cc(ve,be){var Re=be*be,qe=Re*Re,et=Re*qe;return[ve*(.84719-.13063*Re+et*et*(-.04515+.05494*Re-.02326*qe+.00331*et)),be*(1.01183+qe*qe*(-.02625+.01926*Re-.00396*qe))]}cc.invert=function(ve,be){var Re=be,qe=25,et,Xe,it,Ft;do Xe=Re*Re,it=Xe*Xe,Re-=et=(Re*(1.01183+it*it*(-.02625+.01926*Xe-.00396*it))-be)/(1.01183+it*it*(9*-.02625+11*.01926*Xe+13*-.00396*it));while(n(et)>k&&--qe>0);return Xe=Re*Re,it=Xe*Xe,Ft=Xe*it,[ve/(.84719-.13063*Xe+Ft*Ft*(-.04515+.05494*Xe-.02326*it+.00331*Ft)),Re]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,be){return[ve*(1+o(be))/2,2*(be-b(be/2))]}Nl.invert=function(ve,be){for(var Re=be/2,qe=0,et=1/0;qe<10&&n(et)>p;++qe){var Xe=o(be/2);be-=et=(be-b(be/2)-Re)/(1-.5/(Xe*Xe))}return[2*ve/(1+o(be)),be]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gs(){return Do(je(1/0),Rc).rotate([20,0]).scale(152.63)}function Wf(ve,be){var Re=_(be),qe=o(be),et=v(ve);if(ve===0||n(be)===T)return[0,be];if(be===0)return[ve,0];if(n(ve)===T)return[ve*qe,T*Re];var Xe=E/(2*ve)-2*ve/E,it=2*be/E,Ft=(1-it*it)/(Re-it),Ht=Xe*Xe,tr=Ft*Ft,dr=1+Ht/tr,Sr=1+tr/Ht,Or=(Xe*Re/Ft-Xe/2)/dr,Wr=(tr*Re/Ht+Ft/2)/Sr,ni=Or*Or+qe*qe/dr,Pi=Wr*Wr-(tr*Re*Re/Ht+Ft*Re-1)/Sr;return[T*(Or+G(ni)*et),T*(Wr+G(Pi<0?0:Pi)*v(-be*Xe)*et)]}Wf.invert=function(ve,be){ve/=T,be/=T;var Re=ve*ve,qe=be*be,et=Re+qe,Xe=E*E;return[ve?(et-1+G((1-et)*(1-et)+4*Re))/(2*ve)*T:0,Vt(function(it){return et*(E*_(it)-2*it)*E+4*it*it*(be-_(it))+2*E*it-Xe*be},0)]};function Wh(){return t.geoProjection(Wf).scale(127.267)}var rh=1.0148,sf=.23185,Sh=-.14499,Mu=.02406,ih=rh,js=5*sf,Eu=7*Sh,Dc=9*Mu,ks=1.790857183;function bc(ve,be){var Re=be*be;return[ve,be*(rh+Re*Re*(sf+Re*(Sh+Mu*Re)))]}bc.invert=function(ve,be){be>ks?be=ks:be<-ks&&(be=-ks);var Re=be,qe;do{var et=Re*Re;Re-=qe=(Re*(rh+et*et*(sf+et*(Sh+Mu*et)))-be)/(ih+et*et*(js+et*(Eu+Dc*et)))}while(n(qe)>p);return[ve,Re]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,be){if(n(be)<p)return[ve,0];var Re=b(be),qe=ve*_(be);return[_(qe)/Re,be+(1-o(qe))/Re]}_u.invert=function(ve,be){if(n(be)<p)return[ve,0];var Re=ve*ve+be*be,qe=be*.5,et=10,Xe;do{var it=b(qe),Ft=1/o(qe),Ht=Re-2*be*qe+qe*qe;qe-=Xe=(it*Ht+2*(qe-be))/(2+Ht*Ft*Ft+2*(qe-be)*it)}while(n(Xe)>p&&--et>0);return it=b(qe),[(n(be)<n(qe+1/it)?O(ve*it):v(be)*v(ve)*(U(n(ve*it))+T))/_(qe),qe]};function nl(){return t.geoProjection(_u).scale(103.74)}function nh(ve,be){var Re=Fc(ve[1],ve[0]),qe=Fc(be[1],be[0]),et=bd(Re,qe),Xe=wc(Re)/wc(qe);return zu([1,0,ve[0][0],0,1,ve[0][1]],zu([Xe,0,0,0,Xe,0],zu([o(et),_(et),0,-_(et),o(et),0],[1,0,-be[0][0],0,1,-be[0][1]])))}function Mh(ve){var be=1/(ve[0]*ve[4]-ve[1]*ve[3]);return[be*ve[4],-be*ve[1],be*(ve[1]*ve[5]-ve[2]*ve[4]),-be*ve[3],be*ve[0],be*(ve[2]*ve[3]-ve[0]*ve[5])]}function zu(ve,be){return[ve[0]*be[0]+ve[1]*be[3],ve[0]*be[1]+ve[1]*be[4],ve[0]*be[2]+ve[1]*be[5]+ve[2],ve[3]*be[0]+ve[4]*be[3],ve[3]*be[1]+ve[4]*be[4],ve[3]*be[2]+ve[4]*be[5]+ve[5]]}function Fc(ve,be){return[ve[0]-be[0],ve[1]-be[1]]}function wc(ve){return G(ve[0]*ve[0]+ve[1]*ve[1])}function bd(ve,be){return a(ve[0]*be[1]-ve[1]*be[0],ve[0]*be[0]+ve[1]*be[1])}function xf(ve,be,Re){qe(ve,{transform:null});function qe(tr,dr){if(tr.edges=jl(tr.face),dr.face){var Sr=tr.shared=bf(tr.face,dr.face),Or=nh(Sr.map(dr.project),Sr.map(tr.project));tr.transform=dr.transform?zu(dr.transform,Or):Or;for(var Wr=dr.edges,ni=0,Pi=Wr.length;ni<Pi;++ni)Ou(Sr[0],Wr[ni][1])&&Ou(Sr[1],Wr[ni][0])&&(Wr[ni]=tr),Ou(Sr[0],Wr[ni][0])&&Ou(Sr[1],Wr[ni][1])&&(Wr[ni]=tr);for(Wr=tr.edges,ni=0,Pi=Wr.length;ni<Pi;++ni)Ou(Sr[0],Wr[ni][0])&&Ou(Sr[1],Wr[ni][1])&&(Wr[ni]=dr),Ou(Sr[0],Wr[ni][1])&&Ou(Sr[1],Wr[ni][0])&&(Wr[ni]=dr)}else tr.transform=dr.transform;return tr.children&&tr.children.forEach(function(cn){qe(cn,tr)}),tr}function et(tr,dr){var Sr=be(tr,dr),Or=Sr.project([tr*P,dr*P]),Wr;return(Wr=Sr.transform)?[Wr[0]*Or[0]+Wr[1]*Or[1]+Wr[2],-(Wr[3]*Or[0]+Wr[4]*Or[1]+Wr[5])]:(Or[1]=-Or[1],Or)}lf(ve)&&(et.invert=function(tr,dr){var Sr=Xe(ve,[tr,-dr]);return Sr&&(Sr[0]*=A,Sr[1]*=A,Sr)});function Xe(tr,dr){var Sr=tr.project.invert,Or=tr.transform,Wr=dr;if(Or&&(Or=Mh(Or),Wr=[Or[0]*Wr[0]+Or[1]*Wr[1]+Or[2],Or[3]*Wr[0]+Or[4]*Wr[1]+Or[5]]),Sr&&tr===it(ni=Sr(Wr)))return ni;for(var ni,Pi=tr.children,cn=0,ln=Pi&&Pi.length;cn<ln;++cn)if(ni=Xe(Pi[cn],dr))return ni}function it(tr){return be(tr[0]*A,tr[1]*A)}var Ft=t.geoProjection(et),Ht=Ft.stream;return Ft.stream=function(tr){var dr=Ft.rotate(),Sr=Ht(tr),Or=(Ft.rotate([0,0]),Ht(tr));return Ft.rotate(dr),Sr.sphere=function(){Or.polygonStart(),Or.lineStart(),Pf(Or,ve),Or.lineEnd(),Or.polygonEnd()},Sr},Ft.angle(Re==null?-30:Re*P)}function Pf(ve,be,Re){var qe,et=be.edges,Xe=et.length,it,Ft={type:\"MultiPoint\",coordinates:be.face},Ht=be.face.filter(function(Pi){return n(Pi[1])!==90}),tr=t.geoBounds({type:\"MultiPoint\",coordinates:Ht}),dr=!1,Sr=-1,Or=tr[1][0]-tr[0][0],Wr=Or===180||Or===360?[(tr[0][0]+tr[1][0])/2,(tr[0][1]+tr[1][1])/2]:t.geoCentroid(Ft);if(Re)for(;++Sr<Xe&&et[Sr]!==Re;);++Sr;for(var ni=0;ni<Xe;++ni)it=et[(ni+Sr)%Xe],Array.isArray(it)?(dr||(ve.point((qe=t.geoInterpolate(it[0],Wr)(p))[0],qe[1]),dr=!0),ve.point((qe=t.geoInterpolate(it[1],Wr)(p))[0],qe[1])):(dr=!1,it!==Re&&Pf(ve,it,be))}function Ou(ve,be){return ve&&be&&ve[0]===be[0]&&ve[1]===be[1]}function bf(ve,be){for(var Re,qe,et=ve.length,Xe=null,it=0;it<et;++it){Re=ve[it];for(var Ft=be.length;--Ft>=0;)if(qe=be[Ft],Re[0]===qe[0]&&Re[1]===qe[1]){if(Xe)return[Xe,Re];Xe=Re}}}function jl(ve){for(var be=ve.length,Re=[],qe=ve[be-1],et=0;et<be;++et)Re.push([qe,qe=ve[et]]);return Re}function lf(ve){return ve.project.invert||ve.children&&ve.children.some(lf)}var Xh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],If=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(ve){return ve.map(function(be){return Xh[be]})});function Cs(ve){ve=ve||function(Re){var qe=t.geoCentroid({type:\"MultiPoint\",coordinates:Re});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-qe[0],-qe[1]])};var be=If.map(function(Re){return{face:Re,project:ve(Re)}});return[-1,0,0,1,0,1,4,5].forEach(function(Re,qe){var et=be[Re];et&&(et.children||(et.children=[])).push(be[qe])}),xf(be[0],function(Re,qe){return be[Re<-E/2?qe<0?6:4:Re<0?qe<0?2:0:Re<E/2?qe<0?3:1:qe<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var du=2/G(3);function ku(ve,be){var Re=xt(ve,be);return[Re[0]*du,Re[1]]}ku.invert=function(ve,be){return xt.invert(ve/du,be)};function Xf(ve){ve=ve||function(Re){var qe=t.geoCentroid({type:\"MultiPoint\",coordinates:Re});return t.geoProjection(ku).translate([0,0]).scale(1).rotate(qe[1]>0?[-qe[0],0]:[180-qe[0],180])};var be=If.map(function(Re){return{face:Re,project:ve(Re)}});return[-1,0,0,1,0,1,4,5].forEach(function(Re,qe){var et=be[Re];et&&(et.children||(et.children=[])).push(be[qe])}),xf(be[0],function(Re,qe){return be[Re<-E/2?qe<0?6:4:Re<0?qe<0?2:0:Re<E/2?qe<0?3:1:qe<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Us(ve){ve=ve||function(it){var Ft=it.length===6?t.geoCentroid({type:\"MultiPoint\",coordinates:it}):it[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Ft[0],-Ft[1]])};var be=If.map(function(it){for(var Ft=it.map(Rf),Ht=Ft.length,tr=Ft[Ht-1],dr,Sr=[],Or=0;Or<Ht;++Or)dr=Ft[Or],Sr.push(Wu([tr[0]*.9486832980505138+dr[0]*.31622776601683794,tr[1]*.9486832980505138+dr[1]*.31622776601683794,tr[2]*.9486832980505138+dr[2]*.31622776601683794]),Wu([dr[0]*.9486832980505138+tr[0]*.31622776601683794,dr[1]*.9486832980505138+tr[1]*.31622776601683794,dr[2]*.9486832980505138+tr[2]*.31622776601683794])),tr=dr;return Sr}),Re=[],qe=[-1,0,0,1,0,1,4,5];be.forEach(function(it,Ft){for(var Ht=If[Ft],tr=Ht.length,dr=Re[Ft]=[],Sr=0;Sr<tr;++Sr)be.push([Ht[Sr],it[(Sr*2+2)%(2*tr)],it[(Sr*2+1)%(2*tr)]]),qe.push(Ft),dr.push(zc(Rf(it[(Sr*2+2)%(2*tr)]),Rf(it[(Sr*2+1)%(2*tr)])))});var et=be.map(function(it){return{project:ve(it),face:it}});qe.forEach(function(it,Ft){var Ht=et[it];Ht&&(Ht.children||(Ht.children=[])).push(et[Ft])});function Xe(it,Ft){var Ht=o(Ft),tr=[Ht*o(it),Ht*_(it),_(Ft)],dr=it<-E/2?Ft<0?6:4:it<0?Ft<0?2:0:it<E/2?Ft<0?3:1:Ft<0?7:5,Sr=Re[dr];return et[wf(Sr[0],tr)<0?8+3*dr:wf(Sr[1],tr)<0?8+3*dr+1:wf(Sr[2],tr)<0?8+3*dr+2:dr]}return xf(et[0],Xe).angle(-30).scale(110.625).center([0,45])}function wf(ve,be){for(var Re=0,qe=ve.length,et=0;Re<qe;++Re)et+=ve[Re]*be[Re];return et}function zc(ve,be){return[ve[1]*be[2]-ve[2]*be[1],ve[2]*be[0]-ve[0]*be[2],ve[0]*be[1]-ve[1]*be[0]]}function Wu(ve){return[a(ve[1],ve[0])*P,O(c(-1,f(1,ve[2])))*P]}function Rf(ve){var be=ve[0]*A,Re=ve[1]*A,qe=o(Re);return[qe*o(be),qe*_(be),_(Re)]}function Xu(){}function uf(ve){if((Re=ve.length)<4)return!1;for(var be=0,Re,qe=ve[Re-1][1]*ve[0][0]-ve[Re-1][0]*ve[0][1];++be<Re;)qe+=ve[be-1][1]*ve[be][0]-ve[be-1][0]*ve[be][1];return qe<=0}function Zf(ve,be){for(var Re=be[0],qe=be[1],et=!1,Xe=0,it=ve.length,Ft=it-1;Xe<it;Ft=Xe++){var Ht=ve[Xe],tr=Ht[0],dr=Ht[1],Sr=ve[Ft],Or=Sr[0],Wr=Sr[1];dr>qe^Wr>qe&&Re<(Or-tr)*(qe-dr)/(Wr-dr)+tr&&(et=!et)}return et}function Wl(ve,be){var Re=be.stream,qe;if(!Re)throw new Error(\"invalid projection\");switch(ve&&ve.type){case\"Feature\":qe=Zu;break;case\"FeatureCollection\":qe=ah;break;default:qe=Tc;break}return qe(ve,Re)}function ah(ve,be){return{type:\"FeatureCollection\",features:ve.features.map(function(Re){return Zu(Re,be)})}}function Zu(ve,be){return{type:\"Feature\",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,be)}}function Oc(ve,be){return{type:\"GeometryCollection\",geometries:ve.geometries.map(function(Re){return Tc(Re,be)})}}function Tc(ve,be){if(!ve)return null;if(ve.type===\"GeometryCollection\")return Oc(ve,be);var Re;switch(ve.type){case\"Point\":Re=qc;break;case\"MultiPoint\":Re=qc;break;case\"LineString\":Re=cf;break;case\"MultiLineString\":Re=cf;break;case\"Polygon\":Re=fc;break;case\"MultiPolygon\":Re=fc;break;case\"Sphere\":Re=fc;break;default:return null}return t.geoStream(ve,be(Re)),Re.result()}var wl=[],vu=[],qc={point:function(ve,be){wl.push([ve,be])},result:function(){var ve=wl.length?wl.length<2?{type:\"Point\",coordinates:wl[0]}:{type:\"MultiPoint\",coordinates:wl}:null;return wl=[],ve}},cf={lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:\"LineString\",coordinates:vu[0]}:{type:\"MultiLineString\",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],be=[];return vu.forEach(function(Re){uf(Re)?ve.push([Re]):be.push(Re)}),be.forEach(function(Re){var qe=Re[0];ve.some(function(et){if(Zf(et[0],qe))return et.push(Re),!0})||ve.push([Re])}),vu=[],ve.length?ve.length>1?{type:\"MultiPolygon\",coordinates:ve}:{type:\"Polygon\",coordinates:ve[0]}:null}};function Bc(ve){var be=ve(T,0)[0]-ve(-T,0)[0];function Re(qe,et){var Xe=n(qe)<T,it=ve(Xe?qe:qe>0?qe-E:qe+E,et),Ft=(it[0]-it[1])*x,Ht=(it[0]+it[1])*x;if(Xe)return[Ft,Ht];var tr=be*x,dr=Ft>0^Ht>0?-1:1;return[dr*Ft-v(Ht)*tr,dr*Ht-v(Ft)*tr]}return ve.invert&&(Re.invert=function(qe,et){var Xe=(qe+et)*x,it=(et-qe)*x,Ft=n(Xe)<.5*be&&n(it)<.5*be;if(!Ft){var Ht=be*x,tr=Xe>0^it>0?-1:1,dr=-tr*qe+(it>0?1:-1)*Ht,Sr=-tr*et+(Xe>0?1:-1)*Ht;Xe=(-dr-Sr)*x,it=(dr-Sr)*x}var Or=ve.invert(Xe,it);return Ft||(Or[0]+=Xe>0?E:-E),Or}),t.geoProjection(Re).rotate([-90,-90,45]).clipAngle(180-.001)}function At(){return Bc(Li).scale(176.423)}function Xt(){return Bc(Lo).scale(111.48)}function Cr(ve,be){if(!(0<=(be=+be)&&be<=20))throw new Error(\"invalid digits\");function Re(tr){var dr=tr.length,Sr=2,Or=new Array(dr);for(Or[0]=+tr[0].toFixed(be),Or[1]=+tr[1].toFixed(be);Sr<dr;)Or[Sr]=tr[Sr],++Sr;return Or}function qe(tr){return tr.map(Re)}function et(tr){for(var dr=Re(tr[0]),Sr=[dr],Or=1;Or<tr.length;Or++){var Wr=Re(tr[Or]);(Wr.length>2||Wr[0]!=dr[0]||Wr[1]!=dr[1])&&(Sr.push(Wr),dr=Wr)}return Sr.length===1&&tr.length>1&&Sr.push(Re(tr[tr.length-1])),Sr}function Xe(tr){return tr.map(et)}function it(tr){if(tr==null)return tr;var dr;switch(tr.type){case\"GeometryCollection\":dr={type:\"GeometryCollection\",geometries:tr.geometries.map(it)};break;case\"Point\":dr={type:\"Point\",coordinates:Re(tr.coordinates)};break;case\"MultiPoint\":dr={type:tr.type,coordinates:qe(tr.coordinates)};break;case\"LineString\":dr={type:tr.type,coordinates:et(tr.coordinates)};break;case\"MultiLineString\":case\"Polygon\":dr={type:tr.type,coordinates:Xe(tr.coordinates)};break;case\"MultiPolygon\":dr={type:\"MultiPolygon\",coordinates:tr.coordinates.map(Xe)};break;default:return tr}return tr.bbox!=null&&(dr.bbox=tr.bbox),dr}function Ft(tr){var dr={type:\"Feature\",properties:tr.properties,geometry:it(tr.geometry)};return tr.id!=null&&(dr.id=tr.id),tr.bbox!=null&&(dr.bbox=tr.bbox),dr}if(ve!=null)switch(ve.type){case\"Feature\":return Ft(ve);case\"FeatureCollection\":{var Ht={type:\"FeatureCollection\",features:ve.features.map(Ft)};return ve.bbox!=null&&(Ht.bbox=ve.bbox),Ht}default:return it(ve)}return ve}function Ar(ve){var be=_(ve);function Re(qe,et){var Xe=be?b(qe*be/2)/be:qe/2;if(!et)return[2*Xe,-ve];var it=2*i(Xe*_(et)),Ft=1/b(et);return[_(it)*Ft,et+(1-o(it))*Ft-ve]}return Re.invert=function(qe,et){if(n(et+=ve)<p)return[be?2*i(be*qe/2)/be:qe,0];var Xe=qe*qe+et*et,it=0,Ft=10,Ht;do{var tr=b(it),dr=1/o(it),Sr=Xe-2*et*it+it*it;it-=Ht=(tr*Sr+2*(it-et))/(2+Sr*dr*dr+2*(it-et)*tr)}while(n(Ht)>p&&--Ft>0);var Or=qe*(tr=b(it)),Wr=b(n(et)<n(it+1/tr)?O(Or)*.5:U(Or)*.5+E/4)/_(it);return[be?2*i(be*Wr)/be:2*Wr,it]},Re}function Kr(){return Gt(Ar).scale(131.215)}var ki=[[.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]];ki.forEach(function(ve){ve[1]*=1.0144});function Xi(ve,be){var Re=f(18,n(be)*36/E),qe=l(Re),et=Re-qe,Xe=(Sr=ki[qe])[0],it=Sr[1],Ft=(Sr=ki[++qe])[0],Ht=Sr[1],tr=(Sr=ki[f(19,++qe)])[0],dr=Sr[1],Sr;return[ve*(Ft+et*(tr-Xe)/2+et*et*(tr-2*Ft+Xe)/2),(be>0?T:-T)*(Ht+et*(dr-it)/2+et*et*(dr-2*Ht+it)/2)]}Xi.invert=function(ve,be){var Re=be/T,qe=Re*90,et=f(18,n(qe/5)),Xe=c(0,l(et));do{var it=ki[Xe][1],Ft=ki[Xe+1][1],Ht=ki[f(19,Xe+2)][1],tr=Ht-it,dr=Ht-2*Ft+it,Sr=2*(n(Re)-Ft)/tr,Or=dr/tr,Wr=Sr*(1-Or*Sr*(1-2*Or*Sr));if(Wr>=0||Xe===1){qe=(be>=0?5:-5)*(Wr+et);var ni=50,Pi;do et=f(18,n(qe)/5),Xe=l(et),Wr=et-Xe,it=ki[Xe][1],Ft=ki[Xe+1][1],Ht=ki[f(19,Xe+2)][1],qe-=(Pi=(be>=0?T:-T)*(Ft+Wr*(Ht-it)/2+Wr*Wr*(Ht-2*Ft+it)/2)-be)*P;while(n(Pi)>k&&--ni>0);break}}while(--Xe>=0);var cn=ki[Xe][0],ln=ki[Xe+1][0],Cn=ki[f(19,Xe+2)][0];return[ve/(ln+Wr*(Cn-cn)/2+Wr*Wr*(Cn-2*ln+cn)/2),qe*A]};function dn(){return t.geoProjection(Xi).scale(152.63)}function wn(ve){function be(Re,qe){var et=o(qe),Xe=(ve-1)/(ve-et*o(Re));return[Xe*et*_(Re),Xe*_(qe)]}return be.invert=function(Re,qe){var et=Re*Re+qe*qe,Xe=G(et),it=(ve-G(1-et*(ve+1)/(ve-1)))/((ve-1)/Xe+Xe/(ve-1));return[a(Re*it,Xe*G(1-it*it)),Xe?O(qe*it/Xe):0]},be}function Nn(ve,be){var Re=wn(ve);if(!be)return Re;var qe=o(be),et=_(be);function Xe(it,Ft){var Ht=Re(it,Ft),tr=Ht[1],dr=tr*et/(ve-1)+qe;return[Ht[0]*qe/dr,tr/dr]}return Xe.invert=function(it,Ft){var Ht=(ve-1)/(ve-1-Ft*et);return Re.invert(Ht*it,Ht*Ft*qe)},Xe}function Yi(){var ve=2,be=0,Re=t.geoProjectionMutator(Nn),qe=Re(ve,be);return qe.distance=function(et){return arguments.length?Re(ve=+et,be):ve},qe.tilt=function(et){return arguments.length?Re(ve,be=et*A):be*P},qe.scale(432.147).clipAngle(U(1/ve)*P-1e-6)}var Qi=1e-4,on=1e4,Fi=-180,Qn=Fi+Qi,Ca=180,Ra=Ca-Qi,La=-90,Na=La+Qi,Yn=90,Dn=Yn-Qi;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*on)/on}function Zo(ve){return ve===La||ve===Yn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var be=ve[0],Re=ve[1],qe=!1;return be<=Qn?(be=Fi,qe=!0):be>=Ra&&(be=Ca,qe=!0),Re<=Na?(Re=La,qe=!0):Re>=Dn&&(Re=Yn,qe=!0),qe?[be,Re]:ve}function as(ve){return ve.map(Ss)}function ws(ve,be,Re){for(var qe=0,et=ve.length;qe<et;++qe){var Xe=ve[qe].slice();Re.push({index:-1,polygon:be,ring:Xe});for(var it=0,Ft=Xe.length;it<Ft;++it){var Ht=Xe[it],tr=Ht[0],dr=Ht[1];if(tr<=Qn||tr>=Ra||dr<=Na||dr>=Dn){Xe[it]=Ss(Ht);for(var Sr=it+1;Sr<Ft;++Sr){var Or=Xe[Sr],Wr=Or[0],ni=Or[1];if(Wr>Qn&&Wr<Ra&&ni>Na&&ni<Dn)break}if(Sr===it+1)continue;if(it){var Pi={index:-1,polygon:be,ring:Xe.slice(0,it+1)};Pi.ring[Pi.ring.length-1]=Zo(dr),Re[Re.length-1]=Pi}else Re.pop();if(Sr>=Ft)break;Re.push({index:-1,polygon:be,ring:Xe=Xe.slice(Sr-1)}),Xe[0]=Zo(Xe[0][1]),it=-1,Ft=Xe.length}}}}function Ho(ve){var be,Re=ve.length,qe={},et={},Xe,it,Ft,Ht,tr;for(be=0;be<Re;++be){if(Xe=ve[be],it=Xe.ring[0],Ht=Xe.ring[Xe.ring.length-1],it[0]===Ht[0]&&it[1]===Ht[1]){Xe.polygon.push(Xe.ring),ve[be]=null;continue}Xe.index=be,qe[it]=et[Ht]=Xe}for(be=0;be<Re;++be)if(Xe=ve[be],Xe){if(it=Xe.ring[0],Ht=Xe.ring[Xe.ring.length-1],Ft=et[it],tr=qe[Ht],delete qe[it],delete et[Ht],it[0]===Ht[0]&&it[1]===Ht[1]){Xe.polygon.push(Xe.ring);continue}Ft?(delete et[it],delete qe[Ft.ring[0]],Ft.ring.pop(),ve[Ft.index]=null,Xe={index:-1,polygon:Ft.polygon,ring:Ft.ring.concat(Xe.ring)},Ft===tr?Xe.polygon.push(Xe.ring):(Xe.index=Re++,ve.push(qe[Xe.ring[0]]=et[Xe.ring[Xe.ring.length-1]]=Xe))):tr?(delete qe[Ht],delete et[tr.ring[tr.ring.length-1]],Xe.ring.pop(),Xe={index:Re++,polygon:tr.polygon,ring:Xe.ring.concat(tr.ring)},ve[tr.index]=null,ve.push(qe[Xe.ring[0]]=et[Xe.ring[Xe.ring.length-1]]=Xe)):(Xe.ring.push(Xe.ring[0]),Xe.polygon.push(Xe.ring))}}function ml(ve){var be={type:\"Feature\",geometry:Ws(ve.geometry)};return ve.id!=null&&(be.id=ve.id),ve.bbox!=null&&(be.bbox=ve.bbox),ve.properties!=null&&(be.properties=ve.properties),be}function Ws(ve){if(ve==null)return ve;var be,Re,qe,et;switch(ve.type){case\"GeometryCollection\":be={type:\"GeometryCollection\",geometries:ve.geometries.map(Ws)};break;case\"Point\":be={type:\"Point\",coordinates:Ss(ve.coordinates)};break;case\"MultiPoint\":case\"LineString\":be={type:ve.type,coordinates:as(ve.coordinates)};break;case\"MultiLineString\":be={type:\"MultiLineString\",coordinates:ve.coordinates.map(as)};break;case\"Polygon\":{var Xe=[];ws(ve.coordinates,Xe,Re=[]),Ho(Re),be={type:\"Polygon\",coordinates:Xe};break}case\"MultiPolygon\":{Re=[],qe=-1,et=ve.coordinates.length;for(var it=new Array(et);++qe<et;)ws(ve.coordinates[qe],it[qe]=[],Re);Ho(Re),be={type:\"MultiPolygon\",coordinates:it.filter(Ka)};break}default:return ve}return ve.bbox!=null&&(be.bbox=ve.bbox),be}function Ls(ve){if(ve==null)return ve;switch(ve.type){case\"Feature\":return ml(ve);case\"FeatureCollection\":{var be={type:\"FeatureCollection\",features:ve.features.map(ml)};return ve.bbox!=null&&(be.bbox=ve.bbox),be}default:return Ws(ve)}}function va(ve,be){var Re=b(be/2),qe=_(L*Re);return[ve*(.74482-.34588*qe*qe),1.70711*Re]}va.invert=function(ve,be){var Re=be/1.70711,qe=_(L*Re);return[ve/(.74482-.34588*qe*qe),2*i(Re)]};function no(){return t.geoProjection(va).scale(146.153)}function ys(ve,be,Re){var qe=t.geoInterpolate(be,Re),et=qe(.5),Xe=t.geoRotation([-et[0],-et[1]])(be),it=qe.distance/2,Ft=-O(_(Xe[1]*A)/_(it)),Ht=[-et[0],-et[1],-(Xe[0]>0?E-Ft:Ft)*P],tr=t.geoProjection(ve(it)).rotate(Ht),dr=t.geoRotation(Ht),Sr=tr.center;return delete tr.rotate,tr.center=function(Or){return arguments.length?Sr(dr(Or)):dr.invert(Sr())},tr.clipAngle(90)}function rs(ve){var be=o(ve);function Re(qe,et){var Xe=t.geoGnomonicRaw(qe,et);return Xe[0]*=be,Xe}return Re.invert=function(qe,et){return t.geoGnomonicRaw.invert(qe/be,et)},Re}function Ql(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,be){return ys(rs,ve,be)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var be=-ve/2,Re=-be,qe=ve*ve,et=b(Re),Xe=.5/_(Re);function it(Ft,Ht){var tr=U(o(Ht)*o(Ft-be)),dr=U(o(Ht)*o(Ft-Re)),Sr=Ht<0?-1:1;return tr*=tr,dr*=dr,[(tr-dr)/(2*ve),Sr*G(4*qe*dr-(qe-tr+dr)*(qe-tr+dr))/(2*ve)]}return it.invert=function(Ft,Ht){var tr=Ht*Ht,dr=o(G(tr+(Or=Ft+be)*Or)),Sr=o(G(tr+(Or=Ft+Re)*Or)),Or,Wr;return[a(Wr=dr-Sr,Or=(dr+Sr)*et),(Ht<0?-1:1)*U(G(Or*Or+Wr*Wr)*Xe)]},it}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,be){return ys(Yu,ve,be)}function Uc(ve,be){if(n(be)<p)return[ve,0];var Re=n(be/T),qe=O(Re);if(n(ve)<p||n(n(be)-T)<p)return[0,v(be)*E*b(qe/2)];var et=o(qe),Xe=n(E/ve-ve/E)/2,it=Xe*Xe,Ft=et/(Re+et-1),Ht=Ft*(2/Re-1),tr=Ht*Ht,dr=tr+it,Sr=Ft-tr,Or=it+Ft;return[v(ve)*E*(Xe*Sr+G(it*Sr*Sr-dr*(Ft*Ft-tr)))/dr,v(be)*E*(Ht*Or-Xe*G((it+1)*dr-Or*Or))/dr]}Uc.invert=function(ve,be){if(n(be)<p)return[ve,0];if(n(ve)<p)return[0,T*_(2*i(be/E))];var Re=(ve/=E)*ve,qe=(be/=E)*be,et=Re+qe,Xe=et*et,it=-n(be)*(1+et),Ft=it-2*qe+Re,Ht=-2*it+1+2*qe+Xe,tr=qe/Ht+(2*Ft*Ft*Ft/(Ht*Ht*Ht)-9*it*Ft/(Ht*Ht))/27,dr=(it-Ft*Ft/(3*Ht))/Ht,Sr=2*G(-dr/3),Or=U(3*tr/(dr*Sr))/3;return[E*(et-1+G(1+2*(Re-qe)+Xe))/(2*ve),v(be)*E*(-Sr*o(Or+E/3)-Ft/(3*Ht))]};function xu(){return t.geoProjection(Uc).scale(79.4183)}function Ac(ve,be){if(n(be)<p)return[ve,0];var Re=n(be/T),qe=O(Re);if(n(ve)<p||n(n(be)-T)<p)return[0,v(be)*E*b(qe/2)];var et=o(qe),Xe=n(E/ve-ve/E)/2,it=Xe*Xe,Ft=et*(G(1+it)-Xe*et)/(1+it*Re*Re);return[v(ve)*E*Ft,v(be)*E*G(1-Ft*(2*Xe+Ft))]}Ac.invert=function(ve,be){if(!ve)return[0,T*_(2*i(be/E))];var Re=n(ve/E),qe=(1-Re*Re-(be/=E)*be)/(2*Re),et=qe*qe,Xe=G(et+1);return[v(ve)*E*(Xe-qe),v(be)*T*_(2*a(G((1-2*qe*Re)*(qe+Xe)-Re),G(Xe+qe+Re)))]};function Ua(){return t.geoProjection(Ac).scale(79.4183)}function oo(ve,be){if(n(be)<p)return[ve,0];var Re=be/T,qe=O(Re);if(n(ve)<p||n(n(be)-T)<p)return[0,E*b(qe/2)];var et=(E/ve-ve/E)/2,Xe=Re/(1+o(qe));return[E*(v(ve)*G(et*et+1-Xe*Xe)-et),E*Xe]}oo.invert=function(ve,be){if(!be)return[ve,0];var Re=be/E,qe=(E*E*(1-Re*Re)-ve*ve)/(2*E*ve);return[ve?E*(v(ve)*G(qe*qe+1)-qe):0,T*_(2*i(Re))]};function Vc(){return t.geoProjection(oo).scale(79.4183)}function hc(ve,be){if(!be)return[ve,0];var Re=n(be);if(!ve||Re===T)return[0,be];var qe=Re/T,et=qe*qe,Xe=(8*qe-et*(et+2)-5)/(2*et*(qe-1)),it=Xe*Xe,Ft=qe*Xe,Ht=et+it+2*Ft,tr=qe+3*Xe,dr=ve/T,Sr=dr+1/dr,Or=v(n(ve)-T)*G(Sr*Sr-4),Wr=Or*Or,ni=Ht*(et+it*Wr-1)+(1-et)*(et*(tr*tr+4*it)+12*Ft*it+4*it*it),Pi=(Or*(Ht+it-1)+2*G(ni))/(4*Ht+Wr);return[v(ve)*T*Pi,v(be)*T*G(1+Or*n(Pi)-Pi*Pi)]}hc.invert=function(ve,be){var Re;if(!ve||!be)return[ve,be];be/=E;var qe=v(ve)*ve/T,et=(qe*qe-1+4*be*be)/n(qe),Xe=et*et,it=2*be,Ft=50;do{var Ht=it*it,tr=(8*it-Ht*(Ht+2)-5)/(2*Ht*(it-1)),dr=(3*it-Ht*it-10)/(2*Ht*it),Sr=tr*tr,Or=it*tr,Wr=it+tr,ni=Wr*Wr,Pi=it+3*tr,cn=ni*(Ht+Sr*Xe-1)+(1-Ht)*(Ht*(Pi*Pi+4*Sr)+Sr*(12*Or+4*Sr)),ln=-2*Wr*(4*Or*Sr+(1-4*Ht+3*Ht*Ht)*(1+dr)+Sr*(-6+14*Ht-Xe+(-8+8*Ht-2*Xe)*dr)+Or*(-8+12*Ht+(-10+10*Ht-Xe)*dr)),Cn=G(cn),Kn=et*(ni+Sr-1)+2*Cn-qe*(4*ni+Xe),Aa=et*(2*tr*dr+2*Wr*(1+dr))+ln/Cn-8*Wr*(et*(-1+Sr+ni)+2*Cn)*(1+dr)/(Xe+4*ni);it-=Re=Kn/Aa}while(Re>p&&--Ft>0);return[v(ve)*(G(et*et+4)+et)*E/4,T*it]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,be,Re,qe,et){function Xe(it,Ft){var Ht=Re*_(qe*Ft),tr=G(1-Ht*Ht),dr=G(2/(1+tr*o(it*=et)));return[ve*tr*dr*_(it),be*Ht*dr]}return Xe.invert=function(it,Ft){var Ht=it/ve,tr=Ft/be,dr=G(Ht*Ht+tr*tr),Sr=2*O(dr/2);return[a(it*b(Sr),ve*dr)/et,dr&&O(Ft*_(Sr)/(be*Re*dr))/qe]},Xe}function w(ve,be,Re,qe){var et=E/3;ve=c(ve,p),be=c(be,p),ve=f(ve,T),be=f(be,E-p),Re=c(Re,0),Re=f(Re,100-p),qe=c(qe,p);var Xe=Re/100+1,it=qe/100,Ft=U(Xe*o(et))/et,Ht=_(ve)/_(Ft*T),tr=be/E,dr=G(it*_(ve/2)/_(be/2)),Sr=dr/G(tr*Ht*Ft),Or=1/(dr*G(tr*Ht*Ft));return ue(Sr,Or,Ht,Ft,tr)}function B(){var ve=65*A,be=60*A,Re=20,qe=200,et=t.geoProjectionMutator(w),Xe=et(ve,be,Re,qe);return Xe.poleline=function(it){return arguments.length?et(ve=+it*A,be,Re,qe):ve*P},Xe.parallels=function(it){return arguments.length?et(ve,be=+it*A,Re,qe):be*P},Xe.inflation=function(it){return arguments.length?et(ve,be,Re=+it,qe):Re},Xe.ratio=function(it){return arguments.length?et(ve,be,Re,qe=+it):qe},Xe.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*G(3),le=2*G(2*E*G(3)/ee),Oe=$t(le*G(3)/E,le,ee/6);function Ze(){return t.geoProjection(Oe).scale(176.84)}function st(ve,be){return[ve*G(1-3*be*be/(E*E)),be]}st.invert=function(ve,be){return[ve/G(1-3*be*be/(E*E)),be]};function Tt(){return t.geoProjection(st).scale(152.63)}function Yt(ve,be){var Re=o(be),qe=o(ve)*Re,et=1-qe,Xe=o(ve=a(_(ve)*Re,-_(be))),it=_(ve);return Re=G(1-qe*qe),[it*Re-Xe*et,-Xe*Re-it*et]}Yt.invert=function(ve,be){var Re=(ve*ve+be*be)/-2,qe=G(-Re*(2+Re)),et=be*Re+ve*qe,Xe=ve*Re-be*qe,it=G(Xe*Xe+et*et);return[a(qe*et,it*(1+Re)),it?-O(qe*Xe/it):0]};function Kt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function xr(ve,be){var Re=Ce(ve,be);return[(Re[0]+ve/T)/2,(Re[1]+be)/2]}xr.invert=function(ve,be){var Re=ve,qe=be,et=25;do{var Xe=o(qe),it=_(qe),Ft=_(2*qe),Ht=it*it,tr=Xe*Xe,dr=_(Re),Sr=o(Re/2),Or=_(Re/2),Wr=Or*Or,ni=1-tr*Sr*Sr,Pi=ni?U(Xe*Sr)*G(cn=1/ni):cn=0,cn,ln=.5*(2*Pi*Xe*Or+Re/T)-ve,Cn=.5*(Pi*it+qe)-be,Kn=.5*cn*(tr*Wr+Pi*Xe*Sr*Ht)+.5/T,Aa=cn*(dr*Ft/4-Pi*it*Or),fa=.125*cn*(Ft*Or-Pi*it*tr*dr),$a=.5*cn*(Ht*Sr+Pi*Wr*Xe)+.5,Co=Aa*fa-$a*Kn,Qa=(Cn*Aa-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;Re-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[Re,qe]};function Ir(){return t.geoProjection(xr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=Le,e.geoAitoffRaw=Ce,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Se,e.geoBaker=me,e.geoBakerRaw=Pe,e.geoBerghaus=ce,e.geoBerghausRaw=De,e.geoBertin1953=Wt,e.geoBertin1953Raw=ut,e.geoBoggs=Qt,e.geoBoggsRaw=St,e.geoBonne=er,e.geoBonneRaw=mt,e.geoBottomley=wr,e.geoBottomleyRaw=lr,e.geoBromley=ti,e.geoBromleyRaw=Lr,e.geoChamberlin=tt,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=We,e.geoCollignon=Ie,e.geoCollignonRaw=xt,e.geoCraig=ke,e.geoCraigRaw=xe,e.geoCraster=ar,e.geoCrasterRaw=ir,e.geoCylindricalEqualArea=ii,e.geoCylindricalEqualAreaRaw=vr,e.geoCylindricalStereographic=$r,e.geoCylindricalStereographicRaw=pi,e.geoEckert1=ji,e.geoEckert1Raw=di,e.geoEckert2=wi,e.geoEckert2Raw=In,e.geoEckert3=qn,e.geoEckert3Raw=On,e.geoEckert4=ra,e.geoEckert4Raw=Fn,e.geoEckert5=Ut,e.geoEckert5Raw=la,e.geoEckert6=rr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=Er,e.geoFahey=Oi,e.geoFaheyRaw=Qr,e.geoFoucaut=tn,e.geoFoucautRaw=$i,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Xo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=Wn,e.geoGinzburg5=jn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=kr,e.geoGinzburg6Raw=Mt,e.geoGinzburg8=vi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=An,e.geoGinzburg9Raw=hn,e.geoGringorten=$n,e.geoGringortenRaw=Li,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=pt,e.geoHammerRaw=je,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Yl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=Ol,e.geoHufnagel=Ns,e.geoHufnagelRaw=Kl,e.geoHyperelliptical=Oo,e.geoHyperellipticalRaw=aa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Vf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=Os,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=cs,e.geoLagrange=$l,e.geoLagrangeRaw=Gf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=qs,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=od,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Hf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=Tr,e.geoMollweideRaw=sr,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=jf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Wh,e.geoNicolosiRaw=Wf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Xf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=At,e.geoPeirceQuincuncial=Xt,e.geoPierceQuincuncial=Xt,e.geoQuantize=Cr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=Ar,e.geoRobinson=dn,e.geoRobinsonRaw=Xi,e.geoSatellite=Yi,e.geoSatelliteRaw=Nn,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=It,e.geoSinusoidalRaw=_t,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=Ql,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Ze,e.geoWagner4Raw=Oe,e.geoWagner6=Tt,e.geoWagner6Raw=st,e.geoWiechel=Kt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=xr,Object.defineProperty(e,\"__esModule\",{value:!0})})});var GDe=ye((Imr,VDe)=>{\"use strict\";var nd=Oa(),UZ=Dr(),Ozt=qa(),r5=Math.PI/180,tw=180/Math.PI,GZ={cursor:\"pointer\"},HZ={cursor:\"auto\"};function qzt(e,t){var r=e.projection,n;return t._isScoped?n=Bzt:t._isClipped?n=Uzt:n=Nzt,n(e,r)}VDe.exports=qzt;function jZ(e,t){return nd.behavior.zoom().translate(t.translate()).scale(t.scale())}function WZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+\".\"+h]=UZ.nestedProperty(o,h).get(),Ozt.call(\"_storeDirectGUIEdit\",a,s._preGUI,u);var v=UZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),UZ.nestedProperty(o,h).set(d),c[n+\".\"+h]=d)}r(f),f(\"projection.scale\",t.scale()/e.fitScale),f(\"fitbounds\",!1),i.emit(\"plotly_relayout\",c)}function Bzt(e,t){var r=jZ(e,t);function n(){nd.select(this).style(GZ)}function i(){t.scale(nd.event.scale).translate(nd.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.center.lon\":s[0],\"geo.center.lat\":s[1]})}function a(s){var l=t.invert(e.midPt);s(\"center.lon\",l[0]),s(\"center.lat\",l[1])}function o(){nd.select(this).style(HZ),WZ(e,t,a)}return r.on(\"zoomstart\",n).on(\"zoom\",i).on(\"zoomend\",o),r}function Nzt(e,t){var r=jZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(E){return t.invert(E)}function v(E){var T=d(E);if(!T)return!0;var L=t(T);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function _(){nd.select(this).style(GZ),i=nd.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=nd.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nd.event.scale),t.translate([o[0],nd.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var E=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.center.lon\":T[0],\"geo.center.lat\":T[1],\"geo.projection.rotation.lon\":-E[0]})}function p(){nd.select(this).style(HZ),h&&WZ(e,t,k)}function k(E){var T=t.rotate(),L=t.invert(e.midPt);E(\"projection.rotation.lon\",-T[0]),E(\"center.lon\",L[0]),E(\"center.lat\",L[1])}return r.on(\"zoomstart\",_).on(\"zoom\",b).on(\"zoomend\",p),r}function Uzt(e,t){var r={r:t.rotate(),k:t.scale()},n=jZ(e,t),i=Yzt(n,\"zoomstart\",\"zoom\",\"zoomend\"),a=0,o=n.on,s;n.on(\"zoomstart\",function(){nd.select(this).style(GZ);var h=nd.mouse(this),d=t.rotate(),v=d,_=t.translate(),b=Vzt(d);s=zF(t,h),o.call(n,\"zoom\",function(){var p=nd.mouse(this);if(t.scale(r.k=nd.event.scale),!s)h=p,s=zF(t,h);else if(zF(t,p)){t.rotate(d).translate(_);var k=zF(t,p),E=Hzt(s,k),T=Wzt(Gzt(b,E)),L=r.r=jzt(T,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on(\"zoomend\",function(){nd.select(this).style(HZ),o.call(n,\"zoom\",null),c(i.of(this,arguments)),WZ(e,t,f)}).on(\"zoom.redraw\",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit(\"plotly_relayouting\",{\"geo.projection.scale\":t.scale()/e.fitScale,\"geo.projection.rotation.lon\":-h[0],\"geo.projection.rotation.lat\":-h[1]})});function l(h){a++||h({type:\"zoomstart\"})}function u(h){h({type:\"zoom\"})}function c(h){--a||h({type:\"zoomend\"})}function f(h){var d=t.rotate();h(\"projection.rotation.lon\",-d[0]),h(\"projection.rotation.lat\",-d[1])}return nd.rebind(n,i,\"on\")}function zF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&Xzt(r)}function Vzt(e){var t=.5*e[0]*r5,r=.5*e[1]*r5,n=.5*e[2]*r5,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Gzt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function Hzt(e,t){if(!(!e||!t)){var r=Zzt(e,t),n=Math.sqrt(UDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,UDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function jzt(e,t,r){var n=VZ(t,2,e[0]);n=VZ(n,1,e[1]),n=VZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*tw,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*tw-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,_=(Math.atan2(u,s)-Math.atan2(o,h))*tw,b=(Math.atan2(u,s)-Math.atan2(o,-h))*tw,p=BDe(r[0],r[1],d,_),k=BDe(r[0],r[1],v,b);return p<=k?[d,_,r[2]]:[v,b,r[2]]}function BDe(e,t,r,n){var i=NDe(r-e),a=NDe(n-t);return Math.sqrt(i*i+a*a)}function NDe(e){return(e%360+540)%360-180}function VZ(e,t,r){var n=r*r5,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function Wzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*tw,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*tw,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*tw]}function Xzt(e){var t=e[0]*r5,r=e[1]*r5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function UDe(e,t){for(var r=0,n=0,i=e.length;n<i;++n)r+=e[n]*t[n];return r}function Zzt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Yzt(e){for(var t=0,r=arguments.length,n=[];++t<r;)n.push(arguments[t]);var i=nd.dispatch.apply(null,n);return i.of=function(a,o){return function(s){var l;try{l=s.sourceEvent=nd.event,s.target=e,nd.event=s,i[s.type].apply(a,o)}finally{nd.event=l}}},i}});var KDe=ye((Rmr,YDe)=>{\"use strict\";var l1=Oa(),YZ=NZ(),Kzt=YZ.geoPath,Jzt=YZ.geoDistance,$zt=qDe(),Qzt=qa(),vk=Dr(),e7t=vk.strTranslate,OF=ka(),dk=So(),HDe=vf(),t7t=Mc(),ZZ=ho(),jDe=Mg().getAutoRange,XZ=yv(),r7t=Of().prepSelect,i7t=Of().clearOutline,n7t=Of().selectOnClick,a7t=GDe(),hp=uk(),o7t=hx(),XDe=bF(),s7t=SZ().feature;function ZDe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=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()}var tm=ZDe.prototype;YDe.exports=function(t){return new ZDe(t)};tm.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in hp.layerNameToAdjective)if(l!==\"frame\"&&a[\"show\"+l]){s=!0;break}for(var u=!1,c=0;c<e.length;c++){var f=e[0][0].trace;f._geo=i,f.locationmode&&(s=!0);var h=f.marker;if(h){var d=h.angle,v=h.angleref;(d||v===\"north\"||v===\"previous\")&&(u=!0)}}if(this._hasMarkerAngles=u,s){var _=XDe.getTopojsonName(a);(i.topojson===null||_!==i.topojsonName)&&(i.topojsonName=_,PlotlyGeoAssets.topojson[i.topojsonName]===void 0&&o.push(i.fetchTopojson()))}o=o.concat(o7t.fetchTraceGeoData(e)),r.push(new Promise(function(b,p){Promise.all(o).then(function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(e,t),b()}).catch(p)}))};tm.fetchTopojson=function(){var e=this,t=XDe.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise(function(r,n){l1.json(t,function(i,a){if(i)return i.status===404?n(new Error([\"plotly.js could not find topojson file at\",t+\".\",\"Make sure the *topojsonURL* plot config option\",\"is set properly.\"].join(\" \"))):n(new Error([\"unexpected error while fetching topojson file at\",t].join(\" \")));PlotlyGeoAssets.topojson[e.topojsonName]=a,r()})})};tm.update=function(e,t,r){var n=t[this.id];this.hasChoropleth=!1;for(var i=0;i<e.length;i++){var a=e[i],o=a[0].trace;o.type===\"choropleth\"&&(this.hasChoropleth=!0),o.visible===!0&&o._length>0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),t7t.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=l.selectAll(\".point\"),this.dataPoints.text=l.selectAll(\"text\"),this.dataPaths.line=l.selectAll(\".js-line\");var u=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=u.selectAll(\"path\"),this._render()};tm.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=l7t(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},_=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=jDe(r,u),c.range=jDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var E=o.type,T=hp.lonaxisSpan[E]/2||180,L=hp.lataxisSpan[E]/2||90;_=[p-T,p+T],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=WDe(_,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),M=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(WDe(u.range,c.range)),A=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(A)?f.scale(A*M):vk.warn(\"Something went wrong during\"+this.id+\"fitbounds computations.\")}else f.scale(o.scale*M);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var O=f([d.lon,d.lat]),U=f.translate();f.translate([U[0]-(O[0]-U[0]),U[1]-(O[1]-U[1])])}};tm.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h===\"lonaxis\"||h===\"lataxis\"}function s(h){return!!hp.lineLayers[h]}function l(h){return!!hp.fillLayers[h]}var u=this.hasChoropleth?hp.layersForChoropleth:hp.layers,c=u.filter(function(h){return s(h)||l(h)?t[\"show\"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(\".layer\").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],l1.select(this).remove()}),f.enter().append(\"g\").attr(\"class\",function(h){return\"layer \"+h}).each(function(h){var d=i[h]=l1.select(this);h===\"bg\"?r.bgRect=d.append(\"rect\").style(\"pointer-events\",\"all\"):o(h)?a[h]=d.append(\"path\").style(\"fill\",\"none\"):h===\"backplot\"?d.append(\"g\").classed(\"choroplethlayer\",!0):h===\"frontplot\"?d.append(\"g\").classed(\"scatterlayer\",!0):s(h)?a[h]=d.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):l(h)&&(a[h]=d.append(\"path\").style(\"stroke\",\"none\"))}),f.order(),f.each(function(h){var d=a[h],v=hp.layerNameToAdjective[h];h===\"frame\"?d.datum(hp.sphereSVG):s(h)||l(h)?d.datum(s7t(n,n.objects[h])):o(h)&&d.datum(u7t(h,t,e)).call(OF.stroke,t[h].gridcolor).call(dk.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(OF.stroke,t[v+\"color\"]).call(dk.dashLine,\"\",t[v+\"width\"]):l(h)&&d.call(OF.fill,t[v+\"color\"])})};tm.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;dk.setRect(this.clipRect,i,a,o,s),this.bgRect.call(dk.setRect,i,a,o,s).call(OF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};tm.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+\".\"+d]=f[d];Qzt.call(\"_guiRelayout\",n,h),n.emit(\"plotly_doubleclick\",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&i7t(n)}};a===\"pan\"?(i.node().onmousedown=null,i.call(a7t(r,t)),i.on(\"dblclick.zoom\",s),n._context._scrollZoom.geo||i.on(\"wheel.zoom\",null)):(a===\"select\"||a===\"lasso\")&&(i.on(\".zoom\",null),c.prepFn=function(f,h,d){r7t(f,h,d,c,a)},XZ.init(c)),i.on(\"mousemove\",function(){var f=r.projection.invert(vk.getPositionFromD3Event());if(!f)return XZ.unhover(n,l1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},HDe.hover(n,l1.event,r.id)}),i.on(\"mouseout\",function(){n._dragging||XZ.unhover(n,l1.event)}),i.on(\"click\",function(){a!==\"select\"&&a!==\"lasso\"&&(o.indexOf(\"select\")>-1&&n7t(l1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf(\"event\")>-1&&HDe.click(n,l1.event))})};tm.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n=\"clip\"+r._uid+e.id;e.clipDef=r._clips.append(\"clipPath\").attr(\"id\",n),e.clipRect=e.clipDef.append(\"rect\"),e.framework=l1.select(e.container).append(\"g\").attr(\"class\",\"geo \"+e.id).call(dk.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:\"x\",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:\"y\",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},ZZ.setConvert(e.mockAxis,r)};tm.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,\"projection.scale\":r.scale};var i;e._isScoped?i={\"center.lon\":t.lon,\"center.lat\":t.lat}:e._isClipped?i={\"projection.rotation.lon\":n.lon,\"projection.rotation.lat\":n.lat}:i={\"center.lon\":t.lon,\"center.lat\":t.lat,\"projection.rotation.lon\":n.lon},vk.extendFlat(this.viewInitial,i)};tm.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};tm._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?e7t(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?\"none\":null}for(r in this.basePaths)this.basePaths[r].attr(\"d\",t);for(r in this.dataPaths)this.dataPaths[r].attr(\"d\",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr(\"display\",i).attr(\"transform\",n)};function l7t(e){var t=e.projection,r=t.type,n=hp.projNames[r];n=\"geo\"+vk.titleCase(n);for(var i=YZ[n]||$zt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?hp.lonaxisSpan[r]/2:null,s=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],l=function(f){return f?a:[]},u=0;u<s.length;u++){var c=s[u];typeof a[c]!=\"function\"&&(a[c]=l)}return a.isLonLatOverEdges=function(f){if(a(f)===null)return!0;if(o){var h=a.rotate(),d=Jzt(f,[-h[0],-h[1]]),v=o*Math.PI/180;return d>v}else return!1},a.getPath=function(){return Kzt().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(hp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-hp.clipPad),a}function u7t(e,t,r){var n=1e-6,i=2.5,a=t[e],o=hp.scopeDefaults[t.scope],s,l,u;e===\"lonaxis\"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,E){return[k,E]}):e===\"lataxis\"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,E){return[E,k]});var c={type:\"linear\",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};ZZ.setConvert(c,r);var f=ZZ.calcTicks(c);!t.isScoped&&e===\"lonaxis\"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v<h;v++)for(var _=f[v].x,b=d[v]=[],p=l[0];p<l[1]+i;p+=i)b.push(u(_,p));return{type:\"MultiLineString\",coordinates:d}}function WDe(e,t){var r=hp.clipPad,n=e[0]+r,i=e[1]-r,a=t[0]+r,o=t[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",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]]]}}});var KZ=ye((Dmr,QDe)=>{\"use strict\";var n5=Ih(),c7t=Cc().attributes,f7t=Pd().dash,i5=uk(),h7t=mc().overrideAll,JDe=t_(),$De={range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},showgrid:{valType:\"boolean\",dflt:!1},tick0:{valType:\"number\",dflt:0},dtick:{valType:\"number\"},gridcolor:{valType:\"color\",dflt:n5.lightLine},gridwidth:{valType:\"number\",min:0,dflt:1},griddash:f7t},d7t=QDe.exports=h7t({domain:c7t({name:\"geo\"},{}),fitbounds:{valType:\"enumerated\",values:[!1,\"locations\",\"geojson\"],dflt:!1,editType:\"plot\"},resolution:{valType:\"enumerated\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\"enumerated\",values:JDe(i5.scopeDefaults),dflt:\"world\"},projection:{type:{valType:\"enumerated\",values:JDe(i5.projNames)},rotation:{lon:{valType:\"number\"},lat:{valType:\"number\"},roll:{valType:\"number\"}},tilt:{valType:\"number\",dflt:0},distance:{valType:\"number\",min:1.001,dflt:2},parallels:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},scale:{valType:\"number\",min:0,dflt:1}},center:{lon:{valType:\"number\"},lat:{valType:\"number\"}},visible:{valType:\"boolean\",dflt:!0},showcoastlines:{valType:\"boolean\"},coastlinecolor:{valType:\"color\",dflt:n5.defaultLine},coastlinewidth:{valType:\"number\",min:0,dflt:1},showland:{valType:\"boolean\",dflt:!1},landcolor:{valType:\"color\",dflt:i5.landColor},showocean:{valType:\"boolean\",dflt:!1},oceancolor:{valType:\"color\",dflt:i5.waterColor},showlakes:{valType:\"boolean\",dflt:!1},lakecolor:{valType:\"color\",dflt:i5.waterColor},showrivers:{valType:\"boolean\",dflt:!1},rivercolor:{valType:\"color\",dflt:i5.waterColor},riverwidth:{valType:\"number\",min:0,dflt:1},showcountries:{valType:\"boolean\"},countrycolor:{valType:\"color\",dflt:n5.defaultLine},countrywidth:{valType:\"number\",min:0,dflt:1},showsubunits:{valType:\"boolean\"},subunitcolor:{valType:\"color\",dflt:n5.defaultLine},subunitwidth:{valType:\"number\",min:0,dflt:1},showframe:{valType:\"boolean\"},framecolor:{valType:\"color\",dflt:n5.defaultLine},framewidth:{valType:\"number\",min:0,dflt:1},bgcolor:{valType:\"color\",dflt:n5.background},lonaxis:$De,lataxis:$De},\"plot\",\"from-root\");d7t.uirevision={valType:\"any\",editType:\"none\"}});var rFe=ye((Fmr,tFe)=>{\"use strict\";var qF=Dr(),v7t=O_(),p7t=Id().getSubplotData,BF=uk(),g7t=KZ(),eFe=BF.axesNames;tFe.exports=function(t,r,n){v7t(t,r,n,{type:\"geo\",attributes:g7t,handleDefaults:m7t,fullData:n,partition:\"y\"})};function m7t(e,t,r,n){var i=p7t(n.fullData,\"geo\",n.id),a=i.map(function(oe){return oe.index}),o=r(\"resolution\"),s=r(\"scope\"),l=BF.scopeDefaults[s],u=r(\"projection.type\",l.projType),c=t._isAlbersUsa=u===\"albers usa\";c&&(s=t.scope=\"usa\");var f=t._isScoped=s!==\"world\",h=t._isSatellite=u===\"satellite\",d=t._isConic=u.indexOf(\"conic\")!==-1||u===\"albers\",v=t._isClipped=!!BF.lonaxisSpan[u];if(e.visible===!1){var _=qF.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var b=r(\"visible\"),p,k=0;k<eFe.length;k++){var E=eFe[k],T=[30,10][k],L;if(f)L=l[E+\"Range\"];else{var x=BF[E+\"Span\"],C=(x[u]||x[\"*\"])/2,M=r(\"projection.rotation.\"+E.slice(0,3),l.projRotate[k]);L=[M-C,M+C]}var g=r(E+\".range\",L);r(E+\".tick0\"),r(E+\".dtick\",T),p=r(E+\".showgrid\",b?void 0:!1),p&&(r(E+\".gridcolor\"),r(E+\".gridwidth\"),r(E+\".griddash\")),t[E]._ax={type:\"linear\",_id:E.slice(0,3),_traceIndices:a,setScale:qF.identity,c2l:qF.identity,r2l:qF.identity,autorange:!0,range:g.slice(),_m:1,_input:{}}}var P=t.lonaxis.range,A=t.lataxis.range,z=P[0],O=P[1];z>0&&O<0&&(O+=360);var U=(z+O)/2,G;if(!c){var Z=f?l.projRotate:[U,0,0];G=r(\"projection.rotation.lon\",Z[0]),r(\"projection.rotation.lat\",Z[1]),r(\"projection.rotation.roll\",Z[2]),p=r(\"showcoastlines\",!f&&b),p&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),p=r(\"showocean\",b?void 0:!1),p&&r(\"oceancolor\")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?U:G,N=(A[0]+A[1])/2),r(\"center.lon\",j),r(\"center.lat\",N),h&&(r(\"projection.tilt\"),r(\"projection.distance\")),d){var H=l.projParallels||[0,60];r(\"projection.parallels\",H)}r(\"projection.scale\"),p=r(\"showland\",b?void 0:!1),p&&r(\"landcolor\"),p=r(\"showlakes\",b?void 0:!1),p&&r(\"lakecolor\"),p=r(\"showrivers\",b?void 0:!1),p&&(r(\"rivercolor\"),r(\"riverwidth\")),p=r(\"showcountries\",f&&s!==\"usa\"&&b),p&&(r(\"countrycolor\"),r(\"countrywidth\")),(s===\"usa\"||s===\"north america\"&&o===50)&&(r(\"showsubunits\",b),r(\"subunitcolor\"),r(\"subunitwidth\")),f||(p=r(\"showframe\",b),p&&(r(\"framecolor\"),r(\"framewidth\"))),r(\"bgcolor\");var re=r(\"fitbounds\");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var JZ=ye((zmr,aFe)=>{\"use strict\";var y7t=Id().getSubplotCalcData,_7t=Dr().counterRegex,x7t=KDe(),Qm=\"geo\",iFe=_7t(Qm),nFe={};nFe[Qm]={valType:\"subplotid\",dflt:Qm,editType:\"calc\"};function b7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Qm],i=0;i<n.length;i++){var a=n[i],o=y7t(r,Qm,a),s=t[a],l=s._subplot;l||(l=x7t({id:a,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[a]._subplot=l),l.plot(o,t,e._promises)}}function w7t(e,t,r,n){for(var i=n._subplots[Qm]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}function T7t(e){for(var t=e._fullLayout,r=t._subplots[Qm],n=0;n<r.length;n++){var i=t[r[n]],a=i._subplot;a.updateFx(t,i)}}aFe.exports={attr:Qm,name:Qm,idRoot:Qm,idRegex:iFe,attrRegex:iFe,attributes:nFe,layoutAttributes:KZ(),supplyLayoutDefaults:rFe(),plot:b7t,updateFx:T7t,clean:w7t}});var sFe=ye((Omr,oFe)=>{\"use strict\";oFe.exports={attributes:ew(),supplyDefaults:URe(),colorbar:$d(),formatLabels:HRe(),calc:_F(),calcGeoJSON:BZ().calcGeoJSON,plot:BZ().plot,style:FZ(),styleOnSelect:sp().styleOnSelect,hoverPoints:CDe(),eventData:PDe(),selectPoints:DDe(),moduleType:\"trace\",name:\"scattergeo\",basePlotModule:JZ(),categories:[\"geo\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var uFe=ye((qmr,lFe)=>{\"use strict\";lFe.exports=sFe()});var a5=ye((Bmr,hFe)=>{\"use strict\";var{hovertemplateAttrs:A7t,templatefallbackAttrs:S7t}=Ll(),vx=ew(),M7t=Tu(),cFe=Gl(),E7t=Ih().defaultLine,dx=Ao().extendFlat,fFe=vx.marker.line;hFe.exports=dx({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:vx.locationmode,z:{valType:\"data_array\",editType:\"calc\"},geojson:dx({},vx.geojson,{}),featureidkey:vx.featureidkey,text:dx({},vx.text,{}),hovertext:dx({},vx.hovertext,{}),marker:{line:{color:dx({},fFe.color,{dflt:E7t}),width:dx({},fFe.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:vx.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:vx.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:dx({},cFe.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]}),hovertemplate:A7t(),hovertemplatefallback:S7t(),showlegend:dx({},cFe.showlegend,{dflt:!1})},M7t(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var vFe=ye((Nmr,dFe)=>{\"use strict\";var pk=Dr(),k7t=td(),C7t=a5(),L7t=[\"The library used by the *country names* `locationmode` option is changing in the next major version.\",\"Some country names in existing plots may not work in the new version.\",\"To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.\"].join(\" \");dFe.exports=function(t,r,n,i){function a(h,d){return pk.coerce(t,r,C7t,h,d)}var o=a(\"locations\"),s=a(\"z\");if(!(o&&o.length&&pk.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a(\"geojson\"),u;(typeof l==\"string\"&&l!==\"\"||pk.isPlainObject(l))&&(u=\"geojson-id\");var c=a(\"locationmode\",u);c===\"country names\"&&pk.warn(L7t),c===\"geojson-id\"&&a(\"featureidkey\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var f=a(\"marker.line.width\");f&&a(\"marker.line.color\"),a(\"marker.opacity\"),k7t(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),pk.coerceSelectionMarkerOpacity(r,a)}});var NF=ye((Umr,mFe)=>{\"use strict\";var pFe=Eo(),P7t=fs().BADNUM,I7t=gv(),R7t=Rm(),D7t=O0();function gFe(e){return e&&typeof e==\"string\"}mFe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return gFe(c)||pFe(c)}:a=gFe;for(var o=0;o<n;o++){var s=i[o]={},l=r.locations[o],u=r.z[o];a(l)&&pFe(u)?(s.loc=l,s.z=u):(s.loc=null,s.z=P7t),s.index=o}return R7t(i,r),I7t(t,r,{vals:r.z,containerStr:\"\",cLetter:\"z\"}),D7t(i,r),i}});var UF=ye((Vmr,_Fe)=>{\"use strict\";var F7t=Oa(),z7t=ka(),$Z=So(),O7t=tc();function q7t(e,t){t&&yFe(e,t)}function yFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(\".choroplethlocation\"),a=r.marker||{},o=a.line||{},s=O7t.makeColorScaleFuncFromTrace(r);i.each(function(l){F7t.select(this).attr(\"fill\",s(l.z)).call(z7t.stroke,l.mlc||o.color).call($Z.dashLine,\"\",l.mlw||o.width||0).style(\"opacity\",a.opacity)}),$Z.selectedPointStyle(i,r)}function B7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?$Z.selectedPointStyle(r.selectAll(\".choroplethlocation\"),n):yFe(e,t)}_Fe.exports={style:q7t,styleOnSelect:B7t}});var QZ=ye((Gmr,wFe)=>{\"use strict\";var N7t=Oa(),xFe=Dr(),o5=hx(),U7t=bF().getTopojsonFeatures,bFe=Mg().findExtremes,V7t=UF().style;function G7t(e,t,r){var n=t.layers.backplot.select(\".choroplethlayer\");xFe.makeTraceGroups(n,r,\"trace choropleth\").each(function(i){var a=N7t.select(this),o=a.selectAll(\"path.choroplethlocation\").data(xFe.identity);o.enter().append(\"path\").classed(\"choroplethlocation\",!0),o.exit().remove(),V7t(e,i)})}function H7t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a===\"geojson-id\"?o5.extractTraceFeature(e):U7t(r,i.topojson),l=[],u=[],c=0;c<o;c++){var f=e[c],h=a===\"geojson-id\"?f.fOut:o5.locationToFeature(a,f.loc,s);if(h){f.geojson=h,f.ct=h.properties.ct,f._polygons=o5.feature2polygons(h);var d=o5.computeBbox(h);l.push(d[0],d[2]),u.push(d[1],d[3])}else f.geojson=null}if(n.fitbounds===\"geojson\"&&a===\"geojson-id\"){var v=o5.computeBbox(o5.getTraceGeojson(r));l=[v[0],v[2]],u=[v[1],v[3]]}var _={padded:!0};r._extremes.lon=bFe(n.lonaxis._ax,l,_),r._extremes.lat=bFe(n.lataxis._ax,u,_)}wFe.exports={calcGeoJSON:H7t,plot:G7t}});var VF=ye((Hmr,TFe)=>{\"use strict\";var j7t=ho(),W7t=a5(),X7t=Dr().fillText;TFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l<i.length;l++)if(s=i[l],c=!1,s._polygons){for(u=0;u<s._polygons.length;u++)s._polygons[u].contains(f)&&(c=!c),s._polygons[u].contains(h)&&(c=!c);if(c)break}if(!(!c||!s))return t.x0=t.x1=t.xa.c2p(s.ct),t.y0=t.y1=t.ya.c2p(s.ct),t.index=s.index,t.location=s.loc,t.z=s.z,t.zLabel=j7t.tickText(o.mockAxis,o.mockAxis.c2l(s.z),\"hover\").text,t.hovertemplate=s.hovertemplate,Z7t(t,a,s),[t]};function Z7t(e,t,r){if(!t.hovertemplate){var n=r.hi||t.hoverinfo,i=String(r.loc),a=n===\"all\"?W7t.hoverinfo.flags:n.split(\"+\"),o=a.indexOf(\"name\")!==-1,s=a.indexOf(\"location\")!==-1,l=a.indexOf(\"z\")!==-1,u=a.indexOf(\"text\")!==-1,c=!o&&s,f=[];c?e.nameOverride=i:(o&&(e.nameOverride=t.name),s&&f.push(i)),l&&f.push(e.zLabel),u&&X7t(r,t,f),e.extraText=f.join(\"<br>\")}}});var GF=ye((jmr,AFe)=>{\"use strict\";AFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var HF=ye((Wmr,SFe)=>{\"use strict\";SFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++)l=n[s],u=l.ct,u&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,s,t)?(o.push({pointNumber:s,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var EFe=ye((Xmr,MFe)=>{\"use strict\";MFe.exports={attributes:a5(),supplyDefaults:vFe(),colorbar:D_(),calc:NF(),calcGeoJSON:QZ().calcGeoJSON,plot:QZ().plot,style:UF().style,styleOnSelect:UF().styleOnSelect,hoverPoints:VF(),eventData:GF(),selectPoints:HF(),moduleType:\"trace\",name:\"choropleth\",basePlotModule:JZ(),categories:[\"geo\",\"noOpacity\",\"showLegend\"],meta:{}}});var CFe=ye((Zmr,kFe)=>{\"use strict\";kFe.exports=EFe()});var jF=ye((Ymr,PFe)=>{\"use strict\";var Y7t=qa(),l0=Dr(),K7t=gT();function J7t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var _=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n===\"x\"?v=a.tree.range(Math.min(_,b),Math.min(l._rl[0],l._rl[1]),Math.max(_,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(_,b),Math.min(p,k),Math.max(_,b),Math.max(p,k))}else v=a.ids;var E,T,L,x,C,M,g,P,A,z=d;if(n===\"x\"){var O=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C<v.length;C++){if(E=v[C],L=u[E],M=Math.abs(s.c2p(L)-f),O){var G=s.c2p(o._xStarts[E]),Z=s.c2p(o._xEnds[E]);M=f>=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(M<z){if(z=M,x=c[E],g=l.c2p(x)-h,U){var j=l.c2p(o._yStarts[E]),N=l.c2p(o._yEnds[E]);g=h>=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}A=Math.sqrt(M*M+g*g),T=v[C]}}}else for(C=v.length-1;C>-1;C--)E=v[C],L=u[E],x=c[E],M=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(M*M+g*g),P<z&&(z=A=P,T=E);return e.index=T,e.distance=z,e.dxy=A,T===void 0?[e]:[LFe(e,u,c,o)]}function LFe(e,t,r,n){var i=e.xa,a=e.ya,o=e.distance,s=e.dxy,l=e.index,u={pointNumber:l,x:t[l],y:r[l]};u.tx=l0.isArrayOrTypedArray(n.text)?n.text[l]:n.text,u.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,u.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,u.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var c=n.textfont;c&&(u.ts=l0.isArrayOrTypedArray(c.size)?c.size[l]:c.size,u.tc=l0.isArrayOrTypedArray(c.color)?c.color[l]:c.color,u.tf=Array.isArray(c.family)?c.family[l]:c.family,u.tw=Array.isArray(c.weight)?c.weight[l]:c.weight,u.ty=Array.isArray(c.style)?c.style[l]:c.style,u.tv=Array.isArray(c.variant)?c.variant[l]:c.variant);var f=n.marker;f&&(u.ms=l0.isArrayOrTypedArray(f.size)?f.size[l]:f.size,u.mo=l0.isArrayOrTypedArray(f.opacity)?f.opacity[l]:f.opacity,u.mx=l0.isArrayOrTypedArray(f.symbol)?f.symbol[l]:f.symbol,u.ma=l0.isArrayOrTypedArray(f.angle)?f.angle[l]:f.angle,u.mc=l0.isArrayOrTypedArray(f.color)?f.color[l]:f.color);var h=f&&f.line;h&&(u.mlc=Array.isArray(h.color)?h.color[l]:h.color,u.mlw=l0.isArrayOrTypedArray(h.width)?h.width[l]:h.width);var d=f&&f.gradient;d&&d.type!==\"none\"&&(u.mgt=Array.isArray(d.type)?d.type[l]:d.type,u.mgc=Array.isArray(d.color)?d.color[l]:d.color);var v=i.c2p(u.x,!0),_=a.c2p(u.y,!0),b=u.mrc||1,p=n.hoverlabel;p&&(u.hbg=Array.isArray(p.bgcolor)?p.bgcolor[l]:p.bgcolor,u.hbc=Array.isArray(p.bordercolor)?p.bordercolor[l]:p.bordercolor,u.hts=l0.isArrayOrTypedArray(p.font.size)?p.font.size[l]:p.font.size,u.htc=Array.isArray(p.font.color)?p.font.color[l]:p.font.color,u.htf=Array.isArray(p.font.family)?p.font.family[l]:p.font.family,u.hnl=l0.isArrayOrTypedArray(p.namelength)?p.namelength[l]:p.namelength);var k=n.hoverinfo;k&&(u.hi=Array.isArray(k)?k[l]:k);var E=n.hovertemplate;E&&(u.ht=Array.isArray(E)?E[l]:E);var T={};T[e.index]=u;var L=n._origX,x=n._origY,C=l0.extendFlat({},e,{color:K7t(n,u),x0:v-b,x1:v+b,xLabelVal:L?L[l]:u.x,y0:_-b,y1:_+b,yLabelVal:x?x[l]:u.y,cd:T,distance:o,spikeDistance:s,hovertemplate:u.ht});return u.htx?C.text=u.htx:u.tx?C.text=u.tx:n.text&&(C.text=n.text),l0.fillText(u,n,C),Y7t.getComponentMethod(\"errorbars\",\"hoverInfo\")(u,n,C),C}PFe.exports={hoverPoints:J7t,calcHover:LFe}});var px=ye((Kmr,RFe)=>{\"use strict\";var IFe=20;RFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:IFe,SYMBOL_STROKE:IFe/20,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]}}});var gk=ye((Jmr,OFe)=>{\"use strict\";var $7t=Gl(),Q7t=ec(),e9t=Pg(),mf=pf(),DFe=df().axisHoverFormat,FFe=Tu(),t9t=t_(),eY=Ao().extendFlat,r9t=mc().overrideAll,i9t=px().DASHES,zFe=mf.line,u1=mf.marker,n9t=u1.line,gx=OFe.exports=r9t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:DFe(\"x\"),yhoverformat:DFe(\"y\"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:Q7t({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:\"calc\",colorEditType:\"style\",arrayOk:!0,noNumericWeightValues:!0,variantValues:[\"normal\",\"small-caps\"]}),mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"]},line:{color:zFe.color,width:zFe.width,shape:{valType:\"enumerated\",values:[\"linear\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},dash:{valType:\"enumerated\",values:t9t(i9t),dflt:\"solid\"}},marker:eY({},FFe(\"marker\"),{symbol:u1.symbol,angle:u1.angle,size:u1.size,sizeref:u1.sizeref,sizemin:u1.sizemin,sizemode:u1.sizemode,opacity:u1.opacity,colorbar:u1.colorbar,line:eY({},FFe(\"marker.line\"),{width:n9t.width})}),connectgaps:mf.connectgaps,fill:eY({},mf.fill,{dflt:\"none\"}),fillcolor:e9t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:$7t.opacity},\"calc\",\"nested\");gx.x.editType=gx.y.editType=gx.x0.editType=gx.y0.editType=\"calc+clearAxisTypes\";gx.hovertemplate=mf.hovertemplate;gx.hovertemplatefallback=mf.hovertemplatefallback;gx.texttemplate=mf.texttemplate;gx.texttemplatefallback=mf.texttemplatefallback});var WF=ye(tY=>{\"use strict\";var qFe=px();tY.isOpenSymbol=function(e){return typeof e==\"string\"?qFe.OPEN_RE.test(e):e%200>100};tY.isDotSymbol=function(e){return typeof e==\"string\"?qFe.DOT_RE.test(e):e>200}});var UFe=ye((Qmr,NFe)=>{\"use strict\";var BFe=Dr(),a9t=qa(),o9t=WF(),s9t=gk(),l9t=Lm(),XF=Ru(),u9t=oT(),c9t=Dg(),f9t=$p(),h9t=D0(),d9t=Fg(),v9t=F0();NFe.exports=function(t,r,n,i){function a(d,v){return BFe.coerce(t,r,s9t,d,v)}var o=t.marker?o9t.isOpenSymbol(t.marker.symbol):!1,s=XF.isBubble(t),l=u9t(t,r,i,a);if(!l){r.visible=!1;return}c9t(t,r,i,a),a(\"xhoverformat\"),a(\"yhoverformat\");var u=l<l9t.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"mode\",u),XF.hasMarkers(r)&&(f9t(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),a(\"marker.line.width\",o||s?1:0)),XF.hasLines(r)&&(a(\"connectgaps\"),h9t(t,r,n,i,a),a(\"line.shape\")),XF.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),v9t(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,f=(r.marker||{}).color;a(\"fill\"),r.fill!==\"none\"&&d9t(t,r,n,a);var h=a9t.getComponentMethod(\"errorbars\",\"supplyDefaults\");h(t,r,c||f||n,{axis:\"y\"}),h(t,r,c||f||n,{axis:\"x\",inherit:\"y\"}),BFe.coerceSelectionMarkerOpacity(r,a)}});var GFe=ye((eyr,VFe)=>{\"use strict\";var p9t=lI();VFe.exports=function(t,r,n){var i=t.i;return\"x\"in t||(t.x=r._x[i]),\"y\"in t||(t.y=r._y[i]),p9t(t,r,n)}});var jFe=ye((tyr,HFe)=>{\"use strict\";function g9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function m9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function y9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function _9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function x9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function mk(e,t,r,n,i,a){return typeof r==\"function\"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}HFe.exports={ge:function(e,t,r,n,i){return mk(e,t,r,n,i,g9t)},gt:function(e,t,r,n,i){return mk(e,t,r,n,i,m9t)},lt:function(e,t,r,n,i){return mk(e,t,r,n,i,y9t)},le:function(e,t,r,n,i){return mk(e,t,r,n,i,_9t)},eq:function(e,t,r,n,i){return mk(e,t,r,n,i,x9t)}}});var ey=ye((ryr,XFe)=>{\"use strict\";XFe.exports=function(t,r,n){var i={},a,o;if(typeof r==\"string\"&&(r=WFe(r)),Array.isArray(r)){var s={};for(o=0;o<r.length;o++)s[r[o]]=!0;r=s}for(a in r)r[a]=WFe(r[a]);var l={};for(a in r){var u=r[a];if(Array.isArray(u))for(o=0;o<u.length;o++){var c=u[o];if(n&&(l[c]=!0),c in t){if(i[a]=t[c],n)for(var f=o;f<u.length;f++)l[u[f]]=!0;break}}else a in t&&(r[a]&&(i[a]=t[a]),n&&(l[a]=!0))}if(n)for(a in t)l[a]||(i[a]=t[a]);return i};var rY={};function WFe(e){return rY[e]?rY[e]:(typeof e==\"string\"&&(e=rY[e]=e.split(/\\s*,\\s*|\\s+/)),e)}});var s5=ye((iyr,ZFe)=>{\"use strict\";var b9t=ey();ZFe.exports=w9t;function w9t(e){var t;return arguments.length>1&&(e=arguments),typeof e==\"string\"?e=e.split(/\\s/).map(parseFloat):typeof e==\"number\"&&(e=[e]),e.length&&typeof e[0]==\"number\"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=b9t(e,{left:\"x l left Left\",top:\"y t top Top\",width:\"w width W Width\",height:\"h height W Width\",bottom:\"b bottom Bottom\",right:\"r right Right\"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var rw=ye((nyr,YFe)=>{\"use strict\";YFe.exports=T9t;function T9t(e,t){if(!e||e.length==null)throw Error(\"Argument should be an array\");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;n<t;n++){for(var i=-1/0,a=1/0,o=n,s=e.length;o<s;o+=t)e[o]>i&&(i=e[o]),e[o]<a&&(a=e[o]);r[n]=a,r[t+n]=i}return r}});var JFe=ye((ayr,KFe)=>{KFe.exports=function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==void 0)return arguments[e]}});var iw=ye((oyr,QFe)=>{var $Fe=QD();QFe.exports=A9t;function A9t(e,t,r){if(!e)throw new TypeError(\"must specify data as first parameter\");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]==\"number\"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t==\"string\")&&(t=new($Fe(t||\"float32\"))(i+r));var u=t.length-r;if(i!==u)throw new Error(\"source length \"+i+\" (\"+n+\"x\"+e.length+\") does not match destination length \"+u);for(a=0,s=r;a<e.length;a++)for(o=0;o<n;o++)t[s++]=e[a][o]===null?NaN:e[a][o]}else if(!t||typeof t==\"string\"){var c=$Fe(t||\"float32\");if(Array.isArray(e)||t===\"array\")for(t=new c(e.length+r),a=0,s=r,l=t.length;s<l;s++,a++)t[s]=e[a]===null?NaN:e[a];else r===0?t=new c(e):(t=new c(e.length+r),t.set(e,r))}else t.set(e,r);return t}});var tze=ye((syr,eze)=>{\"use strict\";eze.exports=function(e){var t=typeof e;return e!==null&&(t===\"object\"||t===\"function\")}});var ize=ye((lyr,rze)=>{\"use strict\";rze.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var cze=ye((uyr,uze)=>{\"use strict\";var nze=jFe(),aze=rk(),S9t=s5(),M9t=rw(),oze=ey(),iY=JFe(),E9t=iw(),k9t=tze(),C9t=QD(),sze=ize(),L9t=1073741824;uze.exports=function(t,r){r||(r={}),t=E9t(t,\"float64\"),r=oze(r,{bounds:\"range bounds dataBox databox\",maxDepth:\"depth maxDepth maxdepth level maxLevel maxlevel levels\",dtype:\"type dtype format out dst output destination\"});let n=iY(r.maxDepth,255),i=iY(r.bounds,M9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=lze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype=\"array\"),typeof r.dtype==\"string\"?s=new(C9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;p<o;++p)s[p]=p;let l=[],u=[],c=[],f=[];d(0,0,1,s,0,1);let h=0;for(let p=0;p<l.length;p++){let k=l[p];if(s.set)s.set(k,h);else for(let T=0,L=k.length;T<L;T++)s[T+h]=k[T];let E=h+l[p].length;f[p]=[h,E],h=E}return s.range=v,s;function d(p,k,E,T,L,x){if(!T.length)return null;let C=l[L]||(l[L]=[]),M=c[L]||(c[L]=[]),g=u[L]||(u[L]=[]),P=C.length;if(L++,L>n||x>L9t){for(let N=0;N<T.length;N++)C.push(T[N]),M.push(x),g.push(null,null,null,null);return P}if(C.push(T[0]),M.push(x),T.length<=1)return g.push(null,null,null,null),P;let A=E*.5,z=p+A,O=k+A,U=[],G=[],Z=[],j=[];for(let N=1,H=T.length;N<H;N++){let re=T[N],oe=a[re*2],_e=a[re*2+1];oe<z?_e<O?U.push(re):G.push(re):_e<O?Z.push(re):j.push(re)}return x<<=2,g.push(d(p,k,A,U,L,x),d(p,O,A,G,L,x+1),d(z,k,A,Z,L,x+2),d(z,O,A,j,L,x+3)),P}function v(...p){let k;if(k9t(p[p.length-1])){let Z=p.pop();!p.length&&(Z.x!=null||Z.l!=null||Z.left!=null)&&(p=[Z],k={}),k=oze(Z,{level:\"level maxLevel\",d:\"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize\",lod:\"lod details ranges offsets\"})}else k={};p.length||(p=i);let E=S9t(...p),[T,L,x,C]=[Math.min(E.x,E.x+E.width),Math.min(E.y,E.y+E.height),Math.max(E.x,E.x+E.width),Math.max(E.y,E.y+E.height)],[M,g,P,A]=lze([T,L,x,C],i),z=iY(k.level,l.length);if(k.d!=null){let Z;typeof k.d==\"number\"?Z=[k.d,k.d]:k.d.length&&(Z=k.d),z=Math.min(Math.max(Math.ceil(-sze(Math.abs(Z[0])/(i[2]-i[0]))),Math.ceil(-sze(Math.abs(Z[1])/(i[3]-i[1])))),z)}if(z=Math.min(z,l.length),k.lod)return _(M,g,P,A,z);let O=[];U(0,0,1,0,0,1);function U(Z,j,N,H,re,oe){if(re===null||oe===null)return;let _e=Z+N,Ce=j+N;if(M>_e||g>Ce||P<Z||A<j||H>=z||re===oe)return;let Le=l[H];oe===void 0&&(oe=Le.length);for(let De=re;De<oe;De++){let ce=Le[De],je=t[ce*2],lt=t[ce*2+1];je>=T&&je<=x&&lt>=L&&lt<=C&&O.push(ce)}let ge=u[H],ie=ge[re*4+0],Se=ge[re*4+1],Ee=ge[re*4+2],Ae=ge[re*4+3],Be=G(ge,re+1),Pe=N*.5,me=H+1;U(Z,j,Pe,me,ie,Se||Ee||Ae||Be),U(Z,j+Pe,Pe,me,Se,Ee||Ae||Be),U(Z+Pe,j,Pe,me,Ee,Ae||Be),U(Z+Pe,j+Pe,Pe,me,Ae,Be)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return O}function _(p,k,E,T,L){let x=[];for(let C=0;C<L;C++){let M=c[C],g=f[C][0],P=b(p,k,C),A=b(E,T,C),z=nze.ge(M,P),O=nze.gt(M,A,z,M.length-1);x[C]=[z+g,O+g]}return x}function b(p,k,E){let T=1,L=.5,x=.5,C=.5;for(let M=0;M<E;M++)T<<=2,T+=p<L?k<x?0:1:k<x?2:3,C*=.5,L+=p<L?-C:C,x+=k<x?-C:C;return T}};function lze(e,t){let[r,n,i,a]=t,o=1/(i-r),s=1/(a-n),l=new Array(e.length);for(let u=0,c=e.length/2;u<c;u++)l[2*u]=aze((e[2*u]-r)*o,0,1),l[2*u+1]=aze((e[2*u+1]-n)*s,0,1);return l}});var ZF=ye((cyr,fze)=>{\"use strict\";fze.exports=cze()});var nY=ye((fyr,hze)=>{hze.exports=P9t;function P9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case\"a\":a[6]+=n,a[7]+=i;break;case\"v\":a[1]+=i;break;case\"h\":a[1]+=n;break;default:for(var l=1;l<a.length;)a[l++]+=n,a[l++]+=i}switch(s){case\"Z\":n=t,i=r;break;case\"H\":n=a[1];break;case\"V\":i=a[1];break;case\"M\":n=t=a[1],i=r=a[2];break;default:n=a[a.length-2],i=a[a.length-1]}return a})}});var pze=ye((YF,vze)=>{\"use strict\";Object.defineProperty(YF,\"__esModule\",{value:!0});var I9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),yk=Math.PI*2,aY=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},R9t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},dze=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},D9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),_=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*_;p<0&&(p=0),p/=d*b+v*_,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,E=p*-o/a*f,T=c*k-u*E+(t+n)/2,L=u*k+c*E+(r+i)/2,x=(f-k)/a,C=(h-E)/o,M=(-f-k)/a,g=(-h-E)/o,P=dze(1,0,x,C),A=dze(x,C,M,g);return l===0&&A>0&&(A-=yk),l===1&&A<0&&(A+=yk),[T,L,P,A]},F9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var _=Math.sin(u*yk/360),b=Math.cos(u*yk/360),p=b*(r-i)/2+_*(n-a)/2,k=-_*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var T=D9t(r,n,i,a,o,s,f,d,_,b,p,k),L=I9t(T,4),x=L[0],C=L[1],M=L[2],g=L[3],P=Math.abs(g)/(yk/4);Math.abs(1-P)<1e-7&&(P=1);var A=Math.max(Math.ceil(P),1);g/=A;for(var z=0;z<A;z++)v.push(R9t(M,g)),M+=g;return v.map(function(O){var U=aY(O[0],o,s,b,_,x,C),G=U.x,Z=U.y,j=aY(O[1],o,s,b,_,x,C),N=j.x,H=j.y,re=aY(O[2],o,s,b,_,x,C),oe=re.x,_e=re.y;return{x1:G,y1:Z,x2:N,y2:H,x:oe,y:_e}})};YF.default=F9t;vze.exports=YF.default});var yze=ye((hyr,mze)=>{\"use strict\";mze.exports=O9t;var z9t=pze();function O9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case\"M\":a=d[1],o=d[2];break;case\"A\":var _=z9t({px:u,py:c,cx:d[6],cy:d[7],rx:d[1],ry:d[2],xAxisRotation:d[3],largeArcFlag:d[4],sweepFlag:d[5]});if(!_.length)continue;for(var b=0,p;b<_.length;b++)p=_[b],d=[\"C\",p.x1,p.y1,p.x2,p.y2,p.x,p.y],b<_.length-1&&r.push(d);break;case\"S\":var k=u,E=c;(t==\"C\"||t==\"S\")&&(k+=k-n,E+=E-i),d=[\"C\",k,E,d[1],d[2],d[3],d[4]];break;case\"T\":t==\"Q\"||t==\"T\"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=gze(u,c,s,l,d[1],d[2]);break;case\"Q\":s=d[1],l=d[2],d=gze(u,c,d[1],d[2],d[3],d[4]);break;case\"L\":d=KF(u,c,d[1],d[2]);break;case\"H\":d=KF(u,c,d[1],c);break;case\"V\":d=KF(u,c,u,d[1]);break;case\"Z\":d=KF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function KF(e,t,r,n){return[\"C\",e,t,r,n,r,n]}function gze(e,t,r,n,i,a){return[\"C\",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var oY=ye((dyr,_ze)=>{\"use strict\";_ze.exports=function(t){return typeof t!=\"string\"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\dz]$/i.test(t)&&t.length>4))}});var wze=ye((vyr,bze)=>{\"use strict\";var q9t=nM(),B9t=nY(),N9t=yze(),U9t=oY(),xze=gE();bze.exports=V9t;function V9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]==\"string\"&&(e=e[0]),typeof e==\"string\"&&(xze(U9t(e),\"String is not an SVG path.\"),e=q9t(e)),xze(Array.isArray(e),\"Argument should be a string or an array of path segments.\"),e=B9t(e),e=N9t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;r<n;r++)for(var i=e[r].slice(1),a=0;a<i.length;a+=2)i[a+0]<t[0]&&(t[0]=i[a+0]),i[a+1]<t[1]&&(t[1]=i[a+1]),i[a+0]>t[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var kze=ye((pyr,Eze)=>{var nw=Math.PI,Tze=Mze(120);Eze.exports=G9t;function G9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case\"M\":a=d[1],o=d[2];break;case\"A\":d=Sze(u,c,d[1],d[2],Mze(d[3]),d[4],d[5],d[6],d[7]),d.unshift(\"C\"),d.length>7&&(r.push(d.splice(0,7)),d.unshift(\"C\"));break;case\"S\":var _=u,b=c;(t==\"C\"||t==\"S\")&&(_+=_-n,b+=b-i),d=[\"C\",_,b,d[1],d[2],d[3],d[4]];break;case\"T\":t==\"Q\"||t==\"T\"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=Aze(u,c,s,l,d[1],d[2]);break;case\"Q\":s=d[1],l=d[2],d=Aze(u,c,d[1],d[2],d[3],d[4]);break;case\"L\":d=JF(u,c,d[1],d[2]);break;case\"H\":d=JF(u,c,d[1],c);break;case\"V\":d=JF(u,c,u,d[1]);break;case\"Z\":d=JF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function JF(e,t,r,n){return[\"C\",e,t,r,n,r,n]}function Aze(e,t,r,n,i,a){return[\"C\",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function Sze(e,t,r,n,i,a,o,s,l,u){if(u)E=u[0],T=u[1],p=u[2],k=u[3];else{var c=sY(e,t,-i);e=c.x,t=c.y,c=sY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,_=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*_-v*h*h-_*f*f)/(v*h*h+_*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,E=Math.asin(((t-k)/n).toFixed(9)),T=Math.asin(((l-k)/n).toFixed(9));E=e<p?nw-E:E,T=s<p?nw-T:T,E<0&&(E=nw*2+E),T<0&&(T=nw*2+T),o&&E>T&&(E=E-nw*2),!o&&T>E&&(T=T-nw*2)}if(Math.abs(T-E)>Tze){var L=T,x=s,C=l;T=E+Tze*(o&&T>E?1:-1),s=p+r*Math.cos(T),l=k+n*Math.sin(T);var M=Sze(s,l,r,n,i,0,o,x,C,[T,L,p,k])}var g=Math.tan((T-E)/4),P=4/3*r*g,A=4/3*n*g,z=[2*e-(e+P*Math.sin(E)),2*t-(t-A*Math.cos(E)),s+P*Math.sin(T),l-A*Math.cos(T),s,l];if(u)return z;M&&(z=z.concat(M));for(var O=0;O<z.length;){var U=sY(z[O],z[O+1],i);z[O++]=U.x,z[O++]=U.y}return z}function sY(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}function Mze(e){return e*(nw/180)}});var Lze=ye((gyr,Cze)=>{var H9t=nY(),j9t=kze(),W9t={M:\"moveTo\",C:\"bezierCurveTo\"};Cze.exports=function(e,t){e.beginPath(),j9t(H9t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[W9t[n]].apply(e,i)}),e.closePath()}});var Dze=ye((myr,Rze)=>{\"use strict\";var X9t=rk();Rze.exports=Z9t;var _k=1e20;function Z9t(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,_;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error(\"For raw data width and height should be provided by options\");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext(\"2d\"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,_=u.length;v<_;v++)l[v]=u[v*c+i]/255;else if(c!==1)throw Error(\"Raw data can have only 1 value per pixel\");var b=Array(a*o),p=Array(a*o),k=Array(s),E=Array(s),T=Array(s+1),L=Array(s);for(v=0,_=a*o;v<_;v++){var x=l[v];b[v]=x===1?0:x===0?_k:Math.pow(Math.max(0,.5-x),2),p[v]=x===1?_k:x===0?0:Math.pow(Math.max(0,x-.5),2)}Pze(b,a,o,k,E,L,T),Pze(p,a,o,k,E,L,T);var C=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(v=0,_=a*o;v<_;v++)C[v]=X9t(1-((b[v]-p[v])/n+r),0,1);return C}function Pze(e,t,r,n,i,a,o){for(var s=0;s<t;s++){for(var l=0;l<r;l++)n[l]=e[l*t+s];for(Ize(n,i,a,o,r),l=0;l<r;l++)e[l*t+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(Ize(n,i,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(i[s])}}function Ize(e,t,r,n,i){r[0]=0,n[0]=-_k,n[1]=+_k;for(var a=1,o=0;a<i;a++){for(var s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);o++,r[o]=a,n[o]=s,n[o+1]=+_k}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;t[a]=(a-r[o])*(a-r[o])+e[r[o]]}}});var zze=ye((yyr,Fze)=>{\"use strict\";var Y9t=wze(),K9t=nM(),J9t=Lze(),$9t=oY(),Q9t=Dze(),lY=document.createElement(\"canvas\"),dp=lY.getContext(\"2d\");Fze.exports=eOt;function eOt(e,t){if(!$9t(e))throw Error(\"Argument should be valid svg path string\");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=lY.width=t.w||t.width||200,n=lY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||Y9t(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(dp.fillStyle=\"black\",dp.fillRect(0,0,r,n),dp.fillStyle=\"white\",a&&(typeof a!=\"number\"&&(a=1),a>0?dp.strokeStyle=\"white\":dp.strokeStyle=\"black\",dp.lineWidth=Math.abs(a)),dp.translate(r*.5,n*.5),dp.scale(l,l),tOt()){var u=new Path2D(e);dp.fill(u),a&&dp.stroke(u)}else{var c=K9t(e);J9t(dp,c),dp.fill(),a&&dp.stroke()}dp.setTransform(1,0,0,1,0,0);var f=Q9t(dp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var $F;function tOt(){if($F!=null)return $F;var e=document.createElement(\"canvas\").getContext(\"2d\");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return $F=!1;var t=new Path2D(\"M0,0h1v1h-1v-1Z\");e.fillStyle=\"black\",e.fill(t);var r=e.getImageData(0,0,1,1);return $F=r&&r.data&&r.data[3]===255}});var ow=ye((_yr,Xze)=>{\"use strict\";var ez=Eo(),rOt=zze(),QF=ox(),iOt=qa(),c5=Dr(),bh=c5.isArrayOrTypedArray,l5=So(),Oze=hf(),qze=a1().formatColor,u5=Ru(),nOt=O3(),cY=WF(),xk=px(),aOt=X1().DESELECTDIM,Bze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},oOt=ip().appendArrayPointValue;function sOt(e,t){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},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(u5.hasText(t)&&(n.text=Wze(e,t),n.textSel=Uze(e,t,t.selected),n.textUnsel=Uze(e,t,t.unselected)),u5.hasMarkers(t)&&(n.marker=hY(e,t),n.markerSel=fY(e,t,t.selected),n.markerUnsel=fY(e,t,t.unselected),!t.unselected&&bh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=aOt*a[r]}if(u5.hasLines(t)){n.line={overlay:!0,thickness:t.line.width*i,color:t.line.color,opacity:t.opacity};var o=(xk.DASHES[t.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=t.line.width*i;n.line.dashes=o}return t.error_x&&t.error_x.visible&&(n.errorX=Vze(t,t.error_x,i)),t.error_y&&t.error_y.visible&&(n.errorY=Vze(t,t.error_y,i)),t.fill&&t.fill!==\"none\"&&(n.fill={closed:!0,fill:t.fillcolor,thickness:0}),n}function Wze(e,t){var r=e._fullLayout,n=t._length,i=t.textfont,a=t.textposition,o=bh(a)?a:[a],s=i.color,l=i.size,u=i.family,c=i.weight,f=i.style,h=i.variant,d={},v,_=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){d.text=[];var p=r._d3locale,k=Array.isArray(b),E=k?Math.min(b.length,n):n,T=k?function(P){return b[P]}:function(){return b};for(v=0;v<E;v++){var L={i:v},x=t._module.formatLabels(L,t,r),C={};oOt(C,t,v),d.text.push(c5.texttemplateString({data:[C,L,t._meta],fallback:t.texttemplatefallback,labels:x,locale:p,template:T(v)}))}}else bh(t.text)&&t.text.length<n?d.text=t.text.slice():d.text=t.text;if(bh(d.text))for(v=d.text.length;v<n;v++)d.text[v]=\"\";for(d.opacity=t.opacity,d.font={},d.align=[],d.baseline=[],v=0;v<o.length;v++){var M=o[v].split(/\\s+/);switch(M[1]){case\"left\":d.align.push(\"right\");break;case\"right\":d.align.push(\"left\");break;default:d.align.push(M[1])}switch(M[0]){case\"top\":d.baseline.push(\"bottom\");break;case\"bottom\":d.baseline.push(\"top\");break;default:d.baseline.push(M[0])}}if(bh(s))for(d.color=new Array(n),v=0;v<n;v++)d.color[v]=s[v];else d.color=s;if(bh(l)||Array.isArray(u)||bh(c)||Array.isArray(f)||Array.isArray(h))for(d.font=new Array(n),v=0;v<n;v++){var g=d.font[v]={};g.size=(c5.isTypedArray(l)?l[v]:bh(l)?ez(l[v])?l[v]:0:l)*_,g.family=Array.isArray(u)?u[v]:u,g.weight=Nze(bh(c)?c[v]:c),g.style=Array.isArray(f)?f[v]:f,g.variant=Array.isArray(h)?h[v]:h}else d.font={size:l*_,family:u,weight:Nze(c),style:f,variant:h};return d}function Nze(e){return e<=1e3?e>500?\"bold\":\"normal\":e}function hY(e,t){var r=t._length,n=t.marker,i={},a,o=bh(n.symbol),s=bh(n.angle),l=bh(n.color),u=bh(n.line.color),c=bh(n.opacity),f=bh(n.size),h=bh(n.line.width),d;if(o||(d=cY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,_=n.angle,b=qze(n,n.opacity,r),p=qze(n.line,n.opacity,r);if(!bh(p[0])){var k=p;for(p=Array(r),a=0;a<r;a++)p[a]=k}if(!bh(b[0])){var E=b;for(b=Array(r),a=0;a<r;a++)b[a]=E}if(!bh(v)){var T=v;for(v=Array(r),a=0;a<r;a++)v[a]=T}if(!bh(_)){var L=_;for(_=Array(r),a=0;a<r;a++)_[a]=L}for(i.symbols=v,i.angles=_,i.colors=b,i.borderColors=p,a=0;a<r;a++)o&&(d=cY.isOpenSymbol(n.symbol[a])),d&&(p[a]=b[a].slice(),b[a]=b[a].slice(),b[a][3]=0);for(i.opacity=t.opacity,i.markers=new Array(r),a=0;a<r;a++)i.markers[a]=jze({mx:i.symbols[a],ma:i.angles[a]},t)}else d?(i.color=QF(n.color,\"uint8\"),i.color[3]=0,i.borderColor=QF(n.color,\"uint8\")):(i.color=QF(n.color,\"uint8\"),i.borderColor=QF(n.line.color,\"uint8\")),i.opacity=t.opacity*n.opacity,i.marker=jze({mx:n.symbol,ma:n.angle},t);var x=1,C=nOt(t,x),M;if(f||h){var g=i.sizes=new Array(r),P=i.borderSizes=new Array(r),A=0,z;if(f){for(a=0;a<r;a++)g[a]=C(n.size[a]),A+=g[a];z=A/r}else for(M=C(n.size),a=0;a<r;a++)g[a]=M;if(h)for(a=0;a<r;a++)P[a]=n.line.width[a];else for(M=n.line.width,a=0;a<r;a++)P[a]=M;i.sizeAvg=z}else i.size=C(n&&n.size||10),i.borderSizes=C(n.line.width);return i}function fY(e,t,r){var n=t.marker,i={};return r&&(r.marker&&r.marker.symbol?i=hY(e,c5.extendFlat({},n,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function Uze(e,t,r){var n={};if(!r)return n;if(r.textfont){var i={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:c5.extendFlat({},t.textfont)};r.textfont&&c5.extendFlat(i.textfont,r.textfont),n=Wze(e,i)}return n}function Vze(e,t,r){var n={capSize:t.width*2*r,lineWidth:t.thickness*r,color:t.color};return t.copy_ystyle&&(n=e.error_y),n}var Gze=xk.SYMBOL_SDF_SIZE,aw=xk.SYMBOL_SIZE,Hze=xk.SYMBOL_STROKE,uY={},lOt=l5.symbolFuncs[0](aw*.05);function jze(e,t){var r=e.mx;if(r===\"circle\")return null;var n,i,a=l5.symbolNumber(r),o=l5.symbolFuncs[a%100],s=!!l5.symbolNoDot[a%100],l=!!l5.symbolNoFill[a%100],u=cY.isDotSymbol(r);if(e.ma&&(r+=\"_\"+e.ma),uY[r])return uY[r];var c=l5.getMarkerAngle(e,t);return u&&!s?n=o(aw*1.1,c)+lOt:n=o(aw,c),i=rOt(n,{w:Gze,h:Gze,viewBox:[-aw,-aw,aw,aw],stroke:l?Hze:-Hze}),uY[r]=i,i||null}function uOt(e,t,r){var n=r.length,i=n/2,a,o;if(u5.hasLines(t)&&i)if(t.line.shape===\"hv\"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2+2],r[o*2+1]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else if(t.line.shape===\"hvh\"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var s=(r[o*2]+r[o*2+2])/2;a.push(r[o*2],r[o*2+1],s,r[o*2+1],s,r[o*2+3])}a.push(r[n-2],r[n-1])}else if(t.line.shape===\"vhv\"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var l=(r[o*2+1]+r[o*2+3])/2;a.push(r[o*2],r[o*2+1],r[o*2],l,r[o*2+2],l)}a.push(r[n-2],r[n-1])}else if(t.line.shape===\"vh\"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2],r[o*2+3]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else a=r;var u=!1;for(o=0;o<a.length;o++)if(isNaN(a[o])){u=!0;break}var c=u||a.length>xk.TOO_MANY_POINTS||u5.hasMarkers(t)?\"rect\":\"round\";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o<a.length;o+=2)isNaN(a[o])||isNaN(a[o+1])?(a[o]=f,a[o+1]=h):(f=a[o],h=a[o+1])}return{join:c,positions:a}}function cOt(e,t,r,n,i){var a=iOt.getComponentMethod(\"errorbars\",\"makeComputeError\"),o=Oze.getFromId(e,t.xaxis,\"x\"),s=Oze.getFromId(e,t.yaxis,\"y\"),l=r.length/2,u={};function c(f,h){var d=h._id.charAt(0),v=t[\"error_\"+d];if(v&&v.visible&&(h.type===\"linear\"||h.type===\"log\")){for(var _=a(v),b={x:0,y:1}[d],p={x:[0,1,2,3],y:[2,3,0,1]}[d],k=new Float64Array(4*l),E=1/0,T=-1/0,L=0,x=0;L<l;L++,x+=4){var C=f[L];if(ez(C)){var M=r[L*2+b],g=_(C,L),P=g[0],A=g[1];if(ez(P)&&ez(A)){var z=C-P,O=C+A;k[x+p[0]]=M-h.c2l(z),k[x+p[1]]=h.c2l(O)-M,k[x+p[2]]=0,k[x+p[3]]=0,E=Math.min(E,C-P),T=Math.max(T,C+A)}}}u[d]={positions:r,errors:k,_bnds:[E,T]}}}return c(n,o),c(i,s),u}function fOt(e,t,r,n){var i=t._length,a={},o;if(u5.hasMarkers(t)){var s=r.font,l=r.align,u=r.baseline;for(a.offset=new Array(i),o=0;o<i;o++){var c=n.sizes?n.sizes[o]:n.size,f=bh(s)?s[o].size:s.size,h=bh(l)?l.length>1?l[o]:l[0]:l,d=bh(u)?u.length>1?u[o]:u[0]:u,v=Bze[h],_=Bze[d],b=c?c/.8+1:0,p=-_*b-_*.5;a.offset[o]=[v*b/f,p/f]}}return a}Xze.exports={style:sOt,markerStyle:hY,markerSelection:fY,linePositions:uOt,errorBarPositions:cOt,textPosition:fOt}});var dY=ye((xyr,Zze)=>{\"use strict\";var tz=Dr();Zze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){tz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=tz.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u<n.count;u++)n.glText[u].update(s)},n.draw=function(){for(var s=n.count,l=n.fill2d,u=n.error2d,c=n.line2d,f=n.scatter2d,h=n.glText,d=n.select2d,v=n.selectBatch,_=n.unselectBatch,b=0;b<s;b++){if(l&&n.fillOrder[b]&&l.draw(n.fillOrder[b]),c&&n.lineOptions[b]&&c.draw(b),u&&(n.errorXOptions[b]&&u.draw(b),n.errorYOptions[b]&&u.draw(b+s)),f&&n.markerOptions[b])if(_[b].length){var p=tz.repeat([],n.count);p[b]=_[b],f.draw(p)}else v[b].length||f.draw(b);h[b]&&n.textOptions[b]&&h[b].render()}d&&d.draw(v),n.dirty=!1},n.destroy=function(){n.fill2d&&n.fill2d.destroy&&n.fill2d.destroy(),n.scatter2d&&n.scatter2d.destroy&&n.scatter2d.destroy(),n.error2d&&n.error2d.destroy&&n.error2d.destroy(),n.line2d&&n.line2d.destroy&&n.line2d.destroy(),n.select2d&&n.select2d.destroy&&n.select2d.destroy(),n.glText&&n.glText.forEach(function(s){s.destroy&&s.destroy()}),n.lineOptions=null,n.fillOptions=null,n.markerOptions=null,n.markerSelectedOptions=null,n.markerUnselectedOptions=null,n.errorXOptions=null,n.errorYOptions=null,n.textOptions=null,n.textSelectedOptions=null,n.textUnselectedOptions=null,n.selectBatch=null,n.unselectBatch=null,r._scene=null}),n.dirty||tz.extendFlat(n,i),n}});var e7e=ye((byr,Qze)=>{\"use strict\";var hOt=ZF(),f5=Dr(),Yze=hf(),dOt=Mg().findExtremes,Kze=zg(),vY=q0(),vOt=vY.calcMarkerSize,pOt=vY.calcAxisExpansion,gOt=vY.setFirstScatter,mOt=z0(),h5=ow(),yOt=dY(),Jze=fs().BADNUM,_Ot=px().TOO_MANY_POINTS;Qze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Yze.getFromId(t,r.xaxis,\"x\"),a=r._yA=Yze.getFromId(t,r.yaxis,\"y\"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=_Ot,u=s*2,c={},f,h=i.makeCalcdata(r,\"x\"),d=a.makeCalcdata(r,\"y\"),v=Kze(r,i,\"x\",h),_=Kze(r,a,\"y\",d),b=v.vals,p=_.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=_.starts,r._yEnds=_.ends);var k=new Array(u),E=new Array(s);for(f=0;f<s;f++)k[f*2]=b[f]===Jze?NaN:b[f],k[f*2+1]=p[f]===Jze?NaN:p[f],E[f]=f;if(i.type===\"log\")for(f=0;f<u;f+=2)k[f]=i.c2l(k[f]);if(a.type===\"log\")for(f=1;f<u;f+=2)k[f]=a.c2l(k[f]);l&&i.type!==\"log\"&&a.type!==\"log\"?c.tree=hOt(k):c.ids=E,mOt(t,r);var T=xOt(t,o,r,k,b,p),L=yOt(t,o);gOt(n,r);var x;return l?T.marker&&(x=T.marker.sizeAvg||Math.max(T.marker.size,3)):x=vOt(r,s),pOt(t,r,i,a,b,p,x),T.errorX&&$ze(r,i,T.errorX),T.errorY&&$ze(r,a,T.errorY),T.fill&&!L.fill2d&&(L.fill2d=!0),T.marker&&!L.scatter2d&&(L.scatter2d=!0),T.line&&!L.line2d&&(L.line2d=!0),(T.errorX||T.errorY)&&!L.error2d&&(L.error2d=!0),T.text&&!L.glText&&(L.glText=!0),T.marker&&(T.marker.snap=s),L.lineOptions.push(T.line),L.errorXOptions.push(T.errorX),L.errorYOptions.push(T.errorY),L.fillOptions.push(T.fill),L.markerOptions.push(T.marker),L.markerSelectedOptions.push(T.markerSel),L.markerUnselectedOptions.push(T.markerUnsel),L.textOptions.push(T.text),L.textSelectedOptions.push(T.textSel),L.textUnselectedOptions.push(T.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),c._scene=L,c.index=L.count,c.x=b,c.y=p,c.positions=k,L.count++,[{x:!1,y:!1,t:c,trace:r}]};function $ze(e,t,r){var n=e._extremes[t._id],i=dOt(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function xOt(e,t,r,n,i,a){var o=h5.style(e,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&f5.extendFlat(o.line,h5.linePositions(e,r,n)),o.errorX||o.errorY){var s=h5.errorBarPositions(e,r,n,i,a);o.errorX&&f5.extendFlat(o.errorX,s.x),o.errorY&&f5.extendFlat(o.errorY,s.y)}return o.text&&(f5.extendFlat(o.text,{positions:n},h5.textPosition(e,r,o.text,o.marker)),f5.extendFlat(o.textSel,{positions:n},h5.textPosition(e,r,o.text,o.markerSel)),f5.extendFlat(o.textUnsel,{positions:n},h5.textPosition(e,r,o.text,o.markerUnsel))),o}});var pY=ye((wyr,r7e)=>{\"use strict\";var t7e=Dr(),bOt=ka(),wOt=X1().DESELECTDIM;function TOt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=t7e.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,_=c.color,b=l.color,p=t7e.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h<o.length;h++)d=o[h],f.color[d]=v||(p?b[d]:b);for(h=0;h<s.length;h++){d=s[h];var k=p?b[d]:b;f.color[d]=_||(v?k:bOt.addOpacity(k,wOt))}}i.glText[a].update(f)}r7e.exports={styleTextSelection:TOt}});var gY=ye((Tyr,n7e)=>{\"use strict\";var i7e=Ru(),AOt=pY().styleTextSelection;n7e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=i7e.hasText(s),_=i7e.hasMarkers(s),b=!_&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var E=0;E<u;E++)r.contains([l.xpx[E],l.ypx[E]],!1,E,t)?(p.push(E),o.push({pointNumber:E,x:i.c2d(c[E]),y:a.c2d(f[E])})):k.push(E);if(_){var T=h.scatter2d;if(!p.length&&!k.length){var L=new Array(h.count);L[d]=h.markerOptions[d],T.update.apply(T,L)}else if(!h.selectBatch[d].length&&!h.unselectBatch[d].length){var x=new Array(h.count);x[d]=h.markerUnselectedOptions[d],T.update.apply(T,x)}}return h.selectBatch[d]=p,h.unselectBatch[d]=k,v&&AOt(n),o}});var o7e=ye((Ayr,a7e)=>{\"use strict\";var SOt=jF();a7e.exports={moduleType:\"trace\",name:\"scattergl\",basePlotModule:mh(),categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"errorBarsOK\",\"showLegend\",\"scatter-like\"],attributes:gk(),supplyDefaults:UFe(),crossTraceDefaults:cU(),colorbar:$d(),formatLabels:GFe(),calc:e7e(),hoverPoints:SOt.hoverPoints,selectPoints:gY(),meta:{}}});var l7e=ye((Syr,iz)=>{\"use strict\";var rz=rk();iz.exports=s7e;iz.exports.to=s7e;iz.exports.from=MOt;function s7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=rz(r,0,255)&255,n=rz(n,0,255)&255,i=rz(i,0,255)&255,a=rz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function MOt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Nh=ye((Myr,c7e)=>{\"use strict\";var u7e=Object.getOwnPropertySymbols,EOt=Object.prototype.hasOwnProperty,kOt=Object.prototype.propertyIsEnumerable;function COt(e){if(e==null)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(e)}function LOt(){try{if(!Object.assign)return!1;var e=new String(\"abc\");if(e[5]=\"de\",Object.getOwnPropertyNames(e)[0]===\"5\")return!1;for(var t={},r=0;r<10;r++)t[\"_\"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join(\"\")!==\"0123456789\")return!1;var i={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join(\"\")===\"abcdefghijklmnopqrst\"}catch(a){return!1}}c7e.exports=LOt()?Object.assign:function(e,t){for(var r,n=COt(e),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)EOt.call(r,o)&&(n[o]=r[o]);if(u7e){i=u7e(r);for(var s=0;s<i.length;s++)kOt.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n}});var h7e=ye((Eyr,f7e)=>{f7e.exports=function(e){typeof e==\"string\"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n<e.length-1;n++)r.push(e[n],t[n]||\"\");return r.push(e[n]),r.join(\"\")}});var mY=ye((kyr,d7e)=>{\"use strict\";d7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i<a;i++){var o=n[i];for(var s in o)if(!(r[s]!==void 0&&!Array.isArray(r[s])&&t[s]===r[s])&&s in r){var l;if(o[s]===!0)l=r[s];else{if(o[s]===!1)continue;if(typeof o[s]==\"function\"&&(l=o[s](r[s],t,r),l===void 0))continue}t[s]=l}}return t}});var p7e=ye((Cyr,v7e)=>{\"use strict\";v7e.exports=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))});var nz=ye((Lyr,d5)=>{\"use strict\";d5.exports=bk;d5.exports.float32=d5.exports.float=bk;d5.exports.fract32=d5.exports.fract=POt;var g7e=new Float32Array(1);function POt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=bk(e));for(var r=0,n=t.length;r<n;r++)t[r]=e[r]-t[r];return t}return bk(e-bk(e))}function bk(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(g7e[0]=e,g7e[0])}});var _Y=ye((Pyr,_7e)=>{\"use strict\";function IOt(e,t){var r=e==null?null:typeof Symbol!=\"undefined\"&&e[Symbol.iterator]||e[\"@@iterator\"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ROt(e,t){return zOt(e)||IOt(e,t)||y7e(e,t)||BOt()}function DOt(e){return FOt(e)||OOt(e)||y7e(e)||qOt()}function FOt(e){if(Array.isArray(e))return yY(e)}function zOt(e){if(Array.isArray(e))return e}function OOt(e){if(typeof Symbol!=\"undefined\"&&e[Symbol.iterator]!=null||e[\"@@iterator\"]!=null)return Array.from(e)}function y7e(e,t){if(e){if(typeof e==\"string\")return yY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===\"Object\"&&e.constructor&&(r=e.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(e);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yY(e,t)}}function yY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qOt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BOt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\n",
       "In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var NOt=ox(),UOt=rw(),VOt=l7e(),GOt=ZF(),sw=Nh(),az=h7e(),HOt=ey(),jOt=mY(),WOt=iw(),m7e=p7e(),oz=nz(),XOt=s5(),ZOt=nv;function nv(e,t){var r=this;if(!(this instanceof nv))return new nv(e,t);typeof e==\"function\"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;var n=e._gl,i,a=[],o={},s=[],l=[null],u=[null],c=255,f=100;this.tooManyColors=m7e,i=e.texture({data:new Uint8Array(c*4),width:c,height:1,type:\"uint8\",format:\"rgba\",wrapS:\"clamp\",wrapT:\"clamp\",mag:\"nearest\",min:\"nearest\"}),sw(this,{regl:e,gl:n,groups:s,markerCache:u,markerTextures:l,palette:a,paletteIds:o,paletteTexture:i,maxColors:c,maxSize:f,canvas:n.canvas}),this.update(t);var h={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop(\"opacity\"),paletteSize:function(b,p){return[r.tooManyColors?0:c,i.height]},pixelRatio:e.context(\"pixelRatio\"),scale:e.prop(\"scale\"),scaleFract:e.prop(\"scaleFract\"),translate:e.prop(\"translate\"),translateFract:e.prop(\"translateFract\"),markerTexture:e.prop(\"markerTexture\"),paletteTexture:i},attributes:{x:function(b,p){return p.xAttr||{buffer:p.positionBuffer,stride:8,offset:0}},y:function(b,p){return p.yAttr||{buffer:p.positionBuffer,stride:8,offset:4}},xFract:function(b,p){return p.xAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:0}},yFract:function(b,p){return p.yAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:4}},size:function(b,p){return p.size.length?{buffer:p.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(p.size*255/r.maxSize)]}},borderSize:function(b,p){return p.borderSize.length?{buffer:p.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(p.borderSize*255/r.maxSize)]}},colorId:function(b,p){return p.color.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(p.color*4,p.color*4+4):[p.color]}},borderColorId:function(b,p){return p.borderColor.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(p.borderColor*4,p.borderColor*4+4):[p.borderColor]}},isActive:function(b,p){return p.activation===!0?{constant:[1]}:p.activation?p.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop(\"elements\"),count:e.prop(\"count\"),offset:e.prop(\"offset\"),primitive:\"points\"},d=sw({},h);d.frag=az([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "uniform float opacity;\n",
       "uniform sampler2D markerTexture;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragWidth, fragBorderColorLevel, fragColorLevel;\n",
       "\n",
       "float smoothStep(float x, float y) {\n",
       "  return 1.0 / (1.0 + exp(50.0*(x - y)));\n",
       "}\n",
       "\n",
       "void main() {\n",
       "  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;\n",
       "\n",
       "  // max-distance alpha\n",
       "  if (dist < 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",
       "`]),d.vert=az([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute float x, y, xFract, yFract;\n",
       "attribute float size, borderSize;\n",
       "attribute vec4 colorId, borderColorId;\n",
       "attribute float isActive;\n",
       "\n",
       "// \\`invariant\\` effectively turns off optimizations for the position.\n",
       "// We need this because -fast-math on M1 Macs is re-ordering\n",
       "// floating point operations in a way that causes floating point\n",
       "// precision limits to put points in the wrong locations.\n",
       "invariant gl_Position;\n",
       "\n",
       "uniform bool constPointSize;\n",
       "uniform float pixelRatio;\n",
       "uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\n",
       "uniform sampler2D paletteTexture;\n",
       "\n",
       "const float maxSize = 100.;\n",
       "const float borderLevel = .5;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\n",
       "\n",
       "float pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n",
       "\n",
       "bool isDirect = (paletteSize.x < 1.);\n",
       "\n",
       "vec4 getColor(vec4 id) {\n",
       "  return isDirect ? id / 255. : texture2D(paletteTexture,\n",
       "    vec2(\n",
       "      (id.x + .5) / paletteSize.x,\n",
       "      (id.y + .5) / paletteSize.y\n",
       "    )\n",
       "  );\n",
       "}\n",
       "\n",
       "void 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 = 2. * size * pointSizeScale;\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",
       "`]),this.drawMarker=e(d);var v=sw({},h);v.frag=az([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragBorderRadius, fragWidth;\n",
       "\n",
       "uniform float opacity;\n",
       "\n",
       "float 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",
       "\n",
       "void main() {\n",
       "\tfloat radius, alpha = 1.0, delta = fragWidth;\n",
       "\n",
       "\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n",
       "\n",
       "\tif (radius > 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",
       "`]),v.vert=az([`precision highp float;\n",
       "#define GLSLIFY 1\n",
       "\n",
       "attribute float x, y, xFract, yFract;\n",
       "attribute float size, borderSize;\n",
       "attribute vec4 colorId, borderColorId;\n",
       "attribute float isActive;\n",
       "\n",
       "// \\`invariant\\` effectively turns off optimizations for the position.\n",
       "// We need this because -fast-math on M1 Macs is re-ordering\n",
       "// floating point operations in a way that causes floating point\n",
       "// precision limits to put points in the wrong locations.\n",
       "invariant gl_Position;\n",
       "\n",
       "uniform bool constPointSize;\n",
       "uniform float pixelRatio;\n",
       "uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\n",
       "uniform sampler2D paletteTexture;\n",
       "\n",
       "const float maxSize = 100.;\n",
       "\n",
       "varying vec4 fragColor, fragBorderColor;\n",
       "varying float fragBorderRadius, fragWidth;\n",
       "\n",
       "float pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n",
       "\n",
       "bool isDirect = (paletteSize.x < 1.);\n",
       "\n",
       "vec4 getColor(vec4 id) {\n",
       "  return isDirect ? id / 255. : texture2D(paletteTexture,\n",
       "    vec2(\n",
       "      (id.x + .5) / paletteSize.x,\n",
       "      (id.y + .5) / paletteSize.y\n",
       "    )\n",
       "  );\n",
       "}\n",
       "\n",
       "void 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) * pointSizeScale;\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",
       "`]),m7e&&(v.frag=v.frag.replace(\"smoothstep\",\"smoothStep\"),d.frag=d.frag.replace(\"smoothstep\",\"smoothStep\")),this.drawCircle=e(v)}nv.defaults={color:\"black\",borderColor:\"transparent\",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};nv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};nv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=this.groups;if(r.length===1&&Array.isArray(r[0])&&(r[0][0]===null||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var a=0;a<r.length;a++)this.drawItem(a,r[a]);else i.forEach(function(o,s){e.drawItem(s)});return this};nv.prototype.drawItem=function(e,t){var r=this.groups,n=r[e];if(typeof t==\"number\"&&(e=t,n=r[t],t=null),!!(n&&n.count&&n.opacity)){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));for(var i=[],a=1;a<n.activation.length;a++)!n.activation[a]||n.activation[a]!==!0&&!n.activation[a].data.length||i.push.apply(i,DOt(this.getMarkerDrawOptions(a,n,t)));i.length&&this.drawMarker(i)}};nv.prototype.getMarkerDrawOptions=function(e,t,r){var n=t.range,i=t.tree,a=t.viewport,o=t.activation,s=t.selectionBuffer,l=t.count,u=this.regl;if(!i)return r?[sw({},t,{markerTexture:this.markerTextures[e],activation:o[e],count:r.length,elements:r,offset:0})]:[sw({},t,{markerTexture:this.markerTextures[e],activation:o[e],offset:0})];var c=[],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[e],d=h.data,v=new Uint8Array(l),_=0;_<r.length;_++){var b=r[_];v[b]=d?d[b]:1}s.subdata(v)}for(var p=f.length;p--;){var k=ROt(f[p],2),E=k[0],T=k[1];c.push(sw({},t,{markerTexture:this.markerTextures[e],activation:r?s:o[e],offset:E,count:T-E}))}return c};nv.prototype.update=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length){r.length===1&&Array.isArray(r[0])&&(r=r[0]);var i=this.groups,a=this.gl,o=this.regl,s=this.maxSize,l=this.maxColors,u=this.palette;this.groups=i=r.map(function(c,f){var h=i[f];if(c===void 0)return h;c===null?c={positions:null}:typeof c==\"function\"?c={ondraw:c}:typeof c[0]==\"number\"&&(c={positions:c}),c=HOt(c,{positions:\"positions data points\",snap:\"snap cluster lod tree\",size:\"sizes size radius\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",color:\"colors color fill fill-color fillColor\",borderColor:\"borderColors borderColor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range dataBox databox\",viewport:\"viewport viewPort viewBox viewbox\",opacity:\"opacity alpha transparency\",bounds:\"bound bounds boundaries limits\",tooManyColors:\"tooManyColors palette paletteMode optimizePalette enablePalette\"}),c.positions===null&&(c.positions=[]),c.tooManyColors!=null&&(e.tooManyColors=c.tooManyColors),h||(i[f]=h={id:f,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:o.buffer({data:new Uint8Array(0),usage:\"stream\",type:\"uint8\"}),sizeBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),colorBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"uint8\"}),positionBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"}),positionFractBuffer:o.buffer({data:new Uint8Array(0),usage:\"dynamic\",type:\"float\"})},c=sw({},nv.defaults,c)),c.positions&&!(\"marker\"in c)&&(c.marker=h.marker,delete h.marker),c.marker&&!(\"positions\"in c)&&(c.positions=h.positions,delete h.positions);var d=0,v=0;if(jOt(h,c,[{snap:!0,size:function(j,N){return j==null&&(j=nv.defaults.size),d+=j&&j.length?1:0,j},borderSize:function(j,N){return j==null&&(j=nv.defaults.borderSize),d+=j&&j.length?1:0,j},opacity:parseFloat,color:function(j,N){return j==null&&(j=nv.defaults.color),j=e.updateColor(j),v++,j},borderColor:function(j,N){return j==null&&(j=nv.defaults.borderColor),j=e.updateColor(j),v++,j},bounds:function(j,N,H){return\"range\"in H||(H.range=null),j},positions:function(j,N,H){var re=N.snap,oe=N.positionBuffer,_e=N.positionFractBuffer,Ce=N.selectionBuffer;if(j.x||j.y)return j.x.length?N.xAttr={buffer:o.buffer(j.x),offset:0,stride:4,count:j.x.length}:N.xAttr={buffer:j.x.buffer,offset:j.x.offset*4||0,stride:(j.x.stride||1)*4,count:j.x.count},j.y.length?N.yAttr={buffer:o.buffer(j.y),offset:0,stride:4,count:j.y.length}:N.yAttr={buffer:j.y.buffer,offset:j.y.offset*4||0,stride:(j.y.stride||1)*4,count:j.y.count},N.count=Math.max(N.xAttr.count,N.yAttr.count),j;j=WOt(j,\"float64\");var Le=N.count=Math.floor(j.length/2),ge=N.bounds=Le?UOt(j,2):null;if(!H.range&&!N.range&&(delete N.range,H.range=ge),!H.marker&&!N.marker&&(delete N.marker,H.marker=null),re&&(re===!0||Le>re)?N.tree=GOt(j,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:\"points\",usage:\"static\",data:N.tree,type:\"uint32\"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=oz.float32(j);oe({data:Se,usage:\"dynamic\"});var Ee=oz.fract32(j,Se);return _e({data:Ee,usage:\"dynamic\"}),Ce({data:new Uint8Array(Le),type:\"uint8\",usage:\"stream\"}),j}},{marker:function(j,N,H){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!j||typeof j[0]==\"number\"){var oe=e.addMarker(j);re[oe]=!0}else{for(var _e=[],Ce=0,Le=Math.min(j.length,N.count);Ce<Le;Ce++){var ge=e.addMarker(j[Ce]);_e[ge]||(_e[ge]=new Uint8Array(N.count)),_e[ge][Ce]=1}for(var ie=0;ie<_e.length;ie++)if(_e[ie]){var Se={data:_e[ie],type:\"uint8\",usage:\"static\"};re[ie]?re[ie](Se):re[ie]=o.buffer(Se),re[ie].data=_e[ie]}}return j},range:function(j,N,H){var re=N.bounds;if(re)return j||(j=re),N.scale=[1/(j[2]-j[0]),1/(j[3]-j[1])],N.translate=[-j[0],-j[1]],N.scaleFract=oz.fract(N.scale),N.translateFract=oz.fract(N.translate),j},viewport:function(j){var N=XOt(j||[a.drawingBufferWidth,a.drawingBufferHeight]);return N}}]),d){var _=h,b=_.count,p=_.size,k=_.borderSize,E=_.sizeBuffer,T=new Uint8Array(b*2);if(p.length||k.length)for(var L=0;L<b;L++)T[L*2]=Math.round((p[L]==null?p:p[L])*255/s),T[L*2+1]=Math.round((k[L]==null?k:k[L])*255/s);E({data:T,usage:\"dynamic\"})}if(v){var x=h,C=x.count,M=x.color,g=x.borderColor,P=x.colorBuffer,A;if(e.tooManyColors){if(M.length||g.length){A=new Uint8Array(C*8);for(var z=0;z<C;z++){var O=M[z];A[z*8]=u[O*4],A[z*8+1]=u[O*4+1],A[z*8+2]=u[O*4+2],A[z*8+3]=u[O*4+3];var U=g[z];A[z*8+4]=u[U*4],A[z*8+5]=u[U*4+1],A[z*8+6]=u[U*4+2],A[z*8+7]=u[U*4+3]}}}else if(M.length||g.length){A=new Uint8Array(C*4+2);for(var G=0;G<C;G++)M[G]!=null&&(A[G*4]=M[G]%l,A[G*4+1]=Math.floor(M[G]/l)),g[G]!=null&&(A[G*4+2]=g[G]%l,A[G*4+3]=Math.floor(g[G]/l))}P({data:A||new Uint8Array(0),type:\"uint8\",usage:\"dynamic\"})}return h})}};nv.prototype.addMarker=function(e){var t=this.markerTextures,r=this.regl,n=this.markerCache,i=e==null?0:n.indexOf(e);if(i>=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;o<s;o++)a[o]=e[o]*255}var l=Math.floor(Math.sqrt(a.length));return i=t.length,n.push(e),t.push(r.texture({channels:1,data:a,radius:l,mag:\"linear\",min:\"linear\"})),i};nv.prototype.updateColor=function(e){var t=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(e)||(e=[e]);var i=[];if(typeof e[0]==\"number\"){var a=[];if(Array.isArray(e))for(var o=0;o<e.length;o+=4)a.push(e.slice(o,o+4));else for(var s=0;s<e.length;s+=4)a.push(e.subarray(s,s+4));e=a}for(var l=0;l<e.length;l++){var u=e[l];u=NOt(u,\"uint8\");var c=VOt(u,!1);if(t[c]==null){var f=r.length;t[c]=Math.floor(f/4),r[f]=u[0],r[f+1]=u[1],r[f+2]=u[2],r[f+3]=u[3]}i[l]=t[c]}return!this.tooManyColors&&r.length>n*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i<n*t;i++)e.push(0,0,0,0)}r.height<n&&r.resize(t,n),r.subimage({width:Math.min(e.length*.25,t),height:n,data:e},0,0)}};nv.prototype.destroy=function(){return this.groups.forEach(function(e){e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(function(t){return t&&t.destroy&&t.destroy()}),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(e){return e&&e.destroy&&e.destroy()}),this};var YOt=Nh(),KOt=function(t,r){var n=new ZOt(t,r),i=n.render.bind(n);return YOt(i,{render:i,update:n.update.bind(n),draw:n.draw.bind(n),destroy:n.destroy.bind(n),regl:n.regl,gl:n.gl,canvas:n.gl.canvas,groups:n.groups,markers:n.markerCache,palette:n.palette}),i};_7e.exports=KOt});var A7e=ye((Iyr,TY)=>{\"use strict\";TY.exports=uz;TY.exports.default=uz;function uz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=b7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=tqt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;v<i;v+=r)f=e[v],h=e[v+1],f<s&&(s=f),h<l&&(l=h),f>u&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return wk(a,o,r,s,l,d,0),o}function b7e(e,t,r,n,i){var a,o;if(i===wY(e,t,r,n)>0)for(a=t;a<r;a+=n)o=x7e(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=x7e(a,e[a],e[a+1],o);return o&&cz(o,o.next)&&(Ak(o),o=o.next),o}function lw(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(cz(r,r.next)||wh(r.prev,r,r.next)===0)){if(Ak(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function wk(e,t,r,n,i,a,o){if(e){!o&&a&&oqt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?$Ot(e,n,i,a):JOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),Ak(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=QOt(lw(e),t,r),wk(e,t,r,n,i,a,2)):o===2&&eqt(e,t,r,n,i,a):wk(lw(e),t,r,n,i,a,1);break}}}}function JOt(e){var t=e.prev,r=e,n=e.next;if(wh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=i<a?i<o?i:o:a<o?a:o,f=s<l?s<u?s:u:l<u?l:u,h=i>a?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&v5(i,s,a,l,o,u,v.x,v.y)&&wh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function $Ot(e,t,r,n){var i=e.prev,a=e,o=e.next;if(wh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=s<l?s<u?s:u:l<u?l:u,v=c<f?c<h?c:h:f<h?f:h,_=s>l?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=xY(d,v,t,r,n),k=xY(_,b,t,r,n),E=e.prevZ,T=e.nextZ;E&&E.z>=p&&T&&T.z<=k;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&v5(s,c,l,f,u,h,E.x,E.y)&&wh(E.prev,E,E.next)>=0||(E=E.prevZ,T.x>=d&&T.x<=_&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;E&&E.z>=p;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&v5(s,c,l,f,u,h,E.x,E.y)&&wh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;T&&T.z<=k;){if(T.x>=d&&T.x<=_&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function QOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!cz(i,a)&&w7e(i,n,n.next,a)&&Tk(i,a)&&Tk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ak(n),Ak(n.next),n=e=a),n=n.next}while(n!==e);return lw(n)}function eqt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&uqt(o,s)){var l=T7e(o,s);o=lw(o,o.next),l=lw(l,l.next),wk(o,t,r,n,i,a,0),wk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function tqt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a<o;a++)s=t[a]*n,l=a<o-1?t[a+1]*n:e.length,u=b7e(e,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(lqt(u));for(i.sort(rqt),a=0;a<i.length;a++)r=iqt(i[a],r);return r}function rqt(e,t){return e.x-t.x}function iqt(e,t){var r=nqt(e,t);if(!r)return t;var n=T7e(r,e);return lw(n,n.next),lw(r,r.next)}function nqt(e,t){var r=t,n=e.x,i=e.y,a=-1/0,o;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x<r.next.x?r:r.next,s===n))return o}r=r.next}while(r!==t);if(!o)return null;var l=o,u=o.x,c=o.y,f=1/0,h;r=o;do n>=r.x&&r.x>=u&&n!==r.x&&v5(i<c?n:a,i,u,c,i<c?a:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),Tk(r,e)&&(h<f||h===f&&(r.x>o.x||r.x===o.x&&aqt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function aqt(e,t){return wh(e.prev,e,t.prev)<0&&wh(t.next,e,e.next)<0}function oqt(e,t,r,n){var i=e;do i.z===0&&(i.z=xY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sqt(i)}function sqt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<u&&(s++,n=n.nextZ,!!n);t++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function xY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function lqt(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function v5(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function uqt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!cqt(e,t)&&(Tk(e,t)&&Tk(t,e)&&fqt(e,t)&&(wh(e.prev,e,t.prev)||wh(e,t.prev,t))||cz(e,t)&&wh(e.prev,e,e.next)>0&&wh(t.prev,t,t.next)>0)}function wh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function cz(e,t){return e.x===t.x&&e.y===t.y}function w7e(e,t,r,n){var i=lz(wh(e,t,r)),a=lz(wh(e,t,n)),o=lz(wh(r,n,e)),s=lz(wh(r,n,t));return!!(i!==a&&o!==s||i===0&&sz(e,r,t)||a===0&&sz(e,n,t)||o===0&&sz(r,e,n)||s===0&&sz(r,t,n))}function sz(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function lz(e){return e>0?1:e<0?-1:0}function cqt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Tk(e,t){return wh(e.prev,e,e.next)<0?wh(e,t,e.next)>=0&&wh(e,e.prev,t)>=0:wh(e,t,e.prev)<0||wh(e,e.next,t)<0}function fqt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function T7e(e,t){var r=new bY(e.i,e.x,e.y),n=new bY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function x7e(e,t,r,n){var i=new bY(e,t,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 Ak(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}uz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(wY(e,0,a,r));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*r,c=s<l-1?t[s+1]*r:e.length;o-=Math.abs(wY(e,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,v=n[s+2]*r;f+=Math.abs((e[h]-e[v])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[v+1]-e[h+1]))}return o===0&&f===0?0:Math.abs((f-o)/o)};function wY(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}uz.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)r.vertices.push(e[i][a][o]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var M7e=ye((Ryr,S7e)=>{\"use strict\";var hqt=rw();S7e.exports=dqt;function dqt(e,t,r){if(!e||e.length==null)throw Error(\"Argument should be an array\");t==null&&(t=1),r==null&&(r=hqt(e,t));for(var n=0;n<t;n++){var i=r[t+n],a=r[n],o=n,s=e.length;if(i===1/0&&a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:e[o]===a?0:.5;else if(i===1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:0;else if(a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===a?0:1;else{var l=i-a;for(o=n;o<s;o+=t)isNaN(e[o])||(e[o]=l===0?.5:(e[o]-a)/l)}}return e}});var k7e=ye((Dyr,E7e)=>{\"use strict\";E7e.exports=function(){var e,t;if(typeof WeakMap!=\"function\")return!1;try{e=new WeakMap([[t={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(r){return!1}return!(String(e)!==\"[object WeakMap]\"||typeof e.set!=\"function\"||e.set({},1)!==e||typeof e.delete!=\"function\"||typeof e.has!=\"function\"||e.get(t)!==\"one\")}});var L7e=ye((Fyr,C7e)=>{\"use strict\";C7e.exports=function(){}});var mx=ye((zyr,P7e)=>{\"use strict\";var vqt=L7e()();P7e.exports=function(e){return e!==vqt&&e!==null}});var AY=ye((Oyr,R7e)=>{\"use strict\";var pqt=Object.create,gqt=Object.getPrototypeOf,I7e={};R7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||pqt;return typeof e!=\"function\"?!1:gqt(e(t(null),I7e))===I7e}});var SY=ye((qyr,D7e)=>{\"use strict\";var mqt=mx(),yqt={function:!0,object:!0};D7e.exports=function(e){return mqt(e)&&yqt[typeof e]||!1}});var c1=ye((Byr,F7e)=>{\"use strict\";var _qt=mx();F7e.exports=function(e){if(!_qt(e))throw new TypeError(\"Cannot use null or undefined\");return e}});var O7e=ye((Nyr,z7e)=>{\"use strict\";var MY=Object.create,fz;AY()()||(fz=EY());z7e.exports=function(){var e,t,r;return!fz||fz.level!==1?MY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n===\"__proto__\"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(fz,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return MY(n===null?e:n,i)})}()});var EY=ye((Uyr,q7e)=>{\"use strict\";var xqt=SY(),bqt=c1(),wqt=Object.prototype.isPrototypeOf,Tqt=Object.defineProperty,Aqt={configurable:!0,enumerable:!1,writable:!0,value:void 0},hz;hz=function(e,t){if(bqt(e),t===null||xqt(t))return e;throw new TypeError(\"Prototype must be null or an object\")};q7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(hz(n,i),i),n}):t=function(n,i){return hz(n,i).__proto__=i,n}:t=function n(i,a){var o;return hz(i,a),o=wqt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&Tqt(n.nullPolyfill,\"__proto__\",Aqt),i},Object.defineProperty(t,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());O7e()});var dz=ye((Vyr,B7e)=>{\"use strict\";B7e.exports=AY()()?Object.setPrototypeOf:EY()});var U7e=ye((Gyr,N7e)=>{\"use strict\";var Sqt=SY();N7e.exports=function(e){if(!Sqt(e))throw new TypeError(e+\" is not an Object\");return e}});var G7e=ye((Hyr,V7e)=>{\"use strict\";var Mqt=Object.create(null),Eqt=Math.random;V7e.exports=function(){var e;do e=Eqt().toString(36).slice(2);while(Mqt[e]);return e}});var uw=ye((jyr,H7e)=>{\"use strict\";var kqt=void 0;H7e.exports=function(e){return e!==kqt&&e!==null}});var vz=ye((Wyr,j7e)=>{\"use strict\";var Cqt=uw(),Lqt={object:!0,function:!0,undefined:!0};j7e.exports=function(e){return Cqt(e)?hasOwnProperty.call(Lqt,typeof e):!1}});var X7e=ye((Xyr,W7e)=>{\"use strict\";var Pqt=vz();W7e.exports=function(e){if(!Pqt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var Y7e=ye((Zyr,Z7e)=>{\"use strict\";var Iqt=X7e();Z7e.exports=function(e){if(typeof e!=\"function\"||!hasOwnProperty.call(e,\"length\"))return!1;try{if(typeof e.length!=\"number\"||typeof e.call!=\"function\"||typeof e.apply!=\"function\")return!1}catch(t){return!1}return!Iqt(e)}});var kY=ye((Yyr,K7e)=>{\"use strict\";var Rqt=Y7e(),Dqt=/^\\s*class[\\s{/}]/,Fqt=Function.prototype.toString;K7e.exports=function(e){return!(!Rqt(e)||Dqt.test(Fqt.call(e)))}});var $7e=ye((Kyr,J7e)=>{\"use strict\";J7e.exports=function(){var e=Object.assign,t;return typeof e!=\"function\"?!1:(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}});var e9e=ye((Jyr,Q7e)=>{\"use strict\";Q7e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(e){return!1}}});var r9e=ye(($yr,t9e)=>{\"use strict\";var zqt=mx(),Oqt=Object.keys;t9e.exports=function(e){return Oqt(zqt(e)?Object(e):e)}});var n9e=ye((Qyr,i9e)=>{\"use strict\";i9e.exports=e9e()()?Object.keys:r9e()});var o9e=ye((e1r,a9e)=>{\"use strict\";var qqt=n9e(),Bqt=c1(),Nqt=Math.max;a9e.exports=function(e,t){var r,n,i=Nqt(arguments.length,2),a;for(e=Object(Bqt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n<i;++n)t=arguments[n],qqt(t).forEach(a);if(r!==void 0)throw r;return e}});var pz=ye((t1r,s9e)=>{\"use strict\";s9e.exports=$7e()()?Object.assign:o9e()});var CY=ye((r1r,l9e)=>{\"use strict\";var Uqt=mx(),Vqt=Array.prototype.forEach,Gqt=Object.create,Hqt=function(e,t){var r;for(r in e)t[r]=e[r]};l9e.exports=function(e){var t=Gqt(null);return Vqt.call(arguments,function(r){Uqt(r)&&Hqt(Object(r),t)}),t}});var c9e=ye((i1r,u9e)=>{\"use strict\";var LY=\"razdwatrzy\";u9e.exports=function(){return typeof LY.contains!=\"function\"?!1:LY.contains(\"dwa\")===!0&&LY.contains(\"foo\")===!1}});var h9e=ye((n1r,f9e)=>{\"use strict\";var jqt=String.prototype.indexOf;f9e.exports=function(e){return jqt.call(this,e,arguments[1])>-1}});var PY=ye((a1r,d9e)=>{\"use strict\";d9e.exports=c9e()()?String.prototype.contains:h9e()});var f1=ye((o1r,m9e)=>{\"use strict\";var gz=uw(),v9e=kY(),p9e=pz(),g9e=CY(),Sk=PY(),Wqt=m9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!=\"string\"?(a=t,t=e,e=null):a=arguments[2],gz(e)?(r=Sk.call(e,\"c\"),n=Sk.call(e,\"e\"),i=Sk.call(e,\"w\")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?p9e(g9e(a),o):o};Wqt.gs=function(e,t,r){var n,i,a,o;return typeof e!=\"string\"?(a=r,r=t,t=e,e=null):a=arguments[3],gz(t)?v9e(t)?gz(r)?v9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,gz(e)?(n=Sk.call(e,\"c\"),i=Sk.call(e,\"e\")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?p9e(g9e(a),o):o}});var Mk=ye((s1r,_9e)=>{\"use strict\";var y9e=Object.prototype.toString,Xqt=y9e.call(function(){return arguments}());_9e.exports=function(e){return y9e.call(e)===Xqt}});var Ek=ye((l1r,b9e)=>{\"use strict\";var x9e=Object.prototype.toString,Zqt=x9e.call(\"\");b9e.exports=function(e){return typeof e==\"string\"||e&&typeof e==\"object\"&&(e instanceof String||x9e.call(e)===Zqt)||!1}});var T9e=ye((u1r,w9e)=>{\"use strict\";w9e.exports=function(){return typeof globalThis!=\"object\"||!globalThis?!1:globalThis.Array===Array}});var M9e=ye((c1r,S9e)=>{var A9e=function(){if(typeof self==\"object\"&&self)return self;if(typeof window==\"object\"&&window)return window;throw new Error(\"Unable to resolve global `this`\")};S9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(e){return A9e()}try{return __global__||A9e()}finally{delete Object.prototype.__global__}}()});var kk=ye((f1r,E9e)=>{\"use strict\";E9e.exports=T9e()()?globalThis:M9e()});var C9e=ye((h1r,k9e)=>{\"use strict\";var Yqt=kk(),IY={object:!0,symbol:!0};k9e.exports=function(){var e=Yqt.Symbol,t;if(typeof e!=\"function\")return!1;t=e(\"test symbol\");try{String(t)}catch(r){return!1}return!(!IY[typeof e.iterator]||!IY[typeof e.toPrimitive]||!IY[typeof e.toStringTag])}});var P9e=ye((d1r,L9e)=>{\"use strict\";L9e.exports=function(e){return e?typeof e==\"symbol\"?!0:!e.constructor||e.constructor.name!==\"Symbol\"?!1:e[e.constructor.toStringTag]===\"Symbol\":!1}});var RY=ye((v1r,I9e)=>{\"use strict\";var Kqt=P9e();I9e.exports=function(e){if(!Kqt(e))throw new TypeError(e+\" is not a symbol\");return e}});var O9e=ye((p1r,z9e)=>{\"use strict\";var R9e=f1(),Jqt=Object.create,D9e=Object.defineProperty,$qt=Object.prototype,F9e=Jqt(null);z9e.exports=function(e){for(var t=0,r,n;F9e[e+(t||\"\")];)++t;return e+=t||\"\",F9e[e]=!0,r=\"@@\"+e,D9e($qt,r,R9e.gs(null,function(i){n||(n=!0,D9e(this,r,R9e(i)),n=!1)})),r}});var B9e=ye((g1r,q9e)=>{\"use strict\";var rm=f1(),Uh=kk().Symbol;q9e.exports=function(e){return Object.defineProperties(e,{hasInstance:rm(\"\",Uh&&Uh.hasInstance||e(\"hasInstance\")),isConcatSpreadable:rm(\"\",Uh&&Uh.isConcatSpreadable||e(\"isConcatSpreadable\")),iterator:rm(\"\",Uh&&Uh.iterator||e(\"iterator\")),match:rm(\"\",Uh&&Uh.match||e(\"match\")),replace:rm(\"\",Uh&&Uh.replace||e(\"replace\")),search:rm(\"\",Uh&&Uh.search||e(\"search\")),species:rm(\"\",Uh&&Uh.species||e(\"species\")),split:rm(\"\",Uh&&Uh.split||e(\"split\")),toPrimitive:rm(\"\",Uh&&Uh.toPrimitive||e(\"toPrimitive\")),toStringTag:rm(\"\",Uh&&Uh.toStringTag||e(\"toStringTag\")),unscopables:rm(\"\",Uh&&Uh.unscopables||e(\"unscopables\"))})}});var V9e=ye((m1r,U9e)=>{\"use strict\";var N9e=f1(),Qqt=RY(),Ck=Object.create(null);U9e.exports=function(e){return Object.defineProperties(e,{for:N9e(function(t){return Ck[t]?Ck[t]:Ck[t]=e(String(t))}),keyFor:N9e(function(t){var r;Qqt(t);for(r in Ck)if(Ck[r]===t)return r})})}});var j9e=ye((y1r,H9e)=>{\"use strict\";var ty=f1(),DY=RY(),mz=kk().Symbol,eBt=O9e(),tBt=B9e(),rBt=V9e(),iBt=Object.create,FY=Object.defineProperties,yz=Object.defineProperty,Xv,p5,G9e;if(typeof mz==\"function\")try{String(mz()),G9e=!0}catch(e){}else mz=null;p5=function(t){if(this instanceof p5)throw new TypeError(\"Symbol is not a constructor\");return Xv(t)};H9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return G9e?mz(t):(r=iBt(p5.prototype),t=t===void 0?\"\":String(t),FY(r,{__description__:ty(\"\",t),__name__:ty(\"\",eBt(t))}))};tBt(Xv);rBt(Xv);FY(p5.prototype,{constructor:ty(Xv),toString:ty(\"\",function(){return this.__name__})});FY(Xv.prototype,{toString:ty(function(){return\"Symbol (\"+DY(this).__description__+\")\"}),valueOf:ty(function(){return DY(this)})});yz(Xv.prototype,Xv.toPrimitive,ty(\"\",function(){var e=DY(this);return typeof e==\"symbol\"?e:e.toString()}));yz(Xv.prototype,Xv.toStringTag,ty(\"c\",\"Symbol\"));yz(p5.prototype,Xv.toStringTag,ty(\"c\",Xv.prototype[Xv.toStringTag]));yz(p5.prototype,Xv.toPrimitive,ty(\"c\",Xv.prototype[Xv.toPrimitive]))});var yx=ye((_1r,W9e)=>{\"use strict\";W9e.exports=C9e()()?kk().Symbol:j9e()});var Z9e=ye((x1r,X9e)=>{\"use strict\";var nBt=c1();X9e.exports=function(){return nBt(this).length=0,this}});var g5=ye((b1r,Y9e)=>{\"use strict\";Y9e.exports=function(e){if(typeof e!=\"function\")throw new TypeError(e+\" is not a function\");return e}});var J9e=ye((w1r,K9e)=>{\"use strict\";var aBt=uw(),oBt=vz(),sBt=Object.prototype.toString;K9e.exports=function(e){if(!aBt(e))return null;if(oBt(e)){var t=e.toString;if(typeof t!=\"function\"||t===sBt)return null}try{return\"\"+e}catch(r){return null}}});var Q9e=ye((T1r,$9e)=>{\"use strict\";$9e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var tOe=ye((A1r,eOe)=>{\"use strict\";var lBt=Q9e(),uBt=/[\\n\\r\\u2028\\u2029]/g;eOe.exports=function(e){var t=lBt(e);return t===null?\"<Non-coercible to string value>\":(t.length>100&&(t=t.slice(0,99)+\"\\u2026\"),t=t.replace(uBt,function(r){switch(r){case`\n",
       "`:return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}}),t)}});var zY=ye((S1r,nOe)=>{\"use strict\";var rOe=uw(),cBt=vz(),fBt=J9e(),hBt=tOe(),iOe=function(e,t){return e.replace(\"%v\",hBt(t))};nOe.exports=function(e,t,r){if(!cBt(r))throw new TypeError(iOe(t,e));if(!rOe(e)){if(\"default\"in r)return r.default;if(r.isOptional)return null}var n=fBt(r.errorMessage);throw rOe(n)||(n=t),new TypeError(iOe(n,e))}});var oOe=ye((M1r,aOe)=>{\"use strict\";var dBt=zY(),vBt=uw();aOe.exports=function(e){return vBt(e)?e:dBt(e,\"Cannot use %v\",arguments[1])}});var lOe=ye((E1r,sOe)=>{\"use strict\";var pBt=zY(),gBt=kY();sOe.exports=function(e){return gBt(e)?e:pBt(e,\"%v is not a plain function\",arguments[1])}});var cOe=ye((k1r,uOe)=>{\"use strict\";uOe.exports=function(){var e=Array.from,t,r;return typeof e!=\"function\"?!1:(t=[\"raz\",\"dwa\"],r=e(t),!!(r&&r!==t&&r[1]===\"dwa\"))}});var hOe=ye((C1r,fOe)=>{\"use strict\";var mBt=Object.prototype.toString,yBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);fOe.exports=function(e){return typeof e==\"function\"&&yBt(mBt.call(e))}});var vOe=ye((L1r,dOe)=>{\"use strict\";dOe.exports=function(){var e=Math.sign;return typeof e!=\"function\"?!1:e(10)===1&&e(-20)===-1}});var gOe=ye((P1r,pOe)=>{\"use strict\";pOe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var yOe=ye((I1r,mOe)=>{\"use strict\";mOe.exports=vOe()()?Math.sign:gOe()});var xOe=ye((R1r,_Oe)=>{\"use strict\";var _Bt=yOe(),xBt=Math.abs,bBt=Math.floor;_Oe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:_Bt(e)*bBt(xBt(e)))}});var wOe=ye((D1r,bOe)=>{\"use strict\";var wBt=xOe(),TBt=Math.max;bOe.exports=function(e){return TBt(0,wBt(e))}});var MOe=ye((F1r,SOe)=>{\"use strict\";var ABt=yx().iterator,SBt=Mk(),MBt=hOe(),EBt=wOe(),TOe=g5(),kBt=c1(),CBt=mx(),LBt=Ek(),AOe=Array.isArray,OY=Function.prototype.call,cw={configurable:!0,enumerable:!0,writable:!0,value:null},qY=Object.defineProperty;SOe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(kBt(e)),CBt(t)&&TOe(t),!this||this===Array||!MBt(this)){if(!t){if(SBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(AOe(e)){for(o=new Array(s=e.length),i=0;i<s;++i)o[i]=e[i];return o}}o=[]}else n=this;if(!AOe(e)){if((f=e[ABt])!==void 0){for(u=TOe(f).call(e),n&&(o=new n),c=u.next(),i=0;!c.done;)h=t?OY.call(t,r,c.value,i):c.value,n?(cw.value=h,qY(o,i,cw)):o[i]=h,c=u.next(),++i;s=i}else if(LBt(e)){for(s=e.length,n&&(o=new n),i=0,a=0;i<s;++i)h=e[i],i+1<s&&(l=h.charCodeAt(0),l>=55296&&l<=56319&&(h+=e[++i])),h=t?OY.call(t,r,h,a):h,n?(cw.value=h,qY(o,a,cw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=EBt(e.length),n&&(o=new n(s)),i=0;i<s;++i)h=t?OY.call(t,r,e[i],i):e[i],n?(cw.value=h,qY(o,i,cw)):o[i]=h;return n&&(cw.value=null,o.length=s),o}});var kOe=ye((z1r,EOe)=>{\"use strict\";EOe.exports=cOe()()?Array.from:MOe()});var LOe=ye((O1r,COe)=>{\"use strict\";var PBt=kOe(),IBt=pz(),RBt=c1();COe.exports=function(e){var t=Object(RBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?PBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):IBt(i,e),i}});var ROe=ye((q1r,IOe)=>{\"use strict\";var DBt=g5(),FBt=c1(),zBt=Function.prototype.bind,POe=Function.prototype.call,OBt=Object.keys,qBt=Object.prototype.propertyIsEnumerable;IOe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(FBt(r)),DBt(n),i=OBt(r),o&&i.sort(typeof o==\"function\"?zBt.call(o,r):void 0),typeof e!=\"function\"&&(e=i[e]),POe.call(e,i,function(s,l){return qBt.call(r,s)?POe.call(n,a,r[s],s,r,l):t})}}});var FOe=ye((B1r,DOe)=>{\"use strict\";DOe.exports=ROe()(\"forEach\")});var OOe=ye((N1r,zOe)=>{\"use strict\";var BBt=g5(),NBt=FOe(),UBt=Function.prototype.call;zOe.exports=function(e,t){var r={},n=arguments[2];return BBt(t),NBt(e,function(i,a,o,s){r[a]=UBt.call(t,n,i,a,o,s)}),r}});var UOe=ye((U1r,NOe)=>{\"use strict\";var VBt=uw(),GBt=oOe(),qOe=lOe(),HBt=LOe(),jBt=CY(),WBt=OOe(),XBt=Function.prototype.bind,ZBt=Object.defineProperty,YBt=Object.prototype.hasOwnProperty,BOe;BOe=function(e,t,r){var n=GBt(t)&&qOe(t.value),i;return i=HBt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&YBt.call(this,e)?n:(t.value=XBt.call(n,r.resolveContext?r.resolveContext(this):this),ZBt(this,e,t),this[e])},i};NOe.exports=function(e){var t=jBt(arguments[1]);return VBt(t.resolveContext)&&qOe(t.resolveContext),WBt(e,function(r,n){return BOe(n,r,t)})}});var BY=ye((V1r,jOe)=>{\"use strict\";var KBt=Z9e(),JBt=pz(),$Bt=g5(),QBt=c1(),qp=f1(),eNt=UOe(),VOe=yx(),GOe=Object.defineProperty,HOe=Object.defineProperties,Lk;jOe.exports=Lk=function(e,t){if(!(this instanceof Lk))throw new TypeError(\"Constructor requires 'new'\");HOe(this,{__list__:qp(\"w\",QBt(e)),__context__:qp(\"w\",t),__nextIndex__:qp(\"w\",0)}),t&&($Bt(t.on),t.on(\"_add\",this._onAdd),t.on(\"_delete\",this._onDelete),t.on(\"_clear\",this._onClear))};delete Lk.prototype.constructor;HOe(Lk.prototype,JBt({_next:qp(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:qp(function(){return this._createResult(this._next())}),_createResult:qp(function(e){return e===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:qp(function(e){return this.__list__[e]}),_unBind:qp(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)}),toString:qp(function(){return\"[object \"+(this[VOe.toStringTag]||\"Object\")+\"]\"})},eNt({_onAdd:qp(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){GOe(this,\"__redo__\",qp(\"c\",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:qp(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:qp(function(){this.__redo__&&KBt.call(this.__redo__),this.__nextIndex__=0})})));GOe(Lk.prototype,VOe.iterator,qp(function(){return this}))});var KOe=ye((G1r,YOe)=>{\"use strict\";var WOe=dz(),XOe=PY(),NY=f1(),tNt=yx(),UY=BY(),ZOe=Object.defineProperty,m5;m5=YOe.exports=function(e,t){if(!(this instanceof m5))throw new TypeError(\"Constructor requires 'new'\");UY.call(this,e),t?XOe.call(t,\"key+value\")?t=\"key+value\":XOe.call(t,\"key\")?t=\"key\":t=\"value\":t=\"value\",ZOe(this,\"__kind__\",NY(\"\",t))};WOe&&WOe(m5,UY);delete m5.prototype.constructor;m5.prototype=Object.create(UY.prototype,{_resolve:NY(function(e){return this.__kind__===\"value\"?this.__list__[e]:this.__kind__===\"key+value\"?[e,this.__list__[e]]:e})});ZOe(m5.prototype,tNt.toStringTag,NY(\"c\",\"Array Iterator\"))});var eqe=ye((H1r,QOe)=>{\"use strict\";var JOe=dz(),_z=f1(),rNt=yx(),VY=BY(),$Oe=Object.defineProperty,y5;y5=QOe.exports=function(e){if(!(this instanceof y5))throw new TypeError(\"Constructor requires 'new'\");e=String(e),VY.call(this,e),$Oe(this,\"__length__\",_z(\"\",e.length))};JOe&&JOe(y5,VY);delete y5.prototype.constructor;y5.prototype=Object.create(VY.prototype,{_next:_z(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:_z(function(e){var t=this.__list__[e],r;return this.__nextIndex__===this.__length__?t:(r=t.charCodeAt(0),r>=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});$Oe(y5.prototype,rNt.toStringTag,_z(\"c\",\"String Iterator\"))});var rqe=ye((j1r,tqe)=>{\"use strict\";var iNt=Mk(),nNt=mx(),aNt=Ek(),oNt=yx().iterator,sNt=Array.isArray;tqe.exports=function(e){return nNt(e)?sNt(e)||aNt(e)||iNt(e)?!0:typeof e[oNt]==\"function\":!1}});var nqe=ye((W1r,iqe)=>{\"use strict\";var lNt=rqe();iqe.exports=function(e){if(!lNt(e))throw new TypeError(e+\" is not iterable\");return e}});var GY=ye((X1r,sqe)=>{\"use strict\";var uNt=Mk(),cNt=Ek(),aqe=KOe(),fNt=eqe(),hNt=nqe(),oqe=yx().iterator;sqe.exports=function(e){return typeof hNt(e)[oqe]==\"function\"?e[oqe]():uNt(e)?new aqe(e):cNt(e)?new fNt(e):new aqe(e)}});var uqe=ye((Z1r,lqe)=>{\"use strict\";var dNt=Mk(),vNt=g5(),pNt=Ek(),gNt=GY(),mNt=Array.isArray,HY=Function.prototype.call,yNt=Array.prototype.some;lqe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(mNt(e)||dNt(e)?r=\"array\":pNt(e)?r=\"string\":e=gNt(e),vNt(t),a=function(){o=!0},r===\"array\"){yNt.call(e,function(f){return HY.call(t,n,f,a),o});return}if(r===\"string\"){for(l=e.length,s=0;s<l&&(u=e[s],s+1<l&&(c=u.charCodeAt(0),c>=55296&&c<=56319&&(u+=e[++s])),HY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(HY.call(t,n,i.value,a),o)return;i=e.next()}}});var fqe=ye((Y1r,cqe)=>{\"use strict\";cqe.exports=function(){return typeof WeakMap!=\"function\"?!1:Object.prototype.toString.call(new WeakMap)===\"[object WeakMap]\"}()});var vqe=ye((K1r,dqe)=>{\"use strict\";var _Nt=mx(),bz=dz(),xz=U7e(),xNt=c1(),bNt=G7e(),h1=f1(),wNt=GY(),TNt=uqe(),ANt=yx().toStringTag,hqe=fqe(),SNt=Array.isArray,WY=Object.defineProperty,jY=Object.prototype.hasOwnProperty,MNt=Object.getPrototypeOf,_x;dqe.exports=_x=function(){var e=arguments[0],t;if(!(this instanceof _x))throw new TypeError(\"Constructor requires 'new'\");return t=hqe&&bz&&WeakMap!==_x?bz(new WeakMap,MNt(this)):this,_Nt(e)&&(SNt(e)||(e=wNt(e))),WY(t,\"__weakMapData__\",h1(\"c\",\"$weakMap$\"+bNt())),e&&TNt(e,function(r){xNt(r),t.set(r[0],r[1])}),t};hqe&&(bz&&bz(_x,WeakMap),_x.prototype=Object.create(WeakMap.prototype,{constructor:h1(_x)}));Object.defineProperties(_x.prototype,{delete:h1(function(e){return jY.call(xz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:h1(function(e){if(jY.call(xz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:h1(function(e){return jY.call(xz(e),this.__weakMapData__)}),set:h1(function(e,t){return WY(xz(e),this.__weakMapData__,h1(\"c\",t)),this}),toString:h1(function(){return\"[object WeakMap]\"})});WY(_x.prototype,ANt,h1(\"c\",\"WeakMap\"))});var XY=ye((J1r,pqe)=>{\"use strict\";pqe.exports=k7e()()?WeakMap:vqe()});var mqe=ye(($1r,gqe)=>{\"use strict\";gqe.exports=function(e,t,r){if(typeof Array.prototype.findIndex==\"function\")return e.findIndex(t,r);if(typeof t!=\"function\")throw new TypeError(\"predicate must be a function\");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a<i;a++)if(t.call(r,n[a],a,n))return a;return-1}});var KY=ye((Q1r,xqe)=>{\"use strict\";var wz=ox(),ENt=rw(),YY=Nh(),kNt=ey(),CNt=iw(),yqe=A7e(),LNt=M7e(),{float32:PNt,fract32:ZY}=nz(),INt=XY(),_qe=s5(),RNt=mqe(),DNt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\n",
       "attribute vec4 color;\n",
       "attribute float lineEnd, lineTop;\n",
       "\n",
       "uniform vec2 scale, scaleFract, translate, translateFract;\n",
       "uniform float thickness, pixelRatio, id, depth;\n",
       "uniform vec4 viewport;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "\n",
       "vec2 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",
       "\n",
       "void 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",
       "`,FNt=`\n",
       "precision highp float;\n",
       "\n",
       "uniform float dashLength, pixelRatio, thickness, opacity, id;\n",
       "uniform sampler2D dashTexture;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "\n",
       "void main() {\n",
       "\tfloat alpha = 1.;\n",
       "\n",
       "\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n",
       "\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n",
       "\n",
       "\tgl_FragColor = fragColor;\n",
       "\tgl_FragColor.a *= alpha * opacity * dash;\n",
       "}\n",
       "`,zNt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 position, positionFract;\n",
       "\n",
       "uniform vec4 color;\n",
       "uniform vec2 scale, scaleFract, translate, translateFract;\n",
       "uniform float pixelRatio, id;\n",
       "uniform vec4 viewport;\n",
       "uniform float opacity;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "\n",
       "const float MAX_LINES = 256.;\n",
       "\n",
       "void 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",
       "`,ONt=`\n",
       "precision highp float;\n",
       "varying vec4 fragColor;\n",
       "\n",
       "void main() {\n",
       "\tgl_FragColor = fragColor;\n",
       "}\n",
       "`,qNt=`\n",
       "precision highp float;\n",
       "\n",
       "attribute vec2 aCoord, bCoord, nextCoord, prevCoord;\n",
       "attribute vec4 aColor, bColor;\n",
       "attribute float lineEnd, lineTop;\n",
       "\n",
       "uniform vec2 scale, translate;\n",
       "uniform float thickness, pixelRatio, id, depth;\n",
       "uniform vec4 viewport;\n",
       "uniform float miterLimit, miterMode;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec4 startCutoff, endCutoff;\n",
       "varying vec2 tangent;\n",
       "varying vec2 startCoord, endCoord;\n",
       "varying float enableStartMiter, enableEndMiter;\n",
       "\n",
       "const float REVERSE_THRESHOLD = -.875;\n",
       "const 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",
       "\n",
       "float 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",
       "\n",
       "bool isNaN( float val ){\n",
       "  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n",
       "}\n",
       "\n",
       "void main() {\n",
       "\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n",
       "\n",
       "  vec2 adjustedScale;\n",
       "  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n",
       "  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n",
       "\n",
       "  vec2 scaleRatio = adjustedScale * viewport.zw;\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",
       "\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) < MIN_DIFF) {\n",
       "\t\tstartJoinDirection = currNormal;\n",
       "\t}\n",
       "\tif (max(nextTanDiff.x, nextTanDiff.y) < 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) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\n",
       "\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  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 && baClipping > 0. && baClipping < 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 && abClipping > 0. && abClipping < 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) * adjustedScale + translate;\n",
       "\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n",
       "\n",
       "\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n",
       "\tvec2 bBotPosition = (bBotCoord) * adjustedScale + 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",
       "`,BNt=`\n",
       "precision highp float;\n",
       "\n",
       "uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\n",
       "uniform sampler2D dashTexture;\n",
       "\n",
       "varying vec4 fragColor;\n",
       "varying vec2 tangent;\n",
       "varying vec4 startCutoff, endCutoff;\n",
       "varying vec2 startCoord, endCoord;\n",
       "varying float enableStartMiter, enableEndMiter;\n",
       "\n",
       "float 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",
       "\n",
       "void 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 < -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 < -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 < 0.) {\n",
       "\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n",
       "\n",
       "\t\t\t\tif(radius > 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 < 0.) {\n",
       "\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n",
       "\n",
       "\t\t\t\tif(radius > 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) / dashLength) * .5 + .25;\n",
       "\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n",
       "\n",
       "\tgl_FragColor = fragColor;\n",
       "\tgl_FragColor.a *= alpha * opacity * dash;\n",
       "}\n",
       "`;xqe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e==\"function\"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new INt;Wc.createShaders=function(e){let t=e.buffer({usage:\"static\",type:\"float\",data:[0,1,0,0,1,1,1,0]}),r={primitive:\"triangle strip\",instances:e.prop(\"count\"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join===\"round\"?2:1,miterLimit:e.prop(\"miterLimit\"),scale:e.prop(\"scale\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),translate:e.prop(\"translate\"),thickness:e.prop(\"thickness\"),dashTexture:e.prop(\"dashTexture\"),opacity:e.prop(\"opacity\"),pixelRatio:e.context(\"pixelRatio\"),id:e.prop(\"id\"),dashLength:e.prop(\"dashLength\"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop(\"depth\")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\")},n=e(YY({vert:DNt,frag:FNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:16,divisor:1},color:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(YY({cull:{enable:!0,face:\"back\"},vert:qNt,frag:BNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop(\"colorBuffer\"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:\"triangle\",elements:(o,s)=>s.triangles,offset:0,vert:zNt,frag:ONt,uniforms:{scale:e.prop(\"scale\"),color:e.prop(\"fill\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),translate:e.prop(\"translate\"),opacity:e.prop(\"opacity\"),pixelRatio:e.context(\"pixelRatio\"),id:e.prop(\"id\"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop(\"positionBuffer\"),stride:8,offset:8},positionFract:{buffer:e.prop(\"positionFractBuffer\"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:\"miter\",miterLimit:1,thickness:10,cap:\"square\",color:\"black\",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t==\"number\"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join===\"rect\"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]==\"number\"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]==\"number\"&&(i={positions:i}),i=kNt(i,{positions:\"positions points data coords\",thickness:\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\",join:\"lineJoin linejoin join type mode\",miterLimit:\"miterlimit miterLimit\",dashes:\"dash dashes dasharray dash-array dashArray\",color:\"color colour stroke colors colours stroke-color strokeColor\",fill:\"fill fill-color fillColor\",opacity:\"alpha opacity\",overlay:\"overlay crease overlap intersect\",close:\"closed close closed-path closePath\",range:\"range dataBox\",viewport:\"viewport viewBox\",hole:\"holes hole hollow\",splitNull:\"splitNull\"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:\"linear\",min:\"linear\"}),colorBuffer:t.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array}),positionBuffer:t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array})},i=YY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,a<Wc.maxLines&&(o.depth=2*(Wc.maxLines-1-a%Wc.maxLines)/Wc.maxLines-1)),i.join!=null&&(o.join=i.join),i.hole!=null&&(o.hole=i.hole),i.fill!=null&&(o.fill=i.fill?wz(i.fill,\"uint8\"):null),i.viewport!=null&&(o.viewport=_qe(i.viewport)),o.viewport||(o.viewport=_qe([r.drawingBufferWidth,r.drawingBufferHeight])),i.close!=null&&(o.close=i.close),i.positions===null&&(i.positions=[]),i.positions){let u,c;if(i.positions.x&&i.positions.y){let v=i.positions.x,_=i.positions.y;c=o.count=Math.max(v.length,_.length),u=new Float64Array(c*2);for(let b=0;b<c;b++)u[b*2]=v[b],u[b*2+1]=_[b]}else u=CNt(i.positions,\"float64\"),c=o.count=Math.floor(u.length/2);let f=o.bounds=ENt(u,2);if(o.fill){let v=[],_={},b=0;for(let p=0,k=0,E=o.count;p<E;p++){let T=u[p*2],L=u[p*2+1];isNaN(T)||isNaN(L)||T==null||L==null?(T=u[b*2],L=u[b*2+1],_[p]=b):b=p,v[k++]=T,v[k++]=L}if(i.splitNull){o.count-1 in _||(_[o.count]=o.count-1);let p=Object.keys(_).map(Number).sort((L,x)=>L-x),k=[],E=0,T=o.hole!=null?o.hole[0]:null;if(T!=null){let L=RNt(p,x=>x>=T);p=p.slice(0,L),p.push(T)}for(let L=0;L<p.length;L++){let x=v.slice(E*2,p[L]*2).concat(T?v.slice(T*2):[]),C=(o.hole||[]).map(g=>g-T+(p[L]-E)),M=yqe(x,C);M=M.map(g=>g+E+(g+E<p[L]?0:T-p[L])),k.push(...M),E=p[L]+1}for(let L=0,x=k.length;L<x;L++)_[k[L]]!=null&&(k[L]=_[k[L]]);o.triangles=k}else{let p=yqe(v,o.hole||[]);for(let k=0,E=p.length;k<E;k++)_[p[k]]!=null&&(p[k]=_[p[k]]);o.triangles=p}}let h=new Float64Array(u);LNt(h,2,f);let d=new Float64Array(c*2+6);o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[0]=h[c*2-4],d[1]=h[c*2-3]):(d[0]=h[c*2-2],d[1]=h[c*2-1]):(d[0]=h[0],d[1]=h[1]),d.set(h,2),o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[c*2+2]=h[2],d[c*2+3]=h[3],o.count-=1):(d[c*2+2]=h[0],d[c*2+3]=h[1],d[c*2+4]=h[2],d[c*2+5]=h[3]):(d[c*2+2]=h[c*2-2],d[c*2+3]=h[c*2-1],d[c*2+4]=h[c*2-2],d[c*2+5]=h[c*2-1]);var s=PNt(d);o.positionBuffer(s);var l=ZY(d,s);o.positionFractBuffer(l)}if(i.range?o.range=i.range:o.range||(o.range=o.bounds),(i.range||i.positions)&&o.count){let u=o.bounds,c=u[2]-u[0],f=u[3]-u[1],h=o.range[2]-o.range[0],d=o.range[3]-o.range[1];o.scale=[c/h,f/d],o.translate=[-o.range[0]/h+u[0]/h||0,-o.range[1]/d+u[1]/d||0],o.scaleFract=ZY(o.scale),o.translateFract=ZY(o.translate)}if(i.dashes){let u=0,c;if(!i.dashes||i.dashes.length<2)u=1,c=new Uint8Array([255,255,255,255,255,255,255,255]);else{u=0;for(let d=0;d<i.dashes.length;++d)u+=i.dashes[d];c=new Uint8Array(u*Wc.dashMult);let f=0,h=255;for(let d=0;d<2;d++)for(let v=0;v<i.dashes.length;++v){for(let _=0,b=i.dashes[v]*Wc.dashMult*.5;_<b;++_)c[f++]=h;h^=255}}o.dashLength=u,o.dashTexture({channels:1,data:c,width:c.length,height:1,mag:\"linear\",min:\"linear\"},0,0)}if(i.color){let u=o.count,c=i.color;c||(c=\"transparent\");let f=new Uint8Array(u*4+4);if(!Array.isArray(c)||typeof c[0]==\"number\"){let h=wz(c,\"uint8\");for(let d=0;d<u+1;d++)f.set(h,d*4)}else{for(let h=0;h<u;h++){let d=wz(c[h],\"uint8\");f.set(d,h*4)}f.set(wz(c[0],\"uint8\"),u*4)}o.colorBuffer({usage:\"dynamic\",type:\"uint8\",data:f})}}}),e.length<this.passes.length){for(let i=e.length;i<this.passes.length;i++){let a=this.passes[i];a&&(a.colorBuffer.destroy(),a.positionBuffer.destroy(),a.dashTexture.destroy())}this.passes.length=e.length}let n=[];for(let i=0;i<this.passes.length;i++)this.passes[i]!==null&&n.push(this.passes[i]);return this.passes=n,this};Wc.prototype.destroy=function(){return this.passes.forEach(e=>{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var Sqe=ye((e_r,Aqe)=>{\"use strict\";var NNt=rw(),UNt=ox(),VNt=mY(),GNt=ey(),bqe=Nh(),wqe=iw(),{float32:HNt,fract32:JY}=nz();Aqe.exports=jNt;var Tqe=[[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]];function jNt(e,t){if(typeof e==\"function\"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");let r=e._gl,n,i,a,o,s,l,u={color:\"black\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:\"dynamic\",type:\"uint8\",data:new Uint8Array(0)}),i=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),a=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),s=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)}),l=e.buffer({usage:\"static\",type:\"float\",data:Tqe}),v(t),n=e({vert:`\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`,frag:`\n",
       "\t\tprecision highp 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`,uniforms:{range:e.prop(\"range\"),lineWidth:e.prop(\"lineWidth\"),capSize:e.prop(\"capSize\"),opacity:e.prop(\"opacity\"),scale:e.prop(\"scale\"),translate:e.prop(\"translate\"),scaleFract:e.prop(\"scaleFract\"),translateFract:e.prop(\"translateFract\"),viewport:(b,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:\"triangles\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop(\"viewport\")},viewport:e.prop(\"viewport\"),stencil:!1,instances:e.prop(\"count\"),count:Tqe.length}),bqe(f,{update:v,draw:h,destroy:_,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&_(),h()}function h(b){if(typeof b==\"number\")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b==\"number\"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]==\"number\"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L==\"function\"?L={after:L}:typeof L[0]==\"number\"&&(L={positions:L});else return C;return L=GNt(L,{color:\"color colors fill\",capSize:\"capSize cap capsize cap-size\",lineWidth:\"lineWidth line-width width line thickness\",opacity:\"opacity alpha\",range:\"range dataBox\",viewport:\"viewport viewBox\",errors:\"errors error\",positions:\"positions position data points\"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=bqe({},u,L)),VNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=wqe(M),k+=M.length,M),positions:(M,g)=>(M=wqe(M,\"float64\"),g.count=Math.floor(M.length/2),g.bounds=NNt(M,2),g.offset=p,p+=g.count,M)},{color:(M,g)=>{let P=g.count;if(M||(M=\"transparent\"),!Array.isArray(M)||typeof M[0]==\"number\"){let z=M;M=Array(P);for(let O=0;O<P;O++)M[O]=z}if(M.length<P)throw Error(\"Not enough colors\");let A=new Uint8Array(P*4);for(let z=0;z<P;z++){let O=UNt(M[z],\"uint8\");A.set(O,z*4)}return A},range:(M,g,P)=>{let A=g.bounds;return M||(M=A),g.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],g.translate=[-M[0],-M[1]],g.scaleFract=JY(g.scale),g.translateFract=JY(g.translate),M},viewport:M=>{let g;return Array.isArray(M)?g={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(g={x:M.x||M.left||0,y:M.y||M.top||0},M.right?g.width=M.right-g.x:g.width=M.w||M.width||0,M.bottom?g.height=M.bottom-g.y:g.height=M.h||M.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,A)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:A,count:z,offset:O,color:U,errors:G}=g;z&&(C.set(U,O*4),M.set(G,O*4),x.set(A,O*2))});var E=HNt(x);i(E);var T=JY(x,E);a(T),o(C),s(M)}}function _(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var kqe=ye((t_r,Eqe)=>{var Mqe=/[\\'\\\"]/;Eqe.exports=function(t){return t?(Mqe.test(t.charAt(0))&&(t=t.substr(1)),Mqe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):\"\"}});var $Y=ye((r_r,WNt)=>{WNt.exports=[\"inherit\",\"initial\",\"unset\"]});var QY=ye((i_r,XNt)=>{XNt.exports=[\"caption\",\"icon\",\"menu\",\"message-box\",\"small-caption\",\"status-bar\"]});var eK=ye((n_r,ZNt)=>{ZNt.exports=[\"normal\",\"bold\",\"bolder\",\"lighter\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"]});var tK=ye((a_r,YNt)=>{YNt.exports=[\"normal\",\"italic\",\"oblique\"]});var rK=ye((o_r,KNt)=>{KNt.exports=[\"normal\",\"condensed\",\"semi-condensed\",\"extra-condensed\",\"ultra-condensed\",\"expanded\",\"semi-expanded\",\"extra-expanded\",\"ultra-expanded\"]});var Iqe=ye((s_r,Pqe)=>{\"use strict\";function Cqe(e,t){if(typeof e!=\"string\")return[e];var r=[e];typeof t==\"string\"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:[\"{}\",\"[]\",\"()\"],i=t.escape||\"___\",a=!!t.flat;n.forEach(function(l){var u=new RegExp([\"\\\\\",l[0],\"[^\\\\\",l[0],\"\\\\\",l[1],\"]*\\\\\",l[1]].join(\"\")),c=[];function f(h,d,v){var _=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(_),i+_+i}r.forEach(function(h,d){for(var v,_=0;h!=v;)if(v=h,h=h.replace(u,f),_++>1e4)throw Error(\"References have circular dependency. Please, check them.\");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp(\"(\\\\\"+i+d+\"\\\\\"+i+\")\",\"g\"),l[0]+\"$1\"+l[1])}),h})});var o=new RegExp(\"\\\\\"+i+\"([0-9]+)\\\\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error(\"Circular references in parenthesis\");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function Lqe(e,t){if(t&&t.flat){var r=t&&t.escape||\"___\",n=e[0],i;if(!n)return\"\";for(var a=new RegExp(\"\\\\\"+r+\"([0-9]+)\\\\\"+r),o=0;n!=i;){if(o++>1e4)throw Error(\"Circular references in \"+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,\"\")),u+c},\"\");function s(l,u){if(e[u]==null)throw Error(\"Reference \"+u+\"is undefined\");return e[u]}}function iK(e,t){return Array.isArray(e)?Lqe(e,t):Cqe(e,t)}iK.parse=Cqe;iK.stringify=Lqe;Pqe.exports=iK});var Fqe=ye((l_r,Dqe)=>{\"use strict\";var Rqe=Iqe();Dqe.exports=function(t,r,n){if(t==null)throw Error(\"First argument should be a string\");if(r==null)throw Error(\"Separator should be a string or a RegExp\");n?(typeof n==\"string\"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=[\"[]\",\"()\",\"{}\",\"<>\",'\"\"',\"''\",\"``\",\"\\u201C\\u201D\",\"\\xAB\\xBB\"]:(typeof n.ignore==\"string\"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=Rqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l<o.length;l++){var u=o[l],c=o[l+1];u[u.length-1]===\"\\\\\"&&u[u.length-2]!==\"\\\\\"?(s.push(u+r+c),l++):s.push(u)}o=s}for(var l=0;l<o.length;l++)i[0]=o[l],o[l]=Rqe.stringify(i,{flat:!0});return o}});var zqe=ye((u_r,JNt)=>{JNt.exports=[\"xx-small\",\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"larger\",\"smaller\"]});var nK=ye((c_r,Oqe)=>{\"use strict\";var $Nt=zqe();Oqe.exports={isSize:function(t){return/^[\\d\\.]/.test(t)||t.indexOf(\"/\")!==-1||$Nt.indexOf(t)!==-1}}});var Uqe=ye((f_r,Nqe)=>{\"use strict\";var QNt=kqe(),eUt=$Y(),tUt=QY(),rUt=eK(),iUt=tK(),nUt=rK(),aK=Fqe(),aUt=nK().isSize;Nqe.exports=Bqe;var Pk=Bqe.cache={};function Bqe(e){if(typeof e!=\"string\")throw new Error(\"Font argument must be a string.\");if(Pk[e])return Pk[e];if(e===\"\")throw new Error(\"Cannot parse an empty string.\");if(tUt.indexOf(e)!==-1)return Pk[e]={system:e};for(var t={style:\"normal\",variant:\"normal\",weight:\"normal\",stretch:\"normal\",lineHeight:\"normal\",size:\"1rem\",family:[\"serif\"]},r=aK(e,/\\s+/),n;n=r.shift();){if(eUt.indexOf(n)!==-1)return[\"style\",\"variant\",\"weight\",\"stretch\"].forEach(function(a){t[a]=n}),Pk[e]=t;if(iUt.indexOf(n)!==-1){t.style=n;continue}if(n===\"normal\"||n===\"small-caps\"){t.variant=n;continue}if(nUt.indexOf(n)!==-1){t.stretch=n;continue}if(rUt.indexOf(n)!==-1){t.weight=n;continue}if(aUt(n)){var i=aK(n,\"/\");if(t.size=i[0],i[1]!=null?t.lineHeight=qqe(i[1]):r[0]===\"/\"&&(r.shift(),t.lineHeight=qqe(r.shift())),!r.length)throw new Error(\"Missing required font-family.\");return t.family=aK(r.join(\" \"),/\\s*,\\s*/).map(QNt),Pk[e]=t}throw new Error(\"Unknown or unsupported font token: \"+n)}throw new Error(\"Missing required font-size.\")}function qqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var sK=ye((h_r,Vqe)=>{\"use strict\";var oUt=ey(),sUt=nK().isSize,lUt=Rk($Y()),uUt=Rk(QY()),cUt=Rk(eK()),fUt=Rk(tK()),hUt=Rk(rK()),dUt={normal:1,\"small-caps\":1},vUt={serif:1,\"sans-serif\":1,monospace:1,cursive:1,fantasy:1,\"system-ui\":1},oK={style:\"normal\",variant:\"normal\",weight:\"normal\",stretch:\"normal\",size:\"1rem\",lineHeight:\"normal\",family:\"serif\"};Vqe.exports=function(t){if(t=oUt(t,{style:\"style fontstyle fontStyle font-style slope distinction\",variant:\"variant font-variant fontVariant fontvariant var capitalization\",weight:\"weight w font-weight fontWeight fontweight\",stretch:\"stretch font-stretch fontStretch fontstretch width\",size:\"size s font-size fontSize fontsize height em emSize\",lineHeight:\"lh line-height lineHeight lineheight leading\",family:\"font family fontFamily font-family fontfamily type typeface face\",system:\"system reserved default global\"}),t.system)return t.system&&Ik(t.system,uUt),t.system;if(Ik(t.style,fUt),Ik(t.variant,dUt),Ik(t.weight,cUt),Ik(t.stretch,hUt),t.size==null&&(t.size=oK.size),typeof t.size==\"number\"&&(t.size+=\"px\"),!sUt)throw Error(\"Bad size value `\"+t.size+\"`\");t.family||(t.family=oK.family),Array.isArray(t.family)&&(t.family.length||(t.family=[oK.family]),t.family=t.family.map(function(n){return vUt[n]?n:'\"'+n+'\"'}).join(\", \"));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight===\"normal\"||t.lineHeight+\"\"==\"1\"?\"\":\"/\"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(\" \")};function Ik(e,t){if(e&&!t[e]&&!lUt[e])throw Error(\"Unknown keyword `\"+e+\"`\");return e}function Rk(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}});var Hqe=ye((d_r,Gqe)=>{\"use strict\";Gqe.exports={parse:Uqe(),stringify:sK()}});var jqe=ye((lK,uK)=>{(function(e,t){typeof lK==\"object\"&&typeof uK!=\"undefined\"?uK.exports=t():e.createREGL=t()})(lK,function(){\"use strict\";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr<zt.length;++Rr)Me[zt[Rr]]=bt[zt[Rr]];return Me},t=0,r=0,n=5,i=6;function a(Me,bt){this.id=t++,this.type=Me,this.data=bt}function o(Me){return Me.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')}function s(Me){if(Me.length===0)return[];var bt=Me.charAt(0),zt=Me.charAt(Me.length-1);if(Me.length>1&&bt===zt&&(bt==='\"'||bt===\"'\"))return['\"'+o(Me.substr(1,Me.length-2))+'\"'];var Rr=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(\".\");if(jr.length===1)return['\"'+o(Me)+'\"'];for(var Nr=[],Gr=0;Gr<jr.length;++Gr)Nr=Nr.concat(s(jr[Gr]));return Nr}function l(Me){return\"[\"+s(Me).join(\"][\")+\"]\"}function u(Me,bt){return new a(Me,l(bt+\"\"))}function c(Me){return typeof Me==\"function\"&&!Me._reglType||Me instanceof a}function f(Me,bt){if(typeof Me==\"function\")return new a(r,Me);if(typeof Me==\"number\"||typeof Me==\"boolean\")return new a(n,Me);if(Array.isArray(Me))return new a(i,Me.map(function(zt,Rr){return f(zt,bt+\"[\"+Rr+\"]\")}));if(Me instanceof a)return Me}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame==\"function\"?function(Me){return requestAnimationFrame(Me)}:function(Me){return setTimeout(Me,16)},cancel:typeof cancelAnimationFrame==\"function\"?function(Me){return cancelAnimationFrame(Me)}:clearTimeout},v=typeof performance!=\"undefined\"&&performance.now?function(){return performance.now()}:function(){return+new Date};function _(){var Me={\"\":0},bt=[\"\"];return{id:function(zt){var Rr=Me[zt];return Rr||(Rr=Me[zt]=bt.length,bt.push(zt),Rr)},str:function(zt){return bt[zt]}}}function b(Me,bt,zt){var Rr=document.createElement(\"canvas\");e(Rr.style,{border:0,margin:0,padding:0,top:0,left:0,width:\"100%\",height:\"100%\"}),Me.appendChild(Rr),Me===document.body&&(Rr.style.position=\"absolute\",e(Me.style,{margin:0,padding:0}));function jr(){var mi=window.innerWidth,Ui=window.innerHeight;if(Me!==document.body){var qi=Rr.getBoundingClientRect();mi=qi.right-qi.left,Ui=qi.bottom-qi.top}Rr.width=zt*mi,Rr.height=zt*Ui}var Nr;Me!==document.body&&typeof ResizeObserver==\"function\"?(Nr=new ResizeObserver(function(){setTimeout(jr)}),Nr.observe(Me)):window.addEventListener(\"resize\",jr,!1);function Gr(){Nr?Nr.disconnect():window.removeEventListener(\"resize\",jr),Me.removeChild(Rr)}return jr(),{canvas:Rr,onDestroy:Gr}}function p(Me,bt){function zt(Rr){try{return Me.getContext(Rr,bt)}catch(jr){return null}}return zt(\"webgl\")||zt(\"experimental-webgl\")||zt(\"webgl-experimental\")}function k(Me){return typeof Me.nodeName==\"string\"&&typeof Me.appendChild==\"function\"&&typeof Me.getBoundingClientRect==\"function\"}function E(Me){return typeof Me.drawArrays==\"function\"||typeof Me.drawElements==\"function\"}function T(Me){return typeof Me==\"string\"?Me.split():Me}function L(Me){return typeof Me==\"string\"?document.querySelector(Me):Me}function x(Me){var bt=Me||{},zt,Rr,jr,Nr,Gr={},mi=[],Ui=[],qi=typeof window==\"undefined\"?1:window.devicePixelRatio,Ei=!1,Hn={},en=function(Mr){},Wi=function(){};if(typeof bt==\"string\"?zt=document.querySelector(bt):typeof bt==\"object\"&&(k(bt)?zt=bt:E(bt)?(Nr=bt,jr=Nr.canvas):(\"gl\"in bt?Nr=bt.gl:\"canvas\"in bt?jr=L(bt.canvas):\"container\"in bt&&(Rr=L(bt.container)),\"attributes\"in bt&&(Gr=bt.attributes),\"extensions\"in bt&&(mi=T(bt.extensions)),\"optionalExtensions\"in bt&&(Ui=T(bt.optionalExtensions)),\"onDone\"in bt&&(en=bt.onDone),\"profile\"in bt&&(Ei=!!bt.profile),\"pixelRatio\"in bt&&(qi=+bt.pixelRatio),\"cachedCode\"in bt&&(Hn=bt.cachedCode))),zt&&(zt.nodeName.toLowerCase()===\"canvas\"?jr=zt:Rr=zt),!Nr){if(!jr){var si=b(Rr||document.body,en,qi);if(!si)return null;jr=si.canvas,Wi=si.onDestroy}Gr.premultipliedAlpha===void 0&&(Gr.premultipliedAlpha=!0),Nr=p(jr,Gr)}return Nr?{gl:Nr,canvas:jr,container:Rr,extensions:mi,optionalExtensions:Ui,pixelRatio:qi,profile:Ei,cachedCode:Hn,onDone:en,onDestroy:Wi}:(Wi(),en(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function C(Me,bt){var zt={};function Rr(Gr){var mi=Gr.toLowerCase(),Ui;try{Ui=zt[mi]=Me.getExtension(mi)}catch(qi){}return!!Ui}for(var jr=0;jr<bt.extensions.length;++jr){var Nr=bt.extensions[jr];if(!Rr(Nr))return bt.onDestroy(),bt.onDone('\"'+Nr+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return bt.optionalExtensions.forEach(Rr),{extensions:zt,restore:function(){Object.keys(zt).forEach(function(Gr){if(zt[Gr]&&!Rr(Gr))throw new Error(\"(regl): error restoring extension \"+Gr)})}}}function M(Me,bt){for(var zt=Array(Me),Rr=0;Rr<Me;++Rr)zt[Rr]=bt(Rr);return zt}var g=5120,P=5121,A=5122,z=5123,O=5124,U=5125,G=5126;function Z(Me){for(var bt=16;bt<=1<<28;bt*=16)if(Me<=bt)return bt;return 0}function j(Me){var bt,zt;return bt=(Me>65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case A:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case U:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,Ce=3412,Le=3413,ge=3414,ie=3415,Se=33901,Ee=33902,Ae=3379,Be=3386,Pe=34921,me=36347,De=36348,ce=35661,je=35660,lt=34930,pt=36349,Vt=34076,ot=34024,ut=7936,Wt=7937,Nt=7938,$t=35724,sr=34047,Tr=36063,fr=34852,$e=3553,St=34067,Qt=34069,Gt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,wr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(fr),jr=Me.getParameter(Tr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,wr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Gt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ce),Me.getParameter(Le)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(ot),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(je),maxVaryingVectors:Me.getParameter(De),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter($t),renderer:Me.getParameter(Wt),vendor:Me.getParameter(ut),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me==\"object\"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset==\"number\"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr<bt;++Rr)zt[Rr]=Me[Rr]}function We(Me,bt,zt,Rr){for(var jr=0,Nr=0;Nr<bt;++Nr)for(var Gr=Me[Nr],mi=0;mi<zt;++mi)Rr[jr++]=Gr[mi]}function tt(Me,bt,zt,Rr,jr,Nr){for(var Gr=Nr,mi=0;mi<bt;++mi)for(var Ui=Me[mi],qi=0;qi<zt;++qi)for(var Ei=Ui[qi],Hn=0;Hn<Rr;++Hn)jr[Gr++]=Ei[Hn]}function xt(Me,bt,zt,Rr,jr){for(var Nr=1,Gr=zt+1;Gr<bt.length;++Gr)Nr*=bt[Gr];var mi=bt[zt];if(bt.length-zt===4){var Ui=bt[zt+1],qi=bt[zt+2],Ei=bt[zt+3];for(Gr=0;Gr<mi;++Gr)tt(Me[Gr],Ui,qi,Ei,Rr,jr),jr+=Nr}else for(Gr=0;Gr<mi;++Gr)xt(Me[Gr],bt,zt+1,Rr,jr),jr+=Nr}function Ie(Me,bt,zt,Rr){var jr=1;if(bt.length)for(var Nr=0;Nr<bt.length;++Nr)jr*=bt[Nr];else jr=0;var Gr=Rr||H.allocType(zt,jr);switch(bt.length){case 0:break;case 1:Je(Me,bt[0],Gr);break;case 2:We(Me,bt[0],bt[1],Gr);break;case 3:tt(Me,bt[0],bt[1],bt[2],Gr,0);break;default:xt(Me,bt,0,Gr,0)}return Gr}function xe(Me){for(var bt=[],zt=Me;zt.length;zt=zt[0])bt.push(zt.length);return bt}var ke={\"[object Int8Array]\":5120,\"[object Int16Array]\":5122,\"[object Int32Array]\":5124,\"[object Uint8Array]\":5121,\"[object Uint8ClampedArray]\":5121,\"[object Uint16Array]\":5123,\"[object Uint32Array]\":5125,\"[object Float32Array]\":5126,\"[object Float64Array]\":5121,\"[object ArrayBuffer]\":5121},vt=5120,ir=5122,ar=5124,vr=5121,ii=5123,pi=5125,$r=5126,di=5126,ji={int8:vt,int16:ir,int32:ar,uint8:vr,uint16:ii,uint32:pi,float:$r,float32:di},In=35048,wi=35040,On={dynamic:In,stream:wi,static:35044},qn=Ge.flatten,Fn=Ge.shape,ra=35044,la=35040,Ut=5121,wt=5126,rr=[];rr[5120]=1,rr[5122]=2,rr[5124]=4,rr[5121]=1,rr[5123]=2,rr[5125]=4,rr[5126]=4;function nr(Me){return ke[Object.prototype.toString.call(Me)]|0}function Er(Me,bt){for(var zt=0;zt<bt.length;++zt)Me[zt]=bt[zt]}function Xr(Me,bt,zt,Rr,jr,Nr,Gr){for(var mi=0,Ui=0;Ui<zt;++Ui)for(var qi=0;qi<Rr;++qi)Me[mi++]=bt[jr*Ui+Nr*qi+Gr]}function ri(Me,bt,zt,Rr){var jr=0,Nr={};function Gr(Mr){this.id=jr++,this.buffer=Me.createBuffer(),this.type=Mr,this.usage=ra,this.byteLength=0,this.dimension=1,this.dtype=Ut,this.persistentData=null,zt.profile&&(this.stats={size:0})}Gr.prototype.bind=function(){Me.bindBuffer(this.type,this.buffer)},Gr.prototype.destroy=function(){en(this)};var mi=[];function Ui(Mr,Yr){var xi=mi.pop();return xi||(xi=new Gr(Mr)),xi.bind(),Hn(xi,Yr,la,0,1,!1),xi}function qi(Mr){mi.push(Mr)}function Ei(Mr,Yr,xi){Mr.byteLength=Yr.byteLength,Me.bufferData(Mr.type,Yr,xi)}function Hn(Mr,Yr,xi,Ri,ci,an){var Zi;if(Mr.usage=xi,Array.isArray(Yr)){if(Mr.dtype=Ri||wt,Yr.length>0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li<Zi.length;++li)hi*=Zi[li];Mr.dimension=hi,Bn=qn(Yr,Zi,Mr.dtype),Ei(Mr,Bn,xi),an?Mr.persistentData=Bn:H.freeType(Bn)}else if(typeof Yr[0]==\"number\"){Mr.dimension=ci;var mn=H.allocType(Mr.dtype,Yr.length);Er(mn,Yr),Ei(Mr,mn,xi),an?Mr.persistentData=mn:H.freeType(mn)}else Br(Yr[0])&&(Mr.dimension=Yr[0].length,Mr.dtype=Ri||nr(Yr[0])||wt,Bn=qn(Yr,[Yr.length,Yr[0].length],Mr.dtype),Ei(Mr,Bn,xi),an?Mr.persistentData=Bn:H.freeType(Bn))}}else if(Br(Yr))Mr.dtype=Ri||nr(Yr),Mr.dimension=ci,Ei(Mr,Yr,xi),an&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr.buffer)));else if(Vr(Yr)){Zi=Yr.shape;var Ji=Yr.stride,Vi=Yr.offset,Ni=0,pn=0,Vn=0,na=0;Zi.length===1?(Ni=Zi[0],pn=1,Vn=Ji[0],na=0):Zi.length===2&&(Ni=Zi[0],pn=Zi[1],Vn=Ji[0],na=Ji[1]),Mr.dtype=Ri||nr(Yr.data)||wt,Mr.dimension=pn;var Ki=H.allocType(Mr.dtype,Ni*pn);Xr(Ki,Yr.data,Ni,pn,Vn,na,Vi),Ei(Mr,Ki,xi),an?Mr.persistentData=Ki:H.freeType(Ki)}else Yr instanceof ArrayBuffer&&(Mr.dtype=Ut,Mr.dimension=ci,Ei(Mr,Yr,xi),an&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr))))}function en(Mr){bt.bufferCount--,Rr(Mr);var Yr=Mr.buffer;Me.deleteBuffer(Yr),Mr.buffer=null,delete Nr[Mr.id]}function Wi(Mr,Yr,xi,Ri){bt.bufferCount++;var ci=new Gr(Yr);Nr[ci.id]=ci;function an(hi){var li=ra,mn=null,Ji=0,Vi=0,Ni=1;return Array.isArray(hi)||Br(hi)||Vr(hi)||hi instanceof ArrayBuffer?mn=hi:typeof hi==\"number\"?Ji=hi|0:hi&&(\"data\"in hi&&(mn=hi.data),\"usage\"in hi&&(li=On[hi.usage]),\"type\"in hi&&(Vi=ji[hi.type]),\"dimension\"in hi&&(Ni=hi.dimension|0),\"length\"in hi&&(Ji=hi.length|0)),ci.bind(),mn?Hn(ci,mn,li,Vi,Ni,Ri):(Ji&&Me.bufferData(ci.type,Ji,li),ci.dtype=Vi||Ut,ci.usage=li,ci.dimension=Ni,ci.byteLength=Ji),zt.profile&&(ci.stats.size=ci.byteLength*rr[ci.dtype]),an}function Zi(hi,li){Me.bufferSubData(ci.type,li,hi)}function Bn(hi,li){var mn=(li||0)|0,Ji;if(ci.bind(),Br(hi)||hi instanceof ArrayBuffer)Zi(hi,mn);else if(Array.isArray(hi)){if(hi.length>0){if(typeof hi[0]==\"number\"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType=\"buffer\",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Xo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci==\"number\")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:(\"data\"in ci&&(an=ci.data),\"usage\"in ci&&(Zi=On[ci.usage]),\"primitive\"in ci&&(Bn=Sn[ci.primitive]),\"count\"in ci&&(hi=ci.count|0),\"type\"in ci&&(mn=Gr[ci.type]),\"length\"in ci?li=ci.length|0:(li=hi,mn===da||mn===Xo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType=\"elements\",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si==\"function\"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt<Me.length;++zt)if(isNaN(Me[zt]))bt[zt]=65535;else if(Me[zt]===1/0)bt[zt]=31744;else if(Me[zt]===-1/0)bt[zt]=64512;else{Jr[0]=Me[zt];var Rr=vi[0],jr=Rr>>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,$n=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return\"[object \"+Me+\"]\"}var uc=ps(\"HTMLCanvasElement\"),xl=ps(\"OffscreenCanvas\"),Gu=ps(\"CanvasRenderingContext2D\"),qs=ps(\"ImageBitmap\"),od=ps(\"HTMLImageElement\"),Po=ps(\"HTMLVideoElement\"),sd=Object.keys(ke).concat([uc,xl,Gu,qs,od,Po]),Ko=[];Ko[Ns]=1,Ko[aa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]==\"number\")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en<mi;++en)for(var Wi=0;Wi<Gr;++Wi)for(var si=0;si<Ui;++si)Ei[Hn++]=bt[zt*Wi+Rr*en+jr*si+Nr];ju(Me,Ei)}function cc(Me,bt,zt,Rr,jr,Nr){var Gr;if(typeof Pa[Me]!=\"undefined\"?Gr=Pa[Me]:Gr=Go[Me]*Ko[bt],Nr&&(Gr*=6),jr){for(var mi=0,Ui=zt;Ui>=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={\"don't care\":sc,\"dont care\":sc,nice:Lf,fast:jh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,\"nearest mipmap nearest\":Jl,\"linear mipmap nearest\":Os,\"nearest mipmap linear\":yu,\"linear mipmap linear\":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,\"rgb5 a1\":ul},Wi={alpha:_o,luminance:po,\"luminance alpha\":Lo,rgb:No,rgba:Ma,rgba4:ko,\"rgb5 a1\":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en[\"half float\"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,\"depth stencil\":As}),e(en,{uint16:Hl,uint32:ac,\"depth stencil\":us})),bt.webgl_compressed_texture_s3tc&&e(si,{\"rgb s3tc dxt1\":Io,\"rgba s3tc dxt1\":ls,\"rgba s3tc dxt3\":Yl,\"rgba s3tc dxt5\":Su}),bt.webgl_compressed_texture_atc&&e(si,{\"rgb atc\":nc,\"rgba atc explicit alpha\":bs,\"rgba atc interpolated alpha\":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{\"rgb pvrtc 4bppv1\":_a,\"rgb pvrtc 2bppv1\":Vu,\"rgba pvrtc 4bppv1\":Ol,\"rgba pvrtc 2bppv1\":xo}),bt.webgl_compressed_texture_etc1&&(si[\"rgb etc1\"]=Kl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf(\"rgba\")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!=\"object\"||!we)){if(\"premultiplyAlpha\"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),\"flipY\"in we&&(ne.flipY=we.flipY),\"alignment\"in we&&(ne.unpackAlignment=we.alignment),\"colorSpace\"in we&&(ne.colorSpace=Hn[we.colorSpace]),\"type\"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;\"shape\"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):(\"radius\"in we&&(ft=Zt=we.radius),\"width\"in we&&(ft=we.width),\"height\"in we&&(Zt=we.height),\"channels\"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if(\"format\"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&(\"type\"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),\"x\"in we&&(ne.xOffset=we.x|0),\"y\"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Zt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!(\"type\"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,jf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Hf(Ue)||Ic(Ue)||yf(Ue))Hf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(Ah(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br<ht.length;++br)ur*=ht[br];var Ur=th(ne,ur);Ge.flatten(Ue,ht,\"\",Ur),ju(ne,Ur),ne.alignment=1,ne.width=Dt,ne.height=yt,ne.channels=Pt,ne.format=ne.internalformat=Hs[Pt],ne.needsFree=!0}ne.type===aa||ne.type}function pn(ne,we,Ue){var ft=ne.element,Zt=ne.data,hr=ne.internalformat,qt=ne.format,Ve=ne.type,Qe=ne.width,at=ne.height;Ji(ne),ft?Me.texImage2D(we,Ue,qt,qt,Ve,ft):ne.compressed?Me.compressedTexImage2D(we,Ue,hr,Qe,at,0,Zt):ne.needsCopy?(Rr(),Me.copyTexImage2D(we,Ue,qt,ne.xOffset,ne.yOffset,Qe,at,0)):Me.texImage2D(we,Ue,qt,Qe,at,0,qt,Ve,Zt||null)}function Vn(ne,we,Ue,ft,Zt){var hr=ne.element,qt=ne.data,Ve=ne.internalformat,Qe=ne.format,at=ne.type,Ct=ne.width,Ot=ne.height;Ji(ne),hr?Me.texSubImage2D(we,Zt,Ue,ft,Qe,at,hr):ne.compressed?Me.compressedTexSubImage2D(we,Zt,Ue,ft,Ve,Ct,Ot,qt):ne.needsCopy?(Rr(),Me.copyTexSubImage2D(we,Zt,Ue,ft,ne.xOffset,ne.yOffset,Ct,Ot)):Me.texSubImage2D(we,Zt,Ue,ft,Ct,Ot,Qe,at,qt)}var na=[];function Ki(){return na.pop()||new Vi}function kn(ne){ne.needsFree&&H.freeType(ne.data),Vi.call(ne),na.push(ne)}function ta(){hi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function oa(ne,we,Ue){var ft=ne.images[0]=Ki();ne.mipmask=1,ft.width=ne.width=we,ft.height=ne.height=Ue,ft.channels=ne.channels=4}function ba(ne,we){var Ue=null;if(_f(we))Ue=ne.images[0]=Ki(),li(Ue,ne),Ni(Ue,we),ne.mipmask=1;else if(mn(ne,we),Array.isArray(we.mipmap))for(var ft=we.mipmap,Zt=0;Zt<ft.length;++Zt)Ue=ne.images[Zt]=Ki(),li(Ue,ne),Ue.width>>=Zt,Ue.height>>=Zt,Ni(Ue,ft[Zt]),ne.mipmask|=1<<Zt;else Ue=ne.images[0]=Ki(),li(Ue,ne),Ni(Ue,we),ne.mipmask=1;li(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===ls||ne.internalformat===Yl||ne.internalformat)}function is(ne,we){for(var Ue=ne.images,ft=0;ft<Ue.length;++ft){if(!Ue[ft])return;pn(Ue[ft],we,ft)}}var Zs=[];function Va(){var ne=Zs.pop()||new ta;hi.call(ne),ne.mipmask=0;for(var we=0;we<16;++we)ne.images[we]=null;return ne}function Ml(ne){for(var we=ne.images,Ue=0;Ue<we.length;++Ue)we[Ue]&&kn(we[Ue]),we[Ue]=null;Zs.push(ne)}function zo(){this.minFilter=pl,this.magFilter=pl,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function Qs(ne,we){if(\"min\"in we){var Ue=we.min;ne.minFilter=Ei[Ue],Es.indexOf(ne.minFilter)>=0&&!(\"faces\"in we)&&(ne.genMipmaps=!0)}if(\"mag\"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if(\"wrap\"in we){var qt=we.wrap;typeof qt==\"string\"?Zt=hr=Ui[qt]:Array.isArray(qt)&&(Zt=Ui[qt[0]],hr=Ui[qt[1]])}else{if(\"wrapS\"in we){var Ve=we.wrapS;Zt=Ui[Ve]}if(\"wrapT\"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Zt,ne.wrapT=hr,\"anisotropic\"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if(\"mipmap\"in we){var Ct=!1;switch(typeof we.mipmap){case\"string\":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case\"boolean\":Ct=ne.genMipmaps=we.mipmap;break;case\"object\":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!(\"min\"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue<Vs;++Ue){var ft=Ys[Ue];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits<we+1&&(Nr.maxTextureUnits=we+1),ne.unit=we,Me.activeTexture(Fu+we),Me.bindTexture(ne.target,ne.texture)}return we},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,we){var Ue=new wa(_n);ss[Ue.id]=Ue,Nr.textureCount++;function ft(qt,Ve){var Qe=Ue.texInfo;zo.call(Qe);var at=Va();return typeof qt==\"number\"?typeof Ve==\"number\"?oa(at,qt|0,Ve|0):oa(at,qt|0,qt|0):qt?(Qs(Qe,qt),ba(at,qt)):oa(at,1,1),Qe.genMipmaps&&(at.mipmask=(at.width<<1)-1),Ue.mipmask=at.mipmask,li(Ue,at),Ue.internalformat=at.internalformat,ft.width=at.width,ft.height=at.height,ol(Ue),is(at,_n),al(Qe,_n),io(),Ml(at),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,at.width,at.height,Qe.genMipmaps,!1)),ft.format=xi[Ue.internalformat],ft.type=Ri[Ue.type],ft.mag=ci[Qe.magFilter],ft.min=an[Qe.minFilter],ft.wrapS=Zi[Qe.wrapS],ft.wrapT=Zi[Qe.wrapT],ft}function Zt(qt,Ve,Qe,at){var Ct=Ve|0,Ot=Qe|0,Rt=at|0,Bt=Ki();return li(Bt,Ue),Bt.width=0,Bt.height=0,Ni(Bt,qt),Bt.width=Bt.width||(Ue.width>>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType=\"texture2d\",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot==\"number\"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot==\"object\")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),\"faces\"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],$n+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,$n+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D($n+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Zt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType=\"textureCube\",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne<Vs;++ne)Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Ys[ne]=null;dt(ss).forEach(Y),Nr.cubeCount=0,Nr.textureCount=0}Gr.profile&&(Nr.getTotalTextureSize=function(){var ne=0;return Object.keys(ss).forEach(function(we){ne+=ss[we].stats.size}),ne});function K(){for(var ne=0;ne<Vs;++ne){var we=Ys[ne];we&&(we.bindCount=0,we.unit=-1,Ys[ne]=null)}dt(ss).forEach(function(Ue){Ue.texture=Me.createTexture(),Me.bindTexture(Ue.target,Ue.texture);for(var ft=0;ft<32;++ft)if((Ue.mipmask&1<<ft)!==0)if(Ue.target===_n)Me.texImage2D(_n,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Me.texImage2D($n+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne<Vs;++ne){var we=Ys[ne];we&&(we.bindCount=0,we.unit=-1,Ys[ne]=null),Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Me.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:q,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,gs=36194,Wf=33189,Wh=36168,rh=34041,sf=35907,Sh=34836,Mu=34842,ih=34843,js=[];js[Kc]=2,js[Rc]=2,js[gs]=2,js[Wf]=2,js[Wh]=1,js[rh]=4,js[sf]=4,js[Sh]=16,js[Mu]=8,js[ih]=6;function Eu(Me,bt,zt){return js[Me]*bt*zt}var Dc=function(Me,bt,zt,Rr,jr){var Nr={rgba4:Kc,rgb565:gs,\"rgb5 a1\":Rc,depth:Wf,stencil:Wh,\"depth stencil\":rh};bt.ext_srgb&&(Nr.srgba=sf),bt.ext_color_buffer_half_float&&(Nr.rgba16f=Mu,Nr.rgb16f=ih),bt.webgl_color_buffer_float&&(Nr.rgba32f=Sh);var Gr=[];Object.keys(Nr).forEach(function(Wi){var si=Nr[Wi];Gr[si]=Wi});var mi=0,Ui={};function qi(Wi){this.id=mi++,this.refCount=1,this.renderbuffer=Wi,this.format=Kc,this.width=0,this.height=0,jr.profile&&(this.stats={size:0})}qi.prototype.decRef=function(){--this.refCount<=0&&Ei(this)};function Ei(Wi){var si=Wi.renderbuffer;Me.bindRenderbuffer(Nl,null),Me.deleteRenderbuffer(si),Wi.renderbuffer=null,Wi.refCount=0,delete Ui[Wi.id],Rr.renderbufferCount--}function Hn(Wi,si){var Mr=new qi(Me.createRenderbuffer());Ui[Mr.id]=Mr,Rr.renderbufferCount++;function Yr(Ri,ci){var an=0,Zi=0,Bn=Kc;if(typeof Ri==\"object\"&&Ri){var hi=Ri;if(\"shape\"in hi){var li=hi.shape;an=li[0]|0,Zi=li[1]|0}else\"radius\"in hi&&(an=Zi=hi.radius|0),\"width\"in hi&&(an=hi.width|0),\"height\"in hi&&(Zi=hi.height|0);\"format\"in hi&&(Bn=Nr[hi.format])}else typeof Ri==\"number\"?(an=Ri|0,typeof ci==\"number\"?Zi=ci|0:Zi=an):Ri||(an=Zi=1);if(!(an===Mr.width&&Zi===Mr.height&&Bn===Mr.format))return Yr.width=Mr.width=an,Yr.height=Mr.height=Zi,Mr.format=Bn,Me.bindRenderbuffer(Nl,Mr.renderbuffer),Me.renderbufferStorage(Nl,Bn,an,Zi),jr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height)),Yr.format=Gr[Mr.format],Yr}function xi(Ri,ci){var an=Ri|0,Zi=ci|0||an;return an===Mr.width&&Zi===Mr.height||(Yr.width=Mr.width=an,Yr.height=Mr.height=Zi,Me.bindRenderbuffer(Nl,Mr.renderbuffer),Me.renderbufferStorage(Nl,Mr.format,an,Zi),jr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height))),Yr}return Yr(Wi,si),Yr.resize=xi,Yr._reglType=\"renderbuffer\",Yr._renderbuffer=Mr,jr.profile&&(Yr.stats=Mr.stats),Yr.destroy=function(){Mr.decRef()},Yr}jr.profile&&(Rr.getTotalRenderbufferSize=function(){var Wi=0;return Object.keys(Ui).forEach(function(si){Wi+=Ui[si].stats.size}),Wi});function en(){dt(Ui).forEach(function(Wi){Wi.renderbuffer=Me.createRenderbuffer(),Me.bindRenderbuffer(Nl,Wi.renderbuffer),Me.renderbufferStorage(Nl,Wi.format,Wi.width,Wi.height)}),Me.bindRenderbuffer(Nl,null)}return{create:Hn,clear:function(){dt(Ui).forEach(Ei)},restore:en}},ks=36160,bc=36161,hu=3553,_u=34069,nl=36064,nh=36096,Mh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,xf=5126,Pf=6407,Ou=6408,bf=[];bf[Ou]=4,bf[Pf]=3;var jl=[];jl[bd]=1,jl[xf]=4,jl[wc]=2;function lf(Me,bt,zt,Rr,jr,Nr){var Gr={cur:null,next:null,dirty:!1,setFBO:null},mi=[\"rgba\"],Ui=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];bt.ext_srgb&&Ui.push(\"srgba\"),bt.ext_color_buffer_half_float&&Ui.push(\"rgba16f\",\"rgb16f\"),bt.webgl_color_buffer_float&&Ui.push(\"rgba32f\");var qi=[\"uint8\"];bt.oes_texture_half_float&&qi.push(\"half float\",\"float16\"),bt.oes_texture_float&&qi.push(\"float\",\"float32\");function Ei(Vi,Ni,pn){this.target=Vi,this.texture=Ni,this.renderbuffer=pn;var Vn=0,na=0;Ni?(Vn=Ni.width,na=Ni.height):pn&&(Vn=pn.width,na=pn.height),this.width=Vn,this.height=na}function Hn(Vi){Vi&&(Vi.texture&&Vi.texture._texture.decRef(),Vi.renderbuffer&&Vi.renderbuffer._renderbuffer.decRef())}function en(Vi,Ni,pn){if(Vi)if(Vi.texture){var Vn=Vi.texture._texture,na=Math.max(1,Vn.width),Ki=Math.max(1,Vn.height);Vn.refCount+=1}else{var kn=Vi.renderbuffer._renderbuffer;kn.refCount+=1}}function Wi(Vi,Ni){Ni&&(Ni.texture?Me.framebufferTexture2D(ks,Vi,Ni.target,Ni.texture._texture.texture,0):Me.framebufferRenderbuffer(ks,Vi,bc,Ni.renderbuffer._renderbuffer.renderbuffer))}function si(Vi){var Ni=hu,pn=null,Vn=null,na=Vi;typeof Vi==\"object\"&&(na=Vi.data,\"target\"in Vi&&(Ni=Vi.target|0));var Ki=na._reglType;return Ki===\"texture2d\"||Ki===\"textureCube\"?pn=na:Ki===\"renderbuffer\"&&(Vn=na,Ni=bc),new Ei(Ni,pn,Vn)}function Mr(Vi,Ni,pn,Vn,na){if(pn){var Ki=Rr.create2D({width:Vi,height:Ni,format:Vn,type:na});return Ki._texture.refCount=0,new Ei(hu,Ki,null)}else{var kn=jr.create({width:Vi,height:Ni,format:Vn});return kn._renderbuffer.refCount=0,new Ei(bc,null,kn)}}function Yr(Vi){return Vi&&(Vi.texture||Vi.renderbuffer)}function xi(Vi,Ni,pn){Vi&&(Vi.texture?Vi.texture.resize(Ni,pn):Vi.renderbuffer&&Vi.renderbuffer.resize(Ni,pn),Vi.width=Ni,Vi.height=pn)}var Ri=0,ci={};function an(){this.id=Ri++,ci[this.id]=this,this.framebuffer=Me.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Zi(Vi){Vi.colorAttachments.forEach(Hn),Hn(Vi.depthAttachment),Hn(Vi.stencilAttachment),Hn(Vi.depthStencilAttachment)}function Bn(Vi){var Ni=Vi.framebuffer;Me.deleteFramebuffer(Ni),Vi.framebuffer=null,Nr.framebufferCount--,delete ci[Vi.id]}function hi(Vi){var Ni;Me.bindFramebuffer(ks,Vi.framebuffer);var pn=Vi.colorAttachments;for(Ni=0;Ni<pn.length;++Ni)Wi(nl+Ni,pn[Ni]);for(Ni=pn.length;Ni<zt.maxColorAttachments;++Ni)Me.framebufferTexture2D(ks,nl+Ni,hu,null,0);Me.framebufferTexture2D(ks,zu,hu,null,0),Me.framebufferTexture2D(ks,nh,hu,null,0),Me.framebufferTexture2D(ks,Mh,hu,null,0),Wi(nh,Vi.depthAttachment),Wi(Mh,Vi.stencilAttachment),Wi(zu,Vi.depthStencilAttachment);var Vn=Me.checkFramebufferStatus(ks);Me.isContextLost(),Me.bindFramebuffer(ks,Gr.next?Gr.next.framebuffer:null),Gr.cur=Gr.next,Me.getError()}function li(Vi,Ni){var pn=new an;Nr.framebufferCount++;function Vn(Ki,kn){var ta,oa=0,ba=0,is=!0,Zs=!0,Va=null,Ml=!0,zo=\"rgba\",Qs=\"uint8\",al=1,Vl=null,ss=null,Vs=null,Ys=!1;if(typeof Ki==\"number\")oa=Ki|0,ba=kn|0||oa;else if(!Ki)oa=ba=1;else{var wa=Ki;if(\"shape\"in wa){var ol=wa.shape;oa=ol[0],ba=ol[1]}else\"radius\"in wa&&(oa=ba=wa.radius),\"width\"in wa&&(oa=wa.width),\"height\"in wa&&(ba=wa.height);(\"color\"in wa||\"colors\"in wa)&&(Va=wa.color||wa.colors,Array.isArray(Va)),Va||(\"colorCount\"in wa&&(al=wa.colorCount|0),\"colorTexture\"in wa&&(Ml=!!wa.colorTexture,zo=\"rgba4\"),\"colorType\"in wa&&(Qs=wa.colorType,Ml||(Qs===\"half float\"||Qs===\"float16\"?zo=\"rgba16f\":(Qs===\"float\"||Qs===\"float32\")&&(zo=\"rgba32f\"))),\"colorFormat\"in wa&&(zo=wa.colorFormat,mi.indexOf(zo)>=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),(\"depthTexture\"in wa||\"depthStencilTexture\"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),\"depth\"in wa&&(typeof wa.depth==\"boolean\"?is=wa.depth:(Vl=wa.depth,Zs=!1)),\"stencil\"in wa&&(typeof wa.stencil==\"boolean\"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),\"depthStencil\"in wa&&(typeof wa.depthStencil==\"boolean\"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta<al;++ta)io[ta]=Mr(oa,ba,Ml,zo,Qs);oa=oa||io[0].width,ba=ba||io[0].height,Vl?Y=si(Vl):is&&!Zs&&(Y=Mr(oa,ba,Ys,\"depth\",\"uint32\")),ss?D=si(ss):Zs&&!is&&(D=Mr(oa,ba,!1,\"stencil\",\"uint8\")),Vs?J=si(Vs):!Vl&&!ss&&Zs&&is&&(J=Mr(oa,ba,Ys,\"depth stencil\",\"depth stencil\"));var q=null;for(ta=0;ta<io.length;++ta)if(en(io[ta],oa,ba),io[ta]&&io[ta].texture){var K=bf[io[ta].texture._texture.format]*jl[io[ta].texture._texture.type];q===null&&(q=K)}return en(Y,oa,ba),en(D,oa,ba),en(J,oa,ba),Zi(pn),pn.width=oa,pn.height=ba,pn.colorAttachments=io,pn.depthAttachment=Y,pn.stencilAttachment=D,pn.depthStencilAttachment=J,Vn.color=io.map(Yr),Vn.depth=Yr(Y),Vn.stencil=Yr(D),Vn.depthStencil=Yr(J),Vn.width=pn.width,Vn.height=pn.height,hi(pn),Vn}function na(Ki,kn){var ta=Math.max(Ki|0,1),oa=Math.max(kn|0||ta,1);if(ta===pn.width&&oa===pn.height)return Vn;for(var ba=pn.colorAttachments,is=0;is<ba.length;++is)xi(ba[is],ta,oa);return xi(pn.depthAttachment,ta,oa),xi(pn.stencilAttachment,ta,oa),xi(pn.depthStencilAttachment,ta,oa),pn.width=Vn.width=ta,pn.height=Vn.height=oa,hi(pn),Vn}return Vn(Vi,Ni),e(Vn,{resize:na,_reglType:\"framebuffer\",_framebuffer:pn,destroy:function(){Bn(pn),Zi(pn)},use:function(Ki){Gr.setFBO({framebuffer:Vn},Ki)}})}function mn(Vi){var Ni=Array(6);function pn(na){var Ki,kn={color:null},ta=0,oa=null,ba=\"rgba\",is=\"uint8\",Zs=1;if(typeof na==\"number\")ta=na|0;else if(!na)ta=1;else{var Va=na;if(\"shape\"in Va){var Ml=Va.shape;ta=Ml[0]}else\"radius\"in Va&&(ta=Va.radius|0),\"width\"in Va?(ta=Va.width|0,\"height\"in Va):\"height\"in Va&&(ta=Va.height|0);(\"color\"in Va||\"colors\"in Va)&&(oa=Va.color||Va.colors,Array.isArray(oa)),oa||(\"colorCount\"in Va&&(Zs=Va.colorCount|0),\"colorType\"in Va&&(is=Va.colorType),\"colorFormat\"in Va&&(ba=Va.colorFormat)),\"depth\"in Va&&(kn.depth=Va.depth),\"stencil\"in Va&&(kn.stencil=Va.stencil),\"depthStencil\"in Va&&(kn.depthStencil=Va.depthStencil)}var zo;if(oa)if(Array.isArray(oa))for(zo=[],Ki=0;Ki<oa.length;++Ki)zo[Ki]=oa[Ki];else zo=[oa];else{zo=Array(Zs);var Qs={radius:ta,format:ba,type:is};for(Ki=0;Ki<Zs;++Ki)zo[Ki]=Rr.createCube(Qs)}for(kn.color=Array(zo.length),Ki=0;Ki<zo.length;++Ki){var al=zo[Ki];ta=ta||al.width,kn.color[Ki]={target:_u,data:zo[Ki]}}for(Ki=0;Ki<6;++Ki){for(var Vl=0;Vl<zo.length;++Vl)kn.color[Vl].target=_u+Ki;Ki>0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki<ta.length;++Ki)ta[Ki].resize(kn);for(Ki=0;Ki<6;++Ki)Ni[Ki].resize(kn);return pn.width=pn.height=kn,pn}return pn(Vi),e(pn,{faces:Ni,resize:Vn,_reglType:\"framebufferCube\",destroy:function(){Ni.forEach(function(na){na.destroy()})}})}function Ji(){Gr.cur=null,Gr.next=null,Gr.dirty=!0,dt(ci).forEach(function(Vi){Vi.framebuffer=Me.createFramebuffer(),hi(Vi)})}return e(Gr,{getFramebuffer:function(Vi){if(typeof Vi==\"function\"&&Vi._reglType===\"framebuffer\"){var Ni=Vi._framebuffer;if(Ni instanceof an)return Ni}return null},create:li,createCube:mn,clear:function(){dt(ci).forEach(Bn)},restore:Ji})}var Xh=5126,If=34962,Cs=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Xh,this.offset=0,this.stride=0,this.divisor=0}function ku(Me,bt,zt,Rr,jr,Nr,Gr){for(var mi=zt.maxAttributes,Ui=new Array(mi),qi=0;qi<mi;++qi)Ui[qi]=new du;var Ei=0,Hn={},en={Record:du,scope:{},state:Ui,currentVAO:null,targetVAO:null,restore:si()?Zi:function(){},createVAO:Bn,getVAO:Yr,destroyBuffer:Wi,setVAO:si()?xi:Ri,clear:si()?ci:function(){}};function Wi(hi){for(var li=0;li<Ui.length;++li){var mn=Ui[li];mn.buffer===hi&&(Me.disableVertexAttribArray(li),mn.buffer=null)}}function si(){return bt.oes_vertex_array_object}function Mr(){return bt.angle_instanced_arrays}function Yr(hi){return typeof hi==\"function\"&&hi._vao?hi._vao:null}function xi(hi){if(hi!==en.currentVAO){var li=si();hi?li.bindVertexArrayOES(hi.vao):li.bindVertexArrayOES(null),en.currentVAO=hi}}function Ri(hi){if(hi!==en.currentVAO){if(hi)hi.bindAttrs();else{for(var li=Mr(),mn=0;mn<Ui.length;++mn){var Ji=Ui[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Ji.buffer.bind(),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offfset),li&&Ji.divisor&&li.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}Gr.elements?Me.bindBuffer(Cs,Gr.elements.buffer.buffer):Me.bindBuffer(Cs,null)}en.currentVAO=hi}}function ci(){dt(Hn).forEach(function(hi){hi.destroy()})}function an(){this.id=++Ei,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var hi=si();hi?this.vao=hi.createVertexArrayOES():this.vao=null,Hn[this.id]=this,this.buffers=[]}an.prototype.bindAttrs=function(){for(var hi=Mr(),li=this.attributes,mn=0;mn<li.length;++mn){var Ji=li[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Me.bindBuffer(If,Ji.buffer.buffer),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offset),hi&&Ji.divisor&&hi.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}for(var Vi=li.length;Vi<mi;++Vi)Me.disableVertexAttribArray(Vi);var Ni=Nr.getElements(this.elements);Ni?Me.bindBuffer(Cs,Ni.buffer.buffer):Me.bindBuffer(Cs,null)},an.prototype.refresh=function(){var hi=si();hi&&(hi.bindVertexArrayOES(this.vao),this.bindAttrs(),en.currentVAO=null,hi.bindVertexArrayOES(null))},an.prototype.destroy=function(){if(this.vao){var hi=si();this===en.currentVAO&&(en.currentVAO=null,hi.bindVertexArrayOES(null)),hi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Hn[this.id]&&(delete Hn[this.id],Rr.vaoCount-=1)};function Zi(){var hi=si();hi&&dt(Hn).forEach(function(li){li.refresh()})}function Bn(hi){var li=new an;Rr.vaoCount+=1;function mn(Ji){var Vi;if(Array.isArray(Ji))Vi=Ji,li.elements&&li.ownsElements&&li.elements.destroy(),li.elements=null,li.ownsElements=!1,li.offset=0,li.count=0,li.instances=-1,li.primitive=4;else{if(Ji.elements){var Ni=Ji.elements;li.ownsElements?typeof Ni==\"function\"&&Ni._reglType===\"elements\"?(li.elements.destroy(),li.ownsElements=!1):(li.elements(Ni),li.ownsElements=!1):Nr.getElements(Ji.elements)?(li.elements=Ji.elements,li.ownsElements=!1):(li.elements=Nr.create(Ji.elements),li.ownsElements=!0)}else li.elements=null,li.ownsElements=!1;Vi=Ji.attributes,li.offset=0,li.count=-1,li.instances=-1,li.primitive=4,li.elements&&(li.count=li.elements._elements.vertCount,li.primitive=li.elements._elements.primType),\"offset\"in Ji&&(li.offset=Ji.offset|0),\"count\"in Ji&&(li.count=Ji.count|0),\"instances\"in Ji&&(li.instances=Ji.instances|0),\"primitive\"in Ji&&(li.primitive=Sn[Ji.primitive])}var pn={},Vn=li.attributes;Vn.length=Vi.length;for(var na=0;na<Vi.length;++na){var Ki=Vi[na],kn=Vn[na]=new du,ta=Ki.data||Ki;if(Array.isArray(ta)||Br(ta)||Vr(ta)){var oa;li.buffers[na]&&(oa=li.buffers[na],Br(ta)&&oa._buffer.byteLength>=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,\"type\"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):\"x\"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba<li.buffers.length;++ba)!pn[ba]&&li.buffers[ba]&&(li.buffers[ba].destroy(),li.buffers[ba]=null);return li.refresh(),mn}return mn.destroy=function(){for(var Ji=0;Ji<li.buffers.length;++Ji)li.buffers[Ji]&&li.buffers[Ji].destroy();li.buffers.length=0,li.ownsElements&&(li.elements.destroy(),li.elements=null,li.ownsElements=!1),li.destroy()},mn._vao=li,mn._reglType=\"vao\",mn(hi)}return en}var Xf=35632,Us=35633,wf=35718,zc=35721;function Wu(Me,bt,zt,Rr){var jr={},Nr={};function Gr(Mr,Yr,xi,Ri){this.name=Mr,this.id=Yr,this.location=xi,this.info=Ri}function mi(Mr,Yr){for(var xi=0;xi<Mr.length;++xi)if(Mr[xi].id===Yr.id){Mr[xi].location=Yr.location;return}Mr.push(Yr)}function Ui(Mr,Yr,xi){var Ri=Mr===Xf?jr:Nr,ci=Ri[Yr];if(!ci){var an=bt.str(Yr);ci=Me.createShader(Mr),Me.shaderSource(ci,an),Me.compileShader(ci),Ri[Yr]=ci}return ci}var qi={},Ei=[],Hn=0;function en(Mr,Yr){this.id=Hn++,this.fragId=Mr,this.vertId=Yr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Rr.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Wi(Mr,Yr,xi){var Ri,ci,an=Ui(Xf,Mr.fragId),Zi=Ui(Us,Mr.vertId),Bn=Mr.program=Me.createProgram();if(Me.attachShader(Bn,an),Me.attachShader(Bn,Zi),xi)for(Ri=0;Ri<xi.length;++Ri){var hi=xi[Ri];Me.bindAttribLocation(Bn,hi[0],hi[1])}Me.linkProgram(Bn);var li=Me.getProgramParameter(Bn,wf);Rr.profile&&(Mr.stats.uniformsCount=li);var mn=Mr.uniforms;for(Ri=0;Ri<li;++Ri)if(ci=Me.getActiveUniform(Bn,Ri),ci)if(ci.size>1)for(var Ji=0;Ji<ci.size;++Ji){var Vi=ci.name.replace(\"[0]\",\"[\"+Ji+\"]\");mi(mn,new Gr(Vi,bt.id(Vi),Me.getUniformLocation(Bn,Vi),ci))}else mi(mn,new Gr(ci.name,bt.id(ci.name),Me.getUniformLocation(Bn,ci.name),ci));var Ni=Me.getProgramParameter(Bn,zc);Rr.profile&&(Mr.stats.attributesCount=Ni);var pn=Mr.attributes;for(Ri=0;Ri<Ni;++Ri)ci=Me.getActiveAttrib(Bn,Ri),ci&&mi(pn,new Gr(ci.name,bt.id(ci.name),Me.getAttribLocation(Bn,ci.name),ci))}Rr.profile&&(zt.getMaxUniformsCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.uniformsCount>Mr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr<Ei.length;++Mr)Wi(Ei[Mr],null,Ei[Mr].attributes.map(function(Yr){return[Yr.location,Yr.name]}))}return{clear:function(){var Mr=Me.deleteShader.bind(Me);dt(jr).forEach(Mr),jr={},dt(Nr).forEach(Mr),Nr={},Ei.forEach(function(Yr){Me.deleteProgram(Yr.program)}),Ei.length=0,qi={},zt.shaderCount=0},program:function(Mr,Yr,xi,Ri){var ci=qi[Yr];ci||(ci=qi[Yr]={});var an=ci[Mr];if(an&&(an.refCount++,!Ri))return an;var Zi=new en(Yr,Mr);return zt.shaderCount++,Wi(Zi,xi,Ri),an||(ci[Mr]=Zi),Ei.push(Zi),e(Zi,{destroy:function(){if(Zi.refCount--,Zi.refCount<=0){Me.deleteProgram(Zi.program);var Bn=Ei.indexOf(Zi);Ei.splice(Bn,1),zt.shaderCount--}ci[Zi.vertId].refCount<=0&&(Me.deleteShader(Nr[Zi.vertId]),delete Nr[Zi.vertId],delete qi[Zi.fragId][Zi.vertId]),Object.keys(qi[Zi.fragId]).length||(Me.deleteShader(jr[Zi.fragId]),delete jr[Zi.fragId],delete qi[Zi.fragId])}})},restore:si,shader:Ui,frag:-1,vert:-1}}var Rf=6408,Xu=5121,uf=3333,Zf=5126;function Wl(Me,bt,zt,Rr,jr,Nr,Gr){function mi(Ei){var Hn;bt.next===null?Hn=Xu:Hn=bt.next.colorAttachments[0].texture._texture.type;var en=0,Wi=0,si=Rr.framebufferWidth,Mr=Rr.framebufferHeight,Yr=null;Br(Ei)?Yr=Ei:Ei&&(en=Ei.x|0,Wi=Ei.y|0,si=(Ei.width||Rr.framebufferWidth-en)|0,Mr=(Ei.height||Rr.framebufferHeight-Wi)|0,Yr=Ei.data||null),zt();var xi=si*Mr*4;return Yr||(Hn===Xu?Yr=new Uint8Array(xi):Hn===Zf&&(Yr=Yr||new Float32Array(xi))),Me.pixelStorei(uf,4),Me.readPixels(en,Wi,si,Mr,Rf,Hn,Yr),Yr}function Ui(Ei){var Hn;return bt.setFBO({framebuffer:Ei.framebuffer},function(){Hn=mi(Ei)}),Hn}function qi(Ei){return!Ei||!(\"framebuffer\"in Ei)?mi(Ei):Ui(Ei)}return qi}var ah=0,Zu=\"\";function Oc(Me){return vu(Tc(fc(Me)))}function Tc(Me){return At(Yi(Bc(Me),Me.length*8))}function wl(Me,bt){var zt=Bc(Me);zt.length>16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?\"0123456789ABCDEF\":\"0123456789abcdef\",zt=\"\",Rr,jr=0;jr<Me.length;jr++)Rr=Me.charCodeAt(jr),zt+=bt.charAt(Rr>>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",zt=\"\",Rr=Me.length,jr=0;jr<Rr;jr+=3)for(var Nr=Me.charCodeAt(jr)<<16|(jr+1<Rr?Me.charCodeAt(jr+1)<<8:0)|(jr+2<Rr?Me.charCodeAt(jr+2):0),Gr=0;Gr<4;Gr++)jr*8+Gr*6>Me.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr<Ui.length;jr++)Ui[jr]=Me.charCodeAt(jr*2)<<8|Me.charCodeAt(jr*2+1);for(;Ui.length>0;){for(mi=Array(),Gr=0,jr=0;jr<Ui.length;jr++)Gr=(Gr<<16)+Ui[jr],Nr=Math.floor(Gr/zt),Gr-=Nr*zt,(mi.length>0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi=\"\";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr<Ei;jr++)qi=bt[0]+qi;return qi}function fc(Me){for(var bt=\"\",zt=-1,Rr,jr;++zt<Me.length;)Rr=Me.charCodeAt(zt),jr=zt+1<Me.length?Me.charCodeAt(zt+1):0,55296<=Rr&&Rr<=56319&&56320<=jr&&jr<=57343&&(Rr=65536+((Rr&1023)<<10)+(jr&1023),zt++),Rr<=127?bt+=String.fromCharCode(Rr):Rr<=2047?bt+=String.fromCharCode(192|Rr>>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt<bt.length;zt++)bt[zt]=0;for(var zt=0;zt<Me.length*8;zt+=8)bt[zt>>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt=\"\",zt=0;zt<Me.length*32;zt+=8)bt+=String.fromCharCode(Me[zt>>5]>>>24-zt%32&255);return bt}function Xt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Xt(Me,2)^Xt(Me,13)^Xt(Me,22)}function Xi(Me){return Xt(Me,6)^Xt(Me,11)^Xt(Me,25)}function dn(Me){return Xt(Me,7)^Xt(Me,18)^Cr(Me,3)}function wn(Me){return Xt(Me,17)^Xt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en<Me.length;en+=16){for(jr=zt[0],Nr=zt[1],Gr=zt[2],mi=zt[3],Ui=zt[4],qi=zt[5],Ei=zt[6],Hn=zt[7],Wi=0;Wi<64;Wi++)Wi<16?Rr[Wi]=Me[Wi+en]:Rr[Wi]=Qi(Qi(Qi(wn(Rr[Wi-2]),Rr[Wi-7]),dn(Rr[Wi-15])),Rr[Wi-16]),si=Qi(Qi(Qi(Qi(Hn,Xi(Ui)),Ar(Ui,qi,Ei)),Nn[Wi]),Rr[Wi]),Mr=Qi(ki(jr),Kr(jr,Nr,Gr)),Hn=Ei,Ei=qi,qi=Ui,Ui=Qi(mi,si),mi=Gr,Gr=Nr,Nr=jr,jr=Qi(si,Mr);zt[0]=Qi(jr,zt[0]),zt[1]=Qi(Nr,zt[1]),zt[2]=Qi(Gr,zt[2]),zt[3]=Qi(mi,zt[3]),zt[4]=Qi(Ui,zt[4]),zt[5]=Qi(qi,zt[5]),zt[6]=Qi(Ei,zt[6]),zt[7]=Qi(Hn,zt[7])}return zt}function Qi(Me,bt){var zt=(Me&65535)+(bt&65535),Rr=(Me>>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join(\"\")}function Qn(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi<jr.length;++xi)if(jr[xi]===si&&!Nr[xi])return Rr[xi]}var Ri=\"g\"+zt++;return Rr.push(Ri),jr.push(si),Nr.push(Yr),Ri}function mi(){var si=[];function Mr(){si.push.apply(si,on(arguments))}var Yr=[];function xi(){var Ri=\"v\"+zt++;return Yr.push(Ri),arguments.length>0&&(si.push(Ri,\"=\"),si.push.apply(si,on(arguments)),si.push(\";\")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?\"var \"+Yr.join(\",\")+\";\":\"\",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,\"=\",si.def(ci,an),\";\")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,\"=\",Zi,\";\")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci=\"else{\"+ci+\"}\"),Fi([\"if(\",si,\"){\",xi(),\"}\",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn=\"a\"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri<Mr;++Ri)xi();var ci=Ui(),an=ci.toString,Zi=Hn[si]=e(ci,{arg:xi,toString:function(){return Fi([\"function(\",Yr.join(),\"){\",an(),\"}\"])}});return Zi}function Wi(){var si=['\"use strict\";',Ei,\"return {\"];Object.keys(Hn).forEach(function(Ri){si.push('\"',Ri,'\":',Hn[Ri].toString(),\",\")}),si.push(\"}\");var Mr=Fi(si).replace(/;/g,`;\n",
       "`).replace(/}/g,`}\n",
       "`).replace(/{/g,`{\n",
       "`),Yr;if(bt&&(Yr=Oc(Mr),bt[Yr]))return bt[Yr].apply(null,jr);var xi=Function.apply(null,Rr.concat(Mr));return bt&&(bt[Yr]=xi),xi.apply(null,jr)}return{global:Ei,link:Gr,block:mi,proc:en,scope:Ui,cond:qi,compile:Wi}}var Ca=\"xyzw\".split(\"\"),Ra=5121,La=1,Na=2,Yn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws=\"dither\",Ho=\"blend.enable\",ml=\"blend.color\",Ws=\"blend.equation\",Ls=\"blend.func\",va=\"depth.enable\",no=\"depth.func\",ys=\"depth.range\",rs=\"depth.mask\",Ql=\"colorMask\",Cu=\"cull.enable\",Yu=\"cull.face\",Nc=\"frontFace\",pu=\"lineWidth\",Uc=\"polygonOffset.enable\",xu=\"polygonOffset.offset\",Ac=\"sample.alpha\",Ua=\"sample.enable\",oo=\"sample.coverage\",Vc=\"stencil.enable\",hc=\"stencil.mask\",Ku=\"stencil.func\",ue=\"stencil.opFront\",w=\"stencil.opBack\",B=\"scissor.enable\",Q=\"scissor.box\",ee=\"viewport\",le=\"profile\",Oe=\"framebuffer\",Ze=\"vert\",st=\"frag\",Tt=\"elements\",Yt=\"primitive\",Kt=\"count\",xr=\"offset\",Ir=\"instances\",ve=\"vao\",be=\"Width\",Re=\"Height\",qe=Oe+be,et=Oe+Re,Xe=ee+be,it=ee+Re,Ft=\"drawingBuffer\",Ht=Ft+be,tr=Ft+Re,dr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],Sr=34962,Or=34963,Wr=2884,ni=3042,Pi=3024,cn=2960,ln=2929,Cn=3089,Kn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Ne=2305,He=32775,Ye=32776,kt=519,nt=7680,jt=0,gr=1,yr=32774,Hr=513,qr=36160,_i=36064,bi={0:0,1:1,zero:0,one:1,\"src color\":768,\"one minus src color\":769,\"src alpha\":770,\"one minus src alpha\":771,\"dst color\":774,\"one minus dst color\":775,\"dst alpha\":772,\"one minus dst alpha\":773,\"constant color\":32769,\"one minus constant color\":32770,\"constant alpha\":32771,\"one minus constant alpha\":32772,\"src alpha saturate\":776},Zr={never:512,less:513,\"<\":513,equal:514,\"=\":514,\"==\":514,\"===\":514,lequal:515,\"<=\":515,greater:516,\">\":516,notequal:517,\"!=\":517,\"!==\":517,gequal:518,\">=\":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt<zt?-1:1})}function ei(Me,bt,zt,Rr){this.thisDep=Me,this.contextDep=bt,this.propDep=zt,this.append=Rr}function Ln(Me){return Me&&!(Me.thisDep||Me.contextDep||Me.propDep)}function En(Me){return new ei(!1,!1,!1,Me)}function Un(Me,bt){var zt=Me.type;if(zt===Yn){var Rr=Me.data.length;return new ei(!0,Rr>=1,Rr>=2,bt)}else if(zt===Zo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui<Me.data.length;++Ui){var qi=Me.data[Ui];if(qi.type===Dn)mi=!0;else if(qi.type===Ka)Gr=!0;else if(qi.type===bo)Nr=!0;else if(qi.type===Yn){Nr=!0;var Ei=qi.data;Ei>=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Zo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,\"reverse subtract\":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(\".\",\"_\")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,\"blendColor\",[0,0,0,0]),Ni(Ws,\"blendEquationSeparate\",[yr,yr]),Ni(Ls,\"blendFuncSeparate\",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,\"depthFunc\",Hr),Ni(ys,\"depthRange\",[0,1]),Ni(rs,\"depthMask\",!0),Ni(Ql,Ql,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,\"cullFace\",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,\"polygonOffset\",[0,0]),Vi(Ac,Aa),Vi(Ua,fa),Ni(oo,\"sampleCoverage\",[1,!1]),Vi(Vc,cn),Ni(hc,\"stencilMask\",-1),Ni(Ku,\"stencilFunc\",[kt,0,-1]),Ni(ue,\"stencilOpSeparate\",[X,nt,nt,nt]),Ni(w,\"stencilOpSeparate\",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,\"scissor\",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=Qn({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId=\"0\";var Ct=Qe(Vn),Ot=Ve.shared={props:\"a0\"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,\".\",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,\".\",Pt),Bt[Pt]=at.def(Ot.current,\".\",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=[\"this\",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),\".call(\",ur.slice(0,Math.max(ht.data.length+1,4)),\")\");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def(\"this\",ht.data);case Zo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(Oe in at){var Ot=at[Oe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,\".next\",yt);var ht=Pt.context;return Dt.set(ht,\".\"+qe,yt+\".width\"),Dt.set(ht,\".\"+et,yt+\".height\"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,\".next\",\"null\");var Pt=yt.context;return Dt.set(Pt,\".\"+qe,Pt+\".\"+Ht),Dt.set(Pt,\".\"+et,Pt+\".\"+tr),\"null\"})}else if(Oe in Ct){var Rt=Ct[Oe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,\".getFramebuffer(\",yt,\")\");Dt.set(ht,\".next\",ur);var br=Pt.context;return Dt.set(br,\".\"+qe,ur+\"?\"+ur+\".width:\"+br+\".\"+Ht),Dt.set(br,\".\"+et,ur+\"?\"+ur+\".height:\"+br+\".\"+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return\"width\"in Pt?Ur=Pt.width|0:ht=!1,\"height\"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;\"width\"in Pt||(Bi=rn.def(Ci,\".\",qe,\"-\",ur));var Gi=Di;return\"height\"in Pt||(Gi=rn.def(Ci,\".\",et,\"-\",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,\".x|0\"),sn=rn.def(Ci,\".y|0\"),zn=rn.def('\"width\" in ',Ci,\"?\",Ci,\".width|0:\",\"(\",Bi,\".\",qe,\"-\",Gi,\")\"),Ja=rn.def('\"height\" in ',Ci,\"?\",Ci,\".height|0:\",\"(\",Bi,\".\",et,\"-\",sn,\")\");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,\".\",qe),rn.def(Ci,\".\",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,\".\"+Xe,ht[2]),Pt.set(ur,\".\"+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[st]==\"string\"&&typeof at[Ze]==\"string\";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]==\"number\"){for(var Bt=[],Dt=0;Dt<Rt.length;++Dt)Bt.push([Ot[Rt[Dt]]|0,Rt[Dt]]);return Bt}}return null}function Zs(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(ht){if(ht in Ct){var ur=bt.id(Ct[ht]),br=En(function(){return ur});return br.id=ur,br}else if(ht in Ot){var Ur=Ot[ht];return Un(Ur,function(Di,fi){var Ti=Di.invoke(fi,Ur),gn=fi.def(Di.shared.strings,\".id(\",Ti,\")\");return gn})}return null}var Bt=Rt(st),Dt=Rt(Ze),yt=null,Pt;return Ln(Bt)&&Ln(Dt)?(yt=Ei.program(Dt.id,Bt.id,null,at),Pt=En(function(ht,ur){return ht.link(yt)})):Pt=new ei(Bt&&Bt.thisDep||Dt&&Dt.thisDep,Bt&&Bt.contextDep||Dt&&Dt.contextDep,Bt&&Bt.propDep||Dt&&Dt.propDep,function(ht,ur){var br=ht.shared.shader,Ur;Bt?Ur=Bt.append(ht,ur):Ur=ur.def(br,\".\",st);var Di;Dt?Di=Dt.append(ht,ur):Di=ur.def(br,\".\",Ze);var fi=br+\".program(\"+Di+\",\"+Ur;return ur.def(fi+\")\")}),{frag:Bt,vert:Dt,progVar:Pt,program:yt}}function Va(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={},Rt=!1;function Bt(){if(ve in at){var rn=at[ve];return rn!==null&&qi.getVAO(rn)===null&&(rn=qi.createVAO(rn)),Rt=!0,Ot.vao=rn,En(function(Bi){var Gi=qi.getVAO(rn);return Gi?Bi.link(Gi):\"null\"})}else if(ve in Ct){Rt=!0;var Ci=Ct[ve];return Un(Ci,function(Bi,Gi){var sn=Bi.invoke(Gi,Ci);return Gi.def(Bi.shared.vao+\".getVAO(\"+sn+\")\")})}return null}var Dt=Bt(),yt=!1;function Pt(){if(Tt in at){var rn=at[Tt];if(Ot.elements=rn,Ii(rn)){var Ci=Ot.elements=Nr.create(rn,!0);rn=Nr.getElements(Ci),yt=!0}else rn&&(rn=Nr.getElements(rn),yt=!0);var Bi=En(function(sn,zn){if(rn){var Ja=sn.link(rn);return sn.ELEMENTS=Ja,Ja}return sn.ELEMENTS=null,null});return Bi.value=rn,Bi}else if(Tt in Ct){yt=!0;var Gi=Ct[Tt];return Un(Gi,function(sn,zn){var Ja=sn.shared,co=Ja.isBufferArgs,ts=Ja.elements,so=sn.invoke(zn,Gi),Yo=zn.def(\"null\"),ms=zn.def(co,\"(\",so,\")\"),ou=sn.cond(ms).then(Yo,\"=\",ts,\".createStream(\",so,\");\").else(Yo,\"=\",ts,\".getElements(\",so,\");\");return zn.entry(ou),zn.exit(sn.cond(ms).then(ts,\".destroyStream(\",Yo,\");\")),sn.ELEMENTS=Yo,Yo})}else if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.elements+\".getElements(\"+sn.shared.vao+\".currentVAO.elements):null\")});return null}var ht=Pt();function ur(){if(Yt in at){var rn=at[Yt];return Ot.primitive=rn,En(function(Bi,Gi){return Sn[rn]})}else if(Yt in Ct){var Ci=Ct[Yt];return Un(Ci,function(Bi,Gi){var sn=Bi.constants.primTypes,zn=Bi.invoke(Gi,Ci);return Gi.def(sn,\"[\",zn,\"]\")})}else{if(yt)return Ln(ht)?ht.value?En(function(Bi,Gi){return Gi.def(Bi.ELEMENTS,\".primType\")}):En(function(){return Al}):new ei(ht.thisDep,ht.contextDep,ht.propDep,function(Bi,Gi){var sn=Bi.ELEMENTS;return Gi.def(sn,\"?\",sn,\".primType:\",Al)});if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(Bi,Gi){return Gi.def(Bi.shared.vao+\".currentVAO?\"+Bi.shared.vao+\".currentVAO.primitive:\"+Al)})}return null}function br(rn,Ci){if(rn in at){var Bi=at[rn]|0;return Ci?Ot.offset=Bi:Ot.instances=Bi,En(function(sn,zn){return Ci&&(sn.OFFSET=Bi),Bi})}else if(rn in Ct){var Gi=Ct[rn];return Un(Gi,function(sn,zn){var Ja=sn.invoke(zn,Gi);return Ci&&(sn.OFFSET=Ja),Ja})}else if(Ci){if(yt)return En(function(sn,zn){return sn.OFFSET=0,0});if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.vao+\".currentVAO.offset:0\")})}else if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.vao+\".currentVAO.instances:-1\")});return null}var Ur=br(xr,!0);function Di(){if(Kt in at){var rn=at[Kt]|0;return Ot.count=rn,En(function(){return rn})}else if(Kt in Ct){var Ci=Ct[Kt];return Un(Ci,function(zn,Ja){var co=zn.invoke(Ja,Ci);return co})}else if(yt)if(Ln(ht)){if(ht)return Ur?new ei(Ur.thisDep,Ur.contextDep,Ur.propDep,function(zn,Ja){var co=Ja.def(zn.ELEMENTS,\".vertCount-\",zn.OFFSET);return co}):En(function(zn,Ja){return Ja.def(zn.ELEMENTS,\".vertCount\")});var Bi=En(function(){return-1});return Bi}else{var Gi=new ei(ht.thisDep||Ur.thisDep,ht.contextDep||Ur.contextDep,ht.propDep||Ur.propDep,function(zn,Ja){var co=zn.ELEMENTS;return zn.OFFSET?Ja.def(co,\"?\",co,\".vertCount-\",zn.OFFSET,\":-1\"):Ja.def(co,\"?\",co,\".vertCount:-1\")});return Gi}else if(Rt){var sn=new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(zn,Ja){return Ja.def(zn.shared.vao,\".currentVAO?\",zn.shared.vao,\".currentVAO.count:-1\")});return sn}return null}var fi=ur(),Ti=Di(),gn=br(Ir,!1);return{elements:ht,primitive:fi,count:Ti,instances:gn,offset:Ur,vao:Dt,vaoActive:Rt,elementsActive:yt,static:Ot}}function Ml(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return hi.forEach(function(Rt){var Bt=Ji(Rt);function Dt(yt,Pt){if(Rt in at){var ht=yt(at[Rt]);Ot[Bt]=En(function(){return ht})}else if(Rt in Ct){var ur=Ct[Rt];Ot[Bt]=Un(ur,function(br,Ur){return Pt(br,Ur,br.invoke(Ur,ur))})}}switch(Rt){case Cu:case Ho:case ws:case Vc:case va:case B:case Uc:case Ac:case Ua:case rs:return Dt(function(yt){return yt},function(yt,Pt,ht){return ht});case no:return Dt(function(yt){return Zr[yt]},function(yt,Pt,ht){var ur=yt.constants.compareFuncs;return Pt.def(ur,\"[\",ht,\"]\")});case ys:return Dt(function(yt){return yt},function(yt,Pt,ht){var ur=Pt.def(\"+\",ht,\"[0]\"),br=Pt.def(\"+\",ht,\"[1]\");return[ur,br]});case Ls:return Dt(function(yt){var Pt=\"srcRGB\"in yt?yt.srcRGB:yt.src,ht=\"srcAlpha\"in yt?yt.srcAlpha:yt.src,ur=\"dstRGB\"in yt?yt.dstRGB:yt.dst,br=\"dstAlpha\"in yt?yt.dstAlpha:yt.dst;return[bi[Pt],bi[ur],bi[ht],bi[br]]},function(yt,Pt,ht){var ur=yt.constants.blendFuncs;function br(Ci,Bi){var Gi=Pt.def('\"',Ci,Bi,'\" in ',ht,\"?\",ht,\".\",Ci,Bi,\":\",ht,\".\",Ci);return Gi}var Ur=br(\"src\",\"RGB\"),Di=br(\"dst\",\"RGB\"),fi=Pt.def(ur,\"[\",Ur,\"]\"),Ti=Pt.def(ur,\"[\",br(\"src\",\"Alpha\"),\"]\"),gn=Pt.def(ur,\"[\",Di,\"]\"),rn=Pt.def(ur,\"[\",br(\"dst\",\"Alpha\"),\"]\");return[fi,gn,Ti,rn]});case Ws:return Dt(function(yt){if(typeof yt==\"string\")return[xi[yt],xi[yt]];if(typeof yt==\"object\")return[xi[yt.rgb],xi[yt.alpha]]},function(yt,Pt,ht){var ur=yt.constants.blendEquations,br=Pt.def(),Ur=Pt.def(),Di=yt.cond(\"typeof \",ht,'===\"string\"');return Di.then(br,\"=\",Ur,\"=\",ur,\"[\",ht,\"];\"),Di.else(br,\"=\",ur,\"[\",ht,\".rgb];\",Ur,\"=\",ur,\"[\",ht,\".alpha];\"),Pt(Di),[br,Ur]});case ml:return Dt(function(yt){return M(4,function(Pt){return+yt[Pt]})},function(yt,Pt,ht){return M(4,function(ur){return Pt.def(\"+\",ht,\"[\",ur,\"]\")})});case hc:return Dt(function(yt){return yt|0},function(yt,Pt,ht){return Pt.def(ht,\"|0\")});case Ku:return Dt(function(yt){var Pt=yt.cmp||\"keep\",ht=yt.ref||0,ur=\"mask\"in yt?yt.mask:-1;return[Zr[Pt],ht,ur]},function(yt,Pt,ht){var ur=yt.constants.compareFuncs,br=Pt.def('\"cmp\" in ',ht,\"?\",ur,\"[\",ht,\".cmp]\",\":\",nt),Ur=Pt.def(ht,\".ref|0\"),Di=Pt.def('\"mask\" in ',ht,\"?\",ht,\".mask|0:-1\");return[br,Ur,Di]});case ue:case w:return Dt(function(yt){var Pt=yt.fail||\"keep\",ht=yt.zfail||\"keep\",ur=yt.zpass||\"keep\";return[Rt===w?se:X,ai[Pt],ai[ht],ai[ur]]},function(yt,Pt,ht){var ur=yt.constants.stencilOps;function br(Ur){return Pt.def('\"',Ur,'\" in ',ht,\"?\",ur,\"[\",ht,\".\",Ur,\"]:\",nt)}return[Rt===w?se:X,br(\"fail\"),br(\"zfail\"),br(\"zpass\")]});case xu:return Dt(function(yt){var Pt=yt.factor|0,ht=yt.units|0;return[Pt,ht]},function(yt,Pt,ht){var ur=Pt.def(ht,\".factor|0\"),br=Pt.def(ht,\".units|0\");return[ur,br]});case Yu:return Dt(function(yt){var Pt=0;return yt===\"front\"?Pt=X:yt===\"back\"&&(Pt=se),Pt},function(yt,Pt,ht){return Pt.def(ht,'===\"front\"?',X,\":\",se)});case pu:return Dt(function(yt){return yt},function(yt,Pt,ht){return ht});case Nc:return Dt(function(yt){return gi[yt]},function(yt,Pt,ht){return Pt.def(ht+'===\"cw\"?'+Te+\":\"+Ne)});case Ql:return Dt(function(yt){return yt.map(function(Pt){return!!Pt})},function(yt,Pt,ht){return M(4,function(ur){return\"!!\"+ht+\"[\"+ur+\"]\"})});case oo:return Dt(function(yt){var Pt=\"value\"in yt?yt.value:1,ht=!!yt.invert;return[Pt,ht]},function(yt,Pt,ht){var ur=Pt.def('\"value\" in ',ht,\"?+\",ht,\".value:1\"),br=Pt.def(\"!!\",ht,\".invert\");return[ur,br]})}}),Ot}function zo(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(Rt){var Bt=at[Rt],Dt;if(typeof Bt==\"number\"||typeof Bt==\"boolean\")Dt=En(function(){return Bt});else if(typeof Bt==\"function\"){var yt=Bt._reglType;yt===\"texture2d\"||yt===\"textureCube\"?Dt=En(function(Pt){return Pt.link(Bt)}):(yt===\"framebuffer\"||yt===\"framebufferCube\")&&(Dt=En(function(Pt){return Pt.link(Bt.color[0])}))}else Mn(Bt)&&(Dt=En(function(Pt){var ht=Pt.global.def(\"[\",M(Bt.length,function(ur){return Bt[ur]}),\"]\");return ht}));Dt.value=Bt,Ot[Rt]=Dt}),Object.keys(Ct).forEach(function(Rt){var Bt=Ct[Rt];Ot[Rt]=Un(Bt,function(Dt,yt){return Dt.invoke(yt,Bt)})}),Ot}function Qs(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(Rt){var Bt=at[Rt],Dt=bt.id(Rt),yt=new Yr;if(Ii(Bt))yt.state=La,yt.buffer=jr.getBuffer(jr.create(Bt,Sr,!1,!0)),yt.type=0;else{var Pt=jr.getBuffer(Bt);if(Pt)yt.state=La,yt.buffer=Pt,yt.type=0;else if(\"constant\"in Bt){var ht=Bt.constant;yt.buffer=\"null\",yt.state=Na,typeof ht==\"number\"?yt.x=ht:Ca.forEach(function(gn,rn){rn<ht.length&&(yt[gn]=ht[rn])})}else{Ii(Bt.buffer)?Pt=jr.getBuffer(jr.create(Bt.buffer,Sr,!1,!0)):Pt=jr.getBuffer(Bt.buffer);var ur=Bt.offset|0,br=Bt.stride|0,Ur=Bt.size|0,Di=!!Bt.normalized,fi=0;\"type\"in Bt&&(fi=ji[Bt.type]);var Ti=Bt.divisor|0;yt.buffer=Pt,yt.state=La,yt.size=Ur,yt.normalized=Di,yt.type=fi||Pt.dtype,yt.offset=ur,yt.stride=br,yt.divisor=Ti}}Ot[Rt]=En(function(gn,rn){var Ci=gn.attribCache;if(Dt in Ci)return Ci[Dt];var Bi={isStream:!1};return Object.keys(yt).forEach(function(Gi){Bi[Gi]=yt[Gi]}),yt.buffer&&(Bi.buffer=gn.link(yt.buffer),Bi.type=Bi.type||Bi.buffer+\".dtype\"),Ci[Dt]=Bi,Bi})}),Object.keys(Ct).forEach(function(Rt){var Bt=Ct[Rt];function Dt(yt,Pt){var ht=yt.invoke(Pt,Bt),ur=yt.shared,br=yt.constants,Ur=ur.isBufferArgs,Di=ur.buffer,fi={isStream:Pt.def(!1)},Ti=new Yr;Ti.state=La,Object.keys(Ti).forEach(function(Bi){fi[Bi]=Pt.def(\"\"+Ti[Bi])});var gn=fi.buffer,rn=fi.type;Pt(\"if(\",Ur,\"(\",ht,\")){\",fi.isStream,\"=true;\",gn,\"=\",Di,\".createStream(\",Sr,\",\",ht,\");\",rn,\"=\",gn,\".dtype;\",\"}else{\",gn,\"=\",Di,\".getBuffer(\",ht,\");\",\"if(\",gn,\"){\",rn,\"=\",gn,\".dtype;\",'}else if(\"constant\" in ',ht,\"){\",fi.state,\"=\",Na,\";\",\"if(typeof \"+ht+'.constant === \"number\"){',fi[Ca[0]],\"=\",ht,\".constant;\",Ca.slice(1).map(function(Bi){return fi[Bi]}).join(\"=\"),\"=0;\",\"}else{\",Ca.map(function(Bi,Gi){return fi[Bi]+\"=\"+ht+\".constant.length>\"+Gi+\"?\"+ht+\".constant[\"+Gi+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",Ur,\"(\",ht,\".buffer)){\",gn,\"=\",Di,\".createStream(\",Sr,\",\",ht,\".buffer);\",\"}else{\",gn,\"=\",Di,\".getBuffer(\",ht,\".buffer);\",\"}\",rn,'=\"type\" in ',ht,\"?\",br.glTypes,\"[\",ht,\".type]:\",gn,\".dtype;\",fi.normalized,\"=!!\",ht,\".normalized;\");function Ci(Bi){Pt(fi[Bi],\"=\",ht,\".\",Bi,\"|0;\")}return Ci(\"size\"),Ci(\"offset\"),Ci(\"stride\"),Ci(\"divisor\"),Pt(\"}}\"),Pt.exit(\"if(\",fi.isStream,\"){\",Di,\".destroyStream(\",gn,\");\",\"}\"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt==\"number\"||typeof Rt==\"boolean\"?\"\"+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,\".\"+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,\".\",Bt,\"=[\",yt.join(),\"];\"):Rt(Ot,\".\",Bt,\"=\",yt,\";\")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,\".webgl_draw_buffers\"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,\".next\"),Ct||Qe(\"if(\",ur,\"!==\",Bt,\".cur){\"),Qe(\"if(\",ur,\"){\",Rt,\".bindFramebuffer(\",qr,\",\",ur,\".framebuffer);\"),ci&&Qe(Dt,\".drawBuffersWEBGL(\",Pt,\"[\",ur,\".colorAttachments.length]);\"),Qe(\"}else{\",Rt,\".bindFramebuffer(\",qr,\",null);\"),ci&&Qe(Dt,\".drawBuffersWEBGL(\",ht,\");\"),Qe(\"}\",Bt,\".cur=\",ur,\";\"),Ct||Qe(\"}\")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,\".dirty\");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,\"[\",Ti,\"]\")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+\"!==\"+Ur+\"[\"+gn+\"]\"}).join(\"||\")).then(Ot,\".\",mn[ur],\"(\",Di,\");\",Di.map(function(Ti,gn){return Ur+\"[\"+gn+\"]=\"+Ti}).join(\";\"),\";\"))}else{br=Pt.def(yt,\".\",ur);var fi=Ve.cond(br,\"!==\",Dt,\".\",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,\".enable(\",li[ur],\");\").else(Ot,\".disable(\",li[ur],\");\"),Dt,\".\",ur,\"=\",br,\";\"):fi(Ot,\".\",mn[ur],\"(\",br,\");\",Dt,\".\",ur,\"=\",br,\";\")}}}),Object.keys(at.state).length===0&&Pt(Dt,\".dirty=false;\"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,\".enable(\",br,\");\").else(Dt,\".disable(\",br,\");\")),Qe(Bt,\".\",Pt,\"=\",yt,\";\")):(Qe(Ve.cond(ur).then(Dt,\".enable(\",br,\");\").else(Dt,\".disable(\",br,\");\")),Qe(Bt,\".\",Pt,\"=\",ur,\";\"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,\".\",mn[Pt],\"(\",ur,\");\",ur.map(function(Di,fi){return Ur+\"[\"+fi+\"]=\"+Di}).join(\";\"),\";\")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,\".\",mn[Pt],\"(\",yt,\");\",Bt,\".\",Pt,\"=\",yt,\";\")):Qe(Dt,\".\",mn[Pt],\"(\",ur,\");\",Bt,\".\",Pt,\"=\",ur,\";\")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,\".angle_instanced_arrays\"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance==\"undefined\"?\"Date.now()\":\"performance.now()\"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,\"=\",ht(),\";\"),typeof Ot==\"string\"?Ci(Bt,\".count+=\",Ot,\";\"):Ci(Bt,\".count++;\"),Wi&&(Ct?(br=Qe.def(),Ci(br,\"=\",yt,\".getNumPendingQueries();\")):Ci(yt,\".beginQuery(\",Bt,\");\"))}function Di(Ci){Ci(Bt,\".cpuTime+=\",ht(),\"-\",ur,\";\"),Wi&&(Ct?Ci(yt,\".pushScopeStats(\",br,\",\",yt,\".getNumPendingQueries(),\",Bt,\");\"):Ci(yt,\".endQuery();\"))}function fi(Ci){var Bi=Qe.def(Dt,\".profile\");Qe(Dt,\".profile=\",Ci,\";\"),Qe.exit(Dt,\".profile=\",Bi,\";\")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi(\"true\")):fi(\"false\");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,\".profile\");var gn=Ve.block();Ur(gn),Qe(\"if(\",Ti,\"){\",gn,\"}\");var rn=Ve.block();Di(rn),Qe.exit(\"if(\",Ti,\"){\",rn,\"}\")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,\".location\"),Ur=Qe.def(Rt.attributes,\"[\",br,\"]\"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=[\"buffer\",\"normalized\",\"offset\",\"stride\"];function rn(){Qe(\"if(!\",Ur,\".buffer){\",ur,\".enableVertexAttribArray(\",br,\");}\");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,\"||\",Pt):Gi=Pt,Qe(\"if(\",Ur,\".type!==\",Bi,\"||\",Ur,\".size!==\",Gi,\"||\",gn.map(function(zn){return Ur+\".\"+zn+\"!==\"+ht[zn]}).join(\"||\"),\"){\",ur,\".bindBuffer(\",Sr,\",\",fi,\".buffer);\",ur,\".vertexAttribPointer(\",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],\");\",Ur,\".type=\",Bi,\";\",Ur,\".size=\",Gi,\";\",gn.map(function(zn){return Ur+\".\"+zn+\"=\"+ht[zn]+\";\"}).join(\"\"),\"}\"),Ri){var sn=ht.divisor;Qe(\"if(\",Ur,\".divisor!==\",sn,\"){\",Ve.instancing,\".vertexAttribDivisorANGLE(\",[br,sn],\");\",Ur,\".divisor=\",sn,\";}\")}}function Ci(){Qe(\"if(\",Ur,\".buffer){\",ur,\".disableVertexAttribArray(\",br,\");\",Ur,\".buffer=null;\",\"}if(\",Ca.map(function(Bi,Gi){return Ur+\".\"+Bi+\"!==\"+Ti[Gi]}).join(\"||\"),\"){\",ur,\".vertexAttrib4f(\",br,\",\",Ti,\");\",Ca.map(function(Bi,Gi){return Ur+\".\"+Bi+\"=\"+Ti[Gi]+\";\"}).join(\"\"),\"}\")}Di===La?rn():Di===Na?Ci():(Qe(\"if(\",Di,\"===\",La,\"){\"),rn(),Qe(\"}else{\"),Ci(),Qe(\"}\"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,\".\",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt<Ct.length;++Pt){var ht=Ct[Pt],ur=ht.name,br=ht.info.type,Ur=at.uniforms[ur],Di=Ve.link(ht),fi=Di+\".location\",Ti;if(Ur){if(!Ot(Ur))continue;if(Ln(Ur)){var gn=Ur.value;if(br===dc||br===Tl){var rn=Ve.link(gn._texture||gn.color[0]._texture);Qe(Dt,\".uniform1i(\",fi,\",\",rn+\".bind());\"),Qe.exit(rn,\".unbind();\")}else if(br===au||br===Js||br===eu){var Ci=Ve.global.def(\"new Float32Array([\"+Array.prototype.slice.call(gn)+\"])\"),Bi=2;br===Js?Bi=3:br===eu&&(Bi=4),Qe(Dt,\".uniformMatrix\",Bi,\"fv(\",fi,\",false,\",Ci,\");\")}else{switch(br){case $a:yt=\"1f\";break;case Co:yt=\"2f\";break;case Qa:yt=\"3f\";break;case mo:yt=\"4f\";break;case To:yt=\"1i\";break;case Bo:yt=\"1i\";break;case hl:yt=\"2i\";break;case Ps:yt=\"2i\";break;case Ul:yt=\"3i\";break;case Ts:yt=\"3i\";break;case Lu:yt=\"4i\";break;case wo:yt=\"4i\";break}Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",Mn(gn)?Array.prototype.slice.call(gn):gn,\");\")}continue}else Ti=Ur.append(Ve,Qe)}else{if(!Ot(ia))continue;Ti=Qe.def(Bt.uniforms,\"[\",bt.id(ur),\"]\")}br===dc?Qe(\"if(\",Ti,\"&&\",Ti,'._reglType===\"framebuffer\"){',Ti,\"=\",Ti,\".color[0];\",\"}\"):br===Tl&&Qe(\"if(\",Ti,\"&&\",Ti,'._reglType===\"framebufferCube\"){',Ti,\"=\",Ti,\".color[0];\",\"}\");var Gi=1;switch(br){case dc:case Tl:var sn=Qe.def(Ti,\"._texture\");Qe(Dt,\".uniform1i(\",fi,\",\",sn,\".bind());\"),Qe.exit(sn,\".unbind();\");continue;case Bo:case To:yt=\"1i\";break;case Ps:case hl:yt=\"2i\",Gi=2;break;case Ts:case Ul:yt=\"3i\",Gi=3;break;case wo:case Lu:yt=\"4i\",Gi=4;break;case $a:yt=\"1f\";break;case Co:yt=\"2f\",Gi=2;break;case Qa:yt=\"3f\",Gi=3;break;case mo:yt=\"4f\",Gi=4;break;case au:yt=\"Matrix2fv\";break;case Js:yt=\"Matrix3fv\";break;case eu:yt=\"Matrix4fv\";break}if(yt.charAt(0)===\"M\"){Qe(Dt,\".uniform\",yt,\"(\",fi,\",\");var zn=Math.pow(br-au+2,2),Ja=Ve.global.def(\"new Float32Array(\",zn,\")\");Array.isArray(Ti)?Qe(\"false,(\",M(zn,function(ms){return Ja+\"[\"+ms+\"]=\"+Ti[ms]}),\",\",Ja,\")\"):Qe(\"false,(Array.isArray(\",Ti,\")||\",Ti,\" instanceof Float32Array)?\",Ti,\":(\",M(zn,function(ms){return Ja+\"[\"+ms+\"]=\"+Ti+\"[\"+ms+\"]\"}),\",\",Ja,\")\"),Qe(\");\")}else if(Gi>1){for(var co=[],ts=[],so=0;so<Gi;++so)Array.isArray(Ti)?ts.push(Ti[so]):ts.push(Qe.def(Ti+\"[\"+so+\"]\")),Rt&&co.push(Qe.def());Rt&&Qe(\"if(!\",Ve.batchId,\"||\",co.map(function(ms,ou){return ms+\"!==\"+ts[ou]}).join(\"||\"),\"){\",co.map(function(ms,ou){return ms+\"=\"+ts[ou]+\";\"}).join(\"\")),Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",ts.join(\",\"),\");\"),Rt&&Qe(\"}\")}else{if(Rt){var Yo=Qe.def();Qe(\"if(!\",Ve.batchId,\"||\",Yo,\"!==\",Ti,\"){\",Yo,\"=\",Ti,\";\")}Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",Ti,\");\"),Rt&&Qe(\"}\")}}}function J(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.draw,Dt=Ct.draw;function yt(){var Gi=Dt.elements,sn,zn=Qe;return Gi?((Gi.contextDep&&Ct.contextDynamic||Gi.propDep)&&(zn=at),sn=Gi.append(Ve,zn),Dt.elementsActive&&zn(\"if(\"+sn+\")\"+Rt+\".bindBuffer(\"+Or+\",\"+sn+\".buffer.buffer);\")):(sn=zn.def(),zn(sn,\"=\",Bt,\".\",Tt,\";\",\"if(\",sn,\"){\",Rt,\".bindBuffer(\",Or,\",\",sn,\".buffer.buffer);}\",\"else if(\",Ot.vao,\".currentVAO){\",sn,\"=\",Ve.shared.elements+\".getElements(\"+Ot.vao,\".currentVAO.elements);\",an?\"\":\"if(\"+sn+\")\"+Rt+\".bindBuffer(\"+Or+\",\"+sn+\".buffer.buffer);\",\"}\")),sn}function Pt(){var Gi=Dt.count,sn,zn=Qe;return Gi?((Gi.contextDep&&Ct.contextDynamic||Gi.propDep)&&(zn=at),sn=Gi.append(Ve,zn)):sn=zn.def(Bt,\".\",Kt),sn}var ht=yt();function ur(Gi){var sn=Dt[Gi];return sn?sn.contextDep&&Ct.contextDynamic||sn.propDep?sn.append(Ve,at):sn.append(Ve,Qe):Qe.def(Bt,\".\",Gi)}var br=ur(Yt),Ur=ur(xr),Di=Pt();if(typeof Di==\"number\"){if(Di===0)return}else at(\"if(\",Di,\"){\"),at.exit(\"}\");var fi,Ti;Ri&&(fi=ur(Ir),Ti=Ve.instancing);var gn=ht+\".type\",rn=Dt.elements&&Ln(Dt.elements)&&!Dt.vaoActive;function Ci(){function Gi(){at(Ti,\".drawElementsInstancedANGLE(\",[br,Di,gn,Ur+\"<<((\"+gn+\"-\"+Ra+\")>>1)\",fi],\");\")}function sn(){at(Ti,\".drawArraysInstancedANGLE(\",[br,Ur,Di,fi],\");\")}ht&&ht!==\"null\"?rn?Gi():(at(\"if(\",ht,\"){\"),Gi(),at(\"}else{\"),sn(),at(\"}\")):sn()}function Bi(){function Gi(){at(Rt+\".drawElements(\"+[br,Di,gn,Ur+\"<<((\"+gn+\"-\"+Ra+\")>>1)\"]+\");\")}function sn(){at(Rt+\".drawArrays(\"+[br,Ur,Di]+\");\")}ht&&ht!==\"null\"?rn?Gi():(at(\"if(\",ht,\"){\"),Gi(),at(\"}else{\"),sn(),at(\"}\")):sn()}Ri&&(typeof fi!=\"number\"||fi>=0)?typeof fi==\"string\"?(at(\"if(\",fi,\">0){\"),Ci(),at(\"}else if(\",fi,\"<0){\"),Bi(),at(\"}\")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc(\"body\",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,\".angle_instanced_arrays\")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Qe),\");\"):Qe(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Qe(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc(\"draw\",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Ct,\".program);\"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var Ot=Ve.global.def(\"{}\"),Rt=at.def(Ct,\".id\"),Bt=at.def(Ot,\"[\",Rt,\"]\");at(Ve.cond(Bt).then(Bt,\".call(this,a0);\").else(Bt,\"=\",Ot,\"[\",Rt,\"]=\",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),\"(\",Ct,\");\",Bt,\".call(this,a0);\"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ne(Ve,Qe,at,Ct){Ve.batchId=\"a1\",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt=\"a0\",Dt=\"a1\",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,\"for(\",Rt,\"=0;\",Rt,\"<\",Dt,\";++\",Rt,\"){\",yt,\"=\",Bt,\"[\",Rt,\"];\",ht,\"}\",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,ht),\");\"):Pt(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Pt),\");\"):Pt(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Pt(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def(\"{}\"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,\".id\"),Ti=ht.def(Ur,\"[\",fi,\"]\");ht(Ve.shared.gl,\".useProgram(\",Di,\".program);\",\"if(!\",Ti,\"){\",Ti,\"=\",Ur,\"[\",fi,\"]=\",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),\"(\",Di,\");}\",Ti,\".call(this,a0[\",Rt,\"],\",Rt,\");\")}}function Ue(Ve,Qe){var at=Ve.proc(\"batch\",2);Ve.batchId=\"0\",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,\"a1\"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Pt,\".program);\"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var ht=Ve.global.def(\"{}\"),ur=at.def(Pt,\".id\"),br=at.def(ht,\"[\",ur,\"]\");at(Ve.cond(br).then(br,\".call(this,a0,a1);\").else(br,\"=\",ht,\"[\",ur,\"]=\",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),\"(\",Pt,\");\",br,\".call(this,a0,a1);\"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ft(Ve,Qe){var at=Ve.proc(\"scope\",3);Ve.batchId=\"a2\";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],\"[\"+ur+\"]\",ht):at.set(Ve.next[Dt],\"[\"+ur+\"]\",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,\".\"+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,\".\"+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,\".\"+Dt,Pt):at.set(Ct.draw,\".\"+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt=\"[\"+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+\"]\"),at.set(Ct.uniforms,\"[\"+Ve.link(bt.id(Dt),{stable:!0})+\"]\",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,\".\"+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,\".targetVAO\",Rt):at.set(Ct.vao,\".targetVAO\",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,\".\"+Dt,Pt):at.set(Ct.shader,\".\"+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Ze),Bt(st),Object.keys(Qe.state).length>0&&(at(Ot,\".dirty=true;\"),at.exit(Ot,\".dirty=true;\")),at(\"a1(\",Ve.shared.context,\",a0,\",Ve.batchId,\");\")}function Zt(Ve){if(!(typeof Ve!=\"object\"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at<Qe.length;++at)if(h.isDynamic(Ve[Qe[at]]))return!0;return!1}}function hr(Ve,Qe,at){var Ct=Qe.static[at];if(!Ct||!Zt(Ct))return;var Ot=Ve.global,Rt=Object.keys(Ct),Bt=!1,Dt=!1,yt=!1,Pt=Ve.global.def(\"{}\");Rt.forEach(function(ur){var br=Ct[ur];if(h.isDynamic(br)){typeof br==\"function\"&&(br=Ct[ur]=h.unbox(br));var Ur=Un(br,null);Bt=Bt||Ur.thisDep,yt=yt||Ur.propDep,Dt=Dt||Ur.contextDep}else{switch(Ot(Pt,\".\",ur,\"=\"),typeof br){case\"number\":Ot(br);break;case\"string\":Ot('\"',br,'\"');break;case\"object\":Array.isArray(br)&&Ot(\"[\",br.join(),\"]\");break;default:Ot(Ve.link(br));break}Ot(\";\")}});function ht(ur,br){Rt.forEach(function(Ur){var Di=Ct[Ur];if(h.isDynamic(Di)){var fi=ur.invoke(br,Di);br(Pt,\".\",Ur,\"=\",fi,\";\")}})}Qe.dynamic[at]=new h.DynamicVariable(Zo,{thisDep:Bt,contextDep:Dt,propDep:yt,ref:Pt,append:ht}),delete Qe.static[at]}function qt(Ve,Qe,at,Ct,Ot){var Rt=kn();Rt.stats=Rt.link(Ot),Object.keys(Qe.static).forEach(function(Dt){hr(Rt,Qe,Dt)}),dr.forEach(function(Dt){hr(Rt,Ve,Dt)});var Bt=Vl(Ve,Qe,at,Ct,Rt);return Bt.shader.program&&(Bt.shader.program.attributes.sort(function(Dt,yt){return Dt.name<yt.name?-1:1}),Bt.shader.program.uniforms.sort(function(Dt,yt){return Dt.name<yt.name?-1:1})),de(Rt,Bt),ft(Rt,Bt),Ue(Rt,Bt),e(Rt.compile(),{destroy:function(){Bt.shader.program.destroy()}})}return{next:Bn,current:Zi,procs:function(){var Ve=kn(),Qe=Ve.proc(\"poll\"),at=Ve.proc(\"refresh\"),Ct=Ve.block();Qe(Ct),at(Ct);var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.next,Dt=Ot.current;Ct(Dt,\".dirty=false;\"),Vs(Ve,Qe),Vs(Ve,at,null,!0);var yt;Ri&&(yt=Ve.link(Ri)),zt.oes_vertex_array_object&&at(Ve.link(zt.oes_vertex_array_object),\".bindVertexArrayOES(null);\");var Pt=at.def(Ot.attributes),ht=at.def(0),ur=Ve.cond(ht,\".buffer\");ur.then(Rt,\".enableVertexAttribArray(i);\",Rt,\".bindBuffer(\",Sr,\",\",ht,\".buffer.buffer);\",Rt,\".vertexAttribPointer(i,\",ht,\".size,\",ht,\".type,\",ht,\".normalized,\",ht,\".stride,\",ht,\".offset);\").else(Rt,\".disableVertexAttribArray(i);\",Rt,\".vertexAttrib4f(i,\",ht,\".x,\",ht,\".y,\",ht,\".z,\",ht,\".w);\",ht,\".buffer=null;\");var br=Ve.link(Rr.maxAttributes,{stable:!0});return at(\"for(var i=0;i<\",br,\";++i){\",ht,\"=\",Pt,\"[i];\",ur,\"}\"),Ri&&at(\"for(var i=0;i<\",br,\";++i){\",yt,\".vertexAttribDivisorANGLE(i,\",Pt,\"[i].divisor);\",\"}\"),at(Ve.shared.vao,\".currentVAO=null;\",Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"),Object.keys(li).forEach(function(Ur){var Di=li[Ur],fi=Ct.def(Bt,\".\",Ur),Ti=Ve.block();Ti(\"if(\",fi,\"){\",Rt,\".enable(\",Di,\")}else{\",Rt,\".disable(\",Di,\")}\",Dt,\".\",Ur,\"=\",fi,\";\"),at(Ti),Qe(\"if(\",fi,\"!==\",Dt,\".\",Ur,\"){\",Ti,\"}\")}),Object.keys(mn).forEach(function(Ur){var Di=mn[Ur],fi=Zi[Ur],Ti,gn,rn=Ve.block();if(rn(Rt,\".\",Di,\"(\"),Mn(fi)){var Ci=fi.length;Ti=Ve.global.def(Bt,\".\",Ur),gn=Ve.global.def(Dt,\".\",Ur),rn(M(Ci,function(Bi){return Ti+\"[\"+Bi+\"]\"}),\");\",M(Ci,function(Bi){return gn+\"[\"+Bi+\"]=\"+Ti+\"[\"+Bi+\"];\"}).join(\"\")),Qe(\"if(\",M(Ci,function(Bi){return Ti+\"[\"+Bi+\"]!==\"+gn+\"[\"+Bi+\"]\"}).join(\"||\"),\"){\",rn,\"}\")}else Ti=Ct.def(Bt,\".\",Ur),gn=Ct.def(Dt,\".\",Ur),rn(Ti,\");\",Dt,\".\",Ur,\"=\",Ti,\";\"),Qe(\"if(\",Ti,\"!==\",gn,\"){\",rn,\"}\");at(rn)}),Ve.compile()}(),compile:qt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var zt=[];function Rr(){return zt.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function jr(xi){zt.push(xi)}var Nr=[];function Gr(xi){var Ri=Rr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ri),Nr.push(Ri),Wi(Nr.length-1,Nr.length,xi)}function mi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ui(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Ei(){return qi.pop()||new Ui}function Hn(xi){qi.push(xi)}var en=[];function Wi(xi,Ri,ci){var an=Ei();an.startQueryIndex=xi,an.endQueryIndex=Ri,an.sum=0,an.stats=ci,en.push(an)}var si=[],Mr=[];function Yr(){var xi,Ri,ci=Nr.length;if(ci!==0){Mr.length=Math.max(Mr.length,ci+1),si.length=Math.max(si.length,ci+1),si[0]=0,Mr[0]=0;var an=0;for(xi=0,Ri=0;Ri<Nr.length;++Ri){var Zi=Nr[Ri];bt.ext_disjoint_timer_query.getQueryObjectEXT(Zi,Da)?(an+=bt.ext_disjoint_timer_query.getQueryObjectEXT(Zi,yo),jr(Zi)):Nr[xi++]=Zi,si[Ri+1]=an,Mr[Ri+1]=xi}for(Nr.length=xi,xi=0,Ri=0;Ri<en.length;++Ri){var Bn=en[Ri],hi=Bn.startQueryIndex,li=Bn.endQueryIndex;Bn.sum+=si[li]-si[hi];var mn=Mr[hi],Ji=Mr[li];Ji===mn?(Bn.stats.gpuTime+=Bn.sum/1e6,Hn(Bn)):(Bn.startQueryIndex=mn,Bn.endQueryIndex=Ji,en[xi++]=Bn)}en.length=xi}}return{beginQuery:Gr,endQuery:mi,pushScopeStats:Wi,update:Yr,getNumPendingQueries:function(){return Nr.length},clear:function(){zt.push.apply(zt,Nr);for(var xi=0;xi<zt.length;xi++)bt.ext_disjoint_timer_query.deleteQueryEXT(zt[xi]);Nr.length=0,zt.length=0},restore:function(){Nr.length=0,zt.length=0}}},Ms=16384,Xs=256,Gn=1024,ja=34962,Fo=\"webglcontextlost\",Uo=\"webglcontextrestored\",$s=1,Sl=2,bu=3;function dl(Me,bt){for(var zt=0;zt<Me.length;++zt)if(Me[zt]===bt)return zt;return-1}function Sc(Me){var bt=x(Me);if(!bt)return null;var zt=bt.gl,Rr=zt.getContextAttributes(),jr=zt.isContextLost(),Nr=C(zt,bt);if(!Nr)return null;var Gr=_(),mi=Ia(),Ui=bt.cachedCode||{},qi=Nr.extensions,Ei=Is(zt,qi),Hn=v(),en=zt.drawingBufferWidth,Wi=zt.drawingBufferHeight,si={tick:0,time:0,viewportWidth:en,viewportHeight:Wi,framebufferWidth:en,framebufferHeight:Wi,drawingBufferWidth:en,drawingBufferHeight:Wi,pixelRatio:bt.pixelRatio},Mr={},Yr={elements:null,primitive:4,count:-1,offset:0,instances:-1},xi=ti(zt,qi),Ri=ri(zt,mi,bt,Zi),ci=kr(zt,qi,Ri,mi),an=ku(zt,qi,xi,mi,Ri,ci,Yr);function Zi(q){return an.destroyBuffer(q)}var Bn=Wu(zt,Gr,mi,bt),hi=of(zt,qi,xi,function(){Ji.procs.poll()},si,mi,bt),li=Dc(zt,qi,xi,mi,bt),mn=lf(zt,qi,xi,hi,li,mi),Ji=Ea(zt,Gr,qi,xi,Ri,ci,hi,mn,Mr,an,Bn,Yr,si,Ei,Ui,bt),Vi=Wl(zt,mn,Ji.procs.poll,si,Rr,qi,xi),Ni=Ji.next,pn=zt.canvas,Vn=[],na=[],Ki=[],kn=[bt.onDestroy],ta=null;function oa(){if(Vn.length===0){Ei&&Ei.update(),ta=null;return}ta=d.next(oa),Ys();for(var q=Vn.length-1;q>=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,\"stencil\"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+\".\"+ht]=Pt[ht]})}}return Dt(\"blend\"),Dt(\"depth\"),Dt(\"cull\"),Dt(\"stencil\"),Dt(\"polygonOffset\"),Dt(\"scissor\"),Dt(\"sample\"),\"vao\"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur<ht.length;++ur)if(h.isDynamic(ht[ur])){yt[Pt]=h.unbox(ht,Pt);return}}Dt[Pt]=ht}),{dynamic:yt,static:Dt}}var ne=de(q.context||{},!0),we=de(q.uniforms||{},!0),Ue=de(q.attributes||{},!1),ft=de(K(q),!1),Zt={gpuTime:0,cpuTime:0,count:0},hr=Ji.compile(ft,Ue,we,ne,Zt),qt=hr.draw,Ve=hr.batch,Qe=hr.scope,at=[];function Ct(Rt){for(;at.length<Rt;)at.push(null);return at}function Ot(Rt,Bt){var Dt;if(typeof Rt==\"function\")return Qe.call(this,null,Rt,0);if(typeof Bt==\"function\")if(typeof Rt==\"number\")for(Dt=0;Dt<Rt;++Dt)Qe.call(this,null,Bt,Dt);else if(Array.isArray(Rt))for(Dt=0;Dt<Rt.length;++Dt)Qe.call(this,Rt[Dt],Bt,Dt);else return Qe.call(this,Rt,Bt,0);else if(typeof Rt==\"number\"){if(Rt>0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,\"framebuffer\")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),\"depth\"in K&&(zt.clearDepth(+K.depth),de|=Xs),\"stencil\"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if(\"framebuffer\"in q)if(q.framebuffer&&q.framebuffer_reglType===\"framebufferCube\")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case\"frame\":return ss(K);case\"lost\":de=na;break;case\"restore\":de=Ki;break;case\"destroy\":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ui}function D(q){Object.entries(q).forEach(function(K){Ui[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,$s),context:h.define.bind(null,Sl),this:h.define.bind(null,bu),draw:zo({}),buffer:function(q){return Ri.create(q,ja,!1,!1)},elements:function(q){return ci.create(q,!1)},texture:hi.create2D,cube:hi.createCube,renderbuffer:li.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:an.createVAO,attributes:Rr,frame:ss,on:io,limits:xi,hasExtension:function(q){return xi.extensions.indexOf(q.toLowerCase())>=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Kqe=ye((v_r,Yqe)=>{\"use strict\";var pUt=ey();Yqe.exports=function(t){if(t?typeof t==\"string\"&&(t={container:t}):t={},Xqe(t)?t={container:t}:gUt(t)?t={container:t}:mUt(t)?t={gl:t}:t=pUt(t,{container:\"container target element el canvas holder parent parentNode wrapper use ref root node\",gl:\"gl context webgl glContext\",attrs:\"attributes attrs contextAttributes\",pixelRatio:\"pixelRatio pxRatio px ratio pxratio pixelratio\",width:\"w width\",height:\"h height\"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container==\"string\"){var r=document.querySelector(t.container);if(!r)throw Error(\"Element \"+t.container+\" is not found\");t.container=r}Xqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Zqe(),t.container.appendChild(t.canvas),Wqe(t))}else if(!t.canvas)if(typeof document!=\"undefined\")t.container=document.body||document.documentElement,t.canvas=Zqe(),t.container.appendChild(t.canvas),Wqe(t);else throw Error(\"Not DOM environment. Use headless-gl.\");return t.gl||[\"webgl\",\"experimental-webgl\",\"webgl-experimental\"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function Wqe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function Xqe(e){return typeof e.getContext==\"function\"&&\"width\"in e&&\"height\"in e}function gUt(e){return typeof e.nodeName==\"string\"&&typeof e.appendChild==\"function\"&&typeof e.getBoundingClientRect==\"function\"}function mUt(e){return typeof e.drawArrays==\"function\"||typeof e.drawElements==\"function\"}function Zqe(){var e=document.createElement(\"canvas\");return e.style.position=\"absolute\",e.style.top=0,e.style.left=0,e}});var $qe=ye((p_r,Jqe)=>{\"use strict\";var yUt=sK(),_Ut=[32,126];Jqe.exports=xUt;function xUt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement(\"canvas\"),n=e.font,i=typeof e.step==\"number\"?[e.step,e.step]:e.step||[32,32],a=e.chars||_Ut;if(n&&typeof n!=\"string\"&&(n=yUt(n)),!Array.isArray(a))a=String(a).split(\"\");else if(a.length===2&&typeof a[0]==\"number\"&&typeof a[1]==\"number\"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext(\"2d\");u.fillStyle=\"#000\",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign=\"center\",u.textBaseline=\"middle\",u.fillStyle=\"#fff\";for(var c=i[0]/2,f=i[1]/2,s=0;s<a.length;s++)u.fillText(a[s],c,f),(c+=i[0])>t[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var fK=ye(Vh=>{\"use strict\";\"use restrict\";var cK=32;Vh.INT_BITS=cK;Vh.INT_MAX=2147483647;Vh.INT_MIN=-1<<cK-1;Vh.sign=function(e){return(e>0)-(e<0)};Vh.abs=function(e){var t=e>>cK-1;return(e^t)-t};Vh.min=function(e,t){return t^(e^t)&-(e<t)};Vh.max=function(e,t){return e^(e^t)&-(e<t)};Vh.isPow2=function(e){return!(e&e-1)&&!!e};Vh.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Vh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Vh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function Qqe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Vh.countTrailingZeros=Qqe;Vh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Vh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Vh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Dk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<<i&255}})(Dk);Vh.reverse=function(e){return Dk[e&255]<<24|Dk[e>>>8&255]<<16|Dk[e>>>16&255]<<8|Dk[e>>>24&255]};Vh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Vh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Vh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Vh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Vh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>Qqe(e)+1}});var rBe=ye((m_r,tBe)=>{\"use strict\";function eBe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a<n;++a)i[a]=t;else for(a=0;a<n;++a)i[a]=eBe(e,t,r+1);return i}function bUt(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function wUt(e,t){switch(typeof t==\"undefined\"&&(t=0),typeof e){case\"number\":if(e>0)return bUt(e|0,t);break;case\"object\":if(typeof e.length==\"number\")return eBe(e,t,0);break}return[]}tBe.exports=wUt});var mBe=ye(mu=>{\"use strict\";var xx=fK(),Ev=rBe(),iBe=_2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var TUt=typeof Uint8ClampedArray!=\"undefined\",AUt=typeof BigUint64Array!=\"undefined\",SUt=typeof BigInt64Array!=\"undefined\",ad=window.__TYPEDARRAY_POOL;ad.UINT8C||(ad.UINT8C=Ev([32,0]));ad.BIGUINT64||(ad.BIGUINT64=Ev([32,0]));ad.BIGINT64||(ad.BIGINT64=Ev([32,0]));ad.BUFFER||(ad.BUFFER=Ev([32,0]));var Tz=ad.DATA,Az=ad.BUFFER;mu.free=function(t){if(iBe.isBuffer(t))Az[xx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!==\"[object ArrayBuffer]\"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=xx.log2(r)|0;Tz[n].push(t)}};function nBe(e){if(e){var t=e.length||e.byteLength,r=xx.log2(t);Tz[r].push(e)}}function MUt(e){nBe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=MUt;mu.freeArrayBuffer=nBe;mu.freeBuffer=function(t){Az[xx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r===\"arraybuffer\")return Bp(t);switch(r){case\"uint8\":return hK(t);case\"uint16\":return aBe(t);case\"uint32\":return oBe(t);case\"int8\":return sBe(t);case\"int16\":return lBe(t);case\"int32\":return uBe(t);case\"float\":case\"float32\":return cBe(t);case\"double\":case\"float64\":return fBe(t);case\"uint8_clamped\":return hBe(t);case\"bigint64\":return vBe(t);case\"biguint64\":return dBe(t);case\"buffer\":return gBe(t);case\"data\":case\"dataview\":return pBe(t);default:return null}return null};function Bp(t){var t=xx.nextPow2(t),r=xx.log2(t),n=Tz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function hK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=hK;function aBe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=aBe;function oBe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=oBe;function sBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=sBe;function lBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=lBe;function uBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=uBe;function cBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=cBe;function fBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=fBe;function hBe(e){return TUt?new Uint8ClampedArray(Bp(e),0,e):hK(e)}mu.mallocUint8Clamped=hBe;function dBe(e){return AUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=dBe;function vBe(e){return SUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=vBe;function pBe(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=pBe;function gBe(e){e=xx.nextPow2(e);var t=xx.log2(e),r=Az[t];return r.length>0?r.pop():new iBe(e)}mu.mallocBuffer=gBe;mu.clearCache=function(){for(var t=0;t<32;++t)ad.UINT8[t].length=0,ad.UINT16[t].length=0,ad.UINT32[t].length=0,ad.INT8[t].length=0,ad.INT16[t].length=0,ad.INT32[t].length=0,ad.FLOAT[t].length=0,ad.DOUBLE[t].length=0,ad.BIGUINT64[t].length=0,ad.BIGINT64[t].length=0,ad.UINT8C[t].length=0,Tz[t].length=0,Az[t].length=0}});var _Be=ye((__r,yBe)=>{\"use strict\";var EUt=Object.prototype.toString;yBe.exports=function(e){var t;return EUt.call(e)===\"[object Object]\"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var dK=ye((x_r,xBe)=>{xBe.exports=function(t,r){r||(r=[0,\"\"]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\\d.\\-\\+]*\\s*(.*)/)[1]||\"\",r}});var TBe=ye((b_r,wBe)=>{\"use strict\";var kUt=dK();wBe.exports=bBe;var Fk=96;function vK(e,t){var r=kUt(getComputedStyle(e).getPropertyValue(t));return r[0]*bBe(r[1],e)}function CUt(e,t){var r=document.createElement(\"div\");r.style[\"font-size\"]=\"128\"+e,t.appendChild(r);var n=vK(r,\"font-size\")/128;return t.removeChild(r),n}function bBe(e,t){switch(t=t||document.body,e=(e||\"px\").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case\"%\":return t.clientHeight/100;case\"ch\":case\"ex\":return CUt(e,t);case\"em\":return vK(t,\"font-size\");case\"rem\":return vK(document.body,\"font-size\");case\"vw\":return window.innerWidth/100;case\"vh\":return window.innerHeight/100;case\"vmin\":return Math.min(window.innerWidth,window.innerHeight)/100;case\"vmax\":return Math.max(window.innerWidth,window.innerHeight)/100;case\"in\":return Fk;case\"cm\":return Fk/2.54;case\"mm\":return Fk/25.4;case\"pt\":return Fk/72;case\"pc\":return Fk/6}return 1}});var MBe=ye((w_r,SBe)=>{\"use strict\";SBe.exports=Ez;var LUt=Ez.canvas=document.createElement(\"canvas\"),Sz=LUt.getContext(\"2d\"),ABe=Mz([32,126]);Ez.createPairs=Mz;Ez.ascii=ABe;function Ez(e,t){Array.isArray(e)&&(e=e.join(\", \"));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]==\"number\"?n=Mz(t):Array.isArray(t)?n=t:(t.o?n=Mz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=ABe),Sz.font=i+\"px \"+e;for(var o=0;o<n.length;o++){var s=n[o],l=Sz.measureText(s[0]).width+Sz.measureText(s[1]).width,u=Sz.measureText(s).width;if(Math.abs(l-u)>i*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function Mz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i<e[1];i++){var a=String.fromCharCode(i),o=n+a;t.push(o)}return t}});var LBe=ye((T_r,CBe)=>{\"use strict\";CBe.exports=bx;bx.canvas=document.createElement(\"canvas\");bx.cache={};function bx(o,t){t||(t={}),(typeof o==\"string\"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(\", \"):t.family;if(!r)throw Error(\"`family` must be defined\");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||\"\",a=t.style||t.fontStyle||\"\",o=[a,i,n].join(\" \")+\"px \"+r,s=t.origin||\"top\";if(bx.cache[r]&&n<=bx.cache[r].em)return EBe(bx.cache[r],s);var l=t.canvas||bx.canvas,u=l.getContext(\"2d\"),c={upper:t.upper!==void 0?t.upper:\"H\",lower:t.lower!==void 0?t.lower:\"x\",descent:t.descent!==void 0?t.descent:\"p\",ascent:t.ascent!==void 0?t.ascent:\"h\",tittle:t.tittle!==void 0?t.tittle:\"i\",overshoot:t.overshoot!==void 0?t.overshoot:\"O\"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h=\"H\",d={top:0};u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillStyle=\"black\",u.fillText(h,0,0);var v=ry(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline=\"bottom\",u.fillText(h,0,f);var _=ry(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-_+v,u.clearRect(0,0,f,f),u.textBaseline=\"alphabetic\",u.fillText(h,0,f);var b=ry(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline=\"middle\",u.fillText(h,0,f*.5);var k=ry(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline=\"hanging\",u.fillText(h,0,f*.5);var E=ry(u.getImageData(0,0,f,f));d.hanging=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline=\"ideographic\",u.fillText(h,0,f);var T=ry(u.getImageData(0,0,f,f));if(d.ideographic=f-T-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.upper,0,0),d.upper=ry(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.lower,0,0),d.lower=ry(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.tittle,0,0),d.tittle=ry(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.ascent,0,0),d.ascent=ry(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.descent,0,0),d.descent=kBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline=\"top\",u.fillText(c.overshoot,0,0);var L=kBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,bx.cache[r]=d,EBe(d,s)}function EBe(e,t){var r={};typeof t==\"string\"&&(t=e[t]);for(var n in e)n!==\"em\"&&(r[n]=e[n]-t);return r}function ry(e){for(var t=e.height,r=e.data,n=3;n<r.length;n+=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}function kBe(e){for(var t=e.height,r=e.data,n=r.length-1;n>0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var DBe=ye((A_r,RBe)=>{\"use strict\";var _5=Hqe(),PUt=ey(),IUt=jqe(),RUt=Kqe(),DUt=XY(),pK=ox(),FUt=$qe(),wx=mBe(),zUt=s5(),OUt=_Be(),qUt=dK(),BUt=TBe(),NUt=MBe(),UUt=Nh(),VUt=LBe(),GUt=iw(),HUt=fK(),PBe=HUt.nextPow2,IBe=new DUt,Cz=!1;document.body&&(kz=document.body.appendChild(document.createElement(\"div\")),kz.style.font=\"italic small-caps bold condensed 16px/2 cursive\",getComputedStyle(kz).fontStretch&&(Cz=!0),document.body.removeChild(kz));var kz,xc=function(t){jUt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=RUt(t),this.shader=IBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||IUt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:\"uint8\",usage:\"stream\"}),this.sizeBuffer=this.regl.buffer({type:\"float\",usage:\"stream\"}),this.shader||(this.shader=this.createShader(),IBe.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(OUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop(\"count\"),offset:t.prop(\"offset\"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this(\"sizeBuffer\")},width:{offset:0,stride:8,buffer:t.this(\"sizeBuffer\")},char:t.this(\"charBuffer\"),position:t.this(\"position\")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop(\"color\"),opacity:t.prop(\"opacity\"),viewport:t.this(\"viewportArray\"),scale:t.this(\"scale\"),align:t.prop(\"align\"),baseline:t.prop(\"baseline\"),translate:t.this(\"translate\"),positionOffset:t.prop(\"positionOffset\")},primitive:\"points\",viewport:t.this(\"viewport\"),vert:`\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\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n",
       "\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\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\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}`,frag:`\n",
       "\t\t\tprecision highp float;\n",
       "\t\t\tuniform float fontSize, charStep, opacity;\n",
       "\t\t\tuniform vec2 atlasSize;\n",
       "\t\t\tuniform vec4 viewport;\n",
       "\t\t\tuniform sampler2D atlas;\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) > halfCharStep + halfCharWidth ||\n",
       "\t\t\t\t\tfloor(uv.x) < 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}`}),n={};return{regl:t,draw:r,atlas:n}};xc.prototype.update=function(t){var r=this;if(typeof t==\"string\")t={text:t};else if(!t)return;t=PUt(t,{position:\"position positions coord coords coordinates\",font:\"font fontFace fontface typeface cssFont css-font family fontFamily\",fontSize:\"fontSize fontsize size font-size\",text:\"text texts chars characters value values symbols\",align:\"align alignment textAlign textbaseline\",baseline:\"baseline textBaseline textbaseline\",direction:\"dir direction textDirection\",color:\"color colour fill fill-color fillColor textColor textcolor\",kerning:\"kerning kern\",range:\"range dataBox\",viewport:\"vp viewport viewBox viewbox viewPort\",opacity:\"opacity alpha transparency visible visibility opaque\",offset:\"offset positionOffset padding shift indent indentation\"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(Le){return parseFloat(Le)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=zUt(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset==\"number\"&&(t.offset=[t.offset,0]),this.positionOffset=GUt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(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&&(this.scale=t.scale),t.translate&&(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=xc.baseFontSize+\"px sans-serif\");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Le,ge){if(typeof Le==\"string\")try{Le=_5.parse(Le)}catch(je){Le=_5.parse(xc.baseFontSize+\"px \"+Le)}else{var ie=Le.style,Se=Le.weight,Ee=Le.stretch,Ae=Le.variant;Le=_5.parse(_5.stringify(Le)),ie&&(Le.style=ie),Se&&(Le.weight=Se),Ee&&(Le.stretch=Ee),Ae&&(Le.variant=Ae)}var Be=_5.stringify({size:xc.baseFontSize,family:Le.family,stretch:Cz?Le.stretch:void 0,variant:Le.variant,weight:Le.weight,style:Le.style}),Pe=qUt(Le.size),me=Math.round(Pe[0]*BUt(Pe[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||Be!=r.font[ge].baseString)&&(n=!0,r.font[ge]=xc.fonts[Be],!r.font[ge])){var De=Le.family.join(\", \"),ce=[Le.style];Le.style!=Le.variant&&ce.push(Le.variant),Le.variant!=Le.weight&&ce.push(Le.weight),Cz&&Le.weight!=Le.stretch&&ce.push(Le.stretch),r.font[ge]={baseString:Be,family:De,weight:Le.weight,stretch:Le.stretch,style:Le.style,variant:Le.variant,width:{},kerning:{},metrics:VUt(De,{origin:\"top\",fontSize:xc.baseFontSize,fontStyle:ce.join(\" \")})},xc.fonts[Be]=r.font[ge]}}),(n||i)&&this.font.forEach(function(Le,ge){var ie=_5.stringify({size:r.fontSize[ge],family:Le.family,stretch:Cz?Le.stretch:void 0,variant:Le.variant,weight:Le.weight,style:Le.style});if(r.fontAtlas[ge]=r.shader.atlas[ie],!r.fontAtlas[ge]){var Se=Le.metrics;r.shader.atlas[ie]=r.fontAtlas[ge]={fontString:ie,step:Math.ceil(r.fontSize[ge]*Se.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text==\"string\"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o<a.length;o++)a[o]=t.text;t.text=a}var s;if(t.text!=null||n){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var l=1;l<t.text.length;l++)this.textOffsets[l]=this.textOffsets[l-1]+t.text[l-1].length,this.count+=t.text[l].length,this.counts.push(t.text[l].length);this.text=t.text.join(\"\")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];s=[],this.font.forEach(function(Le,ge){xc.atlasContext.font=Le.baseString;for(var ie=r.fontAtlas[ge],Se=0;Se<r.text.length;Se++){var Ee=r.text.charAt(Se);if(ie.ids[Ee]==null&&(ie.ids[Ee]=ie.chars.length,ie.chars.push(Ee),s.push(Ee)),Le.width[Ee]==null&&(Le.width[Ee]=xc.atlasContext.measureText(Ee).width/xc.baseFontSize,r.kerning)){var Ae=[];for(var Be in Le.width)Ae.push(Be+Ee,Ee+Be);UUt(Le.kerning,NUt(Le.family,{pairs:Ae}))}}})}if(t.position)if(t.position.length>2){for(var u=!t.position[0].length,c=wx.mallocFloat(this.count*2),f=0,h=0;f<this.counts.length;f++){var d=this.counts[f];if(u)for(var v=0;v<d;v++)c[h++]=t.position[f*2],c[h++]=t.position[f*2+1];else for(var _=0;_<d;_++)c[h++]=t.position[f][0],c[h++]=t.position[f][1]}this.position.call?this.position({type:\"float\",data:c}):this.position=this.regl.buffer({type:\"float\",data:c}),wx.freeFloat(c)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||n){var b=wx.mallocUint8(this.count),p=wx.mallocFloat(this.count*2);this.textWidth=[];for(var k=0,E=0;k<this.counts.length;k++){for(var T=this.counts[k],L=this.font[k]||this.font[0],x=this.fontAtlas[k]||this.fontAtlas[0],C=0;C<T;C++){var M=this.text.charAt(E),g=this.text.charAt(E-1);if(b[E]=x.ids[M],p[E*2]=L.width[M],C){var P=p[E*2-2],A=p[E*2],z=p[E*2-1],O=z+P*.5+A*.5;if(this.kerning){var U=L.kerning[g+M];U&&(O+=U*.001)}p[E*2+1]=O}else p[E*2+1]=p[E*2]*.5;E++}this.textWidth.push(p.length?p[E*2-2]*.5+p[E*2-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:b,type:\"uint8\",usage:\"stream\"}),this.sizeBuffer({data:p,type:\"float\",usage:\"stream\"}),wx.freeUint8(b),wx.freeFloat(p),s.length&&this.font.forEach(function(Le,ge){var ie=r.fontAtlas[ge],Se=ie.step,Ee=Math.floor(xc.maxAtlasSize/Se),Ae=Math.min(Ee,ie.chars.length),Be=Math.ceil(ie.chars.length/Ae),Pe=PBe(Ae*Se),me=PBe(Be*Se);ie.width=Pe,ie.height=me,ie.rows=Be,ie.cols=Ae,ie.em&&ie.texture({data:FUt({canvas:xc.atlasCanvas,font:ie.fontString,chars:ie.chars,shape:[Pe,me],step:[Se,Se]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(Le,ge){var ie=Array.isArray(r.align)?r.align.length>1?r.align[ge]:r.align[0]:r.align;if(typeof ie==\"number\")return ie;switch(ie){case\"right\":case\"end\":return-Le;case\"center\":case\"centre\":case\"middle\":return-Le*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Le,ge){var ie=(r.font[ge]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof Le==\"number\"?Se+=Le-ie.baseline:Se+=-ie[Le],Se*=-1,Se})),t.color!=null)if(t.color||(t.color=\"transparent\"),typeof t.color==\"string\"||!isNaN(t.color))this.color=pK(t.color,\"uint8\");else{var G;if(typeof t.color[0]==\"number\"&&t.color.length>this.counts.length){var Z=t.color.length;G=wx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N<Z;N+=4)G.set(pK(j(N,N+4),\"uint8\"),N)}else{var H=t.color.length;G=wx.mallocUint8(H*4);for(var re=0;re<H;re++)G.set(pK(t.color[re]||0,\"uint8\"),re*4)}this.color=G}if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity){var oe=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var Ce=0;Ce<this.batch.length;Ce++)this.batch[Ce]={count:this.counts.length>1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ce*4,Ce*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ce*2,Ce*2+2):this.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=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text=\"\";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement(\"canvas\");xc.atlasContext=xc.atlasCanvas.getContext(\"2d\",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function jUt(e){return typeof e==\"function\"&&e._gl&&e.prop&&e.texture&&e.buffer}RBe.exports=xc});var FBe=ye((gK,mK)=>{(function(e,t){typeof gK==\"object\"&&typeof mK!=\"undefined\"?mK.exports=t():e.createREGL=t()})(gK,function(){\"use strict\";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr<zt.length;++Rr)Me[zt[Rr]]=bt[zt[Rr]];return Me},t=0,r=0,n=5,i=6;function a(Me,bt){this.id=t++,this.type=Me,this.data=bt}function o(Me){return Me.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')}function s(Me){if(Me.length===0)return[];var bt=Me.charAt(0),zt=Me.charAt(Me.length-1);if(Me.length>1&&bt===zt&&(bt==='\"'||bt===\"'\"))return['\"'+o(Me.substr(1,Me.length-2))+'\"'];var Rr=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(\".\");if(jr.length===1)return['\"'+o(Me)+'\"'];for(var Nr=[],Gr=0;Gr<jr.length;++Gr)Nr=Nr.concat(s(jr[Gr]));return Nr}function l(Me){return\"[\"+s(Me).join(\"][\")+\"]\"}function u(Me,bt){return new a(Me,l(bt+\"\"))}function c(Me){return typeof Me==\"function\"&&!Me._reglType||Me instanceof a}function f(Me,bt){if(typeof Me==\"function\")return new a(r,Me);if(typeof Me==\"number\"||typeof Me==\"boolean\")return new a(n,Me);if(Array.isArray(Me))return new a(i,Me.map(function(zt,Rr){return f(zt,bt+\"[\"+Rr+\"]\")}));if(Me instanceof a)return Me}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame==\"function\"?function(Me){return requestAnimationFrame(Me)}:function(Me){return setTimeout(Me,16)},cancel:typeof cancelAnimationFrame==\"function\"?function(Me){return cancelAnimationFrame(Me)}:clearTimeout},v=typeof performance!=\"undefined\"&&performance.now?function(){return performance.now()}:function(){return+new Date};function _(){var Me={\"\":0},bt=[\"\"];return{id:function(zt){var Rr=Me[zt];return Rr||(Rr=Me[zt]=bt.length,bt.push(zt),Rr)},str:function(zt){return bt[zt]}}}function b(Me,bt,zt){var Rr=document.createElement(\"canvas\");e(Rr.style,{border:0,margin:0,padding:0,top:0,left:0,width:\"100%\",height:\"100%\"}),Me.appendChild(Rr),Me===document.body&&(Rr.style.position=\"absolute\",e(Me.style,{margin:0,padding:0}));function jr(){var mi=window.innerWidth,Ui=window.innerHeight;if(Me!==document.body){var qi=Rr.getBoundingClientRect();mi=qi.right-qi.left,Ui=qi.bottom-qi.top}Rr.width=zt*mi,Rr.height=zt*Ui}var Nr;Me!==document.body&&typeof ResizeObserver==\"function\"?(Nr=new ResizeObserver(function(){setTimeout(jr)}),Nr.observe(Me)):window.addEventListener(\"resize\",jr,!1);function Gr(){Nr?Nr.disconnect():window.removeEventListener(\"resize\",jr),Me.removeChild(Rr)}return jr(),{canvas:Rr,onDestroy:Gr}}function p(Me,bt){function zt(Rr){try{return Me.getContext(Rr,bt)}catch(jr){return null}}return zt(\"webgl\")||zt(\"experimental-webgl\")||zt(\"webgl-experimental\")}function k(Me){return typeof Me.nodeName==\"string\"&&typeof Me.appendChild==\"function\"&&typeof Me.getBoundingClientRect==\"function\"}function E(Me){return typeof Me.drawArrays==\"function\"||typeof Me.drawElements==\"function\"}function T(Me){return typeof Me==\"string\"?Me.split():Me}function L(Me){return typeof Me==\"string\"?document.querySelector(Me):Me}function x(Me){var bt=Me||{},zt,Rr,jr,Nr,Gr={},mi=[],Ui=[],qi=typeof window==\"undefined\"?1:window.devicePixelRatio,Ei=!1,Hn={},en=function(Mr){},Wi=function(){};if(typeof bt==\"string\"?zt=document.querySelector(bt):typeof bt==\"object\"&&(k(bt)?zt=bt:E(bt)?(Nr=bt,jr=Nr.canvas):(\"gl\"in bt?Nr=bt.gl:\"canvas\"in bt?jr=L(bt.canvas):\"container\"in bt&&(Rr=L(bt.container)),\"attributes\"in bt&&(Gr=bt.attributes),\"extensions\"in bt&&(mi=T(bt.extensions)),\"optionalExtensions\"in bt&&(Ui=T(bt.optionalExtensions)),\"onDone\"in bt&&(en=bt.onDone),\"profile\"in bt&&(Ei=!!bt.profile),\"pixelRatio\"in bt&&(qi=+bt.pixelRatio),\"cachedCode\"in bt&&(Hn=bt.cachedCode))),zt&&(zt.nodeName.toLowerCase()===\"canvas\"?jr=zt:Rr=zt),!Nr){if(!jr){var si=b(Rr||document.body,en,qi);if(!si)return null;jr=si.canvas,Wi=si.onDestroy}Gr.premultipliedAlpha===void 0&&(Gr.premultipliedAlpha=!0),Nr=p(jr,Gr)}return Nr?{gl:Nr,canvas:jr,container:Rr,extensions:mi,optionalExtensions:Ui,pixelRatio:qi,profile:Ei,cachedCode:Hn,onDone:en,onDestroy:Wi}:(Wi(),en(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function C(Me,bt){var zt={};function Rr(Gr){var mi=Gr.toLowerCase(),Ui;try{Ui=zt[mi]=Me.getExtension(mi)}catch(qi){}return!!Ui}for(var jr=0;jr<bt.extensions.length;++jr){var Nr=bt.extensions[jr];if(!Rr(Nr))return bt.onDestroy(),bt.onDone('\"'+Nr+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return bt.optionalExtensions.forEach(Rr),{extensions:zt,restore:function(){Object.keys(zt).forEach(function(Gr){if(zt[Gr]&&!Rr(Gr))throw new Error(\"(regl): error restoring extension \"+Gr)})}}}function M(Me,bt){for(var zt=Array(Me),Rr=0;Rr<Me;++Rr)zt[Rr]=bt(Rr);return zt}var g=5120,P=5121,A=5122,z=5123,O=5124,U=5125,G=5126;function Z(Me){for(var bt=16;bt<=1<<28;bt*=16)if(Me<=bt)return bt;return 0}function j(Me){var bt,zt;return bt=(Me>65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case A:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case U:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,Ce=3412,Le=3413,ge=3414,ie=3415,Se=33901,Ee=33902,Ae=3379,Be=3386,Pe=34921,me=36347,De=36348,ce=35661,je=35660,lt=34930,pt=36349,Vt=34076,ot=34024,ut=7936,Wt=7937,Nt=7938,$t=35724,sr=34047,Tr=36063,fr=34852,$e=3553,St=34067,Qt=34069,Gt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,wr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(fr),jr=Me.getParameter(Tr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,wr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!=\"undefined\"&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Gt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ce),Me.getParameter(Le)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(ot),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(je),maxVaryingVectors:Me.getParameter(De),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter($t),renderer:Me.getParameter(Wt),vendor:Me.getParameter(ut),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me==\"object\"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset==\"number\"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr<bt;++Rr)zt[Rr]=Me[Rr]}function We(Me,bt,zt,Rr){for(var jr=0,Nr=0;Nr<bt;++Nr)for(var Gr=Me[Nr],mi=0;mi<zt;++mi)Rr[jr++]=Gr[mi]}function tt(Me,bt,zt,Rr,jr,Nr){for(var Gr=Nr,mi=0;mi<bt;++mi)for(var Ui=Me[mi],qi=0;qi<zt;++qi)for(var Ei=Ui[qi],Hn=0;Hn<Rr;++Hn)jr[Gr++]=Ei[Hn]}function xt(Me,bt,zt,Rr,jr){for(var Nr=1,Gr=zt+1;Gr<bt.length;++Gr)Nr*=bt[Gr];var mi=bt[zt];if(bt.length-zt===4){var Ui=bt[zt+1],qi=bt[zt+2],Ei=bt[zt+3];for(Gr=0;Gr<mi;++Gr)tt(Me[Gr],Ui,qi,Ei,Rr,jr),jr+=Nr}else for(Gr=0;Gr<mi;++Gr)xt(Me[Gr],bt,zt+1,Rr,jr),jr+=Nr}function Ie(Me,bt,zt,Rr){var jr=1;if(bt.length)for(var Nr=0;Nr<bt.length;++Nr)jr*=bt[Nr];else jr=0;var Gr=Rr||H.allocType(zt,jr);switch(bt.length){case 0:break;case 1:Je(Me,bt[0],Gr);break;case 2:We(Me,bt[0],bt[1],Gr);break;case 3:tt(Me,bt[0],bt[1],bt[2],Gr,0);break;default:xt(Me,bt,0,Gr,0)}return Gr}function xe(Me){for(var bt=[],zt=Me;zt.length;zt=zt[0])bt.push(zt.length);return bt}var ke={\"[object Int8Array]\":5120,\"[object Int16Array]\":5122,\"[object Int32Array]\":5124,\"[object Uint8Array]\":5121,\"[object Uint8ClampedArray]\":5121,\"[object Uint16Array]\":5123,\"[object Uint32Array]\":5125,\"[object Float32Array]\":5126,\"[object Float64Array]\":5121,\"[object ArrayBuffer]\":5121},vt=5120,ir=5122,ar=5124,vr=5121,ii=5123,pi=5125,$r=5126,di=5126,ji={int8:vt,int16:ir,int32:ar,uint8:vr,uint16:ii,uint32:pi,float:$r,float32:di},In=35048,wi=35040,On={dynamic:In,stream:wi,static:35044},qn=Ge.flatten,Fn=Ge.shape,ra=35044,la=35040,Ut=5121,wt=5126,rr=[];rr[5120]=1,rr[5122]=2,rr[5124]=4,rr[5121]=1,rr[5123]=2,rr[5125]=4,rr[5126]=4;function nr(Me){return ke[Object.prototype.toString.call(Me)]|0}function Er(Me,bt){for(var zt=0;zt<bt.length;++zt)Me[zt]=bt[zt]}function Xr(Me,bt,zt,Rr,jr,Nr,Gr){for(var mi=0,Ui=0;Ui<zt;++Ui)for(var qi=0;qi<Rr;++qi)Me[mi++]=bt[jr*Ui+Nr*qi+Gr]}function ri(Me,bt,zt,Rr){var jr=0,Nr={};function Gr(Mr){this.id=jr++,this.buffer=Me.createBuffer(),this.type=Mr,this.usage=ra,this.byteLength=0,this.dimension=1,this.dtype=Ut,this.persistentData=null,zt.profile&&(this.stats={size:0})}Gr.prototype.bind=function(){Me.bindBuffer(this.type,this.buffer)},Gr.prototype.destroy=function(){en(this)};var mi=[];function Ui(Mr,Yr){var xi=mi.pop();return xi||(xi=new Gr(Mr)),xi.bind(),Hn(xi,Yr,la,0,1,!1),xi}function qi(Mr){mi.push(Mr)}function Ei(Mr,Yr,xi){Mr.byteLength=Yr.byteLength,Me.bufferData(Mr.type,Yr,xi)}function Hn(Mr,Yr,xi,Ri,ci,an){var Zi;if(Mr.usage=xi,Array.isArray(Yr)){if(Mr.dtype=Ri||wt,Yr.length>0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li<Zi.length;++li)hi*=Zi[li];Mr.dimension=hi,Bn=qn(Yr,Zi,Mr.dtype),Ei(Mr,Bn,xi),an?Mr.persistentData=Bn:H.freeType(Bn)}else if(typeof Yr[0]==\"number\"){Mr.dimension=ci;var mn=H.allocType(Mr.dtype,Yr.length);Er(mn,Yr),Ei(Mr,mn,xi),an?Mr.persistentData=mn:H.freeType(mn)}else Br(Yr[0])&&(Mr.dimension=Yr[0].length,Mr.dtype=Ri||nr(Yr[0])||wt,Bn=qn(Yr,[Yr.length,Yr[0].length],Mr.dtype),Ei(Mr,Bn,xi),an?Mr.persistentData=Bn:H.freeType(Bn))}}else if(Br(Yr))Mr.dtype=Ri||nr(Yr),Mr.dimension=ci,Ei(Mr,Yr,xi),an&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr.buffer)));else if(Vr(Yr)){Zi=Yr.shape;var Ji=Yr.stride,Vi=Yr.offset,Ni=0,pn=0,Vn=0,na=0;Zi.length===1?(Ni=Zi[0],pn=1,Vn=Ji[0],na=0):Zi.length===2&&(Ni=Zi[0],pn=Zi[1],Vn=Ji[0],na=Ji[1]),Mr.dtype=Ri||nr(Yr.data)||wt,Mr.dimension=pn;var Ki=H.allocType(Mr.dtype,Ni*pn);Xr(Ki,Yr.data,Ni,pn,Vn,na,Vi),Ei(Mr,Ki,xi),an?Mr.persistentData=Ki:H.freeType(Ki)}else Yr instanceof ArrayBuffer&&(Mr.dtype=Ut,Mr.dimension=ci,Ei(Mr,Yr,xi),an&&(Mr.persistentData=new Uint8Array(new Uint8Array(Yr))))}function en(Mr){bt.bufferCount--,Rr(Mr);var Yr=Mr.buffer;Me.deleteBuffer(Yr),Mr.buffer=null,delete Nr[Mr.id]}function Wi(Mr,Yr,xi,Ri){bt.bufferCount++;var ci=new Gr(Yr);Nr[ci.id]=ci;function an(hi){var li=ra,mn=null,Ji=0,Vi=0,Ni=1;return Array.isArray(hi)||Br(hi)||Vr(hi)||hi instanceof ArrayBuffer?mn=hi:typeof hi==\"number\"?Ji=hi|0:hi&&(\"data\"in hi&&(mn=hi.data),\"usage\"in hi&&(li=On[hi.usage]),\"type\"in hi&&(Vi=ji[hi.type]),\"dimension\"in hi&&(Ni=hi.dimension|0),\"length\"in hi&&(Ji=hi.length|0)),ci.bind(),mn?Hn(ci,mn,li,Vi,Ni,Ri):(Ji&&Me.bufferData(ci.type,Ji,li),ci.dtype=Vi||Ut,ci.usage=li,ci.dimension=Ni,ci.byteLength=Ji),zt.profile&&(ci.stats.size=ci.byteLength*rr[ci.dtype]),an}function Zi(hi,li){Me.bufferSubData(ci.type,li,hi)}function Bn(hi,li){var mn=(li||0)|0,Ji;if(ci.bind(),Br(hi)||hi instanceof ArrayBuffer)Zi(hi,mn);else if(Array.isArray(hi)){if(hi.length>0){if(typeof hi[0]==\"number\"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType=\"buffer\",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Xo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci==\"number\")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:(\"data\"in ci&&(an=ci.data),\"usage\"in ci&&(Zi=On[ci.usage]),\"primitive\"in ci&&(Bn=Sn[ci.primitive]),\"count\"in ci&&(hi=ci.count|0),\"type\"in ci&&(mn=Gr[ci.type]),\"length\"in ci?li=ci.length|0:(li=hi,mn===da||mn===Xo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType=\"elements\",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si==\"function\"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt<Me.length;++zt)if(isNaN(Me[zt]))bt[zt]=65535;else if(Me[zt]===1/0)bt[zt]=31744;else if(Me[zt]===-1/0)bt[zt]=64512;else{Jr[0]=Me[zt];var Rr=vi[0],jr=Rr>>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,$n=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return\"[object \"+Me+\"]\"}var uc=ps(\"HTMLCanvasElement\"),xl=ps(\"OffscreenCanvas\"),Gu=ps(\"CanvasRenderingContext2D\"),qs=ps(\"ImageBitmap\"),od=ps(\"HTMLImageElement\"),Po=ps(\"HTMLVideoElement\"),sd=Object.keys(ke).concat([uc,xl,Gu,qs,od,Po]),Ko=[];Ko[Ns]=1,Ko[aa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]==\"number\")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en<mi;++en)for(var Wi=0;Wi<Gr;++Wi)for(var si=0;si<Ui;++si)Ei[Hn++]=bt[zt*Wi+Rr*en+jr*si+Nr];ju(Me,Ei)}function cc(Me,bt,zt,Rr,jr,Nr){var Gr;if(typeof Pa[Me]!=\"undefined\"?Gr=Pa[Me]:Gr=Go[Me]*Ko[bt],Nr&&(Gr*=6),jr){for(var mi=0,Ui=zt;Ui>=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={\"don't care\":sc,\"dont care\":sc,nice:Lf,fast:jh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,\"nearest mipmap nearest\":Jl,\"linear mipmap nearest\":Os,\"nearest mipmap linear\":yu,\"linear mipmap linear\":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,\"rgb5 a1\":ul},Wi={alpha:_o,luminance:po,\"luminance alpha\":Lo,rgb:No,rgba:Ma,rgba4:ko,\"rgb5 a1\":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en[\"half float\"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,\"depth stencil\":As}),e(en,{uint16:Hl,uint32:ac,\"depth stencil\":us})),bt.webgl_compressed_texture_s3tc&&e(si,{\"rgb s3tc dxt1\":Io,\"rgba s3tc dxt1\":ls,\"rgba s3tc dxt3\":Yl,\"rgba s3tc dxt5\":Su}),bt.webgl_compressed_texture_atc&&e(si,{\"rgb atc\":nc,\"rgba atc explicit alpha\":bs,\"rgba atc interpolated alpha\":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{\"rgb pvrtc 4bppv1\":_a,\"rgb pvrtc 2bppv1\":Vu,\"rgba pvrtc 4bppv1\":Ol,\"rgba pvrtc 2bppv1\":xo}),bt.webgl_compressed_texture_etc1&&(si[\"rgb etc1\"]=Kl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf(\"rgba\")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!=\"object\"||!we)){if(\"premultiplyAlpha\"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),\"flipY\"in we&&(ne.flipY=we.flipY),\"alignment\"in we&&(ne.unpackAlignment=we.alignment),\"colorSpace\"in we&&(ne.colorSpace=Hn[we.colorSpace]),\"type\"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;\"shape\"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):(\"radius\"in we&&(ft=Zt=we.radius),\"width\"in we&&(ft=we.width),\"height\"in we&&(Zt=we.height),\"channels\"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if(\"format\"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&(\"type\"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),\"x\"in we&&(ne.xOffset=we.x|0),\"y\"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Zt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!(\"type\"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,jf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Hf(Ue)||Ic(Ue)||yf(Ue))Hf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(Ah(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br<ht.length;++br)ur*=ht[br];var Ur=th(ne,ur);Ge.flatten(Ue,ht,\"\",Ur),ju(ne,Ur),ne.alignment=1,ne.width=Dt,ne.height=yt,ne.channels=Pt,ne.format=ne.internalformat=Hs[Pt],ne.needsFree=!0}ne.type===aa||ne.type}function pn(ne,we,Ue){var ft=ne.element,Zt=ne.data,hr=ne.internalformat,qt=ne.format,Ve=ne.type,Qe=ne.width,at=ne.height;Ji(ne),ft?Me.texImage2D(we,Ue,qt,qt,Ve,ft):ne.compressed?Me.compressedTexImage2D(we,Ue,hr,Qe,at,0,Zt):ne.needsCopy?(Rr(),Me.copyTexImage2D(we,Ue,qt,ne.xOffset,ne.yOffset,Qe,at,0)):Me.texImage2D(we,Ue,qt,Qe,at,0,qt,Ve,Zt||null)}function Vn(ne,we,Ue,ft,Zt){var hr=ne.element,qt=ne.data,Ve=ne.internalformat,Qe=ne.format,at=ne.type,Ct=ne.width,Ot=ne.height;Ji(ne),hr?Me.texSubImage2D(we,Zt,Ue,ft,Qe,at,hr):ne.compressed?Me.compressedTexSubImage2D(we,Zt,Ue,ft,Ve,Ct,Ot,qt):ne.needsCopy?(Rr(),Me.copyTexSubImage2D(we,Zt,Ue,ft,ne.xOffset,ne.yOffset,Ct,Ot)):Me.texSubImage2D(we,Zt,Ue,ft,Ct,Ot,Qe,at,qt)}var na=[];function Ki(){return na.pop()||new Vi}function kn(ne){ne.needsFree&&H.freeType(ne.data),Vi.call(ne),na.push(ne)}function ta(){hi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function oa(ne,we,Ue){var ft=ne.images[0]=Ki();ne.mipmask=1,ft.width=ne.width=we,ft.height=ne.height=Ue,ft.channels=ne.channels=4}function ba(ne,we){var Ue=null;if(_f(we))Ue=ne.images[0]=Ki(),li(Ue,ne),Ni(Ue,we),ne.mipmask=1;else if(mn(ne,we),Array.isArray(we.mipmap))for(var ft=we.mipmap,Zt=0;Zt<ft.length;++Zt)Ue=ne.images[Zt]=Ki(),li(Ue,ne),Ue.width>>=Zt,Ue.height>>=Zt,Ni(Ue,ft[Zt]),ne.mipmask|=1<<Zt;else Ue=ne.images[0]=Ki(),li(Ue,ne),Ni(Ue,we),ne.mipmask=1;li(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===ls||ne.internalformat===Yl||ne.internalformat)}function is(ne,we){for(var Ue=ne.images,ft=0;ft<Ue.length;++ft){if(!Ue[ft])return;pn(Ue[ft],we,ft)}}var Zs=[];function Va(){var ne=Zs.pop()||new ta;hi.call(ne),ne.mipmask=0;for(var we=0;we<16;++we)ne.images[we]=null;return ne}function Ml(ne){for(var we=ne.images,Ue=0;Ue<we.length;++Ue)we[Ue]&&kn(we[Ue]),we[Ue]=null;Zs.push(ne)}function zo(){this.minFilter=pl,this.magFilter=pl,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function Qs(ne,we){if(\"min\"in we){var Ue=we.min;ne.minFilter=Ei[Ue],Es.indexOf(ne.minFilter)>=0&&!(\"faces\"in we)&&(ne.genMipmaps=!0)}if(\"mag\"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if(\"wrap\"in we){var qt=we.wrap;typeof qt==\"string\"?Zt=hr=Ui[qt]:Array.isArray(qt)&&(Zt=Ui[qt[0]],hr=Ui[qt[1]])}else{if(\"wrapS\"in we){var Ve=we.wrapS;Zt=Ui[Ve]}if(\"wrapT\"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Zt,ne.wrapT=hr,\"anisotropic\"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if(\"mipmap\"in we){var Ct=!1;switch(typeof we.mipmap){case\"string\":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case\"boolean\":Ct=ne.genMipmaps=we.mipmap;break;case\"object\":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!(\"min\"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue<Vs;++Ue){var ft=Ys[Ue];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits<we+1&&(Nr.maxTextureUnits=we+1),ne.unit=we,Me.activeTexture(Fu+we),Me.bindTexture(ne.target,ne.texture)}return we},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,we){var Ue=new wa(_n);ss[Ue.id]=Ue,Nr.textureCount++;function ft(qt,Ve){var Qe=Ue.texInfo;zo.call(Qe);var at=Va();return typeof qt==\"number\"?typeof Ve==\"number\"?oa(at,qt|0,Ve|0):oa(at,qt|0,qt|0):qt?(Qs(Qe,qt),ba(at,qt)):oa(at,1,1),Qe.genMipmaps&&(at.mipmask=(at.width<<1)-1),Ue.mipmask=at.mipmask,li(Ue,at),Ue.internalformat=at.internalformat,ft.width=at.width,ft.height=at.height,ol(Ue),is(at,_n),al(Qe,_n),io(),Ml(at),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,at.width,at.height,Qe.genMipmaps,!1)),ft.format=xi[Ue.internalformat],ft.type=Ri[Ue.type],ft.mag=ci[Qe.magFilter],ft.min=an[Qe.minFilter],ft.wrapS=Zi[Qe.wrapS],ft.wrapT=Zi[Qe.wrapT],ft}function Zt(qt,Ve,Qe,at){var Ct=Ve|0,Ot=Qe|0,Rt=at|0,Bt=Ki();return li(Bt,Ue),Bt.width=0,Bt.height=0,Ni(Bt,qt),Bt.width=Bt.width||(Ue.width>>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType=\"texture2d\",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot==\"number\"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot==\"object\")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),\"faces\"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],$n+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,$n+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D($n+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Zt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType=\"textureCube\",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne<Vs;++ne)Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Ys[ne]=null;dt(ss).forEach(Y),Nr.cubeCount=0,Nr.textureCount=0}Gr.profile&&(Nr.getTotalTextureSize=function(){var ne=0;return Object.keys(ss).forEach(function(we){ne+=ss[we].stats.size}),ne});function K(){for(var ne=0;ne<Vs;++ne){var we=Ys[ne];we&&(we.bindCount=0,we.unit=-1,Ys[ne]=null)}dt(ss).forEach(function(Ue){Ue.texture=Me.createTexture(),Me.bindTexture(Ue.target,Ue.texture);for(var ft=0;ft<32;++ft)if((Ue.mipmask&1<<ft)!==0)if(Ue.target===_n)Me.texImage2D(_n,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Me.texImage2D($n+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne<Vs;++ne){var we=Ys[ne];we&&(we.bindCount=0,we.unit=-1,Ys[ne]=null),Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Me.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:q,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,gs=36194,Wf=33189,Wh=36168,rh=34041,sf=35907,Sh=34836,Mu=34842,ih=34843,js=[];js[Kc]=2,js[Rc]=2,js[gs]=2,js[Wf]=2,js[Wh]=1,js[rh]=4,js[sf]=4,js[Sh]=16,js[Mu]=8,js[ih]=6;function Eu(Me,bt,zt){return js[Me]*bt*zt}var Dc=function(Me,bt,zt,Rr,jr){var Nr={rgba4:Kc,rgb565:gs,\"rgb5 a1\":Rc,depth:Wf,stencil:Wh,\"depth stencil\":rh};bt.ext_srgb&&(Nr.srgba=sf),bt.ext_color_buffer_half_float&&(Nr.rgba16f=Mu,Nr.rgb16f=ih),bt.webgl_color_buffer_float&&(Nr.rgba32f=Sh);var Gr=[];Object.keys(Nr).forEach(function(Wi){var si=Nr[Wi];Gr[si]=Wi});var mi=0,Ui={};function qi(Wi){this.id=mi++,this.refCount=1,this.renderbuffer=Wi,this.format=Kc,this.width=0,this.height=0,jr.profile&&(this.stats={size:0})}qi.prototype.decRef=function(){--this.refCount<=0&&Ei(this)};function Ei(Wi){var si=Wi.renderbuffer;Me.bindRenderbuffer(Nl,null),Me.deleteRenderbuffer(si),Wi.renderbuffer=null,Wi.refCount=0,delete Ui[Wi.id],Rr.renderbufferCount--}function Hn(Wi,si){var Mr=new qi(Me.createRenderbuffer());Ui[Mr.id]=Mr,Rr.renderbufferCount++;function Yr(Ri,ci){var an=0,Zi=0,Bn=Kc;if(typeof Ri==\"object\"&&Ri){var hi=Ri;if(\"shape\"in hi){var li=hi.shape;an=li[0]|0,Zi=li[1]|0}else\"radius\"in hi&&(an=Zi=hi.radius|0),\"width\"in hi&&(an=hi.width|0),\"height\"in hi&&(Zi=hi.height|0);\"format\"in hi&&(Bn=Nr[hi.format])}else typeof Ri==\"number\"?(an=Ri|0,typeof ci==\"number\"?Zi=ci|0:Zi=an):Ri||(an=Zi=1);if(!(an===Mr.width&&Zi===Mr.height&&Bn===Mr.format))return Yr.width=Mr.width=an,Yr.height=Mr.height=Zi,Mr.format=Bn,Me.bindRenderbuffer(Nl,Mr.renderbuffer),Me.renderbufferStorage(Nl,Bn,an,Zi),jr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height)),Yr.format=Gr[Mr.format],Yr}function xi(Ri,ci){var an=Ri|0,Zi=ci|0||an;return an===Mr.width&&Zi===Mr.height||(Yr.width=Mr.width=an,Yr.height=Mr.height=Zi,Me.bindRenderbuffer(Nl,Mr.renderbuffer),Me.renderbufferStorage(Nl,Mr.format,an,Zi),jr.profile&&(Mr.stats.size=Eu(Mr.format,Mr.width,Mr.height))),Yr}return Yr(Wi,si),Yr.resize=xi,Yr._reglType=\"renderbuffer\",Yr._renderbuffer=Mr,jr.profile&&(Yr.stats=Mr.stats),Yr.destroy=function(){Mr.decRef()},Yr}jr.profile&&(Rr.getTotalRenderbufferSize=function(){var Wi=0;return Object.keys(Ui).forEach(function(si){Wi+=Ui[si].stats.size}),Wi});function en(){dt(Ui).forEach(function(Wi){Wi.renderbuffer=Me.createRenderbuffer(),Me.bindRenderbuffer(Nl,Wi.renderbuffer),Me.renderbufferStorage(Nl,Wi.format,Wi.width,Wi.height)}),Me.bindRenderbuffer(Nl,null)}return{create:Hn,clear:function(){dt(Ui).forEach(Ei)},restore:en}},ks=36160,bc=36161,hu=3553,_u=34069,nl=36064,nh=36096,Mh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,xf=5126,Pf=6407,Ou=6408,bf=[];bf[Ou]=4,bf[Pf]=3;var jl=[];jl[bd]=1,jl[xf]=4,jl[wc]=2;function lf(Me,bt,zt,Rr,jr,Nr){var Gr={cur:null,next:null,dirty:!1,setFBO:null},mi=[\"rgba\"],Ui=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];bt.ext_srgb&&Ui.push(\"srgba\"),bt.ext_color_buffer_half_float&&Ui.push(\"rgba16f\",\"rgb16f\"),bt.webgl_color_buffer_float&&Ui.push(\"rgba32f\");var qi=[\"uint8\"];bt.oes_texture_half_float&&qi.push(\"half float\",\"float16\"),bt.oes_texture_float&&qi.push(\"float\",\"float32\");function Ei(Vi,Ni,pn){this.target=Vi,this.texture=Ni,this.renderbuffer=pn;var Vn=0,na=0;Ni?(Vn=Ni.width,na=Ni.height):pn&&(Vn=pn.width,na=pn.height),this.width=Vn,this.height=na}function Hn(Vi){Vi&&(Vi.texture&&Vi.texture._texture.decRef(),Vi.renderbuffer&&Vi.renderbuffer._renderbuffer.decRef())}function en(Vi,Ni,pn){if(Vi)if(Vi.texture){var Vn=Vi.texture._texture,na=Math.max(1,Vn.width),Ki=Math.max(1,Vn.height);Vn.refCount+=1}else{var kn=Vi.renderbuffer._renderbuffer;kn.refCount+=1}}function Wi(Vi,Ni){Ni&&(Ni.texture?Me.framebufferTexture2D(ks,Vi,Ni.target,Ni.texture._texture.texture,0):Me.framebufferRenderbuffer(ks,Vi,bc,Ni.renderbuffer._renderbuffer.renderbuffer))}function si(Vi){var Ni=hu,pn=null,Vn=null,na=Vi;typeof Vi==\"object\"&&(na=Vi.data,\"target\"in Vi&&(Ni=Vi.target|0));var Ki=na._reglType;return Ki===\"texture2d\"||Ki===\"textureCube\"?pn=na:Ki===\"renderbuffer\"&&(Vn=na,Ni=bc),new Ei(Ni,pn,Vn)}function Mr(Vi,Ni,pn,Vn,na){if(pn){var Ki=Rr.create2D({width:Vi,height:Ni,format:Vn,type:na});return Ki._texture.refCount=0,new Ei(hu,Ki,null)}else{var kn=jr.create({width:Vi,height:Ni,format:Vn});return kn._renderbuffer.refCount=0,new Ei(bc,null,kn)}}function Yr(Vi){return Vi&&(Vi.texture||Vi.renderbuffer)}function xi(Vi,Ni,pn){Vi&&(Vi.texture?Vi.texture.resize(Ni,pn):Vi.renderbuffer&&Vi.renderbuffer.resize(Ni,pn),Vi.width=Ni,Vi.height=pn)}var Ri=0,ci={};function an(){this.id=Ri++,ci[this.id]=this,this.framebuffer=Me.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Zi(Vi){Vi.colorAttachments.forEach(Hn),Hn(Vi.depthAttachment),Hn(Vi.stencilAttachment),Hn(Vi.depthStencilAttachment)}function Bn(Vi){var Ni=Vi.framebuffer;Me.deleteFramebuffer(Ni),Vi.framebuffer=null,Nr.framebufferCount--,delete ci[Vi.id]}function hi(Vi){var Ni;Me.bindFramebuffer(ks,Vi.framebuffer);var pn=Vi.colorAttachments;for(Ni=0;Ni<pn.length;++Ni)Wi(nl+Ni,pn[Ni]);for(Ni=pn.length;Ni<zt.maxColorAttachments;++Ni)Me.framebufferTexture2D(ks,nl+Ni,hu,null,0);Me.framebufferTexture2D(ks,zu,hu,null,0),Me.framebufferTexture2D(ks,nh,hu,null,0),Me.framebufferTexture2D(ks,Mh,hu,null,0),Wi(nh,Vi.depthAttachment),Wi(Mh,Vi.stencilAttachment),Wi(zu,Vi.depthStencilAttachment);var Vn=Me.checkFramebufferStatus(ks);Me.isContextLost(),Me.bindFramebuffer(ks,Gr.next?Gr.next.framebuffer:null),Gr.cur=Gr.next,Me.getError()}function li(Vi,Ni){var pn=new an;Nr.framebufferCount++;function Vn(Ki,kn){var ta,oa=0,ba=0,is=!0,Zs=!0,Va=null,Ml=!0,zo=\"rgba\",Qs=\"uint8\",al=1,Vl=null,ss=null,Vs=null,Ys=!1;if(typeof Ki==\"number\")oa=Ki|0,ba=kn|0||oa;else if(!Ki)oa=ba=1;else{var wa=Ki;if(\"shape\"in wa){var ol=wa.shape;oa=ol[0],ba=ol[1]}else\"radius\"in wa&&(oa=ba=wa.radius),\"width\"in wa&&(oa=wa.width),\"height\"in wa&&(ba=wa.height);(\"color\"in wa||\"colors\"in wa)&&(Va=wa.color||wa.colors,Array.isArray(Va)),Va||(\"colorCount\"in wa&&(al=wa.colorCount|0),\"colorTexture\"in wa&&(Ml=!!wa.colorTexture,zo=\"rgba4\"),\"colorType\"in wa&&(Qs=wa.colorType,Ml||(Qs===\"half float\"||Qs===\"float16\"?zo=\"rgba16f\":(Qs===\"float\"||Qs===\"float32\")&&(zo=\"rgba32f\"))),\"colorFormat\"in wa&&(zo=wa.colorFormat,mi.indexOf(zo)>=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),(\"depthTexture\"in wa||\"depthStencilTexture\"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),\"depth\"in wa&&(typeof wa.depth==\"boolean\"?is=wa.depth:(Vl=wa.depth,Zs=!1)),\"stencil\"in wa&&(typeof wa.stencil==\"boolean\"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),\"depthStencil\"in wa&&(typeof wa.depthStencil==\"boolean\"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta<al;++ta)io[ta]=Mr(oa,ba,Ml,zo,Qs);oa=oa||io[0].width,ba=ba||io[0].height,Vl?Y=si(Vl):is&&!Zs&&(Y=Mr(oa,ba,Ys,\"depth\",\"uint32\")),ss?D=si(ss):Zs&&!is&&(D=Mr(oa,ba,!1,\"stencil\",\"uint8\")),Vs?J=si(Vs):!Vl&&!ss&&Zs&&is&&(J=Mr(oa,ba,Ys,\"depth stencil\",\"depth stencil\"));var q=null;for(ta=0;ta<io.length;++ta)if(en(io[ta],oa,ba),io[ta]&&io[ta].texture){var K=bf[io[ta].texture._texture.format]*jl[io[ta].texture._texture.type];q===null&&(q=K)}return en(Y,oa,ba),en(D,oa,ba),en(J,oa,ba),Zi(pn),pn.width=oa,pn.height=ba,pn.colorAttachments=io,pn.depthAttachment=Y,pn.stencilAttachment=D,pn.depthStencilAttachment=J,Vn.color=io.map(Yr),Vn.depth=Yr(Y),Vn.stencil=Yr(D),Vn.depthStencil=Yr(J),Vn.width=pn.width,Vn.height=pn.height,hi(pn),Vn}function na(Ki,kn){var ta=Math.max(Ki|0,1),oa=Math.max(kn|0||ta,1);if(ta===pn.width&&oa===pn.height)return Vn;for(var ba=pn.colorAttachments,is=0;is<ba.length;++is)xi(ba[is],ta,oa);return xi(pn.depthAttachment,ta,oa),xi(pn.stencilAttachment,ta,oa),xi(pn.depthStencilAttachment,ta,oa),pn.width=Vn.width=ta,pn.height=Vn.height=oa,hi(pn),Vn}return Vn(Vi,Ni),e(Vn,{resize:na,_reglType:\"framebuffer\",_framebuffer:pn,destroy:function(){Bn(pn),Zi(pn)},use:function(Ki){Gr.setFBO({framebuffer:Vn},Ki)}})}function mn(Vi){var Ni=Array(6);function pn(na){var Ki,kn={color:null},ta=0,oa=null,ba=\"rgba\",is=\"uint8\",Zs=1;if(typeof na==\"number\")ta=na|0;else if(!na)ta=1;else{var Va=na;if(\"shape\"in Va){var Ml=Va.shape;ta=Ml[0]}else\"radius\"in Va&&(ta=Va.radius|0),\"width\"in Va?(ta=Va.width|0,\"height\"in Va):\"height\"in Va&&(ta=Va.height|0);(\"color\"in Va||\"colors\"in Va)&&(oa=Va.color||Va.colors,Array.isArray(oa)),oa||(\"colorCount\"in Va&&(Zs=Va.colorCount|0),\"colorType\"in Va&&(is=Va.colorType),\"colorFormat\"in Va&&(ba=Va.colorFormat)),\"depth\"in Va&&(kn.depth=Va.depth),\"stencil\"in Va&&(kn.stencil=Va.stencil),\"depthStencil\"in Va&&(kn.depthStencil=Va.depthStencil)}var zo;if(oa)if(Array.isArray(oa))for(zo=[],Ki=0;Ki<oa.length;++Ki)zo[Ki]=oa[Ki];else zo=[oa];else{zo=Array(Zs);var Qs={radius:ta,format:ba,type:is};for(Ki=0;Ki<Zs;++Ki)zo[Ki]=Rr.createCube(Qs)}for(kn.color=Array(zo.length),Ki=0;Ki<zo.length;++Ki){var al=zo[Ki];ta=ta||al.width,kn.color[Ki]={target:_u,data:zo[Ki]}}for(Ki=0;Ki<6;++Ki){for(var Vl=0;Vl<zo.length;++Vl)kn.color[Vl].target=_u+Ki;Ki>0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki<ta.length;++Ki)ta[Ki].resize(kn);for(Ki=0;Ki<6;++Ki)Ni[Ki].resize(kn);return pn.width=pn.height=kn,pn}return pn(Vi),e(pn,{faces:Ni,resize:Vn,_reglType:\"framebufferCube\",destroy:function(){Ni.forEach(function(na){na.destroy()})}})}function Ji(){Gr.cur=null,Gr.next=null,Gr.dirty=!0,dt(ci).forEach(function(Vi){Vi.framebuffer=Me.createFramebuffer(),hi(Vi)})}return e(Gr,{getFramebuffer:function(Vi){if(typeof Vi==\"function\"&&Vi._reglType===\"framebuffer\"){var Ni=Vi._framebuffer;if(Ni instanceof an)return Ni}return null},create:li,createCube:mn,clear:function(){dt(ci).forEach(Bn)},restore:Ji})}var Xh=5126,If=34962,Cs=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Xh,this.offset=0,this.stride=0,this.divisor=0}function ku(Me,bt,zt,Rr,jr,Nr,Gr){for(var mi=zt.maxAttributes,Ui=new Array(mi),qi=0;qi<mi;++qi)Ui[qi]=new du;var Ei=0,Hn={},en={Record:du,scope:{},state:Ui,currentVAO:null,targetVAO:null,restore:si()?Zi:function(){},createVAO:Bn,getVAO:Yr,destroyBuffer:Wi,setVAO:si()?xi:Ri,clear:si()?ci:function(){}};function Wi(hi){for(var li=0;li<Ui.length;++li){var mn=Ui[li];mn.buffer===hi&&(Me.disableVertexAttribArray(li),mn.buffer=null)}}function si(){return bt.oes_vertex_array_object}function Mr(){return bt.angle_instanced_arrays}function Yr(hi){return typeof hi==\"function\"&&hi._vao?hi._vao:null}function xi(hi){if(hi!==en.currentVAO){var li=si();hi?li.bindVertexArrayOES(hi.vao):li.bindVertexArrayOES(null),en.currentVAO=hi}}function Ri(hi){if(hi!==en.currentVAO){if(hi)hi.bindAttrs();else{for(var li=Mr(),mn=0;mn<Ui.length;++mn){var Ji=Ui[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Ji.buffer.bind(),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offfset),li&&Ji.divisor&&li.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}Gr.elements?Me.bindBuffer(Cs,Gr.elements.buffer.buffer):Me.bindBuffer(Cs,null)}en.currentVAO=hi}}function ci(){dt(Hn).forEach(function(hi){hi.destroy()})}function an(){this.id=++Ei,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var hi=si();hi?this.vao=hi.createVertexArrayOES():this.vao=null,Hn[this.id]=this,this.buffers=[]}an.prototype.bindAttrs=function(){for(var hi=Mr(),li=this.attributes,mn=0;mn<li.length;++mn){var Ji=li[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Me.bindBuffer(If,Ji.buffer.buffer),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offset),hi&&Ji.divisor&&hi.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}for(var Vi=li.length;Vi<mi;++Vi)Me.disableVertexAttribArray(Vi);var Ni=Nr.getElements(this.elements);Ni?Me.bindBuffer(Cs,Ni.buffer.buffer):Me.bindBuffer(Cs,null)},an.prototype.refresh=function(){var hi=si();hi&&(hi.bindVertexArrayOES(this.vao),this.bindAttrs(),en.currentVAO=null,hi.bindVertexArrayOES(null))},an.prototype.destroy=function(){if(this.vao){var hi=si();this===en.currentVAO&&(en.currentVAO=null,hi.bindVertexArrayOES(null)),hi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Hn[this.id]&&(delete Hn[this.id],Rr.vaoCount-=1)};function Zi(){var hi=si();hi&&dt(Hn).forEach(function(li){li.refresh()})}function Bn(hi){var li=new an;Rr.vaoCount+=1;function mn(Ji){var Vi;if(Array.isArray(Ji))Vi=Ji,li.elements&&li.ownsElements&&li.elements.destroy(),li.elements=null,li.ownsElements=!1,li.offset=0,li.count=0,li.instances=-1,li.primitive=4;else{if(Ji.elements){var Ni=Ji.elements;li.ownsElements?typeof Ni==\"function\"&&Ni._reglType===\"elements\"?(li.elements.destroy(),li.ownsElements=!1):(li.elements(Ni),li.ownsElements=!1):Nr.getElements(Ji.elements)?(li.elements=Ji.elements,li.ownsElements=!1):(li.elements=Nr.create(Ji.elements),li.ownsElements=!0)}else li.elements=null,li.ownsElements=!1;Vi=Ji.attributes,li.offset=0,li.count=-1,li.instances=-1,li.primitive=4,li.elements&&(li.count=li.elements._elements.vertCount,li.primitive=li.elements._elements.primType),\"offset\"in Ji&&(li.offset=Ji.offset|0),\"count\"in Ji&&(li.count=Ji.count|0),\"instances\"in Ji&&(li.instances=Ji.instances|0),\"primitive\"in Ji&&(li.primitive=Sn[Ji.primitive])}var pn={},Vn=li.attributes;Vn.length=Vi.length;for(var na=0;na<Vi.length;++na){var Ki=Vi[na],kn=Vn[na]=new du,ta=Ki.data||Ki;if(Array.isArray(ta)||Br(ta)||Vr(ta)){var oa;li.buffers[na]&&(oa=li.buffers[na],Br(ta)&&oa._buffer.byteLength>=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,\"type\"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):\"x\"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba<li.buffers.length;++ba)!pn[ba]&&li.buffers[ba]&&(li.buffers[ba].destroy(),li.buffers[ba]=null);return li.refresh(),mn}return mn.destroy=function(){for(var Ji=0;Ji<li.buffers.length;++Ji)li.buffers[Ji]&&li.buffers[Ji].destroy();li.buffers.length=0,li.ownsElements&&(li.elements.destroy(),li.elements=null,li.ownsElements=!1),li.destroy()},mn._vao=li,mn._reglType=\"vao\",mn(hi)}return en}var Xf=35632,Us=35633,wf=35718,zc=35721;function Wu(Me,bt,zt,Rr){var jr={},Nr={};function Gr(Mr,Yr,xi,Ri){this.name=Mr,this.id=Yr,this.location=xi,this.info=Ri}function mi(Mr,Yr){for(var xi=0;xi<Mr.length;++xi)if(Mr[xi].id===Yr.id){Mr[xi].location=Yr.location;return}Mr.push(Yr)}function Ui(Mr,Yr,xi){var Ri=Mr===Xf?jr:Nr,ci=Ri[Yr];if(!ci){var an=bt.str(Yr);ci=Me.createShader(Mr),Me.shaderSource(ci,an),Me.compileShader(ci),Ri[Yr]=ci}return ci}var qi={},Ei=[],Hn=0;function en(Mr,Yr){this.id=Hn++,this.fragId=Mr,this.vertId=Yr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Rr.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Wi(Mr,Yr,xi){var Ri,ci,an=Ui(Xf,Mr.fragId),Zi=Ui(Us,Mr.vertId),Bn=Mr.program=Me.createProgram();if(Me.attachShader(Bn,an),Me.attachShader(Bn,Zi),xi)for(Ri=0;Ri<xi.length;++Ri){var hi=xi[Ri];Me.bindAttribLocation(Bn,hi[0],hi[1])}Me.linkProgram(Bn);var li=Me.getProgramParameter(Bn,wf);Rr.profile&&(Mr.stats.uniformsCount=li);var mn=Mr.uniforms;for(Ri=0;Ri<li;++Ri)if(ci=Me.getActiveUniform(Bn,Ri),ci)if(ci.size>1)for(var Ji=0;Ji<ci.size;++Ji){var Vi=ci.name.replace(\"[0]\",\"[\"+Ji+\"]\");mi(mn,new Gr(Vi,bt.id(Vi),Me.getUniformLocation(Bn,Vi),ci))}else mi(mn,new Gr(ci.name,bt.id(ci.name),Me.getUniformLocation(Bn,ci.name),ci));var Ni=Me.getProgramParameter(Bn,zc);Rr.profile&&(Mr.stats.attributesCount=Ni);var pn=Mr.attributes;for(Ri=0;Ri<Ni;++Ri)ci=Me.getActiveAttrib(Bn,Ri),ci&&mi(pn,new Gr(ci.name,bt.id(ci.name),Me.getAttribLocation(Bn,ci.name),ci))}Rr.profile&&(zt.getMaxUniformsCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.uniformsCount>Mr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr<Ei.length;++Mr)Wi(Ei[Mr],null,Ei[Mr].attributes.map(function(Yr){return[Yr.location,Yr.name]}))}return{clear:function(){var Mr=Me.deleteShader.bind(Me);dt(jr).forEach(Mr),jr={},dt(Nr).forEach(Mr),Nr={},Ei.forEach(function(Yr){Me.deleteProgram(Yr.program)}),Ei.length=0,qi={},zt.shaderCount=0},program:function(Mr,Yr,xi,Ri){var ci=qi[Yr];ci||(ci=qi[Yr]={});var an=ci[Mr];if(an&&(an.refCount++,!Ri))return an;var Zi=new en(Yr,Mr);return zt.shaderCount++,Wi(Zi,xi,Ri),an||(ci[Mr]=Zi),Ei.push(Zi),e(Zi,{destroy:function(){if(Zi.refCount--,Zi.refCount<=0){Me.deleteProgram(Zi.program);var Bn=Ei.indexOf(Zi);Ei.splice(Bn,1),zt.shaderCount--}ci[Zi.vertId].refCount<=0&&(Me.deleteShader(Nr[Zi.vertId]),delete Nr[Zi.vertId],delete qi[Zi.fragId][Zi.vertId]),Object.keys(qi[Zi.fragId]).length||(Me.deleteShader(jr[Zi.fragId]),delete jr[Zi.fragId],delete qi[Zi.fragId])}})},restore:si,shader:Ui,frag:-1,vert:-1}}var Rf=6408,Xu=5121,uf=3333,Zf=5126;function Wl(Me,bt,zt,Rr,jr,Nr,Gr){function mi(Ei){var Hn;bt.next===null?Hn=Xu:Hn=bt.next.colorAttachments[0].texture._texture.type;var en=0,Wi=0,si=Rr.framebufferWidth,Mr=Rr.framebufferHeight,Yr=null;Br(Ei)?Yr=Ei:Ei&&(en=Ei.x|0,Wi=Ei.y|0,si=(Ei.width||Rr.framebufferWidth-en)|0,Mr=(Ei.height||Rr.framebufferHeight-Wi)|0,Yr=Ei.data||null),zt();var xi=si*Mr*4;return Yr||(Hn===Xu?Yr=new Uint8Array(xi):Hn===Zf&&(Yr=Yr||new Float32Array(xi))),Me.pixelStorei(uf,4),Me.readPixels(en,Wi,si,Mr,Rf,Hn,Yr),Yr}function Ui(Ei){var Hn;return bt.setFBO({framebuffer:Ei.framebuffer},function(){Hn=mi(Ei)}),Hn}function qi(Ei){return!Ei||!(\"framebuffer\"in Ei)?mi(Ei):Ui(Ei)}return qi}var ah=0,Zu=\"\";function Oc(Me){return vu(Tc(fc(Me)))}function Tc(Me){return At(Yi(Bc(Me),Me.length*8))}function wl(Me,bt){var zt=Bc(Me);zt.length>16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?\"0123456789ABCDEF\":\"0123456789abcdef\",zt=\"\",Rr,jr=0;jr<Me.length;jr++)Rr=Me.charCodeAt(jr),zt+=bt.charAt(Rr>>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",zt=\"\",Rr=Me.length,jr=0;jr<Rr;jr+=3)for(var Nr=Me.charCodeAt(jr)<<16|(jr+1<Rr?Me.charCodeAt(jr+1)<<8:0)|(jr+2<Rr?Me.charCodeAt(jr+2):0),Gr=0;Gr<4;Gr++)jr*8+Gr*6>Me.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr<Ui.length;jr++)Ui[jr]=Me.charCodeAt(jr*2)<<8|Me.charCodeAt(jr*2+1);for(;Ui.length>0;){for(mi=Array(),Gr=0,jr=0;jr<Ui.length;jr++)Gr=(Gr<<16)+Ui[jr],Nr=Math.floor(Gr/zt),Gr-=Nr*zt,(mi.length>0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi=\"\";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr<Ei;jr++)qi=bt[0]+qi;return qi}function fc(Me){for(var bt=\"\",zt=-1,Rr,jr;++zt<Me.length;)Rr=Me.charCodeAt(zt),jr=zt+1<Me.length?Me.charCodeAt(zt+1):0,55296<=Rr&&Rr<=56319&&56320<=jr&&jr<=57343&&(Rr=65536+((Rr&1023)<<10)+(jr&1023),zt++),Rr<=127?bt+=String.fromCharCode(Rr):Rr<=2047?bt+=String.fromCharCode(192|Rr>>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt<bt.length;zt++)bt[zt]=0;for(var zt=0;zt<Me.length*8;zt+=8)bt[zt>>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt=\"\",zt=0;zt<Me.length*32;zt+=8)bt+=String.fromCharCode(Me[zt>>5]>>>24-zt%32&255);return bt}function Xt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Xt(Me,2)^Xt(Me,13)^Xt(Me,22)}function Xi(Me){return Xt(Me,6)^Xt(Me,11)^Xt(Me,25)}function dn(Me){return Xt(Me,7)^Xt(Me,18)^Cr(Me,3)}function wn(Me){return Xt(Me,17)^Xt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en<Me.length;en+=16){for(jr=zt[0],Nr=zt[1],Gr=zt[2],mi=zt[3],Ui=zt[4],qi=zt[5],Ei=zt[6],Hn=zt[7],Wi=0;Wi<64;Wi++)Wi<16?Rr[Wi]=Me[Wi+en]:Rr[Wi]=Qi(Qi(Qi(wn(Rr[Wi-2]),Rr[Wi-7]),dn(Rr[Wi-15])),Rr[Wi-16]),si=Qi(Qi(Qi(Qi(Hn,Xi(Ui)),Ar(Ui,qi,Ei)),Nn[Wi]),Rr[Wi]),Mr=Qi(ki(jr),Kr(jr,Nr,Gr)),Hn=Ei,Ei=qi,qi=Ui,Ui=Qi(mi,si),mi=Gr,Gr=Nr,Nr=jr,jr=Qi(si,Mr);zt[0]=Qi(jr,zt[0]),zt[1]=Qi(Nr,zt[1]),zt[2]=Qi(Gr,zt[2]),zt[3]=Qi(mi,zt[3]),zt[4]=Qi(Ui,zt[4]),zt[5]=Qi(qi,zt[5]),zt[6]=Qi(Ei,zt[6]),zt[7]=Qi(Hn,zt[7])}return zt}function Qi(Me,bt){var zt=(Me&65535)+(bt&65535),Rr=(Me>>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join(\"\")}function Qn(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi<jr.length;++xi)if(jr[xi]===si&&!Nr[xi])return Rr[xi]}var Ri=\"g\"+zt++;return Rr.push(Ri),jr.push(si),Nr.push(Yr),Ri}function mi(){var si=[];function Mr(){si.push.apply(si,on(arguments))}var Yr=[];function xi(){var Ri=\"v\"+zt++;return Yr.push(Ri),arguments.length>0&&(si.push(Ri,\"=\"),si.push.apply(si,on(arguments)),si.push(\";\")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?\"var \"+Yr.join(\",\")+\";\":\"\",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,\"=\",si.def(ci,an),\";\")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,\"=\",Zi,\";\")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci=\"else{\"+ci+\"}\"),Fi([\"if(\",si,\"){\",xi(),\"}\",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn=\"a\"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri<Mr;++Ri)xi();var ci=Ui(),an=ci.toString,Zi=Hn[si]=e(ci,{arg:xi,toString:function(){return Fi([\"function(\",Yr.join(),\"){\",an(),\"}\"])}});return Zi}function Wi(){var si=['\"use strict\";',Ei,\"return {\"];Object.keys(Hn).forEach(function(Ri){si.push('\"',Ri,'\":',Hn[Ri].toString(),\",\")}),si.push(\"}\");var Mr=Fi(si).replace(/;/g,`;\n",
       "`).replace(/}/g,`}\n",
       "`).replace(/{/g,`{\n",
       "`),Yr;if(bt&&(Yr=Oc(Mr),bt[Yr]))return bt[Yr].apply(null,jr);var xi=Function.apply(null,Rr.concat(Mr));return bt&&(bt[Yr]=xi),xi.apply(null,jr)}return{global:Ei,link:Gr,block:mi,proc:en,scope:Ui,cond:qi,compile:Wi}}var Ca=\"xyzw\".split(\"\"),Ra=5121,La=1,Na=2,Yn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws=\"dither\",Ho=\"blend.enable\",ml=\"blend.color\",Ws=\"blend.equation\",Ls=\"blend.func\",va=\"depth.enable\",no=\"depth.func\",ys=\"depth.range\",rs=\"depth.mask\",Ql=\"colorMask\",Cu=\"cull.enable\",Yu=\"cull.face\",Nc=\"frontFace\",pu=\"lineWidth\",Uc=\"polygonOffset.enable\",xu=\"polygonOffset.offset\",Ac=\"sample.alpha\",Ua=\"sample.enable\",oo=\"sample.coverage\",Vc=\"stencil.enable\",hc=\"stencil.mask\",Ku=\"stencil.func\",ue=\"stencil.opFront\",w=\"stencil.opBack\",B=\"scissor.enable\",Q=\"scissor.box\",ee=\"viewport\",le=\"profile\",Oe=\"framebuffer\",Ze=\"vert\",st=\"frag\",Tt=\"elements\",Yt=\"primitive\",Kt=\"count\",xr=\"offset\",Ir=\"instances\",ve=\"vao\",be=\"Width\",Re=\"Height\",qe=Oe+be,et=Oe+Re,Xe=ee+be,it=ee+Re,Ft=\"drawingBuffer\",Ht=Ft+be,tr=Ft+Re,dr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],Sr=34962,Or=34963,Wr=2884,ni=3042,Pi=3024,cn=2960,ln=2929,Cn=3089,Kn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Ne=2305,He=32775,Ye=32776,kt=519,nt=7680,jt=0,gr=1,yr=32774,Hr=513,qr=36160,_i=36064,bi={0:0,1:1,zero:0,one:1,\"src color\":768,\"one minus src color\":769,\"src alpha\":770,\"one minus src alpha\":771,\"dst color\":774,\"one minus dst color\":775,\"dst alpha\":772,\"one minus dst alpha\":773,\"constant color\":32769,\"one minus constant color\":32770,\"constant alpha\":32771,\"one minus constant alpha\":32772,\"src alpha saturate\":776},Zr={never:512,less:513,\"<\":513,equal:514,\"=\":514,\"==\":514,\"===\":514,lequal:515,\"<=\":515,greater:516,\">\":516,notequal:517,\"!=\":517,\"!==\":517,gequal:518,\">=\":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt<zt?-1:1})}function ei(Me,bt,zt,Rr){this.thisDep=Me,this.contextDep=bt,this.propDep=zt,this.append=Rr}function Ln(Me){return Me&&!(Me.thisDep||Me.contextDep||Me.propDep)}function En(Me){return new ei(!1,!1,!1,Me)}function Un(Me,bt){var zt=Me.type;if(zt===Yn){var Rr=Me.data.length;return new ei(!0,Rr>=1,Rr>=2,bt)}else if(zt===Zo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui<Me.data.length;++Ui){var qi=Me.data[Ui];if(qi.type===Dn)mi=!0;else if(qi.type===Ka)Gr=!0;else if(qi.type===bo)Nr=!0;else if(qi.type===Yn){Nr=!0;var Ei=qi.data;Ei>=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Zo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,\"reverse subtract\":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(\".\",\"_\")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,\"blendColor\",[0,0,0,0]),Ni(Ws,\"blendEquationSeparate\",[yr,yr]),Ni(Ls,\"blendFuncSeparate\",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,\"depthFunc\",Hr),Ni(ys,\"depthRange\",[0,1]),Ni(rs,\"depthMask\",!0),Ni(Ql,Ql,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,\"cullFace\",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,\"polygonOffset\",[0,0]),Vi(Ac,Aa),Vi(Ua,fa),Ni(oo,\"sampleCoverage\",[1,!1]),Vi(Vc,cn),Ni(hc,\"stencilMask\",-1),Ni(Ku,\"stencilFunc\",[kt,0,-1]),Ni(ue,\"stencilOpSeparate\",[X,nt,nt,nt]),Ni(w,\"stencilOpSeparate\",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,\"scissor\",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=Qn({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId=\"0\";var Ct=Qe(Vn),Ot=Ve.shared={props:\"a0\"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,\".\",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,\".\",Pt),Bt[Pt]=at.def(Ot.current,\".\",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=[\"this\",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),\".call(\",ur.slice(0,Math.max(ht.data.length+1,4)),\")\");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def(\"this\",ht.data);case Zo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(Oe in at){var Ot=at[Oe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,\".next\",yt);var ht=Pt.context;return Dt.set(ht,\".\"+qe,yt+\".width\"),Dt.set(ht,\".\"+et,yt+\".height\"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,\".next\",\"null\");var Pt=yt.context;return Dt.set(Pt,\".\"+qe,Pt+\".\"+Ht),Dt.set(Pt,\".\"+et,Pt+\".\"+tr),\"null\"})}else if(Oe in Ct){var Rt=Ct[Oe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,\".getFramebuffer(\",yt,\")\");Dt.set(ht,\".next\",ur);var br=Pt.context;return Dt.set(br,\".\"+qe,ur+\"?\"+ur+\".width:\"+br+\".\"+Ht),Dt.set(br,\".\"+et,ur+\"?\"+ur+\".height:\"+br+\".\"+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return\"width\"in Pt?Ur=Pt.width|0:ht=!1,\"height\"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;\"width\"in Pt||(Bi=rn.def(Ci,\".\",qe,\"-\",ur));var Gi=Di;return\"height\"in Pt||(Gi=rn.def(Ci,\".\",et,\"-\",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,\".x|0\"),sn=rn.def(Ci,\".y|0\"),zn=rn.def('\"width\" in ',Ci,\"?\",Ci,\".width|0:\",\"(\",Bi,\".\",qe,\"-\",Gi,\")\"),Ja=rn.def('\"height\" in ',Ci,\"?\",Ci,\".height|0:\",\"(\",Bi,\".\",et,\"-\",sn,\")\");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,\".\",qe),rn.def(Ci,\".\",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,\".\"+Xe,ht[2]),Pt.set(ur,\".\"+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[st]==\"string\"&&typeof at[Ze]==\"string\";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]==\"number\"){for(var Bt=[],Dt=0;Dt<Rt.length;++Dt)Bt.push([Ot[Rt[Dt]]|0,Rt[Dt]]);return Bt}}return null}function Zs(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(ht){if(ht in Ct){var ur=bt.id(Ct[ht]),br=En(function(){return ur});return br.id=ur,br}else if(ht in Ot){var Ur=Ot[ht];return Un(Ur,function(Di,fi){var Ti=Di.invoke(fi,Ur),gn=fi.def(Di.shared.strings,\".id(\",Ti,\")\");return gn})}return null}var Bt=Rt(st),Dt=Rt(Ze),yt=null,Pt;return Ln(Bt)&&Ln(Dt)?(yt=Ei.program(Dt.id,Bt.id,null,at),Pt=En(function(ht,ur){return ht.link(yt)})):Pt=new ei(Bt&&Bt.thisDep||Dt&&Dt.thisDep,Bt&&Bt.contextDep||Dt&&Dt.contextDep,Bt&&Bt.propDep||Dt&&Dt.propDep,function(ht,ur){var br=ht.shared.shader,Ur;Bt?Ur=Bt.append(ht,ur):Ur=ur.def(br,\".\",st);var Di;Dt?Di=Dt.append(ht,ur):Di=ur.def(br,\".\",Ze);var fi=br+\".program(\"+Di+\",\"+Ur;return ur.def(fi+\")\")}),{frag:Bt,vert:Dt,progVar:Pt,program:yt}}function Va(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={},Rt=!1;function Bt(){if(ve in at){var rn=at[ve];return rn!==null&&qi.getVAO(rn)===null&&(rn=qi.createVAO(rn)),Rt=!0,Ot.vao=rn,En(function(Bi){var Gi=qi.getVAO(rn);return Gi?Bi.link(Gi):\"null\"})}else if(ve in Ct){Rt=!0;var Ci=Ct[ve];return Un(Ci,function(Bi,Gi){var sn=Bi.invoke(Gi,Ci);return Gi.def(Bi.shared.vao+\".getVAO(\"+sn+\")\")})}return null}var Dt=Bt(),yt=!1;function Pt(){if(Tt in at){var rn=at[Tt];if(Ot.elements=rn,Ii(rn)){var Ci=Ot.elements=Nr.create(rn,!0);rn=Nr.getElements(Ci),yt=!0}else rn&&(rn=Nr.getElements(rn),yt=!0);var Bi=En(function(sn,zn){if(rn){var Ja=sn.link(rn);return sn.ELEMENTS=Ja,Ja}return sn.ELEMENTS=null,null});return Bi.value=rn,Bi}else if(Tt in Ct){yt=!0;var Gi=Ct[Tt];return Un(Gi,function(sn,zn){var Ja=sn.shared,co=Ja.isBufferArgs,ts=Ja.elements,so=sn.invoke(zn,Gi),Yo=zn.def(\"null\"),ms=zn.def(co,\"(\",so,\")\"),ou=sn.cond(ms).then(Yo,\"=\",ts,\".createStream(\",so,\");\").else(Yo,\"=\",ts,\".getElements(\",so,\");\");return zn.entry(ou),zn.exit(sn.cond(ms).then(ts,\".destroyStream(\",Yo,\");\")),sn.ELEMENTS=Yo,Yo})}else if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.elements+\".getElements(\"+sn.shared.vao+\".currentVAO.elements):null\")});return null}var ht=Pt();function ur(){if(Yt in at){var rn=at[Yt];return Ot.primitive=rn,En(function(Bi,Gi){return Sn[rn]})}else if(Yt in Ct){var Ci=Ct[Yt];return Un(Ci,function(Bi,Gi){var sn=Bi.constants.primTypes,zn=Bi.invoke(Gi,Ci);return Gi.def(sn,\"[\",zn,\"]\")})}else{if(yt)return Ln(ht)?ht.value?En(function(Bi,Gi){return Gi.def(Bi.ELEMENTS,\".primType\")}):En(function(){return Al}):new ei(ht.thisDep,ht.contextDep,ht.propDep,function(Bi,Gi){var sn=Bi.ELEMENTS;return Gi.def(sn,\"?\",sn,\".primType:\",Al)});if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(Bi,Gi){return Gi.def(Bi.shared.vao+\".currentVAO?\"+Bi.shared.vao+\".currentVAO.primitive:\"+Al)})}return null}function br(rn,Ci){if(rn in at){var Bi=at[rn]|0;return Ci?Ot.offset=Bi:Ot.instances=Bi,En(function(sn,zn){return Ci&&(sn.OFFSET=Bi),Bi})}else if(rn in Ct){var Gi=Ct[rn];return Un(Gi,function(sn,zn){var Ja=sn.invoke(zn,Gi);return Ci&&(sn.OFFSET=Ja),Ja})}else if(Ci){if(yt)return En(function(sn,zn){return sn.OFFSET=0,0});if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.vao+\".currentVAO.offset:0\")})}else if(Rt)return new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(sn,zn){return zn.def(sn.shared.vao+\".currentVAO?\"+sn.shared.vao+\".currentVAO.instances:-1\")});return null}var Ur=br(xr,!0);function Di(){if(Kt in at){var rn=at[Kt]|0;return Ot.count=rn,En(function(){return rn})}else if(Kt in Ct){var Ci=Ct[Kt];return Un(Ci,function(zn,Ja){var co=zn.invoke(Ja,Ci);return co})}else if(yt)if(Ln(ht)){if(ht)return Ur?new ei(Ur.thisDep,Ur.contextDep,Ur.propDep,function(zn,Ja){var co=Ja.def(zn.ELEMENTS,\".vertCount-\",zn.OFFSET);return co}):En(function(zn,Ja){return Ja.def(zn.ELEMENTS,\".vertCount\")});var Bi=En(function(){return-1});return Bi}else{var Gi=new ei(ht.thisDep||Ur.thisDep,ht.contextDep||Ur.contextDep,ht.propDep||Ur.propDep,function(zn,Ja){var co=zn.ELEMENTS;return zn.OFFSET?Ja.def(co,\"?\",co,\".vertCount-\",zn.OFFSET,\":-1\"):Ja.def(co,\"?\",co,\".vertCount:-1\")});return Gi}else if(Rt){var sn=new ei(Dt.thisDep,Dt.contextDep,Dt.propDep,function(zn,Ja){return Ja.def(zn.shared.vao,\".currentVAO?\",zn.shared.vao,\".currentVAO.count:-1\")});return sn}return null}var fi=ur(),Ti=Di(),gn=br(Ir,!1);return{elements:ht,primitive:fi,count:Ti,instances:gn,offset:Ur,vao:Dt,vaoActive:Rt,elementsActive:yt,static:Ot}}function Ml(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return hi.forEach(function(Rt){var Bt=Ji(Rt);function Dt(yt,Pt){if(Rt in at){var ht=yt(at[Rt]);Ot[Bt]=En(function(){return ht})}else if(Rt in Ct){var ur=Ct[Rt];Ot[Bt]=Un(ur,function(br,Ur){return Pt(br,Ur,br.invoke(Ur,ur))})}}switch(Rt){case Cu:case Ho:case ws:case Vc:case va:case B:case Uc:case Ac:case Ua:case rs:return Dt(function(yt){return yt},function(yt,Pt,ht){return ht});case no:return Dt(function(yt){return Zr[yt]},function(yt,Pt,ht){var ur=yt.constants.compareFuncs;return Pt.def(ur,\"[\",ht,\"]\")});case ys:return Dt(function(yt){return yt},function(yt,Pt,ht){var ur=Pt.def(\"+\",ht,\"[0]\"),br=Pt.def(\"+\",ht,\"[1]\");return[ur,br]});case Ls:return Dt(function(yt){var Pt=\"srcRGB\"in yt?yt.srcRGB:yt.src,ht=\"srcAlpha\"in yt?yt.srcAlpha:yt.src,ur=\"dstRGB\"in yt?yt.dstRGB:yt.dst,br=\"dstAlpha\"in yt?yt.dstAlpha:yt.dst;return[bi[Pt],bi[ur],bi[ht],bi[br]]},function(yt,Pt,ht){var ur=yt.constants.blendFuncs;function br(Ci,Bi){var Gi=Pt.def('\"',Ci,Bi,'\" in ',ht,\"?\",ht,\".\",Ci,Bi,\":\",ht,\".\",Ci);return Gi}var Ur=br(\"src\",\"RGB\"),Di=br(\"dst\",\"RGB\"),fi=Pt.def(ur,\"[\",Ur,\"]\"),Ti=Pt.def(ur,\"[\",br(\"src\",\"Alpha\"),\"]\"),gn=Pt.def(ur,\"[\",Di,\"]\"),rn=Pt.def(ur,\"[\",br(\"dst\",\"Alpha\"),\"]\");return[fi,gn,Ti,rn]});case Ws:return Dt(function(yt){if(typeof yt==\"string\")return[xi[yt],xi[yt]];if(typeof yt==\"object\")return[xi[yt.rgb],xi[yt.alpha]]},function(yt,Pt,ht){var ur=yt.constants.blendEquations,br=Pt.def(),Ur=Pt.def(),Di=yt.cond(\"typeof \",ht,'===\"string\"');return Di.then(br,\"=\",Ur,\"=\",ur,\"[\",ht,\"];\"),Di.else(br,\"=\",ur,\"[\",ht,\".rgb];\",Ur,\"=\",ur,\"[\",ht,\".alpha];\"),Pt(Di),[br,Ur]});case ml:return Dt(function(yt){return M(4,function(Pt){return+yt[Pt]})},function(yt,Pt,ht){return M(4,function(ur){return Pt.def(\"+\",ht,\"[\",ur,\"]\")})});case hc:return Dt(function(yt){return yt|0},function(yt,Pt,ht){return Pt.def(ht,\"|0\")});case Ku:return Dt(function(yt){var Pt=yt.cmp||\"keep\",ht=yt.ref||0,ur=\"mask\"in yt?yt.mask:-1;return[Zr[Pt],ht,ur]},function(yt,Pt,ht){var ur=yt.constants.compareFuncs,br=Pt.def('\"cmp\" in ',ht,\"?\",ur,\"[\",ht,\".cmp]\",\":\",nt),Ur=Pt.def(ht,\".ref|0\"),Di=Pt.def('\"mask\" in ',ht,\"?\",ht,\".mask|0:-1\");return[br,Ur,Di]});case ue:case w:return Dt(function(yt){var Pt=yt.fail||\"keep\",ht=yt.zfail||\"keep\",ur=yt.zpass||\"keep\";return[Rt===w?se:X,ai[Pt],ai[ht],ai[ur]]},function(yt,Pt,ht){var ur=yt.constants.stencilOps;function br(Ur){return Pt.def('\"',Ur,'\" in ',ht,\"?\",ur,\"[\",ht,\".\",Ur,\"]:\",nt)}return[Rt===w?se:X,br(\"fail\"),br(\"zfail\"),br(\"zpass\")]});case xu:return Dt(function(yt){var Pt=yt.factor|0,ht=yt.units|0;return[Pt,ht]},function(yt,Pt,ht){var ur=Pt.def(ht,\".factor|0\"),br=Pt.def(ht,\".units|0\");return[ur,br]});case Yu:return Dt(function(yt){var Pt=0;return yt===\"front\"?Pt=X:yt===\"back\"&&(Pt=se),Pt},function(yt,Pt,ht){return Pt.def(ht,'===\"front\"?',X,\":\",se)});case pu:return Dt(function(yt){return yt},function(yt,Pt,ht){return ht});case Nc:return Dt(function(yt){return gi[yt]},function(yt,Pt,ht){return Pt.def(ht+'===\"cw\"?'+Te+\":\"+Ne)});case Ql:return Dt(function(yt){return yt.map(function(Pt){return!!Pt})},function(yt,Pt,ht){return M(4,function(ur){return\"!!\"+ht+\"[\"+ur+\"]\"})});case oo:return Dt(function(yt){var Pt=\"value\"in yt?yt.value:1,ht=!!yt.invert;return[Pt,ht]},function(yt,Pt,ht){var ur=Pt.def('\"value\" in ',ht,\"?+\",ht,\".value:1\"),br=Pt.def(\"!!\",ht,\".invert\");return[ur,br]})}}),Ot}function zo(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(Rt){var Bt=at[Rt],Dt;if(typeof Bt==\"number\"||typeof Bt==\"boolean\")Dt=En(function(){return Bt});else if(typeof Bt==\"function\"){var yt=Bt._reglType;yt===\"texture2d\"||yt===\"textureCube\"?Dt=En(function(Pt){return Pt.link(Bt)}):(yt===\"framebuffer\"||yt===\"framebufferCube\")&&(Dt=En(function(Pt){return Pt.link(Bt.color[0])}))}else Mn(Bt)&&(Dt=En(function(Pt){var ht=Pt.global.def(\"[\",M(Bt.length,function(ur){return Bt[ur]}),\"]\");return ht}));Dt.value=Bt,Ot[Rt]=Dt}),Object.keys(Ct).forEach(function(Rt){var Bt=Ct[Rt];Ot[Rt]=Un(Bt,function(Dt,yt){return Dt.invoke(yt,Bt)})}),Ot}function Qs(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic,Ot={};return Object.keys(at).forEach(function(Rt){var Bt=at[Rt],Dt=bt.id(Rt),yt=new Yr;if(Ii(Bt))yt.state=La,yt.buffer=jr.getBuffer(jr.create(Bt,Sr,!1,!0)),yt.type=0;else{var Pt=jr.getBuffer(Bt);if(Pt)yt.state=La,yt.buffer=Pt,yt.type=0;else if(\"constant\"in Bt){var ht=Bt.constant;yt.buffer=\"null\",yt.state=Na,typeof ht==\"number\"?yt.x=ht:Ca.forEach(function(gn,rn){rn<ht.length&&(yt[gn]=ht[rn])})}else{Ii(Bt.buffer)?Pt=jr.getBuffer(jr.create(Bt.buffer,Sr,!1,!0)):Pt=jr.getBuffer(Bt.buffer);var ur=Bt.offset|0,br=Bt.stride|0,Ur=Bt.size|0,Di=!!Bt.normalized,fi=0;\"type\"in Bt&&(fi=ji[Bt.type]);var Ti=Bt.divisor|0;yt.buffer=Pt,yt.state=La,yt.size=Ur,yt.normalized=Di,yt.type=fi||Pt.dtype,yt.offset=ur,yt.stride=br,yt.divisor=Ti}}Ot[Rt]=En(function(gn,rn){var Ci=gn.attribCache;if(Dt in Ci)return Ci[Dt];var Bi={isStream:!1};return Object.keys(yt).forEach(function(Gi){Bi[Gi]=yt[Gi]}),yt.buffer&&(Bi.buffer=gn.link(yt.buffer),Bi.type=Bi.type||Bi.buffer+\".dtype\"),Ci[Dt]=Bi,Bi})}),Object.keys(Ct).forEach(function(Rt){var Bt=Ct[Rt];function Dt(yt,Pt){var ht=yt.invoke(Pt,Bt),ur=yt.shared,br=yt.constants,Ur=ur.isBufferArgs,Di=ur.buffer,fi={isStream:Pt.def(!1)},Ti=new Yr;Ti.state=La,Object.keys(Ti).forEach(function(Bi){fi[Bi]=Pt.def(\"\"+Ti[Bi])});var gn=fi.buffer,rn=fi.type;Pt(\"if(\",Ur,\"(\",ht,\")){\",fi.isStream,\"=true;\",gn,\"=\",Di,\".createStream(\",Sr,\",\",ht,\");\",rn,\"=\",gn,\".dtype;\",\"}else{\",gn,\"=\",Di,\".getBuffer(\",ht,\");\",\"if(\",gn,\"){\",rn,\"=\",gn,\".dtype;\",'}else if(\"constant\" in ',ht,\"){\",fi.state,\"=\",Na,\";\",\"if(typeof \"+ht+'.constant === \"number\"){',fi[Ca[0]],\"=\",ht,\".constant;\",Ca.slice(1).map(function(Bi){return fi[Bi]}).join(\"=\"),\"=0;\",\"}else{\",Ca.map(function(Bi,Gi){return fi[Bi]+\"=\"+ht+\".constant.length>\"+Gi+\"?\"+ht+\".constant[\"+Gi+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",Ur,\"(\",ht,\".buffer)){\",gn,\"=\",Di,\".createStream(\",Sr,\",\",ht,\".buffer);\",\"}else{\",gn,\"=\",Di,\".getBuffer(\",ht,\".buffer);\",\"}\",rn,'=\"type\" in ',ht,\"?\",br.glTypes,\"[\",ht,\".type]:\",gn,\".dtype;\",fi.normalized,\"=!!\",ht,\".normalized;\");function Ci(Bi){Pt(fi[Bi],\"=\",ht,\".\",Bi,\"|0;\")}return Ci(\"size\"),Ci(\"offset\"),Ci(\"stride\"),Ci(\"divisor\"),Pt(\"}}\"),Pt.exit(\"if(\",fi.isStream,\"){\",Di,\".destroyStream(\",gn,\");\",\"}\"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt==\"number\"||typeof Rt==\"boolean\"?\"\"+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,\".\"+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,\".\",Bt,\"=[\",yt.join(),\"];\"):Rt(Ot,\".\",Bt,\"=\",yt,\";\")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,\".webgl_draw_buffers\"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,\".next\"),Ct||Qe(\"if(\",ur,\"!==\",Bt,\".cur){\"),Qe(\"if(\",ur,\"){\",Rt,\".bindFramebuffer(\",qr,\",\",ur,\".framebuffer);\"),ci&&Qe(Dt,\".drawBuffersWEBGL(\",Pt,\"[\",ur,\".colorAttachments.length]);\"),Qe(\"}else{\",Rt,\".bindFramebuffer(\",qr,\",null);\"),ci&&Qe(Dt,\".drawBuffersWEBGL(\",ht,\");\"),Qe(\"}\",Bt,\".cur=\",ur,\";\"),Ct||Qe(\"}\")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,\".dirty\");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,\"[\",Ti,\"]\")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+\"!==\"+Ur+\"[\"+gn+\"]\"}).join(\"||\")).then(Ot,\".\",mn[ur],\"(\",Di,\");\",Di.map(function(Ti,gn){return Ur+\"[\"+gn+\"]=\"+Ti}).join(\";\"),\";\"))}else{br=Pt.def(yt,\".\",ur);var fi=Ve.cond(br,\"!==\",Dt,\".\",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,\".enable(\",li[ur],\");\").else(Ot,\".disable(\",li[ur],\");\"),Dt,\".\",ur,\"=\",br,\";\"):fi(Ot,\".\",mn[ur],\"(\",br,\");\",Dt,\".\",ur,\"=\",br,\";\")}}}),Object.keys(at.state).length===0&&Pt(Dt,\".dirty=false;\"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,\".enable(\",br,\");\").else(Dt,\".disable(\",br,\");\")),Qe(Bt,\".\",Pt,\"=\",yt,\";\")):(Qe(Ve.cond(ur).then(Dt,\".enable(\",br,\");\").else(Dt,\".disable(\",br,\");\")),Qe(Bt,\".\",Pt,\"=\",ur,\";\"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,\".\",mn[Pt],\"(\",ur,\");\",ur.map(function(Di,fi){return Ur+\"[\"+fi+\"]=\"+Di}).join(\";\"),\";\")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,\".\",mn[Pt],\"(\",yt,\");\",Bt,\".\",Pt,\"=\",yt,\";\")):Qe(Dt,\".\",mn[Pt],\"(\",ur,\");\",Bt,\".\",Pt,\"=\",ur,\";\")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,\".angle_instanced_arrays\"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance==\"undefined\"?\"Date.now()\":\"performance.now()\"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,\"=\",ht(),\";\"),typeof Ot==\"string\"?Ci(Bt,\".count+=\",Ot,\";\"):Ci(Bt,\".count++;\"),Wi&&(Ct?(br=Qe.def(),Ci(br,\"=\",yt,\".getNumPendingQueries();\")):Ci(yt,\".beginQuery(\",Bt,\");\"))}function Di(Ci){Ci(Bt,\".cpuTime+=\",ht(),\"-\",ur,\";\"),Wi&&(Ct?Ci(yt,\".pushScopeStats(\",br,\",\",yt,\".getNumPendingQueries(),\",Bt,\");\"):Ci(yt,\".endQuery();\"))}function fi(Ci){var Bi=Qe.def(Dt,\".profile\");Qe(Dt,\".profile=\",Ci,\";\"),Qe.exit(Dt,\".profile=\",Bi,\";\")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi(\"true\")):fi(\"false\");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,\".profile\");var gn=Ve.block();Ur(gn),Qe(\"if(\",Ti,\"){\",gn,\"}\");var rn=Ve.block();Di(rn),Qe.exit(\"if(\",Ti,\"){\",rn,\"}\")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,\".location\"),Ur=Qe.def(Rt.attributes,\"[\",br,\"]\"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=[\"buffer\",\"normalized\",\"offset\",\"stride\"];function rn(){Qe(\"if(!\",Ur,\".buffer){\",ur,\".enableVertexAttribArray(\",br,\");}\");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,\"||\",Pt):Gi=Pt,Qe(\"if(\",Ur,\".type!==\",Bi,\"||\",Ur,\".size!==\",Gi,\"||\",gn.map(function(zn){return Ur+\".\"+zn+\"!==\"+ht[zn]}).join(\"||\"),\"){\",ur,\".bindBuffer(\",Sr,\",\",fi,\".buffer);\",ur,\".vertexAttribPointer(\",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],\");\",Ur,\".type=\",Bi,\";\",Ur,\".size=\",Gi,\";\",gn.map(function(zn){return Ur+\".\"+zn+\"=\"+ht[zn]+\";\"}).join(\"\"),\"}\"),Ri){var sn=ht.divisor;Qe(\"if(\",Ur,\".divisor!==\",sn,\"){\",Ve.instancing,\".vertexAttribDivisorANGLE(\",[br,sn],\");\",Ur,\".divisor=\",sn,\";}\")}}function Ci(){Qe(\"if(\",Ur,\".buffer){\",ur,\".disableVertexAttribArray(\",br,\");\",Ur,\".buffer=null;\",\"}if(\",Ca.map(function(Bi,Gi){return Ur+\".\"+Bi+\"!==\"+Ti[Gi]}).join(\"||\"),\"){\",ur,\".vertexAttrib4f(\",br,\",\",Ti,\");\",Ca.map(function(Bi,Gi){return Ur+\".\"+Bi+\"=\"+Ti[Gi]+\";\"}).join(\"\"),\"}\")}Di===La?rn():Di===Na?Ci():(Qe(\"if(\",Di,\"===\",La,\"){\"),rn(),Qe(\"}else{\"),Ci(),Qe(\"}\"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,\".\",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt<Ct.length;++Pt){var ht=Ct[Pt],ur=ht.name,br=ht.info.type,Ur=at.uniforms[ur],Di=Ve.link(ht),fi=Di+\".location\",Ti;if(Ur){if(!Ot(Ur))continue;if(Ln(Ur)){var gn=Ur.value;if(br===dc||br===Tl){var rn=Ve.link(gn._texture||gn.color[0]._texture);Qe(Dt,\".uniform1i(\",fi,\",\",rn+\".bind());\"),Qe.exit(rn,\".unbind();\")}else if(br===au||br===Js||br===eu){var Ci=Ve.global.def(\"new Float32Array([\"+Array.prototype.slice.call(gn)+\"])\"),Bi=2;br===Js?Bi=3:br===eu&&(Bi=4),Qe(Dt,\".uniformMatrix\",Bi,\"fv(\",fi,\",false,\",Ci,\");\")}else{switch(br){case $a:yt=\"1f\";break;case Co:yt=\"2f\";break;case Qa:yt=\"3f\";break;case mo:yt=\"4f\";break;case To:yt=\"1i\";break;case Bo:yt=\"1i\";break;case hl:yt=\"2i\";break;case Ps:yt=\"2i\";break;case Ul:yt=\"3i\";break;case Ts:yt=\"3i\";break;case Lu:yt=\"4i\";break;case wo:yt=\"4i\";break}Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",Mn(gn)?Array.prototype.slice.call(gn):gn,\");\")}continue}else Ti=Ur.append(Ve,Qe)}else{if(!Ot(ia))continue;Ti=Qe.def(Bt.uniforms,\"[\",bt.id(ur),\"]\")}br===dc?Qe(\"if(\",Ti,\"&&\",Ti,'._reglType===\"framebuffer\"){',Ti,\"=\",Ti,\".color[0];\",\"}\"):br===Tl&&Qe(\"if(\",Ti,\"&&\",Ti,'._reglType===\"framebufferCube\"){',Ti,\"=\",Ti,\".color[0];\",\"}\");var Gi=1;switch(br){case dc:case Tl:var sn=Qe.def(Ti,\"._texture\");Qe(Dt,\".uniform1i(\",fi,\",\",sn,\".bind());\"),Qe.exit(sn,\".unbind();\");continue;case Bo:case To:yt=\"1i\";break;case Ps:case hl:yt=\"2i\",Gi=2;break;case Ts:case Ul:yt=\"3i\",Gi=3;break;case wo:case Lu:yt=\"4i\",Gi=4;break;case $a:yt=\"1f\";break;case Co:yt=\"2f\",Gi=2;break;case Qa:yt=\"3f\",Gi=3;break;case mo:yt=\"4f\",Gi=4;break;case au:yt=\"Matrix2fv\";break;case Js:yt=\"Matrix3fv\";break;case eu:yt=\"Matrix4fv\";break}if(yt.charAt(0)===\"M\"){Qe(Dt,\".uniform\",yt,\"(\",fi,\",\");var zn=Math.pow(br-au+2,2),Ja=Ve.global.def(\"new Float32Array(\",zn,\")\");Array.isArray(Ti)?Qe(\"false,(\",M(zn,function(ms){return Ja+\"[\"+ms+\"]=\"+Ti[ms]}),\",\",Ja,\")\"):Qe(\"false,(Array.isArray(\",Ti,\")||\",Ti,\" instanceof Float32Array)?\",Ti,\":(\",M(zn,function(ms){return Ja+\"[\"+ms+\"]=\"+Ti+\"[\"+ms+\"]\"}),\",\",Ja,\")\"),Qe(\");\")}else if(Gi>1){for(var co=[],ts=[],so=0;so<Gi;++so)Array.isArray(Ti)?ts.push(Ti[so]):ts.push(Qe.def(Ti+\"[\"+so+\"]\")),Rt&&co.push(Qe.def());Rt&&Qe(\"if(!\",Ve.batchId,\"||\",co.map(function(ms,ou){return ms+\"!==\"+ts[ou]}).join(\"||\"),\"){\",co.map(function(ms,ou){return ms+\"=\"+ts[ou]+\";\"}).join(\"\")),Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",ts.join(\",\"),\");\"),Rt&&Qe(\"}\")}else{if(Rt){var Yo=Qe.def();Qe(\"if(!\",Ve.batchId,\"||\",Yo,\"!==\",Ti,\"){\",Yo,\"=\",Ti,\";\")}Qe(Dt,\".uniform\",yt,\"(\",fi,\",\",Ti,\");\"),Rt&&Qe(\"}\")}}}function J(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.draw,Dt=Ct.draw;function yt(){var Gi=Dt.elements,sn,zn=Qe;return Gi?((Gi.contextDep&&Ct.contextDynamic||Gi.propDep)&&(zn=at),sn=Gi.append(Ve,zn),Dt.elementsActive&&zn(\"if(\"+sn+\")\"+Rt+\".bindBuffer(\"+Or+\",\"+sn+\".buffer.buffer);\")):(sn=zn.def(),zn(sn,\"=\",Bt,\".\",Tt,\";\",\"if(\",sn,\"){\",Rt,\".bindBuffer(\",Or,\",\",sn,\".buffer.buffer);}\",\"else if(\",Ot.vao,\".currentVAO){\",sn,\"=\",Ve.shared.elements+\".getElements(\"+Ot.vao,\".currentVAO.elements);\",an?\"\":\"if(\"+sn+\")\"+Rt+\".bindBuffer(\"+Or+\",\"+sn+\".buffer.buffer);\",\"}\")),sn}function Pt(){var Gi=Dt.count,sn,zn=Qe;return Gi?((Gi.contextDep&&Ct.contextDynamic||Gi.propDep)&&(zn=at),sn=Gi.append(Ve,zn)):sn=zn.def(Bt,\".\",Kt),sn}var ht=yt();function ur(Gi){var sn=Dt[Gi];return sn?sn.contextDep&&Ct.contextDynamic||sn.propDep?sn.append(Ve,at):sn.append(Ve,Qe):Qe.def(Bt,\".\",Gi)}var br=ur(Yt),Ur=ur(xr),Di=Pt();if(typeof Di==\"number\"){if(Di===0)return}else at(\"if(\",Di,\"){\"),at.exit(\"}\");var fi,Ti;Ri&&(fi=ur(Ir),Ti=Ve.instancing);var gn=ht+\".type\",rn=Dt.elements&&Ln(Dt.elements)&&!Dt.vaoActive;function Ci(){function Gi(){at(Ti,\".drawElementsInstancedANGLE(\",[br,Di,gn,Ur+\"<<((\"+gn+\"-\"+Ra+\")>>1)\",fi],\");\")}function sn(){at(Ti,\".drawArraysInstancedANGLE(\",[br,Ur,Di,fi],\");\")}ht&&ht!==\"null\"?rn?Gi():(at(\"if(\",ht,\"){\"),Gi(),at(\"}else{\"),sn(),at(\"}\")):sn()}function Bi(){function Gi(){at(Rt+\".drawElements(\"+[br,Di,gn,Ur+\"<<((\"+gn+\"-\"+Ra+\")>>1)\"]+\");\")}function sn(){at(Rt+\".drawArrays(\"+[br,Ur,Di]+\");\")}ht&&ht!==\"null\"?rn?Gi():(at(\"if(\",ht,\"){\"),Gi(),at(\"}else{\"),sn(),at(\"}\")):sn()}Ri&&(typeof fi!=\"number\"||fi>=0)?typeof fi==\"string\"?(at(\"if(\",fi,\">0){\"),Ci(),at(\"}else if(\",fi,\"<0){\"),Bi(),at(\"}\")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc(\"body\",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,\".angle_instanced_arrays\")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Qe),\");\"):Qe(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Qe(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc(\"draw\",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Ct,\".program);\"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var Ot=Ve.global.def(\"{}\"),Rt=at.def(Ct,\".id\"),Bt=at.def(Ot,\"[\",Rt,\"]\");at(Ve.cond(Bt).then(Bt,\".call(this,a0);\").else(Bt,\"=\",Ot,\"[\",Rt,\"]=\",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),\"(\",Ct,\");\",Bt,\".call(this,a0);\"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ne(Ve,Qe,at,Ct){Ve.batchId=\"a1\",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt=\"a0\",Dt=\"a1\",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,\"for(\",Rt,\"=0;\",Rt,\"<\",Dt,\";++\",Rt,\"){\",yt,\"=\",Bt,\"[\",Rt,\"];\",ht,\"}\",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,ht),\");\"):Pt(Ve.shared.vao,\".setVAO(\",at.drawVAO.append(Ve,Pt),\");\"):Pt(Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"):(Pt(Ve.shared.vao,\".setVAO(null);\"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def(\"{}\"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,\".id\"),Ti=ht.def(Ur,\"[\",fi,\"]\");ht(Ve.shared.gl,\".useProgram(\",Di,\".program);\",\"if(!\",Ti,\"){\",Ti,\"=\",Ur,\"[\",fi,\"]=\",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),\"(\",Di,\");}\",Ti,\".call(this,a0[\",Rt,\"],\",Rt,\");\")}}function Ue(Ve,Qe){var at=Ve.proc(\"batch\",2);Ve.batchId=\"0\",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,\"a1\"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,\".useProgram(\",Pt,\".program);\"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,\".setVAO(null);\");var ht=Ve.global.def(\"{}\"),ur=at.def(Pt,\".id\"),br=at.def(ht,\"[\",ur,\"]\");at(Ve.cond(br).then(br,\".call(this,a0,a1);\").else(br,\"=\",ht,\"[\",ur,\"]=\",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),\"(\",Pt,\");\",br,\".call(this,a0,a1);\"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,\".dirty=true;\"),Ve.shared.vao&&at(Ve.shared.vao,\".setVAO(null);\")}function ft(Ve,Qe){var at=Ve.proc(\"scope\",3);Ve.batchId=\"a2\";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],\"[\"+ur+\"]\",ht):at.set(Ve.next[Dt],\"[\"+ur+\"]\",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,\".\"+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,\".\"+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,\".\"+Dt,Pt):at.set(Ct.draw,\".\"+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt=\"[\"+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+\"]\"),at.set(Ct.uniforms,\"[\"+Ve.link(bt.id(Dt),{stable:!0})+\"]\",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,\".\"+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,\".targetVAO\",Rt):at.set(Ct.vao,\".targetVAO\",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,\".\"+Dt,Pt):at.set(Ct.shader,\".\"+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Ze),Bt(st),Object.keys(Qe.state).length>0&&(at(Ot,\".dirty=true;\"),at.exit(Ot,\".dirty=true;\")),at(\"a1(\",Ve.shared.context,\",a0,\",Ve.batchId,\");\")}function Zt(Ve){if(!(typeof Ve!=\"object\"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at<Qe.length;++at)if(h.isDynamic(Ve[Qe[at]]))return!0;return!1}}function hr(Ve,Qe,at){var Ct=Qe.static[at];if(!Ct||!Zt(Ct))return;var Ot=Ve.global,Rt=Object.keys(Ct),Bt=!1,Dt=!1,yt=!1,Pt=Ve.global.def(\"{}\");Rt.forEach(function(ur){var br=Ct[ur];if(h.isDynamic(br)){typeof br==\"function\"&&(br=Ct[ur]=h.unbox(br));var Ur=Un(br,null);Bt=Bt||Ur.thisDep,yt=yt||Ur.propDep,Dt=Dt||Ur.contextDep}else{switch(Ot(Pt,\".\",ur,\"=\"),typeof br){case\"number\":Ot(br);break;case\"string\":Ot('\"',br,'\"');break;case\"object\":Array.isArray(br)&&Ot(\"[\",br.join(),\"]\");break;default:Ot(Ve.link(br));break}Ot(\";\")}});function ht(ur,br){Rt.forEach(function(Ur){var Di=Ct[Ur];if(h.isDynamic(Di)){var fi=ur.invoke(br,Di);br(Pt,\".\",Ur,\"=\",fi,\";\")}})}Qe.dynamic[at]=new h.DynamicVariable(Zo,{thisDep:Bt,contextDep:Dt,propDep:yt,ref:Pt,append:ht}),delete Qe.static[at]}function qt(Ve,Qe,at,Ct,Ot){var Rt=kn();Rt.stats=Rt.link(Ot),Object.keys(Qe.static).forEach(function(Dt){hr(Rt,Qe,Dt)}),dr.forEach(function(Dt){hr(Rt,Ve,Dt)});var Bt=Vl(Ve,Qe,at,Ct,Rt);return Bt.shader.program&&(Bt.shader.program.attributes.sort(function(Dt,yt){return Dt.name<yt.name?-1:1}),Bt.shader.program.uniforms.sort(function(Dt,yt){return Dt.name<yt.name?-1:1})),de(Rt,Bt),ft(Rt,Bt),Ue(Rt,Bt),e(Rt.compile(),{destroy:function(){Bt.shader.program.destroy()}})}return{next:Bn,current:Zi,procs:function(){var Ve=kn(),Qe=Ve.proc(\"poll\"),at=Ve.proc(\"refresh\"),Ct=Ve.block();Qe(Ct),at(Ct);var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.next,Dt=Ot.current;Ct(Dt,\".dirty=false;\"),Vs(Ve,Qe),Vs(Ve,at,null,!0);var yt;Ri&&(yt=Ve.link(Ri)),zt.oes_vertex_array_object&&at(Ve.link(zt.oes_vertex_array_object),\".bindVertexArrayOES(null);\");var Pt=at.def(Ot.attributes),ht=at.def(0),ur=Ve.cond(ht,\".buffer\");ur.then(Rt,\".enableVertexAttribArray(i);\",Rt,\".bindBuffer(\",Sr,\",\",ht,\".buffer.buffer);\",Rt,\".vertexAttribPointer(i,\",ht,\".size,\",ht,\".type,\",ht,\".normalized,\",ht,\".stride,\",ht,\".offset);\").else(Rt,\".disableVertexAttribArray(i);\",Rt,\".vertexAttrib4f(i,\",ht,\".x,\",ht,\".y,\",ht,\".z,\",ht,\".w);\",ht,\".buffer=null;\");var br=Ve.link(Rr.maxAttributes,{stable:!0});return at(\"for(var i=0;i<\",br,\";++i){\",ht,\"=\",Pt,\"[i];\",ur,\"}\"),Ri&&at(\"for(var i=0;i<\",br,\";++i){\",yt,\".vertexAttribDivisorANGLE(i,\",Pt,\"[i].divisor);\",\"}\"),at(Ve.shared.vao,\".currentVAO=null;\",Ve.shared.vao,\".setVAO(\",Ve.shared.vao,\".targetVAO);\"),Object.keys(li).forEach(function(Ur){var Di=li[Ur],fi=Ct.def(Bt,\".\",Ur),Ti=Ve.block();Ti(\"if(\",fi,\"){\",Rt,\".enable(\",Di,\")}else{\",Rt,\".disable(\",Di,\")}\",Dt,\".\",Ur,\"=\",fi,\";\"),at(Ti),Qe(\"if(\",fi,\"!==\",Dt,\".\",Ur,\"){\",Ti,\"}\")}),Object.keys(mn).forEach(function(Ur){var Di=mn[Ur],fi=Zi[Ur],Ti,gn,rn=Ve.block();if(rn(Rt,\".\",Di,\"(\"),Mn(fi)){var Ci=fi.length;Ti=Ve.global.def(Bt,\".\",Ur),gn=Ve.global.def(Dt,\".\",Ur),rn(M(Ci,function(Bi){return Ti+\"[\"+Bi+\"]\"}),\");\",M(Ci,function(Bi){return gn+\"[\"+Bi+\"]=\"+Ti+\"[\"+Bi+\"];\"}).join(\"\")),Qe(\"if(\",M(Ci,function(Bi){return Ti+\"[\"+Bi+\"]!==\"+gn+\"[\"+Bi+\"]\"}).join(\"||\"),\"){\",rn,\"}\")}else Ti=Ct.def(Bt,\".\",Ur),gn=Ct.def(Dt,\".\",Ur),rn(Ti,\");\",Dt,\".\",Ur,\"=\",Ti,\";\"),Qe(\"if(\",Ti,\"!==\",gn,\"){\",rn,\"}\");at(rn)}),Ve.compile()}(),compile:qt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var zt=[];function Rr(){return zt.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function jr(xi){zt.push(xi)}var Nr=[];function Gr(xi){var Ri=Rr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ri),Nr.push(Ri),Wi(Nr.length-1,Nr.length,xi)}function mi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ui(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Ei(){return qi.pop()||new Ui}function Hn(xi){qi.push(xi)}var en=[];function Wi(xi,Ri,ci){var an=Ei();an.startQueryIndex=xi,an.endQueryIndex=Ri,an.sum=0,an.stats=ci,en.push(an)}var si=[],Mr=[];function Yr(){var xi,Ri,ci=Nr.length;if(ci!==0){Mr.length=Math.max(Mr.length,ci+1),si.length=Math.max(si.length,ci+1),si[0]=0,Mr[0]=0;var an=0;for(xi=0,Ri=0;Ri<Nr.length;++Ri){var Zi=Nr[Ri];bt.ext_disjoint_timer_query.getQueryObjectEXT(Zi,Da)?(an+=bt.ext_disjoint_timer_query.getQueryObjectEXT(Zi,yo),jr(Zi)):Nr[xi++]=Zi,si[Ri+1]=an,Mr[Ri+1]=xi}for(Nr.length=xi,xi=0,Ri=0;Ri<en.length;++Ri){var Bn=en[Ri],hi=Bn.startQueryIndex,li=Bn.endQueryIndex;Bn.sum+=si[li]-si[hi];var mn=Mr[hi],Ji=Mr[li];Ji===mn?(Bn.stats.gpuTime+=Bn.sum/1e6,Hn(Bn)):(Bn.startQueryIndex=mn,Bn.endQueryIndex=Ji,en[xi++]=Bn)}en.length=xi}}return{beginQuery:Gr,endQuery:mi,pushScopeStats:Wi,update:Yr,getNumPendingQueries:function(){return Nr.length},clear:function(){zt.push.apply(zt,Nr);for(var xi=0;xi<zt.length;xi++)bt.ext_disjoint_timer_query.deleteQueryEXT(zt[xi]);Nr.length=0,zt.length=0},restore:function(){Nr.length=0,zt.length=0}}},Ms=16384,Xs=256,Gn=1024,ja=34962,Fo=\"webglcontextlost\",Uo=\"webglcontextrestored\",$s=1,Sl=2,bu=3;function dl(Me,bt){for(var zt=0;zt<Me.length;++zt)if(Me[zt]===bt)return zt;return-1}function Sc(Me){var bt=x(Me);if(!bt)return null;var zt=bt.gl,Rr=zt.getContextAttributes(),jr=zt.isContextLost(),Nr=C(zt,bt);if(!Nr)return null;var Gr=_(),mi=Ia(),Ui=bt.cachedCode||{},qi=Nr.extensions,Ei=Is(zt,qi),Hn=v(),en=zt.drawingBufferWidth,Wi=zt.drawingBufferHeight,si={tick:0,time:0,viewportWidth:en,viewportHeight:Wi,framebufferWidth:en,framebufferHeight:Wi,drawingBufferWidth:en,drawingBufferHeight:Wi,pixelRatio:bt.pixelRatio},Mr={},Yr={elements:null,primitive:4,count:-1,offset:0,instances:-1},xi=ti(zt,qi),Ri=ri(zt,mi,bt,Zi),ci=kr(zt,qi,Ri,mi),an=ku(zt,qi,xi,mi,Ri,ci,Yr);function Zi(q){return an.destroyBuffer(q)}var Bn=Wu(zt,Gr,mi,bt),hi=of(zt,qi,xi,function(){Ji.procs.poll()},si,mi,bt),li=Dc(zt,qi,xi,mi,bt),mn=lf(zt,qi,xi,hi,li,mi),Ji=Ea(zt,Gr,qi,xi,Ri,ci,hi,mn,Mr,an,Bn,Yr,si,Ei,Ui,bt),Vi=Wl(zt,mn,Ji.procs.poll,si,Rr,qi,xi),Ni=Ji.next,pn=zt.canvas,Vn=[],na=[],Ki=[],kn=[bt.onDestroy],ta=null;function oa(){if(Vn.length===0){Ei&&Ei.update(),ta=null;return}ta=d.next(oa),Ys();for(var q=Vn.length-1;q>=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,\"stencil\"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+\".\"+ht]=Pt[ht]})}}return Dt(\"blend\"),Dt(\"depth\"),Dt(\"cull\"),Dt(\"stencil\"),Dt(\"polygonOffset\"),Dt(\"scissor\"),Dt(\"sample\"),\"vao\"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur<ht.length;++ur)if(h.isDynamic(ht[ur])){yt[Pt]=h.unbox(ht,Pt);return}}Dt[Pt]=ht}),{dynamic:yt,static:Dt}}var ne=de(q.context||{},!0),we=de(q.uniforms||{},!0),Ue=de(q.attributes||{},!1),ft=de(K(q),!1),Zt={gpuTime:0,cpuTime:0,count:0},hr=Ji.compile(ft,Ue,we,ne,Zt),qt=hr.draw,Ve=hr.batch,Qe=hr.scope,at=[];function Ct(Rt){for(;at.length<Rt;)at.push(null);return at}function Ot(Rt,Bt){var Dt;if(typeof Rt==\"function\")return Qe.call(this,null,Rt,0);if(typeof Bt==\"function\")if(typeof Rt==\"number\")for(Dt=0;Dt<Rt;++Dt)Qe.call(this,null,Bt,Dt);else if(Array.isArray(Rt))for(Dt=0;Dt<Rt.length;++Dt)Qe.call(this,Rt[Dt],Bt,Dt);else return Qe.call(this,Rt,Bt,0);else if(typeof Rt==\"number\"){if(Rt>0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,\"framebuffer\")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),\"depth\"in K&&(zt.clearDepth(+K.depth),de|=Xs),\"stencil\"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if(\"framebuffer\"in q)if(q.framebuffer&&q.framebuffer_reglType===\"framebufferCube\")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case\"frame\":return ss(K);case\"lost\":de=na;break;case\"restore\":de=Ki;break;case\"destroy\":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ui}function D(q){Object.entries(q).forEach(function(K){Ui[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,$s),context:h.define.bind(null,Sl),this:h.define.bind(null,bu),draw:zo({}),buffer:function(q){return Ri.create(q,ja,!1,!1)},elements:function(q){return ci.create(q,!1)},texture:hi.create2D,cube:hi.createCube,renderbuffer:li.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:an.createVAO,attributes:Rr,frame:ss,on:io,limits:xi,hasExtension:function(q){return xi.extensions.indexOf(q.toLowerCase())>=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Lz=ye((S_r,zBe)=>{\"use strict\";var WUt=zX(),XUt=FBe();zBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has(\"parcoords\"))){try{o.regl=XUt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener(\"webglcontextlost\",function(s){t&&t.emit&&t.emit(\"plotly_webglcontextlost\",{event:s,layer:o.key})},!1)}}),a||WUt({container:i._glcontainer.node()}),a}});var xK=ye((_K,UBe)=>{\"use strict\";var OBe=_Y(),qBe=KY(),ZUt=Sqe(),BBe=DBe(),yK=Dr(),YUt=Cg().selectMode,KUt=Lz(),JUt=Ru(),$Ut=SU(),QUt=pY().styleTextSelection,NBe={};function eVt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var _K=UBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=KUt(t,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],NBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if($Ut(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=ZUt(h)),a.line2d===!0&&(a.line2d=qBe(h)),a.scatter2d===!0&&(a.scatter2d=OBe(h)),a.fill2d===!0&&(a.fill2d=qBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;l<f;l++)a.glText[l]=new BBe(h);if(a.glText){if(f>a.glText.length){var d=f-a.glText.length;for(l=0;l<d;l++)a.glText.push(new BBe(h))}else if(f<a.glText.length){var v=a.glText.length-f,_=a.glText.splice(f,v);_.forEach(function(N){N.destroy()})}for(l=0;l<f;l++)a.glText[l].update(a.textOptions[l])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(N){if(N&&N.positions){for(var H=N.positions,re=0;re<H.length&&(isNaN(H[re])||isNaN(H[re+1]));)re+=2;for(var oe=H.length-2;oe>re&&(isNaN(H[oe])||isNaN(H[oe+1]));)oe-=2;N.positions=H.slice(re,oe+2)}return N}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=yK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(N,H){var re=n[H];if(!(!N||!re||!re[0]||!re[0].trace)){var oe=re[0],_e=oe.trace,Ce=oe.t,Le=a.lineOptions[H],ge,ie,Se=[];_e._ownfill&&Se.push(H),_e._nexttrace&&Se.push(H+1),Se.length&&(a.fillOrder[H]=Se);var Ee=[],Ae=Le&&Le.positions||Ce.positions,Be,Pe;if(_e.fill===\"tozeroy\"){for(Be=0;Be<Ae.length&&isNaN(Ae[Be+1]);)Be+=2;for(Pe=Ae.length-2;Pe>Be&&isNaN(Ae[Pe+1]);)Pe-=2;Ae[Be+1]!==0&&(Ee=[Ae[Be],0]),Ee=Ee.concat(Ae.slice(Be,Pe+2)),Ae[Pe+1]!==0&&(Ee=Ee.concat([Ae[Pe],0]))}else if(_e.fill===\"tozerox\"){for(Be=0;Be<Ae.length&&isNaN(Ae[Be]);)Be+=2;for(Pe=Ae.length-2;Pe>Be&&isNaN(Ae[Pe]);)Pe-=2;Ae[Be]!==0&&(Ee=[0,Ae[Be+1]]),Ee=Ee.concat(Ae.slice(Be,Pe+2)),Ae[Pe]!==0&&(Ee=Ee.concat([0,Ae[Pe+1]]))}else if(_e.fill===\"toself\"||_e.fill===\"tonext\"){for(Ee=[],ge=0,N.splitNull=!0,ie=0;ie<Ae.length;ie+=2)(isNaN(Ae[ie])||isNaN(Ae[ie+1]))&&(Ee=Ee.concat(Ae.slice(ge,ie)),Ee.push(Ae[ge],Ae[ge+1]),Ee.push(null,null),ge=ie+2);Ee=Ee.concat(Ae.slice(ge)),ge&&Ee.push(Ae[ge],Ae[ge+1])}else{var me=_e._nexttrace;if(me){var De=a.lineOptions[H+1];if(De){var ce=De.positions;if(_e.fill===\"tonexty\"){for(Ee=Ae.slice(),H=Math.floor(ce.length/2);H--;){var je=ce[H*2],lt=ce[H*2+1];isNaN(je)||isNaN(lt)||Ee.push(je,lt)}N.fill=me.fillcolor}}}}if(_e._prevtrace&&_e._prevtrace.fill===\"tonext\"){var pt=a.lineOptions[H-1].positions,Vt=Ee.length/2;ge=Vt;var ot=[ge];for(ie=0;ie<pt.length;ie+=2)(isNaN(pt[ie])||isNaN(pt[ie+1]))&&(ot.push(ie/2+Vt+1),ge=ie+2);Ee=Ee.concat(pt),N.hole=ot}return N.fillmode=_e.fill,N.opacity=_e.opacity,N.positions=Ee,N}}),a.fill2d.update(a.fillOptions))}var p=i.dragmode,k=YUt(p),E=i.clickmode.indexOf(\"select\")>-1;for(let[N]of n)if(N){var T=N.trace,L=N.t,x=L.index,C=T._length,M=L.x,g=L.y;if(T.selectedpoints||k||E){if(k||(k=!0),T.selectedpoints){var P=a.selectBatch[x]=yK.selIndices2selPoints(T),A={};for(u=0;u<P.length;u++)A[P[u]]=1;var z=[];for(u=0;u<C;u++)A[u]||z.push(u);a.unselectBatch[x]=z}var O=L.xpx=new Array(C),U=L.ypx=new Array(C);for(u=0;u<C;u++)O[u]=o.c2p(M[u]),U[u]=s.c2p(g[u])}else L.xpx=L.ypx=null}if(k){if(a.select2d||(a.select2d=OBe(i._glcanvas.data()[1].regl)),a.scatter2d){var G=new Array(f);for(l=0;l<f;l++)G[l]=a.selectBatch[l].length||a.unselectBatch[l].length?a.markerUnselectedOptions[l]:{};a.scatter2d.update(G)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&n.forEach(function(N){var H=((N||[])[0]||{}).trace||{};JUt.hasText(H)&&QUt(N)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var Z={viewport:eVt(i,o,s,t._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(s._rl||s.range)[0],(o._rl||o.range)[1],(s._rl||s.range)[1]]},j=yK.repeat(Z,a.count);a.fill2d&&a.fill2d.update(j),a.line2d&&a.line2d.update(j),a.error2d&&a.error2d.update(j.concat(j)),a.scatter2d&&a.scatter2d.update(j),a.select2d&&a.select2d.update(j),a.glText&&a.glText.forEach(function(N){N.update(Z)})}}};_K.reglPrecompiled=NBe});var HBe=ye((M_r,GBe)=>{\"use strict\";var VBe=o7e();VBe.plot=xK();GBe.exports=VBe});var WBe=ye((E_r,jBe)=>{\"use strict\";jBe.exports=HBe()});var bK=ye((k_r,KBe)=>{\"use strict\";var tVt=pf(),YBe=Tu(),XBe=df().axisHoverFormat,{hovertemplateAttrs:rVt,templatefallbackAttrs:iVt}=Ll(),zk=gk(),nVt=Rh().idRegex,aVt=vl().templatedArray,x5=Ao().extendFlat,d1=tVt.marker,oVt=d1.line,sVt=x5(YBe(\"marker.line\",{editTypeOverride:\"calc\"}),{width:x5({},oVt.width,{editType:\"calc\"}),editType:\"calc\"}),Pz=x5(YBe(\"marker\"),{symbol:d1.symbol,angle:d1.angle,size:x5({},d1.size,{editType:\"markerSize\"}),sizeref:d1.sizeref,sizemin:d1.sizemin,sizemode:d1.sizemode,opacity:d1.opacity,colorbar:d1.colorbar,line:sVt,editType:\"calc\"});Pz.color.editType=Pz.cmin.editType=Pz.cmax.editType=\"style\";function ZBe(e){return{valType:\"info_array\",freeLength:!0,editType:\"calc\",items:{valType:\"subplotid\",regex:nVt[e],editType:\"plot\"}}}KBe.exports={dimensions:aVt(\"dimension\",{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},label:{valType:\"string\",editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},axis:{type:{valType:\"enumerated\",values:[\"linear\",\"log\",\"date\",\"category\"],editType:\"calc+clearAxisTypes\"},matches:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc+clearAxisTypes\"},editType:\"calc+clearAxisTypes\"}),text:x5({},zk.text,{}),hovertext:x5({},zk.hovertext,{}),hovertemplate:rVt(),hovertemplatefallback:iVt(),xhoverformat:XBe(\"x\"),yhoverformat:XBe(\"y\"),marker:Pz,xaxes:ZBe(\"x\"),yaxes:ZBe(\"y\"),diagonal:{visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},showupperhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},showlowerhalf:{valType:\"boolean\",dflt:!0,editType:\"calc\"},selected:{marker:zk.selected.marker,editType:\"calc\"},unselected:{marker:zk.unselected.marker,editType:\"calc\"},opacity:zk.opacity}});var Iz=ye((C_r,JBe)=>{\"use strict\";JBe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i<t.length;i++)a=t[i],a.visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),e._length=n,i=0;i<t.length;i++)a=t[i],a.visible&&(a._length=n);return n}});var eNe=ye((L_r,QBe)=>{\"use strict\";var wK=Dr(),lVt=Zd(),$Be=bK(),uVt=Ru(),cVt=$p(),fVt=Iz(),hVt=WF().isOpenSymbol;QBe.exports=function(t,r,n,i){function a(d,v){return wK.coerce(t,r,$Be,d,v)}var o=lVt(t,r,{name:\"dimensions\",handleItemDefaults:dVt}),s=a(\"diagonal.visible\"),l=a(\"showupperhalf\"),u=a(\"showlowerhalf\"),c=fVt(r,o,\"values\");if(!c||!s&&!l&&!u){r.visible=!1;return}a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"xhoverformat\"),a(\"yhoverformat\"),cVt(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=hVt(r.marker.symbol),h=uVt.isBubble(r);a(\"marker.line.width\",f||h?1:0),vVt(t,r,i,a),wK.coerceSelectionMarkerOpacity(r,a)};function dVt(e,t){function r(i,a){return wK.coerce(e,t,$Be.dimensions,i,a)}r(\"label\");var n=r(\"values\");n&&n.length?r(\"visible\"):t.visible=!1,r(\"axis.type\"),r(\"axis.matches\")}function vVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;u<a;u++){var d=u?u+1:\"\";f[u]=\"x\"+d,h[u]=\"y\"+d}var v=n(\"xaxes\",f),_=n(\"yaxes\",h),b=t._diag=new Array(a);t._xaxes={},t._yaxes={};var p=[],k=[];function E(z,O,U,G){if(z){var Z=z.charAt(0),j=r._splomAxes[Z];if(t[\"_\"+Z+\"axes\"][z]=1,G.push(z),!(z in j)){var N=j[z]={};U&&(N.label=U.label||\"\",U.visible&&U.axis&&(U.axis.type&&(N.type=U.axis.type),U.axis.matches&&(N.matches=O)))}}}var T=!l&&!s,L=!l&&!o;for(t._axesDim={},u=0;u<a;u++){var x=i[u],C=u===0,M=u===a-1,g=C&&T||M&&L?void 0:v[u],P=C&&L||M&&T?void 0:_[u];E(g,P,x,p),E(P,g,x,k),b[u]=[g,P],t._axesDim[g]=u,t._axesDim[P]=u}for(u=0;u<p.length;u++)for(c=0;c<k.length;c++){var A=p[u]+k[c];(u>c&&o||u<c&&s||u===c&&(l||!s||!o))&&(r._splomSubplots[A]=1)}(!s||!l&&o&&s)&&(r._splomGridDflt.xside=\"bottom\",r._splomGridDflt.yside=\"left\")}});var iNe=ye((P_r,rNe)=>{\"use strict\";var tNe=Dr();rNe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=tNe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||tNe.extendFlat(l,o),l}});var oNe=ye((I_r,aNe)=>{\"use strict\";var TK=Dr(),Rz=hf(),pVt=q0().calcMarkerSize,gVt=q0().calcAxisExpansion,mVt=z0(),nNe=ow().markerSelection,yVt=ow().markerStyle,_Vt=iNe(),xVt=fs().BADNUM,bVt=px().TOO_MANY_POINTS;aNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(E,T){for(var L=E.makeCalcdata({v:T.values,vcalendar:r.calendar},\"v\"),x=0;x<L.length;x++)L[x]=L[x]===xVt?NaN:L[x];o.push(L),s.push(E.type===\"log\"?TK.simpleMap(L,E.c2l):L)}for(u=0;u<n.length;u++)if(f=n[u],f.visible){if(h=Rz.getFromId(t,r._diag[u][0]),d=Rz.getFromId(t,r._diag[u][1]),h&&d&&h.type!==d.type){TK.log(\"Skipping splom dimension \"+u+\" with conflicting axis types\");continue}h?(v(h,f),d&&d.type===\"category\"&&(d._categories=h._categories.slice())):v(d,f),l.push(u)}mVt(t,r),TK.extendFlat(a,yVt(t,r));var _=o.length,b=_*i>bVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=pVt(r,i),c=0;c<l.length;c++)u=l[c],f=n[u],h=Rz.getFromId(t,r._diag[u][0])||{},d=Rz.getFromId(t,r._diag[u][1])||{},gVt(t,r,h,d,o[c],o[c],p);var k=_Vt(t,r);return k.matrix||(k.matrix=!0),k.matrixOptions=a,k.selectedOptions=nNe(t,r,r.selected),k.unselectedOptions=nNe(t,r,r.unselected),[{x:!1,y:!1,t:{},trace:r}]}});var lNe=ye((sNe,Ok)=>{(function(){var e,t,r,n,i,a;typeof performance!=\"undefined\"&&performance!==null&&performance.now?Ok.exports=function(){return performance.now()}:typeof process!=\"undefined\"&&process!==null&&process.hrtime?(Ok.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(Ok.exports=function(){return Date.now()-r},r=Date.now()):(Ok.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(sNe)});var cNe=ye((R_r,zz)=>{var wVt=lNe(),v1=window,Dz=[\"moz\",\"webkit\"],w5=\"AnimationFrame\",T5=v1[\"request\"+w5],qk=v1[\"cancel\"+w5]||v1[\"cancelRequest\"+w5];for(b5=0;!T5&&b5<Dz.length;b5++)T5=v1[Dz[b5]+\"Request\"+w5],qk=v1[Dz[b5]+\"Cancel\"+w5]||v1[Dz[b5]+\"CancelRequest\"+w5];var b5;(!T5||!qk)&&(Fz=0,AK=0,Tx=[],uNe=1e3/60,T5=function(e){if(Tx.length===0){var t=wVt(),r=Math.max(0,uNe-(t-Fz));Fz=r+t,setTimeout(function(){var n=Tx.slice(0);Tx.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(Fz)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Tx.push({handle:++AK,callback:e,cancelled:!1}),AK},qk=function(e){for(var t=0;t<Tx.length;t++)Tx[t].handle===e&&(Tx[t].cancelled=!0)});var Fz,AK,Tx,uNe;zz.exports=function(e){return T5.call(v1,e)};zz.exports.cancel=function(){qk.apply(v1,arguments)};zz.exports.polyfill=function(e){e||(e=v1),e.requestAnimationFrame=T5,e.cancelAnimationFrame=qk}});var hNe=ye((D_r,fNe)=>{fNe.exports=function(t,r){var n=typeof t==\"number\",i=typeof r==\"number\";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error(\"array length must be positive\");for(var o=new Array(a),s=0,l=t;s<a;s++,l++)o[s]=l;return o}});var gNe=ye((F_r,pNe)=>{\"use strict\";var TVt=_Y(),AVt=ey(),SVt=rw(),dNe=cNe(),MVt=hNe(),SK=s5(),EVt=iw();pNe.exports=Ax;function Ax(e,t){if(!(this instanceof Ax))return new Ax(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=TVt(e),this.canvas=this.scatter.canvas}Ax.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=dNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,dNe(()=>{this.dirty=!1})),this)};Ax.prototype.update=function(...e){if(!e.length)return;for(let n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);let t=[],r=0;for(let n=0;n<this.traces.length;n++){let i=this.traces[n],a=this.traces[n].passes;for(let o=0;o<a.length;o++)t.push(this.passes[a[o]]);i.passOffset=r,r+=i.passes.length}return this.scatter.update(...t),this};Ax.prototype.updateItem=function(e,t){let{regl:r}=this;if(t===null)return this.traces[e]=null,this;if(!t)return this;let n=AVt(t,{data:\"data items columns rows values dimensions samples x\",snap:\"snap cluster\",size:\"sizes size radius\",color:\"colors color fill fill-color fillColor\",opacity:\"opacity alpha transparency opaque\",borderSize:\"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline\",borderColor:\"borderColors borderColor bordercolor stroke stroke-color strokeColor\",marker:\"markers marker shape\",range:\"range ranges databox dataBox\",viewport:\"viewport viewBox viewbox\",domain:\"domain domains area areas\",padding:\"pad padding paddings pads margin margins\",transpose:\"transpose transposed\",diagonal:\"diagonal diag showDiagonal\",upper:\"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf\",lower:\"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower\"}),i=this.traces[e]||(this.traces[e]={id:e,buffer:r.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array}),color:\"black\",marker:null,size:12,borderColor:\"transparent\",borderSize:1,viewport:SK([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(n.color!=null&&(i.color=n.color),n.size!=null&&(i.size=n.size),n.marker!=null&&(i.marker=n.marker),n.borderColor!=null&&(i.borderColor=n.borderColor),n.borderSize!=null&&(i.borderSize=n.borderSize),n.opacity!=null&&(i.opacity=n.opacity),n.viewport&&(i.viewport=SK(n.viewport)),n.diagonal!=null&&(i.diagonal=n.diagonal),n.upper!=null&&(i.upper=n.upper),n.lower!=null&&(i.lower=n.lower),n.data){i.buffer(EVt(n.data)),i.columns=n.data.length,i.count=n.data[0].length,i.bounds=[];for(let _=0;_<i.columns;_++)i.bounds[_]=SVt(n.data[_],1)}let a;n.range&&(i.range=n.range,a=i.range&&typeof i.range[0]!=\"number\"),n.domain&&(i.domain=n.domain);let o=!1;n.padding!=null&&(Array.isArray(n.padding)&&n.padding.length===i.columns&&typeof n.padding[n.padding.length-1]==\"number\"?(i.padding=n.padding.map(vNe),o=!0):i.padding=vNe(n.padding));let s=i.columns,l=i.count,u=i.viewport.width,c=i.viewport.height,f=i.viewport.x,h=i.viewport.y,d=u/s,v=c/s;i.passes=[];for(let _=0;_<s;_++)for(let b=0;b<s;b++){if(!i.diagonal&&b===_||!i.upper&&_>b||!i.lower&&_<b)continue;let p=kVt(i.id,_,b),k=this.passes[p]||(this.passes[p]={});if(n.data&&(n.transpose?k.positions={x:{buffer:i.buffer,offset:b,count:l,stride:s},y:{buffer:i.buffer,offset:_,count:l,stride:s}}:k.positions={x:{buffer:i.buffer,offset:b*l,count:l},y:{buffer:i.buffer,offset:_*l,count:l}},k.bounds=Oz(i.bounds,_,b)),n.domain||n.viewport||n.data){let E=o?Oz(i.padding,_,b):i.padding;if(i.domain){let[T,L,x,C]=Oz(i.domain,_,b);k.viewport=[f+T*u+E[0],h+L*c+E[1],f+x*u-E[2],h+C*c-E[3]]}else k.viewport=[f+b*d+d*E[0],h+_*v+v*E[1],f+(b+1)*d-d*E[2],h+(_+1)*v-v*E[3]]}n.color&&(k.color=i.color),n.size&&(k.size=i.size),n.marker&&(k.marker=i.marker),n.borderSize&&(k.borderSize=i.borderSize),n.borderColor&&(k.borderColor=i.borderColor),n.opacity&&(k.opacity=i.opacity),n.range&&(k.range=a?Oz(i.range,_,b):i.range||k.bounds),i.passes.push(p)}return this};Ax.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r<e.length;r++)if(typeof e[r]==\"number\"){let{passes:n,passOffset:i}=this.traces[e[r]];t.push(...MVt(i,i+n.length))}else if(e[r].length){let n=e[r],{passes:i,passOffset:a}=this.traces[r];i=i.map((o,s)=>{t[a+s]=n})}this.scatter.draw(...t)}return this};Ax.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function kVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function Oz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function vNe(e){if(typeof e==\"number\")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=SK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var yNe=ye((z_r,mNe)=>{\"use strict\";var CVt=gNe(),MK=Dr(),qz=hf(),LVt=Cg().selectMode;mNe.exports=function(t,r,n){if(n.length)for(var i=0;i<n.length;i++)PVt(t,n[i][0])};function PVt(e,t){var r=e._fullLayout,n=r._size,i=t.trace,a=t.t,o=r._splomScenes[i.uid],s=o.matrixOptions,l=s.cdata,u=r._glcanvas.data()[0].regl,c=r.dragmode,f,h,d,v,_;if(l.length!==0){s.lower=i.showupperhalf,s.upper=i.showlowerhalf,s.diagonal=i.diagonal.visible;var b=i._visibleDims,p=l.length,k=o.viewOpts={};for(k.ranges=new Array(p),k.domains=new Array(p),_=0;_<b.length;_++){d=b[_];var E=k.ranges[_]=new Array(4),T=k.domains[_]=new Array(4);f=qz.getFromId(e,i._diag[d][0]),f&&(E[0]=f._rl[0],E[2]=f._rl[1],T[0]=f.domain[0],T[2]=f.domain[1]),h=qz.getFromId(e,i._diag[d][1]),h&&(E[1]=h._rl[0],E[3]=h._rl[1],T[1]=h.domain[0],T[3]=h.domain[1])}var L=e._context.plotGlPixelRatio,x=n.l*L,C=n.b*L,M=n.w*L,g=n.h*L;k.viewport=[x,C,M+x,g+C],o.matrix===!0&&(o.matrix=CVt(u));var P=r.clickmode.indexOf(\"select\")>-1,A=LVt(c)||!!i.selectedpoints||P,z=!0;if(A){var O=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,G={};for(d=0;d<U.length;d++)G[U[d]]=!0;var Z=[];for(d=0;d<O;d++)G[d]||Z.push(d);o.unselectBatch=Z}var j=a.xpx=new Array(p),N=a.ypx=new Array(p);for(_=0;_<b.length;_++){if(d=b[_],f=qz.getFromId(e,i._diag[d][0]),f)for(j[_]=new Array(O),v=0;v<O;v++)j[_][v]=f.c2p(l[_][v]);if(h=qz.getFromId(e,i._diag[d][1]),h)for(N[_]=new Array(O),v=0;v<O;v++)N[_][v]=h.c2p(l[_][v])}if(o.selectBatch.length||o.unselectBatch.length){var H=MK.extendFlat({},s,o.unselectedOptions,k),re=MK.extendFlat({},s,o.selectedOptions,k);o.matrix.update(H,re),z=!1}}else a.xpx=a.ypx=null;if(z){var oe=MK.extendFlat({},s,k);o.matrix.update(oe,null)}}}});var EK=ye(_Ne=>{\"use strict\";_Ne.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s<o.length;s++){var l=o[s];if(t._diag[l][a]===n)return s}return!1}});var ANe=ye((q_r,TNe)=>{\"use strict\";var xNe=EK(),IVt=jF().calcHover,bNe=ho().getFromId,RVt=Ao().extendFlat;function DVt(e,t,r,n,i){i||(i={});var a=(n||\"\").charAt(0)===\"x\",o=(n||\"\").charAt(0)===\"y\",s=wNe(e,t,r);if((a||o)&&i.hoversubplots===\"axis\"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=RVt({},e),f=0;f<l.length;f++){var h=l[f];if(h!==e.xa._id+e.ya._id){o?c.xa=bNe(u,h,\"x\"):c.ya=bNe(u,h,\"y\");var d=a||o,v=wNe(c,t,r,d);s=s.concat(v)}}return s}function wNe(e,t,r,n){var i=e.cd,a=i[0].trace,o=e.scene,s=o.matrixOptions.cdata,l=e.xa,u=e.ya,c=l.c2p(t),f=u.c2p(r),h=e.distance,d=xNe.getDimIndex(a,l),v=xNe.getDimIndex(a,u);if(d===!1||v===!1)return[e];for(var _=s[d],b=s[v],p,k,E=h,T=0;T<_.length;T++)if(!(n&&T!==e.index)){var L=_[T],x=b[T],C=l.c2p(L)-c,M=u.c2p(x)-f,g=Math.sqrt(C*C+M*M);(n||g<E)&&(E=k=g,p=T)}return e.index=p,e.distance=E,e.dxy=k,p===void 0?[e]:[IVt(e,_,b,a)]}TNe.exports={hoverPoints:DVt}});var LNe=ye((B_r,CNe)=>{\"use strict\";var kNe=Dr(),SNe=kNe.pushUnique,MNe=Ru(),ENe=EK();CNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!MNe.hasMarkers(i)&&!MNe.hasText(i);if(i.visible!==!0||f)return c;var h=ENe.getDimIndex(i,l),d=ENe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],_=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var T=0;T<b.length;T++)r.contains([v[T],_[T]],null,T,t)?(c.push({pointNumber:T,x:b[T],y:p[T]}),SNe(k,T)):k.indexOf(T)!==-1?SNe(k,T):E.push(T);var L=o.matrixOptions;return!k.length&&!E.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,kNe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=k,o.unselectBatch=E,c}});var RNe=ye((N_r,INe)=>{\"use strict\";var PNe=Dr(),FVt=z0(),zVt=ow().markerStyle;INe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){FVt(t,n),PNe.extendFlat(i.matrixOptions,zVt(t,n));var a=PNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var FNe=ye((U_r,DNe)=>{\"use strict\";var OVt=qa(),qVt=yV();DNe.exports={moduleType:\"trace\",name:\"splom\",categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:bK(),supplyDefaults:eNe(),colorbar:$d(),calc:oNe(),plot:yNe(),hoverPoints:ANe().hoverPoints,selectPoints:LNe(),editStyle:RNe(),meta:{}};OVt.register(qVt)});var UNe=ye((V_r,NNe)=>{\"use strict\";var BVt=KY(),NVt=qa(),UVt=Lz(),VVt=Id().getModuleCalcData,Sx=mh(),zNe=hf().getFromId,ONe=ho().shouldShowZeroLine,qNe=\"splom\",BNe={};function GVt(e){var t=e._fullLayout,r=NVt.getModule(qNe),n=VVt(e.calcdata,r)[0],i=UVt(e,[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],BNe);i&&(t._hasOnlyLargeSploms&&kK(e),r.plot(e,{},n))}function HVt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&kK(e);for(var n=0;n<t.length;n++){var i=t[n][0],a=i.trace,o=r._splomScenes[a.uid];a.type===\"splom\"&&o&&o.matrix&&jVt(e,a,o)}}function jVt(e,t,r){for(var n=r.matrixOptions.data.length,i=t._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],l=a[o]=new Array(4),u=zNe(e,t._diag[s][0]);u&&(l[0]=u.r2l(u.range[0]),l[2]=u.r2l(u.range[1]));var c=zNe(e,t._diag[s][1]);c&&(l[1]=c.r2l(c.range[0]),l[3]=c.r2l(c.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function kK(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,n=t._splomGrid;n||(n=t._splomGrid=BVt(r)),n.update(WVt(e))}function WVt(e){var t=e._context.plotGlPixelRatio,r=e._fullLayout,n=r._size,i=[0,0,r.width*t,r.height*t],a={},o;function s(x,C,M,g,P,A){M*=t,g*=t,P*=t,A*=t;var z=C[x+\"color\"],O=C[x+\"width\"],U=String(z+O);U in a?a[U].data.push(NaN,NaN,M,g,P,A):a[U]={data:[M,g,P,A],join:\"rect\",thickness:O*t,color:z,viewport:i,range:i,overlay:!1}}for(o in r._splomSubplots){var l=r._plots[o],u=l.xaxis,c=l.yaxis,f=u._gridVals,h=c._gridVals,d=u._offset,v=u._length,_=c._length,b=n.b+c.domain[0]*n.h,p=-c._m,k=-p*c.r2l(c.range[0],c.calendar),E,T;if(u.showgrid)for(o=0;o<f.length;o++)E=d+u.l2p(f[o].x),s(\"grid\",u,E,b,E,b+_);if(c.showgrid)for(o=0;o<h.length;o++)T=b+k+p*h[o].x,s(\"grid\",c,d,T,d+v,T);ONe(e,u,c)&&(E=d+u.l2p(0),s(\"zeroline\",u,E,b,E,b+_)),ONe(e,c,u)&&(T=b+k+0,s(\"zeroline\",c,d,T,d+v,T))}var L=[];for(o in a)L.push(a[o]);return L}function XVt(e,t,r,n){var i={},a;if(n._splomScenes){for(a=0;a<e.length;a++){var o=e[a];o.type===\"splom\"&&(i[o.uid]=1)}for(a=0;a<r.length;a++){var s=r[a];if(!i[s.uid]){var l=n._splomScenes[s.uid];l&&l.destroy&&l.destroy(),n._splomScenes[s.uid]=null,delete n._splomScenes[s.uid]}}}Object.keys(n._splomScenes||{}).length===0&&delete n._splomScenes,n._splomGrid&&!t._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),Sx.clean(e,t,r,n)}NNe.exports={name:qNe,attr:Sx.attr,attrRegex:Sx.attrRegex,layoutAttributes:Sx.layoutAttributes,supplyLayoutDefaults:Sx.supplyLayoutDefaults,drawFramework:Sx.drawFramework,plot:GVt,drag:HVt,updateGrid:kK,clean:XVt,updateFx:Sx.updateFx,toSVG:Sx.toSVG,reglPrecompiled:BNe}});var HNe=ye((G_r,GNe)=>{\"use strict\";var VNe=FNe();VNe.basePlotModule=UNe(),GNe.exports=VNe});var WNe=ye((H_r,jNe)=>{\"use strict\";jNe.exports=HNe()});var PK=ye((j_r,XNe)=>{\"use strict\";var ZVt=Tu(),CK=Rd(),LK=ec(),YVt=Cc().attributes,Bz=Ao().extendFlat,KVt=vl().templatedArray;XNe.exports={domain:YVt({name:\"parcoords\",trace:!0,editType:\"plot\"}),labelangle:{valType:\"angle\",dflt:0,editType:\"plot\"},labelside:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},labelfont:LK({editType:\"plot\"}),tickfont:LK({autoShadowDflt:!0,editType:\"plot\"}),rangefont:LK({editType:\"plot\"}),dimensions:KVt(\"dimension\",{label:{valType:\"string\",editType:\"plot\"},tickvals:Bz({},CK.tickvals,{editType:\"plot\"}),ticktext:Bz({},CK.ticktext,{editType:\"plot\"}),tickformat:Bz({},CK.tickformat,{editType:\"plot\"}),visible:{valType:\"boolean\",dflt:!0,editType:\"plot\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},constraintrange:{valType:\"info_array\",freeLength:!0,dimensions:\"1-2\",items:[{valType:\"any\",editType:\"plot\"},{valType:\"any\",editType:\"plot\"}],editType:\"plot\"},multiselect:{valType:\"boolean\",dflt:!0,editType:\"plot\"},values:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"}),line:Bz({editType:\"calc\"},ZVt(\"line\",{colorscaleDflt:\"Viridis\",autoColorDflt:!1,editTypeOverride:\"calc\"})),unselected:{line:{color:{valType:\"color\",dflt:\"#7f7f7f\",editType:\"plot\"},opacity:{valType:\"number\",min:0,max:1,dflt:\"auto\",editType:\"plot\"},editType:\"plot\"},editType:\"plot\"}}});var Bk=ye((W_r,ZNe)=>{\"use strict\";ZNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:[\"contextLineLayer\",\"focusLineLayer\",\"pickLineLayer\"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:\"magenta\",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:\"axis-extent-text\",parcoordsLineLayers:\"parcoords-line-layers\",parcoordsLineLayer:\"parcoords-lines\",parcoords:\"parcoords\",parcoordsControlView:\"parcoords-control-view\",yAxis:\"y-axis\",axisOverlays:\"axis-overlays\",axis:\"axis\",axisHeading:\"axis-heading\",axisTitle:\"axis-title\",axisExtent:\"axis-extent\",axisExtentTop:\"axis-extent-top\",axisExtentTopText:\"axis-extent-top-text\",axisExtentBottom:\"axis-extent-bottom\",axisExtentBottomText:\"axis-extent-bottom-text\",axisBrush:\"axis-brush\"},id:{filterBarPattern:\"filter-bar-pattern\"}}});var iy=ye((X_r,KNe)=>{\"use strict\";var JVt=ZS();function YNe(e){return[e]}KNe.exports={keyFun:function(e){return e.key},repeat:YNe,descend:JVt,wrap:YNe,unwrap:function(e){return e[0]}}});var DK=ye((Z_r,sUe)=>{\"use strict\";var Th=Bk(),im=Oa(),$Vt=iy().keyFun,Nz=iy().repeat,A5=Dr().sorterAsc,QVt=Dr().strTranslate,JNe=Th.bar.snapRatio;function $Ne(e,t){return e*(1-JNe)+t*JNe}var QNe=Th.bar.snapClose;function eGt(e,t){return e*(1-QNe)+t*QNe}function Vz(e,t,r,n){if(tGt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c<i*o;c+=i){var f=c+i,h=t[f];if(i*r<i*eGt(l,h))return $Ne(l,u);if(i*r<i*h||f===o)return $Ne(h,l);u=l,l=h}}function tGt(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}function rGt(e){e.attr(\"x\",-Th.bar.captureWidth/2).attr(\"width\",Th.bar.captureWidth)}function iGt(e){e.attr(\"visibility\",\"visible\").style(\"visibility\",\"visible\").attr(\"fill\",\"yellow\").attr(\"opacity\",0)}function nGt(e){if(!e.brush.filterSpecified)return\"0,\"+e.height;for(var t=eUe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,a,o=t.length?t[0][0]:null,s=0;s<t.length;s++)n=t[s],i=n[1]-n[0],r.push(o),r.push(i),a=s+1,a<t.length&&(o=t[a][0]-n[1]);return r.push(e.height),r}function eUe(e,t){return e.map(function(r){return r.map(function(n){return Math.max(0,n*t)}).sort(A5)})}function aGt(e,t){var r=Th.bar.handleHeight;if(!(t>e[1]+r||t<e[0]-r))return t>=.9*e[1]+.1*e[0]?\"n\":t<=.9*e[0]+.1*e[1]?\"s\":\"ns\"}function tUe(){im.select(document.body).style(\"cursor\",null)}function RK(e){e.attr(\"stroke-dasharray\",nGt)}function Uz(e,t){var r=im.select(e).selectAll(\".highlight, .highlight-shadow\"),n=t?r.transition().duration(Th.bar.snapDuration).each(\"end\",t):r;RK(n)}function rUe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=eUe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]<u[h][0]-t?f:h),!isNaN(i)){var v=u[i],_=aGt(v,t);_&&(a.interval=l[i],a.intervalPix=v,a.region=_)}}if(e.ordinal&&!a.region){var b=e.unitTickvals,p=e.unitToPaddedPx.invert(t);for(o=0;o<b.length;o++){var k=[b[Math.max(o-1,0)]*.25+b[o]*.75,b[Math.min(o+1,b.length-1)]*.25+b[o]*.75];if(p>=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function oGt(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=rUe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region===\"ns\",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region===\"s\"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function iUe(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(A5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Uz(e.parentNode)}function sGt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(nUe(e,t),iUe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=im.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,tUe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&IK(r)):IK(r),i.brushCallback(t),Uz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),i.newExtent=[Vz(0,l,i.newExtent[0],i.stayingIntervals),Vz(1,l,i.newExtent[1],i.stayingIntervals)];var u=i.newExtent[1]>i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||IK(r),i.brushCallback(t),u?Uz(e.parentNode,s):(s(),Uz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function nUe(e,t){var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=rUe(t,r),i=\"crosshair\";n.clickableOrdinalRange?i=\"pointer\":n.region&&(i=n.region+\"-resize\"),im.select(document.body).style(\"cursor\",i)}function lGt(e){e.on(\"mousemove\",function(t){im.event.preventDefault(),t.parent.inBrushDrag||nUe(this,t)}).on(\"mouseleave\",function(t){t.parent.inBrushDrag||tUe()}).call(im.behavior.drag().on(\"dragstart\",function(t){oGt(this,t)}).on(\"drag\",function(t){iUe(this,t)}).on(\"dragend\",function(t){sGt(this,t)}))}function aUe(e,t){return e[0]-t[0]}function uGt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(\".background\").data(Nz);i.enter().append(\"rect\").classed(\"background\",!0).call(rGt).call(iGt).style(\"pointer-events\",n?\"none\":\"auto\").attr(\"transform\",QVt(0,Th.verticalPadding)),i.call(lGt).attr(\"height\",function(s){return s.height-Th.verticalPadding});var a=e.selectAll(\".highlight-shadow\").data(Nz);a.enter().append(\"line\").classed(\"highlight-shadow\",!0).attr(\"x\",-Th.bar.width/2).attr(\"stroke-width\",Th.bar.width+Th.bar.strokeWidth).attr(\"stroke\",t).attr(\"opacity\",Th.bar.strokeOpacity).attr(\"stroke-linecap\",\"butt\"),a.attr(\"y1\",function(s){return s.height}).call(RK);var o=e.selectAll(\".highlight\").data(Nz);o.enter().append(\"line\").classed(\"highlight\",!0).attr(\"x\",-Th.bar.width/2).attr(\"stroke-width\",Th.bar.width-Th.bar.strokeWidth).attr(\"stroke\",Th.bar.fillColor).attr(\"opacity\",Th.bar.fillOpacity).attr(\"stroke-linecap\",\"butt\"),o.attr(\"y1\",function(s){return s.height}).call(RK)}function cGt(e,t,r){var n=e.selectAll(\".\"+Th.cn.axisBrush).data(Nz,$Vt);n.enter().append(\"g\").classed(Th.cn.axisBrush,!0),uGt(n,t,r)}function fGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function IK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function hGt(e){return function(r){var n=r.brush,i=fGt(n),a=i.slice();n.filter.set(a),e()}}function oUe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function dGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(A5)}).sort(aUe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=oUe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function vGt(e,t,r,n,i,a){var o=dGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:hGt(i),brushEndCallback:a}}}function pGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(A5)}),t.multiselect?e=oUe(e.sort(aUe)):e=[e[0]]):e=[e.sort(A5)],t.tickvals){var r=t.tickvals.slice().sort(A5);if(e=e.map(function(n){var i=[Vz(0,r,n[0],[]),Vz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}sUe.exports={makeBrush:vGt,ensureAxisBrush:cGt,cleanRanges:pGt}});var cUe=ye((Y_r,uUe)=>{\"use strict\";var Mx=Dr(),gGt=pv().hasColorscale,mGt=td(),yGt=Cc().defaults,_Gt=Zd(),xGt=ho(),lUe=PK(),bGt=DK(),FK=Bk().maxDimensionCount,wGt=Iz();function TGt(e,t,r,n,i){var a=i(\"line.color\",r);if(gGt(e,\"line\")&&Mx.isArrayOrTypedArray(a)){if(a.length)return i(\"line.colorscale\"),mGt(e,t,n,i,{prefix:\"line.\",cLetter:\"c\"}),a.length;t.line.color=r}return 1/0}function AGt(e,t,r,n){function i(u,c){return Mx.coerce(e,t,lUe.dimensions,u,c)}var a=i(\"values\"),o=i(\"visible\");if(a&&a.length||(o=t.visible=!1),o){i(\"label\"),i(\"tickvals\"),i(\"ticktext\"),i(\"tickformat\");var s=i(\"range\");t._ax={_id:\"y\",type:\"linear\",showexponent:\"all\",exponentformat:\"B\",range:s},xGt.setConvert(t._ax,n.layout),i(\"multiselect\");var l=i(\"constraintrange\");l&&(t.constraintrange=bGt.cleanRanges(l,t))}}uUe.exports=function(t,r,n,i){function a(c,f){return Mx.coerce(t,r,lUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>FK&&(Mx.log(\"parcoords traces support up to \"+FK+\" dimensions at the moment\"),o.splice(FK));var s=_Gt(t,r,{name:\"dimensions\",layout:i,handleItemDefaults:AGt}),l=TGt(t,r,n,i,a);yGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),wGt(r,s,\"values\",l);var u=Mx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});Mx.coerceFont(a,\"labelfont\",u),Mx.coerceFont(a,\"tickfont\",u,{autoShadowDflt:!0}),Mx.coerceFont(a,\"rangefont\",u),a(\"labelangle\"),a(\"labelside\"),a(\"unselected.line.color\"),a(\"unselected.line.opacity\")}});var hUe=ye((K_r,fUe)=>{\"use strict\";var SGt=Dr().isArrayOrTypedArray,zK=tc(),MGt=iy().wrap;fUe.exports=function(t,r){var n,i;return zK.hasColorscale(r,\"line\")&&SGt(r.line.color)?(n=r.line.color,i=zK.extractOpts(r.line).colorscale,zK.calc(t,r,{vals:n,containerStr:\"line\",cLetter:\"c\"})):(n=EGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),MGt({lineColor:n,cscale:i})};function EGt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}});function kGt(e){var c,f;var t,r=[],n=1,i;if(typeof e==\"number\")return{space:\"rgb\",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e==\"number\")return{space:\"rgb\",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),OK.default[e])r=OK.default[e].slice(),i=\"rgb\";else if(e===\"transparent\")n=0,i=\"rgb\",r=[0,0,0];else if(e[0]===\"#\"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i=\"rgb\"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\\s*\\(([^\\)]*)\\)/.exec(e)){var l=t[1];i=l.replace(/a$/,\"\");var u=i===\"cmyk\"?4:i===\"gray\"?1:3;r=t[2].trim().split(/\\s*[,\\/]\\s*|\\s+/),i===\"color\"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]===\"%\")return h=parseFloat(h)/100,d===3?h:i===\"rgb\"?h*255:i[0]===\"h\"||i[0]===\"l\"&&!d?h*100:i===\"lab\"?h*125:i===\"lch\"?d<2?h*150:h*360:i[0]===\"o\"&&!d?h:i===\"oklab\"?h*.4:i===\"oklch\"?d<2?h*.4:h*360:h;if(i[d]===\"h\"||d===2&&i[i.length-1]===\"h\"){if(dUe[h]!==void 0)return dUe[h];if(h.endsWith(\"deg\"))return parseFloat(h);if(h.endsWith(\"turn\"))return parseFloat(h)*360;if(h.endsWith(\"grad\"))return parseFloat(h)*360/400;if(h.endsWith(\"rad\"))return parseFloat(h)*180/Math.PI}return h===\"none\"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\\s|\\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(\"\"))==null?void 0:f.toLowerCase())||\"rgb\");return{space:i,values:r,alpha:n}}var OK,vUe,dUe,pUe=gu(()=>{OK=Att(TX(),1),vUe=kGt,dUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Nk,qK=gu(()=>{Nk={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}});var Gz,gUe=gu(()=>{qK();Gz={name:\"hsl\",min:[0,0,0],max:[360,100,100],channel:[\"hue\",\"saturation\",\"lightness\"],alias:[\"HSL\"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Nk.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var yUe={};mee(yUe,{default:()=>mUe});function mUe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=vUe(e);if(!i.space)return[];let a=i.space[0]===\"h\"?Gz.min:Nk.min,o=i.space[0]===\"h\"?Gz.max:Nk.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]===\"h\"&&(t=Gz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var _Ue=gu(()=>{pUe();qK();gUe()});var BK=ye(Hz=>{\"use strict\";var CGt=Dr().isTypedArray;Hz.convertTypedArray=function(e){return CGt(e)?Array.prototype.slice.call(e):e};Hz.isOrdinal=function(e){return!!e.tickvals};Hz.isVisible=function(e){return e.visible||!(\"visible\"in e)}});var CUe=ye((axr,kUe)=>{\"use strict\";var LGt=[\"precision highp float;\",\"\",\"varying vec4 fragColor;\",\"\",\"attribute vec4 p01_04, p05_08, p09_12, p13_16,\",\"               p17_20, p21_24, p25_28, p29_32,\",\"               p33_36, p37_40, p41_44, p45_48,\",\"               p49_52, p53_56, p57_60, colors;\",\"\",\"uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\",\"             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\",\"\",\"uniform vec2 resolution, viewBoxPos, viewBoxSize;\",\"uniform float maskHeight;\",\"uniform float drwLayer; // 0: context, 1: focus, 2: pick\",\"uniform vec4 contextColor;\",\"uniform sampler2D maskTexture, palette;\",\"\",\"bool isPick    = (drwLayer > 1.5);\",\"bool isContext = (drwLayer < 0.5);\",\"\",\"const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\",\"const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\",\"\",\"float val(mat4 p, mat4 v) {\",\"    return dot(matrixCompMult(p, v) * UNITS, UNITS);\",\"}\",\"\",\"float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\",\"    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\",\"    return y1 * (1.0 - ratio) + y2 * ratio;\",\"}\",\"\",\"int iMod(int a, int b) {\",\"    return a - b * (a / b);\",\"}\",\"\",\"bool fOutside(float p, float lo, float hi) {\",\"    return (lo < hi) && (lo > p || p > hi);\",\"}\",\"\",\"bool vOutside(vec4 p, vec4 lo, vec4 hi) {\",\"    return (\",\"        fOutside(p[0], lo[0], hi[0]) ||\",\"        fOutside(p[1], lo[1], hi[1]) ||\",\"        fOutside(p[2], lo[2], hi[2]) ||\",\"        fOutside(p[3], lo[3], hi[3])\",\"    );\",\"}\",\"\",\"bool mOutside(mat4 p, mat4 lo, mat4 hi) {\",\"    return (\",\"        vOutside(p[0], lo[0], hi[0]) ||\",\"        vOutside(p[1], lo[1], hi[1]) ||\",\"        vOutside(p[2], lo[2], hi[2]) ||\",\"        vOutside(p[3], lo[3], hi[3])\",\"    );\",\"}\",\"\",\"bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    return mOutside(A, loA, hiA) ||\",\"           mOutside(B, loB, hiB) ||\",\"           mOutside(C, loC, hiC) ||\",\"           mOutside(D, loD, hiD);\",\"}\",\"\",\"bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    mat4 pnts[4];\",\"    pnts[0] = A;\",\"    pnts[1] = B;\",\"    pnts[2] = C;\",\"    pnts[3] = D;\",\"\",\"    for(int i = 0; i < 4; ++i) {\",\"        for(int j = 0; j < 4; ++j) {\",\"            for(int k = 0; k < 4; ++k) {\",\"                if(0 == iMod(\",\"                    int(255.0 * texture2D(maskTexture,\",\"                        vec2(\",\"                            (float(i * 2 + j / 2) + 0.5) / 8.0,\",\"                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\",\"                        ))[3]\",\"                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\",\"                    2\",\"                )) return true;\",\"            }\",\"        }\",\"    }\",\"    return false;\",\"}\",\"\",\"vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\",\"    float x = 0.5 * sign(v) + 0.5;\",\"    float y = axisY(x, A, B, C, D);\",\"    float z = 1.0 - abs(v);\",\"\",\"    z += isContext ? 0.0 : 2.0 * float(\",\"        outsideBoundingBox(A, B, C, D) ||\",\"        outsideRasterMask(A, B, C, D)\",\"    );\",\"\",\"    return vec4(\",\"        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\",\"        z,\",\"        1.0\",\"    );\",\"}\",\"\",\"void main() {\",\"    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\",\"    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\",\"    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\",\"    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\",\"\",\"    float v = colors[3];\",\"\",\"    gl_Position = position(isContext, v, A, B, C, D);\",\"\",\"    fragColor =\",\"        isContext ? vec4(contextColor) :\",\"        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\",\"}\"].join(`\n",
       "`),PGt=[\"precision highp float;\",\"\",\"varying vec4 fragColor;\",\"\",\"void main() {\",\"    gl_FragColor = fragColor;\",\"}\"].join(`\n",
       "`),Uk=Bk().maxDimensionCount,SUe=Dr(),xUe=1e-6,jz=2048,IGt=new Uint8Array(4),bUe=new Uint8Array(4),wUe={shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\"};function RGt(e){e.read({x:0,y:0,width:1,height:1,data:IGt})}function MUe(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function DGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],MUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}r.drawCompleted||(RGt(e),r.drawCompleted=!0),s(0)}function FGt(e){return Math.max(xUe,Math.min(1-xUe,e))}function zGt(e,t){for(var r=new Array(256),n=0;n<256;n++)r[n]=e(n/255).concat(t);return r}function NK(e,t){return(e>>>8*t)%256/255}function OGt(e,t,r){for(var n=new Array(e*(Uk+4)),i=0,a=0;a<e;a++){for(var o=0;o<Uk;o++)n[i++]=o<t.length?t[o].paddedUnitValues[a]:.5;n[i++]=NK(a,2),n[i++]=NK(a,1),n[i++]=NK(a,0),n[i++]=FGt(r[a])}return n}function qGt(e,t,r){for(var n=new Array(t*8),i=0,a=0;a<t;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=e*4+s,u=r[a*64+l];l===63&&o===0&&(u*=-1),n[i++]=u}return n}function TUe(e){var t=\"0\"+e;return t.slice(-2)}function EUe(e){return e<Uk?\"p\"+TUe(e+1)+\"_\"+TUe(e+4):\"colors\"}function BGt(e,t,r){for(var n=0;n<=Uk;n+=4)e[EUe(n)](qGt(n/4,t,r))}function NGt(e){for(var t={},r=0;r<=Uk;r+=4)t[EUe(r)]=e.buffer({usage:\"dynamic\",type:\"float\",data:new Uint8Array(0)});return t}function UGt(e,t,r,n,i,a,o,s,l,u,c,f,h,d){for(var v=[[],[]],_=0;_<64;_++)v[0][_]=_===i?1:0,v[1][_]=_===a?1:0;o*=d,s*=d,l*=d,u*=d;var b=e.lines.canvasOverdrag*d,p=e.domain,k=e.canvasWidth*d,E=e.canvasHeight*d,T=e.pad.l*d,L=e.pad.b*d,x=e.layoutHeight*d,C=e.layoutWidth*d,M=e.deselectedLines.color,g=e.deselectedLines.opacity,P=SUe.extendFlat({key:c,resolution:[k,E],viewBoxPos:[o+b,s],viewBoxSize:[l,u],i0:i,i1:a,dim0A:v[0].slice(0,16),dim0B:v[0].slice(16,32),dim0C:v[0].slice(32,48),dim0D:v[0].slice(48,64),dim1A:v[1].slice(0,16),dim1B:v[1].slice(16,32),dim1C:v[1].slice(32,48),dim1D:v[1].slice(48,64),drwLayer:f,contextColor:[M[0]/255,M[1]/255,M[2]/255,g!==\"auto\"?M[3]*g:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(n===t?0:o+b)+(T-b)+C*p.x[0],scissorWidth:(n===r?k-o+b:l+.5)+(n===t?o+b:0),scissorY:s+L+x*p.y[0],scissorHeight:u,viewportX:T-b+C*p.x[0],viewportY:L+x*p.y[0],viewportWidth:k,viewportHeight:E},h);return P}function AUe(e){var t=jz-1,r=Math.max(0,Math.floor(e[0]*t),0),n=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(r,n),Math.max(r,n)]}kUe.exports=function(e,t){var r=t.context,n=t.pick,i=t.regl,a=i._gl,o=a.getParameter(a.ALIASED_LINE_WIDTH_RANGE),s=Math.max(o[0],Math.min(o[1],t.viewModel.plotGlPixelRatio)),l={currentRafs:{},drawCompleted:!0,clearOnly:!1},u,c,f,h,d=NGt(i),v,_=i.texture(wUe),b=[];k(t);var p=i({profile:!1,blend:{enable:r,func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:1,dstAlpha:1},equation:{rgb:\"add\",alpha:\"add\"},color:[0,0,0,0]},depth:{enable:!r,mask:!0,func:\"less\",range:[0,1]},cull:{enable:!0,face:\"back\"},scissor:{enable:!0,box:{x:i.prop(\"scissorX\"),y:i.prop(\"scissorY\"),width:i.prop(\"scissorWidth\"),height:i.prop(\"scissorHeight\")}},viewport:{x:i.prop(\"viewportX\"),y:i.prop(\"viewportY\"),width:i.prop(\"viewportWidth\"),height:i.prop(\"viewportHeight\")},dither:!1,vert:LGt,frag:PGt,primitive:\"lines\",lineWidth:s,attributes:d,uniforms:{resolution:i.prop(\"resolution\"),viewBoxPos:i.prop(\"viewBoxPos\"),viewBoxSize:i.prop(\"viewBoxSize\"),dim0A:i.prop(\"dim0A\"),dim1A:i.prop(\"dim1A\"),dim0B:i.prop(\"dim0B\"),dim1B:i.prop(\"dim1B\"),dim0C:i.prop(\"dim0C\"),dim1C:i.prop(\"dim1C\"),dim0D:i.prop(\"dim0D\"),dim1D:i.prop(\"dim1D\"),loA:i.prop(\"loA\"),hiA:i.prop(\"hiA\"),loB:i.prop(\"loB\"),hiB:i.prop(\"hiB\"),loC:i.prop(\"loC\"),hiC:i.prop(\"hiC\"),loD:i.prop(\"loD\"),hiD:i.prop(\"hiD\"),palette:_,contextColor:i.prop(\"contextColor\"),maskTexture:i.prop(\"maskTexture\"),drwLayer:i.prop(\"drwLayer\"),maskHeight:i.prop(\"maskHeight\")},offset:i.prop(\"offset\"),count:i.prop(\"count\")});function k(M){u=M.model,c=M.viewModel,f=c.dimensions.slice(),h=f[0]?f[0].values.length:0;var g=u.lines,P=n?g.color.map(function(z,O){return O/g.color.length}):g.color,A=OGt(h,f,P);BGt(d,h,A),!r&&!n&&(_=i.texture(SUe.extendFlat({data:zGt(u.unitToColor,255)},wUe)))}function E(M){var g,P,A,z=[[],[]];for(A=0;A<64;A++){var O=!M&&A<f.length?f[A].brush.filter.getBounds():[-1/0,1/0];z[0][A]=O[0],z[1][A]=O[1]}var U=jz*8,G=new Array(U);for(g=0;g<U;g++)G[g]=255;if(!M)for(g=0;g<f.length;g++){var Z=g%8,j=(g-Z)/8,N=Math.pow(2,Z),H=f[g],re=H.brush.filter.get();if(!(re.length<2)){var oe=AUe(re[0])[1];for(P=1;P<re.length;P++){var _e=AUe(re[P]);for(A=oe+1;A<_e[0];A++)G[A*8+j]&=~N;oe=Math.max(oe,_e[1])}}}var Ce={shape:[8,jz],format:\"alpha\",type:\"uint8\",mag:\"nearest\",min:\"nearest\",data:G};return v?v(Ce):v=i.texture(Ce),{maskTexture:v,maskHeight:jz,loA:z[0].slice(0,16),loB:z[0].slice(16,32),loC:z[0].slice(32,48),loD:z[0].slice(48,64),hiA:z[1].slice(0,16),hiB:z[1].slice(16,32),hiC:z[1].slice(32,48),hiD:z[1].slice(48,64)}}function T(M,g,P){var A=M.length,z,O,U,G=1/0,Z=-1/0;for(z=0;z<A;z++)M[z].dim0.canvasX<G&&(G=M[z].dim0.canvasX,O=z),M[z].dim1.canvasX>Z&&(Z=M[z].dim1.canvasX,U=z);A===0&&MUe(i,0,0,u.canvasWidth,u.canvasHeight);var j=E(r);for(z=0;z<A;z++){var N=M[z],H=N.dim0.crossfilterDimensionIndex,re=N.dim1.crossfilterDimensionIndex,oe=N.canvasX,_e=N.canvasY,Ce=oe+N.panelSizeX,Le=N.plotGlPixelRatio;if(g||!b[H]||b[H][0]!==oe||b[H][1]!==Ce){b[H]=[oe,Ce];var ge=UGt(u,O,U,z,H,re,oe,_e,N.panelSizeX,N.panelSizeY,N.dim0.crossfilterDimensionIndex,r?0:n?2:1,j,Le);l.clearOnly=P;var ie=g?u.lines.blockLineCount:h;DGt(i,p,l,ie,h,ge)}}}function L(M,g){return i.read({x:M,y:g,width:1,height:1,data:bUe}),bUe}function x(M,g,P,A){var z=new Uint8Array(4*P*A);return i.read({x:M,y:g,width:P,height:A,data:z}),z}function C(){e.style[\"pointer-events\"]=\"none\",_.destroy(),v&&v.destroy();for(var M in d)d[M].destroy()}return{render:T,readPixel:L,readPixels:x,destroy:C,update:k}}});var GUe=ye((oxr,VUe)=>{\"use strict\";var qd=Oa(),p1=Dr(),UK=p1.isArrayOrTypedArray,FUe=p1.numberFormat,zUe=(_Ue(),pb(yUe)).default,OUe=ho(),VGt=p1.strRotate,ny=p1.strTranslate,GGt=Zl(),Wz=So(),LUe=tc(),HK=iy(),ig=HK.keyFun,ay=HK.repeat,qUe=HK.unwrap,S5=BK(),Dl=Bk(),BUe=DK(),HGt=CUe();function PUe(e,t,r){return p1.aggNums(e,null,t,r)}function NUe(e,t){return jK(PUe(Math.min,e,t),PUe(Math.max,e,t))}function Xz(e){var t=e.range;return t?jK(t[0],t[1]):NUe(e.values,e._length)}function jK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function jGt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function WGt(e,t,r,n,i){var a=Xz(r);return n?qd.scale.ordinal().domain(n.map(jGt(FUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):qd.scale.linear().domain(a).range([e-t,t])}function XGt(e,t){return qd.scale.linear().range([t,e-t])}function ZGt(e,t){return qd.scale.linear().domain(Xz(e)).range([t,1-t])}function YGt(e){if(e.tickvals){var t=Xz(e);return qd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function KGt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=zUe(a[1]);return qd.rgb(\"rgb(\"+o[0]+\",\"+o[1]+\",\"+o[2]+\")\")}),n=function(a){return function(o){return o[a]}},i=\"rgb\".split(\"\").map(function(a){return qd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function GK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function JGt(e,t,r){var n=qUe(t),i=n.trace,a=S5.convertTypedArray(n.lineColor),o=i.line,s={color:zUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=LUe.extractOpts(o),u=l.reversescale?LUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,_=i.labelfont,b=i.tickfont,p=i.rangefont,k=p1.extendDeepNoArrays({},o,{color:a.map(qd.scale.linear().domain(Xz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),E=Math.floor(h*(c.x[1]-c.x[0])),T=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=E,C=T;return{key:r,colCount:f.filter(S5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:KGt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:_,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function $Gt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=XGt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(S5.isVisible).map(function(h,d){var v=ZGt(h,l),_=f[h.label];f[h.label]=(_||0)+1;var b=h.label+(_?\"__\"+_:\"\"),p=h.constraintrange,k=p&&p.length;k&&!UK(p[0])&&(p=[p]);var E=k?p.map(function(O){return O.map(v)}):[[-1/0,1/0]],T=function(){var O=c;O.focusLayer&&O.focusLayer.render(O.panels,!0);var U=GK(O);!e.contextShown()&&U?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var x=h.tickvals,C;function M(O,U){return{val:O,text:C[U]}}function g(O,U){return O.val-U.val}if(UK(x)&&x.length){p1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!UK(C)||!C.length?C=x.map(FUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P<x.length;P++)if(x[P]<x[P-1]){for(var A=x.map(M).sort(g),z=0;z<x.length;z++)x[z]=A[z].val,C[z]=A[z].text;break}}else x=void 0;return L=S5.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:x,ticktext:C,ordinal:S5.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(v),unitTickvals:x&&x.map(v),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:WGt(i,Dl.verticalPadding,h,x,C),ordinalScale:YGt(h),parent:c,model:r,brush:BUe.makeBrush(e,k,E,function(){e.linePickActive(!1)},T,function(O){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var U=v.invert,G=O.map(function(Z){return Z.map(U).sort(p1.sorterAsc)}).sort(function(Z,j){return Z[0]-j[0]});t.filterChanged(c.key,h._index,G)}})}}),c}function IUe(e){e.classed(Dl.cn.axisExtentText,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"default\")}function QGt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function RUe(e,t){var r=t===\"top\"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function VK(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a<i.length-1;a++){var o=n[a]||(n[a]={}),s=i[a],l=i[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=t.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function eHt(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].length;r++)for(var n=e[t][r].trace,i=n.dimensions,a=0;a<i.length;a++){var o=i[a].values,s=i[a]._ax;s&&(s.range?s.range=jK(s.range[0],s.range[1]):s.range=NUe(o,n._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=i[a].tickformat,OUe.calcTicks(s),s.cleanRange())}}function UUe(e,t){return OUe.tickText(e._ax,t,!1).text}function DUe(e,t){if(e.ordinal)return\"\";var r=e.domainScale.domain(),n=r[t?r.length-1:0];return UUe(e.model.dimensions[e.visibleIndex],n)}VUe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=o._toppaper,l=o._glcontainer,u=t._context.plotGlPixelRatio,c=t._fullLayout.paper_bgcolor;eHt(r);var f=QGt(),h=r.filter(function(z){return qUe(z).trace.visible}).map(JGt.bind(0,n)).map($Gt.bind(0,f,i));l.each(function(z,O){return p1.extendFlat(z,h[O])});var d=l.selectAll(\".gl-canvas\").each(function(z){z.viewModel=h[0],z.viewModel.plotGlPixelRatio=u,z.viewModel.paperColor=c,z.model=z.viewModel?z.viewModel.model:null}),v=null,_=d.filter(function(z){return z.pick});_.style(\"pointer-events\",a?\"none\":\"auto\").on(\"mousemove\",function(z){if(f.linePickActive()&&z.lineLayer&&i&&i.hover){var O=qd.event,U=this.width,G=this.height,Z=qd.mouse(this),j=Z[0],N=Z[1];if(j<0||N<0||j>=U||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),re=H[3]!==0,oe=re?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:O.clientX,clientY:O.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style(\"opacity\",function(z){return z.pick?0:1}),s.style(\"background\",\"rgba(255, 255, 255, 0)\");var b=s.selectAll(\".\"+Dl.cn.parcoords).data(h,ig);b.exit().remove(),b.enter().append(\"g\").classed(Dl.cn.parcoords,!0).style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"none\"),b.attr(\"transform\",function(z){return ny(z.model.translateX,z.model.translateY)});var p=b.selectAll(\".\"+Dl.cn.parcoordsControlView).data(ay,ig);p.enter().append(\"g\").classed(Dl.cn.parcoordsControlView,!0),p.attr(\"transform\",function(z){return ny(z.model.pad.l,z.model.pad.t)});var k=p.selectAll(\".\"+Dl.cn.yAxis).data(function(z){return z.dimensions},ig);k.enter().append(\"g\").classed(Dl.cn.yAxis,!0),p.each(function(z){VK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=HGt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var O=!z.context||i;z.lineLayer.render(z.viewModel.panels,O)}}),k.attr(\"transform\",function(z){return ny(z.xScale(z.xIndex),0)}),k.call(qd.behavior.drag().origin(function(z){return z}).on(\"drag\",function(z){var O=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,qd.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(U,G){return U.x-G.x}).each(function(U,G){U.xIndex=G,U.x=z===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),VK(k,O,u),k.filter(function(U){return Math.abs(z.xIndex-U.xIndex)!==0}).attr(\"transform\",function(U){return ny(U.xScale(U.xIndex),0)}),qd.select(this).attr(\"transform\",ny(z.x,0)),k.each(function(U,G,Z){Z===z.parent.key&&(O.dimensions[G]=U)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!GK(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on(\"dragend\",function(z){var O=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,VK(k,O,u),qd.select(this).attr(\"transform\",function(U){return ny(U.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!GK(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(O.key,O.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var E=k.selectAll(\".\"+Dl.cn.axisOverlays).data(ay,ig);E.enter().append(\"g\").classed(Dl.cn.axisOverlays,!0),E.selectAll(\".\"+Dl.cn.axis).remove();var T=E.selectAll(\".\"+Dl.cn.axis).data(ay,ig);T.enter().append(\"g\").classed(Dl.cn.axis,!0),T.each(function(z){var O=z.model.height/z.model.tickDistance,U=z.domainScale,G=U.domain();qd.select(this).call(qd.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(O,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return S5.isOrdinal(z)?Z:UUe(z.model.dimensions[z.visibleIndex],Z)}).scale(U)),Wz.font(T.selectAll(\"text\"),z.model.tickFont)}),T.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),T.selectAll(\"text\").style(\"cursor\",\"default\");var L=E.selectAll(\".\"+Dl.cn.axisHeading).data(ay,ig);L.enter().append(\"g\").classed(Dl.cn.axisHeading,!0);var x=L.selectAll(\".\"+Dl.cn.axisTitle).data(ay,ig);x.enter().append(\"text\").classed(Dl.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"pointer-events\",a?\"none\":\"auto\"),x.text(function(z){return z.label}).each(function(z){var O=qd.select(this);Wz.font(O,z.model.labelFont),GGt.convertToTspans(O,t)}).attr(\"transform\",function(z){var O=RUe(z.model.labelAngle,z.model.labelSide),U=Dl.axisTitleOffset;return(O.dir>0?\"\":ny(0,2*U+z.model.height))+VGt(O.degrees)+ny(-U*O.dx,-U*O.dy)}).attr(\"text-anchor\",function(z){var O=RUe(z.model.labelAngle,z.model.labelSide),U=Math.abs(O.dx),G=Math.abs(O.dy);return 2*U>G?O.dir*O.dx<0?\"start\":\"end\":\"middle\"});var C=E.selectAll(\".\"+Dl.cn.axisExtent).data(ay,ig);C.enter().append(\"g\").classed(Dl.cn.axisExtent,!0);var M=C.selectAll(\".\"+Dl.cn.axisExtentTop).data(ay,ig);M.enter().append(\"g\").classed(Dl.cn.axisExtentTop,!0),M.attr(\"transform\",ny(0,-Dl.axisExtentOffset));var g=M.selectAll(\".\"+Dl.cn.axisExtentTopText).data(ay,ig);g.enter().append(\"text\").classed(Dl.cn.axisExtentTopText,!0).call(IUe),g.text(function(z){return DUe(z,!0)}).each(function(z){Wz.font(qd.select(this),z.model.rangeFont)});var P=C.selectAll(\".\"+Dl.cn.axisExtentBottom).data(ay,ig);P.enter().append(\"g\").classed(Dl.cn.axisExtentBottom,!0),P.attr(\"transform\",function(z){return ny(0,z.model.height+Dl.axisExtentOffset)});var A=P.selectAll(\".\"+Dl.cn.axisExtentBottomText).data(ay,ig);A.enter().append(\"text\").classed(Dl.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(IUe),A.text(function(z){return DUe(z,!1)}).each(function(z){Wz.font(qd.select(this),z.model.rangeFont)}),BUe.ensureAxisBrush(E,c,t)}});var XK=ye((WK,XUe)=>{\"use strict\";var tHt=GUe(),rHt=Lz(),HUe=BK().isVisible,WUe={};function jUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function iHt(e,t){return function(n,i){return jUe(e,t,n)-jUe(e,t,i)}}var WK=XUe.exports=function(t,r){var n=t._fullLayout,i=rHt(t,[],WUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,_){var b=v[0].trace;s[_]=b.index;var p=l[_]=b.index;a[_]=t.data[p].dimensions,o[_]=t.data[p].dimensions.slice()});var c=function(v,_,b){var p=o[v][_],k=b.map(function(M){return M.slice()}),E=\"dimensions[\"+_+\"].constraintrange\",T=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(T[E]===void 0){var L=p.constraintrange;T[E]=L||null}var x=t._fullData[s[v]].dimensions[_];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[E]=k,t.emit(\"plotly_restyle\",[C,[l[v]]])},f=function(v){t.emit(\"plotly_hover\",v)},h=function(v){t.emit(\"plotly_unhover\",v)},d=function(v,_){var b=iHt(_,o[v].filter(HUe));a[v].sort(b),o[v].filter(function(p){return!HUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit(\"plotly_restyle\",[{dimensions:[a[v]]},[l[v]]])};tHt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};WK.reglPrecompiled=WUe});var YUe=ye(Vk=>{\"use strict\";var ZUe=Oa(),nHt=Id().getModuleCalcData,aHt=XK(),oHt=Wp();Vk.name=\"parcoords\";Vk.plot=function(e){var t=nHt(e.calcdata,\"parcoords\")[0];t.length&&aHt(e,t)};Vk.clean=function(e,t,r,n){var i=n._has&&n._has(\"parcoords\"),a=t._has&&t._has(\"parcoords\");i&&!a&&(n._paperdiv.selectAll(\".parcoords\").remove(),n._glimages.selectAll(\"*\").remove())};Vk.toSVG=function(e){var t=e._fullLayout._glimages,r=ZUe.select(e).selectAll(\".svg-container\"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\");function i(){var a=this,o=a.toDataURL(\"image/png\"),s=t.append(\"svg:image\");s.attr({xmlns:oHt.svg,\"xlink:href\":o,preserveAspectRatio:\"none\",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){ZUe.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")},60)}});var JUe=ye((lxr,KUe)=>{\"use strict\";KUe.exports={attributes:PK(),supplyDefaults:cUe(),calc:hUe(),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcoords\",basePlotModule:YUe(),categories:[\"gl\",\"regl\",\"noOpacity\",\"noHover\"],meta:{}}});var eVe=ye((uxr,QUe)=>{\"use strict\";var $Ue=JUe();$Ue.plot=XK();QUe.exports=$Ue});var rVe=ye((cxr,tVe)=>{\"use strict\";tVe.exports=eVe()});var ZK=ye((fxr,sVe)=>{\"use strict\";var nVe=Ao().extendFlat,sHt=Gl(),iVe=ec(),lHt=Tu(),{hovertemplateAttrs:aVe,templatefallbackAttrs:oVe}=Ll(),uHt=Cc().attributes,cHt=nVe({editType:\"calc\"},lHt(\"line\",{editTypeOverride:\"calc\"}),{shape:{valType:\"enumerated\",values:[\"linear\",\"hspline\"],dflt:\"linear\",editType:\"plot\"},hovertemplate:aVe({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\"]}),hovertemplatefallback:oVe({editType:\"plot\"})});sVe.exports={domain:uHt({name:\"parcats\",trace:!0,editType:\"calc\"}),hoverinfo:nVe({},sHt.hoverinfo,{flags:[\"count\",\"probability\"],editType:\"plot\",arrayOk:!1}),hoveron:{valType:\"enumerated\",values:[\"category\",\"color\",\"dimension\"],dflt:\"category\",editType:\"plot\"},hovertemplate:aVe({editType:\"plot\",arrayOk:!1},{keys:[\"count\",\"probability\",\"category\",\"categorycount\",\"colorcount\",\"bandcolorcount\"]}),hovertemplatefallback:oVe({editType:\"plot\"}),arrangement:{valType:\"enumerated\",values:[\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"perpendicular\",editType:\"plot\"},bundlecolors:{valType:\"boolean\",dflt:!0,editType:\"plot\"},sortpaths:{valType:\"enumerated\",values:[\"forward\",\"backward\"],dflt:\"forward\",editType:\"plot\"},labelfont:iVe({editType:\"calc\"}),tickfont:iVe({autoShadowDflt:!0,editType:\"calc\"}),dimensions:{_isLinkedToArray:\"dimension\",label:{valType:\"string\",editType:\"calc\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},values:{valType:\"data_array\",dflt:[],editType:\"calc\"},displayindex:{valType:\"integer\",editType:\"calc\"},editType:\"calc\",visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"}},line:cHt,counts:{valType:\"number\",min:0,dflt:1,arrayOk:!0,editType:\"calc\"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var cVe=ye((hxr,uVe)=>{\"use strict\";var M5=Dr(),fHt=pv().hasColorscale,hHt=td(),dHt=Cc().defaults,vHt=Zd(),lVe=ZK(),pHt=Iz(),gHt=vv().isTypedArraySpec;function mHt(e,t,r,n,i){i(\"line.shape\"),i(\"line.hovertemplate\"),i(\"line.hovertemplatefallback\");var a=i(\"line.color\",n.colorway[0]);if(fHt(e,\"line\")&&M5.isArrayOrTypedArray(a)){if(a.length)return i(\"line.colorscale\"),hHt(e,t,n,i,{prefix:\"line.\",cLetter:\"c\"}),a.length;t.line.color=r}return 1/0}function yHt(e,t){function r(u,c){return M5.coerce(e,t,lVe.dimensions,u,c)}var n=r(\"values\"),i=r(\"visible\");if(n&&n.length||(i=t.visible=!1),i){r(\"label\"),r(\"displayindex\",t._index);var a=e.categoryarray,o=M5.isArrayOrTypedArray(a)&&a.length>0||gHt(a),s;o&&(s=\"array\");var l=r(\"categoryorder\",s);l===\"array\"?(r(\"categoryarray\"),r(\"ticktext\")):(delete e.categoryarray,delete e.ticktext),!o&&l===\"array\"&&(t.categoryorder=\"trace\")}}uVe.exports=function(t,r,n,i){function a(u,c){return M5.coerce(t,r,lVe,u,c)}var o=vHt(t,r,{name:\"dimensions\",handleItemDefaults:yHt}),s=mHt(t,r,n,i,a);dHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),pHt(r,o,\"values\",s),a(\"hoveron\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"arrangement\"),a(\"bundlecolors\"),a(\"sortpaths\"),a(\"counts\");var l=i.font;M5.coerceFont(a,\"labelfont\",l,{overrideDflt:{size:Math.round(l.size)}}),M5.coerceFont(a,\"tickfont\",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var hVe=ye((dxr,fVe)=>{\"use strict\";var _Ht=iy().wrap,xHt=pv().hasColorscale,bHt=gv(),wHt=tq(),THt=So(),Gk=Dr(),AHt=Eo();fVe.exports=function(t,r){var n=Gk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder===\"trace\")P=null;else if(g.categoryorder===\"array\")P=g.categoryarray;else{P=wHt(g.values);for(var A=!0,z=0;z<P.length;z++)if(!AHt(P[z])){A=!1;break}P.sort(A?Gk.sorterAsc:void 0),g.categoryorder===\"category descending\"&&(P=P.reverse())}return PHt(g.values,P)}),a,o,s;Gk.isArrayOrTypedArray(r.counts)?a=r.counts:a=[r.counts],IHt(n),n.forEach(function(g,P){RHt(g,i[P])});var l=r.line,u;l?(xHt(r,\"line\")&&bHt(t,r,{vals:r.line.color,containerStr:\"line\",cLetter:\"c\"}),u=THt.tryColorscale(l)):u=Gk.identity;function c(g){var P,A;return Gk.isArrayOrTypedArray(l.color)?(P=l.color[g%l.color.length],A=P):P=l.color,{color:u(P),rawColor:A}}var f=n[0].values.length,h={},d=i.map(function(g){return g.inds});s=0;var v,_;for(v=0;v<f;v++){var b=[];for(_=0;_<d.length;_++)b.push(d[_][v]);o=a[v%a.length],s+=o;var p=c(v),k=b+\"-\"+p.rawColor;h[k]===void 0&&(h[k]=CHt(b,p.color,p.rawColor)),LHt(h[k],v,o)}var E=n.map(function(g,P){return MHt(P,g._index,g._displayindex,g.label,s)});for(v=0;v<f;v++)for(o=a[v%a.length],_=0;_<E.length;_++){var T=E[_].containerInd,L=i[_].inds[v],x=E[_].categories;if(x[L]===void 0){var C=r.dimensions[T]._categoryarray[L],M=r.dimensions[T]._ticktext[L];x[L]=EHt(_,L,C,M)}kHt(x[L],v,o)}return _Ht(SHt(E,h,s))};function SHt(e,t,r){var n=e.map(function(i){return i.categories.length}).reduce(function(i,a){return Math.max(i,a)});return{dimensions:e,paths:t,trace:void 0,maxCats:n,count:r}}function MHt(e,t,r,n,i){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:n,count:i,categories:[],dragX:null}}function EHt(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function kHt(e,t,r){e.valueInds.push(t),e.count+=r}function CHt(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function LHt(e,t,r){e.valueInds.push(t),e.count+=r}function PHt(e,t){t==null?t=[]:t=t.map(function(u){return u});var r={},n={},i=[];t.forEach(function(u,c){r[u]=0,n[u]=c});for(var a=0;a<e.length;a++){var o=e[a],s;r[o]===void 0?(r[o]=1,s=t.push(o)-1,n[o]=s):(r[o]++,s=n[o]),i.push(s)}var l=t.map(function(u){return r[u]});return{uniqueValues:t,uniqueCounts:l,inds:i}}function IHt(e){var t=e.map(function(n){return n.displayindex}),r;if(DHt(t))for(r=0;r<e.length;r++)e[r]._displayindex=e[r].displayindex;else for(r=0;r<e.length;r++)e[r]._displayindex=r}function RHt(e,t){e._categoryarray=t.uniqueValues,e.ticktext===null||e.ticktext===void 0?e._ticktext=[]:e._ticktext=e.ticktext.slice();for(var r=e._ticktext.length;r<t.uniqueValues.length;r++)e._ticktext.push(t.uniqueValues[r])}function DHt(e){for(var t=new Array(e.length),r=0;r<e.length;r++){if(e[r]<0||e[r]>=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var bVe=ye((vxr,xVe)=>{\"use strict\";var Fl=Oa(),FHt=(H2(),pb(G2)).interpolateNumber,zHt=ZP(),Wk=vf(),Ex=Dr(),Hk=Ex.strTranslate,dVe=So(),YK=fd(),OHt=Zl();function qHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(QHt.bind(0,t,r)),o=n.selectAll(\"g.parcatslayer\").data([null]);o.enter().append(\"g\").attr(\"class\",\"parcatslayer\").style(\"pointer-events\",i?\"none\":\"all\");var s=o.selectAll(\"g.trace.parcats\").data(a,g1),l=s.enter().append(\"g\").attr(\"class\",\"trace parcats\");s.attr(\"transform\",function(k){return Hk(k.x,k.y)}),l.append(\"g\").attr(\"class\",\"paths\");var u=s.select(\"g.paths\"),c=u.selectAll(\"path.path\").data(function(k){return k.paths},g1);c.attr(\"fill\",function(k){return k.model.color});var f=c.enter().append(\"path\").attr(\"class\",\"path\").attr(\"stroke-opacity\",0).attr(\"fill\",function(k){return k.model.color}).attr(\"fill-opacity\",0);$K(f),c.attr(\"d\",function(k){return k.svgD}),f.empty()||c.sort(KK),c.exit().remove(),c.on(\"mouseover\",BHt).on(\"mouseout\",NHt).on(\"click\",UHt),l.append(\"g\").attr(\"class\",\"dimensions\");var h=s.select(\"g.dimensions\"),d=h.selectAll(\"g.dimension\").data(function(k){return k.dimensions},g1);d.enter().append(\"g\").attr(\"class\",\"dimension\"),d.attr(\"transform\",function(k){return Hk(k.x,0)}),d.exit().remove();var v=d.selectAll(\"g.category\").data(function(k){return k.categories},g1),_=v.enter().append(\"g\").attr(\"class\",\"category\");v.attr(\"transform\",function(k){return Hk(0,k.y)}),_.append(\"rect\").attr(\"class\",\"catrect\").attr(\"pointer-events\",\"none\"),v.select(\"rect.catrect\").attr(\"fill\",\"none\").attr(\"width\",function(k){return k.width}).attr(\"height\",function(k){return k.height}),pVe(_);var b=v.selectAll(\"rect.bandrect\").data(function(k){return k.bands},g1);b.each(function(){Ex.raiseToTop(this)}),b.attr(\"fill\",function(k){return k.color});var p=b.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"stroke-opacity\",0).attr(\"fill\",function(k){return k.color}).attr(\"fill-opacity\",0);b.attr(\"fill\",function(k){return k.color}).attr(\"width\",function(k){return k.width}).attr(\"height\",function(k){return k.height}).attr(\"y\",function(k){return k.y}).attr(\"cursor\",function(k){return k.parcatsViewModel.arrangement===\"fixed\"?\"default\":k.parcatsViewModel.arrangement===\"perpendicular\"?\"ns-resize\":\"move\"}),eJ(p),b.exit().remove(),_.append(\"text\").attr(\"class\",\"catlabel\").attr(\"pointer-events\",\"none\"),v.select(\"text.catlabel\").attr(\"text-anchor\",function(k){return jk(k)?\"start\":\"end\"}).attr(\"alignment-baseline\",\"middle\").style(\"fill\",\"rgb(0, 0, 0)\").attr(\"x\",function(k){return jk(k)?k.width+5:-5}).attr(\"y\",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){dVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),OHt.convertToTspans(Fl.select(this),t)}),_.append(\"text\").attr(\"class\",\"dimlabel\"),v.select(\"text.dimlabel\").attr(\"text-anchor\",\"middle\").attr(\"alignment-baseline\",\"baseline\").attr(\"cursor\",function(k){return k.parcatsViewModel.arrangement===\"fixed\"?\"default\":\"ew-resize\"}).attr(\"x\",function(k){return k.width/2}).attr(\"y\",-5).text(function(k,E){return E===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){dVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll(\"rect.bandrect\").on(\"mouseover\",ZHt).on(\"mouseout\",YHt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on(\"dragstart\",KHt).on(\"drag\",JHt).on(\"dragend\",$Ht)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll(\"g.paths\").selectAll(\"path.path\"),k.dimensionSelection=Fl.select(this).selectAll(\"g.dimensions\").selectAll(\"g.dimension\")}),s.exit().remove()}xVe.exports=function(e,t,r,n){qHt(r,e,n,t)};function g1(e){return e.key}function jk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function KK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function BHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){Ex.raiseToTop(this),QK(Fl.select(this));var t=Xk(e),r=JK(e);if(e.parcatsViewModel.graphDiv.emit(\"plotly_hover\",{points:t,event:Fl.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf(\"none\")===-1){var n=Fl.mouse(this)[0],i=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=i._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f<e.leftXs.length-1;f++)if(e.leftXs[f]+e.dimWidths[f]-2<=n&&n<=e.leftXs[f+1]+2){var h=e.parcatsViewModel.dimensions[f],d=e.parcatsViewModel.dimensions[f+1];u=(h.x+h.width+d.x)/2,c=(e.topYs[f]+e.topYs[f+1]+e.height)/2;break}var v=e.parcatsViewModel.x+u,_=e.parcatsViewModel.y+c,b=YK.mostReadable(e.model.color,[\"black\",\"white\"]),p=e.model.count,k=p/e.parcatsViewModel.model.count,E={countLabel:p,probabilityLabel:k.toFixed(3)},T=[];e.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&T.push([\"Count:\",E.countLabel].join(\" \")),e.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&T.push([\"P:\",E.probabilityLabel].join(\" \"));var L=T.join(\"<br>\"),x=Fl.mouse(i)[0];Wk.loneHover({trace:a,x:v-s.left+l.left,y:_-s.top+l.top,text:L,color:e.model.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:10,fontColor:b,idealAlign:x<v?\"right\":\"left\",hovertemplate:(a.line||{}).hovertemplate,hovertemplateLabels:E,eventData:[{data:a._input,fullData:a,count:p,probability:k}]},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:i})}}}function NHt(e){if(!e.parcatsViewModel.dragDimension&&($K(Fl.select(this)),Wk.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(KK),e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1)){var t=Xk(e),r=JK(e);e.parcatsViewModel.graphDiv.emit(\"plotly_unhover\",{points:t,event:Fl.event,constraints:r})}}function Xk(e){for(var t=[],r=mVe(e.parcatsViewModel),n=0;n<e.model.valueInds.length;n++){var i=e.model.valueInds[n];t.push({curveNumber:r,pointNumber:i})}return t}function JK(e){for(var t={},r=e.parcatsViewModel.model.dimensions,n=0;n<r.length;n++){var i=r[n],a=i.categories[e.model.categoryInds[n]];t[i.containerInd]=a.categoryValue}return e.model.rawColor!==void 0&&(t.color=e.model.rawColor),t}function UHt(e){if(e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){var t=Xk(e),r=JK(e);e.parcatsViewModel.graphDiv.emit(\"plotly_click\",{points:t,event:Fl.event,constraints:r})}}function $K(e){e.attr(\"fill\",function(t){return t.model.color}).attr(\"fill-opacity\",.6).attr(\"stroke\",\"lightgray\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1)}function QK(e){e.attr(\"fill-opacity\",.8).attr(\"stroke\",function(t){return YK.mostReadable(t.model.color,[\"black\",\"white\"])}).attr(\"stroke-width\",.3)}function VHt(e){e.select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",2.5)}function pVe(e){e.select(\"rect.catrect\").attr(\"stroke\",\"black\").attr(\"stroke-width\",1).attr(\"stroke-opacity\",1)}function GHt(e){e.attr(\"stroke\",\"black\").attr(\"stroke-width\",1.5)}function eJ(e){e.attr(\"stroke\",\"black\").attr(\"stroke-width\",.2).attr(\"stroke-opacity\",1).attr(\"fill-opacity\",1)}function Zz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(i){return i.model.categoryInds[r]===n&&i.model.color===e.color})}function HHt(e){var t=Fl.select(e.parentNode).selectAll(\"rect.bandrect\");t.each(function(r){var n=Zz(r);QK(n),n.each(function(){Ex.raiseToTop(this)})}),VHt(Fl.select(e.parentNode))}function jHt(e){var t=Fl.select(e).datum(),r=Zz(t);QK(r),r.each(function(){Ex.raiseToTop(this)}),Fl.select(e.parentNode).selectAll(\"rect.bandrect\").filter(function(n){return n.color===t.color}).each(function(){Ex.raiseToTop(this),GHt(Fl.select(this))})}function tJ(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Fl.select(e.parentNode).selectAll(\"rect.bandrect\"),s=[];o.each(function(u){var c=Zz(u);c.each(function(f){Array.prototype.push.apply(s,Xk(f))})});var l={};l[i.dimensionInd]=i.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function rJ(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Zz(n),s=[];o.each(function(u){Array.prototype.push.apply(s,Xk(u))});var l={};l[i.dimensionInd]=i.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function gVe(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=Fl.select(r.parentNode).select(\"rect.catrect\"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,d=\"left\"):(h=o.left+o.width,d=\"right\");var v=s.model.count,_=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:_,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&k.push([\"Count:\",p.countLabel].join(\" \")),s.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&k.push([\"P(\"+p.categoryLabel+\"):\",p.probabilityLabel].join(\" \"));var E=k.join(\"<br>\");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:E,color:\"lightgray\",borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontSize:12,fontColor:\"black\",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:_,probability:b}]}}function WHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll(\"g.category\").select(\"rect.catrect\").each(function(){var i=this;n.push(gVe(e,t,i))}),n}function XHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d=\"left\"):(h=a.left+a.width,d=\"right\");var v=s.model.categoryLabel,_=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var E=b/_,T=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:E.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf(\"count\")!==-1&&C.push([\"Count:\",x.countLabel].join(\" \")),s.parcatsViewModel.hoverinfoItems.indexOf(\"probability\")!==-1&&(C.push(\"P(color \\u2229 \"+v+\"): \"+x.probabilityLabel),C.push(\"P(\"+v+\" | color): \"+T.toFixed(3)),C.push(\"P(color | \"+v+\"): \"+L.toFixed(3)));var M=C.join(\"<br>\"),g=YK.mostReadable(o.color,[\"black\",\"white\"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:o.color,borderColor:\"black\",fontFamily:'Monaco, \"Courier New\", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:_,probability:E,categorycount:p,colorcount:k,bandcolorcount:b}]}}function ZHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a===\"color\"?(jHt(o),rJ(o,\"plotly_hover\",Fl.event)):(HHt(o),tJ(o,\"plotly_hover\",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf(\"none\")===-1){var s;a===\"category\"?s=gVe(r,i,o):a===\"color\"?s=XHt(r,i,o):a===\"dimension\"&&(s=WHt(r,i,o)),s&&Wk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function YHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&($K(t.pathSelection),pVe(t.dimensionSelection.selectAll(\"g.category\")),eJ(t.dimensionSelection.selectAll(\"g.category\").selectAll(\"rect.bandrect\")),Wk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(KK),t.hoverinfoItems.indexOf(\"skip\")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r===\"color\"?rJ(n,\"plotly_unhover\",Fl.event):tJ(n,\"plotly_unhover\",Fl.event)}}function KHt(e){e.parcatsViewModel.arrangement!==\"fixed\"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll(\"g.category\").select(\"rect.catrect\").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,Ex.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll(\"rect.bandrect\").each(function(i){i.y<n&&n<=i.y+i.height&&(e.potentialClickBand=this)}))}),e.parcatsViewModel.dragDimension=e,Wk.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function JHt(e){if(e.parcatsViewModel.arrangement!==\"fixed\"&&(e.dragHasMoved=!0,e.dragDimensionDisplayInd!==null)){var t=e.dragDimensionDisplayInd,r=t-1,n=t+1,i=e.parcatsViewModel.dimensions[t];if(e.dragCategoryDisplayInd!==null){var a=i.categories[e.dragCategoryDisplayInd];a.model.dragY+=Fl.event.dy;var o=a.model.dragY,s=a.model.displayInd,l=i.categories,u=l[s-1],c=l[s+1];u!==void 0&&o<u.y+u.height/2&&(a.model.displayInd=u.model.displayInd,u.model.displayInd=s),c!==void 0&&o+a.height>c.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement===\"freeform\"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragX<f.x+f.width&&(i.model.displayInd=f.model.displayInd,f.model.displayInd=t),h!==void 0&&i.model.dragX+i.width>h.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}nJ(e.parcatsViewModel),iJ(e.parcatsViewModel),_Ve(e.parcatsViewModel),yVe(e.parcatsViewModel)}}function $Ht(e){if(e.parcatsViewModel.arrangement!==\"fixed\"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll(\"text\").attr(\"font-weight\",\"normal\");var t={},r=mVe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t[\"dimensions[\"+v+\"].displayindex\"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t[\"dimensions[\"+e.model.containerInd+\"].categoryarray\"]=[l],t[\"dimensions[\"+e.model.containerInd+\"].ticktext\"]=[u],t[\"dimensions[\"+e.model.containerInd+\"].categoryorder\"]=\"array\"}}if(e.parcatsViewModel.hoverinfoItems.indexOf(\"skip\")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron===\"color\"?rJ(e.potentialClickBand,\"plotly_click\",Fl.event.sourceEvent):tJ(e.potentialClickBand,\"plotly_click\",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,nJ(e.parcatsViewModel),iJ(e.parcatsViewModel);var f=Fl.transition().duration(300).ease(\"cubic-in-out\");f.each(function(){_Ve(e.parcatsViewModel,!0),yVe(e.parcatsViewModel,!0)}).each(\"end\",function(){(i||a)&&zHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function mVe(e){for(var t,r=e.graphDiv._fullData,n=0;n<r.length;n++)if(e.key===r[n].uid){t=n;break}return t}function yVe(e,t){t===void 0&&(t=!1);function r(n){return t?n.transition():n}e.pathSelection.data(function(n){return n.paths},g1),r(e.pathSelection).attr(\"d\",function(n){return n.svgD})}function _Ve(e,t){t===void 0&&(t=!1);function r(l){return t?l.transition():l}e.dimensionSelection.data(function(l){return l.dimensions},g1);var n=e.dimensionSelection.selectAll(\"g.category\").data(function(l){return l.categories},g1);r(e.dimensionSelection).attr(\"transform\",function(l){return Hk(l.x,0)}),r(n).attr(\"transform\",function(l){return Hk(0,l.y)});var i=n.select(\".dimlabel\");i.text(function(l,u){return u===0?l.parcatsViewModel.model.dimensions[l.model.dimensionInd].dimensionLabel:null});var a=n.select(\".catlabel\");a.attr(\"text-anchor\",function(l){return jk(l)?\"start\":\"end\"}).attr(\"x\",function(l){return jk(l)?l.width+5:-5}).each(function(l){var u,c;jk(l)?(u=l.width+5,c=\"start\"):(u=-5,c=\"end\"),Fl.select(this).selectAll(\"tspan\").attr(\"x\",u).attr(\"text-anchor\",c)});var o=n.selectAll(\"rect.bandrect\").data(function(l){return l.bands},g1),s=o.enter().append(\"rect\").attr(\"class\",\"bandrect\").attr(\"cursor\",\"move\").attr(\"stroke-opacity\",0).attr(\"fill\",function(l){return l.color}).attr(\"fill-opacity\",0);o.attr(\"fill\",function(l){return l.color}).attr(\"width\",function(l){return l.width}).attr(\"height\",function(l){return l.height}).attr(\"y\",function(l){return l.y}),eJ(s),o.each(function(){Ex.raiseToTop(this)}),o.exit().remove()}function QHt(e,t,r){var n=r[0],i=t.margin||{l:80,r:80,t:100,b:80},a=n.trace,o=a.domain,s=t.width,l=t.height,u=Math.floor(s*(o.x[1]-o.x[0])),c=Math.floor(l*(o.y[1]-o.y[0])),f=o.x[0]*s+i.l,h=t.height-o.y[1]*t.height+i.t,d=a.line.shape,v;a.hoverinfo===\"all\"?v=[\"count\",\"probability\"]:v=(a.hoverinfo||\"\").split(\"+\");var _={trace:a,key:a.uid,model:n,x:f,y:h,width:u,height:c,hoveron:a.hoveron,hoverinfoItems:v,arrangement:a.arrangement,bundlecolors:a.bundlecolors,sortpaths:a.sortpaths,labelfont:a.labelfont,categorylabelfont:a.tickfont,pathShape:d,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return n.dimensions&&(nJ(_),iJ(_)),_}function vVe(e,t,r,n,i){var a=[],o=[],s,l;for(l=0;l<r.length-1;l++)s=FHt(r[l]+e[l],e[l+1]),a.push(s(i)),o.push(s(1-i));var u=\"M \"+e[0]+\",\"+t[0];for(u+=\"l\"+r[0]+\",0 \",l=1;l<r.length;l++)u+=\"C\"+a[l-1]+\",\"+t[l-1]+\" \"+o[l-1]+\",\"+t[l]+\" \"+e[l]+\",\"+t[l],u+=\"l\"+r[l]+\",0 \";for(u+=\"l0,\"+n+\" \",u+=\"l -\"+r[r.length-1]+\",0 \",l=r.length-2;l>=0;l--)u+=\"C\"+o[l]+\",\"+(t[l+1]+n)+\" \"+a[l]+\",\"+(t[l]+n)+\" \"+(e[l]+r[l])+\",\"+(t[l]+n),u+=\"l-\"+r[l]+\",0 \";return u+=\"Z\",u}function iJ(e){var t=e.dimensions,r=e.model,n=t.map(function(O){return O.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(O){return O.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(O){return O.displayInd}),o=e.dimensions.map(function(O){return O.model.dimensionInd}),s=t.map(function(O){return O.x}),l=t.map(function(O){return O.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(O){var U=O.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return U[Z]});return G}u.sort(function(O,U){var G=f(O),Z=f(U);return e.sortpaths===\"backward\"&&(G.reverse(),Z.reverse()),G.push(O.valueInds[0]),Z.push(U.valueInds[0]),e.bundlecolors&&(G.unshift(O.rawColor),Z.unshift(U.rawColor)),G<Z?-1:G>Z?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(O){return O.height}).reduce(function(O,U){return O+U}),_=0;_<u.length;_++){var b=u[_],p;d>0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),E=0;E<b.categoryInds.length;E++){var T=b.categoryInds[E],L=i[E][T],x=a[E];k[x]=n[x][L],n[x][L]+=p;var C=e.dimensions[x].categories[L],M=C.bands.length,g=C.bands[M-1];if(g===void 0||b.rawColor!==g.rawColor){var P=g===void 0?0:g.y+g.height;C.bands.push({key:P,color:b.color,rawColor:b.rawColor,height:p,width:C.width,count:b.count,y:P,categoryViewModel:C,parcatsViewModel:e})}else{var A=C.bands[M-1];A.height+=p,A.count+=b.count}}var z;e.pathShape===\"hspline\"?z=vVe(s,k,l,p,.5):z=vVe(s,k,l,p,0),h[_]={key:b.valueInds[0],model:b,height:p,leftXs:s,topYs:k,dimWidths:l,svgD:z,parcatsViewModel:e}}e.paths=h}function nJ(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var i=t[n].dimensionInd,a=e.model.dimensions[i];r.push(ejt(e,a))}e.dimensions=r}function ejt(e,t){var r=40,n=16,i=e.model.dimensions.length,a=t.displayInd,o,s,l;i>1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),_,b,p,k,E,T=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),E=0;E<f;E++)k=L[E].categoryInd,b=t.categories[k],d>0?_=b.count/d*v:_=0,p={key:b.valueInds[0],model:b,width:n,height:_,y:b.dragY!==null?b.dragY:T,bands:[],parcatsViewModel:e},T=T+_+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var aJ=ye((pxr,wVe)=>{\"use strict\";var tjt=bVe();wVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;tjt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var AVe=ye(Yz=>{\"use strict\";var rjt=Id().getModuleCalcData,ijt=aJ(),TVe=\"parcats\";Yz.name=TVe;Yz.plot=function(e,t,r,n){var i=rjt(e.calcdata,TVe);if(i.length){var a=i[0];ijt(e,a,r,n)}};Yz.clean=function(e,t,r,n){var i=n._has&&n._has(\"parcats\"),a=t._has&&t._has(\"parcats\");i&&!a&&n._paperdiv.selectAll(\".parcats\").remove()}});var MVe=ye((mxr,SVe)=>{\"use strict\";SVe.exports={attributes:ZK(),supplyDefaults:cVe(),calc:hVe(),plot:aJ(),colorbar:{container:\"line\",min:\"cmin\",max:\"cmax\"},moduleType:\"trace\",name:\"parcats\",basePlotModule:AVe(),categories:[\"noOpacity\"],meta:{}}});var kVe=ye((yxr,EVe)=>{\"use strict\";EVe.exports=MVe()});var m1=ye((_xr,FVe)=>{\"use strict\";var njt=t_(),CVe=\"1.13.4\",RVe='\\xA9 <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',LVe=['\\xA9 <a target=\"_blank\" href=\"https://carto.com/\">Carto</a>',RVe].join(\" \"),PVe=['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">ODbL</a>'].join(\" \"),ajt=['Map tiles by <a target=\"_blank\" href=\"https://stamen.com\">Stamen Design</a>','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>',\"|\",'Data by <a target=\"_blank\" href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors','under <a target=\"_blank\" href=\"https://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>'].join(\" \"),DVe={\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:RVe,tiles:[\"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png\",\"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-positron\":{id:\"carto-positron\",version:8,sources:{\"plotly-carto-positron\":{type:\"raster\",attribution:LVe,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-positron\",type:\"raster\",source:\"plotly-carto-positron\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-darkmatter\":{id:\"carto-darkmatter\",version:8,sources:{\"plotly-carto-darkmatter\":{type:\"raster\",attribution:LVe,tiles:[\"https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-carto-darkmatter\",type:\"raster\",source:\"plotly-carto-darkmatter\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-terrain\":{id:\"stamen-terrain\",version:8,sources:{\"plotly-stamen-terrain\":{type:\"raster\",attribution:PVe,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-terrain\",type:\"raster\",source:\"plotly-stamen-terrain\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-toner\":{id:\"stamen-toner\",version:8,sources:{\"plotly-stamen-toner\":{type:\"raster\",attribution:PVe,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-toner\",type:\"raster\",source:\"plotly-stamen-toner\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"stamen-watercolor\":{id:\"stamen-watercolor\",version:8,sources:{\"plotly-stamen-watercolor\":{type:\"raster\",attribution:ajt,tiles:[\"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key=\"],tileSize:256}},layers:[{id:\"plotly-stamen-watercolor\",type:\"raster\",source:\"plotly-stamen-watercolor\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"}},IVe=njt(DVe);FVe.exports={requiredVersion:CVe,styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",styleValuesMapbox:[\"basic\",\"streets\",\"outdoors\",\"light\",\"dark\",\"satellite\",\"satellite-streets\"],styleValueDflt:\"basic\",stylesNonMapbox:DVe,styleValuesNonMapbox:IVe,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",wrongVersionErrorMsg:[\"Your custom plotly.js bundle is not using the correct mapbox-gl version\",\"Please install @plotly/mapbox-gl@\"+CVe+\".\"].join(`\n",
       "`),noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\"  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(`\n",
       "`),missingStyleErrorMsg:[\"No valid mapbox style found, please set `mapbox.style` to one of:\",IVe.join(\", \"),\"or register a Mapbox access token to use a Mapbox-served style.\"].join(`\n",
       "`),multipleTokensErrorMsg:[\"Set multiple mapbox access token across different mapbox subplot,\",\"using first token found as mapbox-gl does not allow multipleaccess tokens on the same page.\"].join(`\n",
       "`),mapOnErrorMsg:\"Mapbox error.\",mapboxLogo:{path0:\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\",path1:\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\",path2:\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\",polygon:\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34\"},styleRules:{map:\"overflow:hidden;position:relative;\",\"missing-css\":\"display:none;\",canary:\"background-color:salmon;\",\"ctrl-bottom-left\":\"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;\",\"ctrl-bottom-right\":\"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;\",ctrl:\"clear: both; pointer-events: auto; transform: translate(0, 0);\",\"ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner\":\"display: none;\",\"ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner\":\"display: block; margin-top:2px\",\"ctrl-attrib.mapboxgl-compact:hover\":\"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;\",\"ctrl-attrib.mapboxgl-compact::after\":`content: \"\"; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E %3Cpath fill=\"%23333333\" fill-rule=\"evenodd\" d=\"M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0\"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,\"ctrl-attrib.mapboxgl-compact\":\"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;\",\"ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; right: 0\",\"ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after\":\"bottom: 0; left: 0\",\"ctrl-bottom-left .mapboxgl-ctrl\":\"margin: 0 0 10px 10px; float: left;\",\"ctrl-bottom-right .mapboxgl-ctrl\":\"margin: 0 10px 10px 0; float: right;\",\"ctrl-attrib\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a\":\"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px\",\"ctrl-attrib a:hover\":\"color: inherit; text-decoration: underline;\",\"ctrl-attrib .mapbox-improve-map\":\"font-weight: bold; margin-left: 2px;\",\"attrib-empty\":\"display: none;\",\"ctrl-logo\":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version=\"1.0\" encoding=\"utf-8\"?%3E %3Csvg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 21 21\" style=\"enable-background:new 0 0 21 21;\" xml:space=\"preserve\"%3E%3Cg transform=\"translate(0,0.01)\"%3E%3Cpath d=\"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z\" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3Cpath d=\"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpath d=\"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z\" style=\"opacity:0.35;enable-background:new\" class=\"st1\"/%3E%3Cpolygon points=\"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 \" style=\"opacity:0.9;fill:%23ffffff;enable-background:new\" class=\"st0\"/%3E%3C/g%3E%3C/svg%3E')`}}});var Zk=ye((xxr,BVe)=>{\"use strict\";var zVe=Dr(),OVe=ka().defaultLine,ojt=Cc().attributes,sjt=ec(),ljt=pf().textposition,ujt=mc().overrideAll,cjt=vl().templatedArray,oJ=m1(),qVe=sjt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});qVe.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\";var fjt=BVe.exports=ujt({_arrayAttrRegexps:[zVe.counterRegex(\"mapbox\",\".layers\",!0)],domain:ojt({name:\"mapbox\"}),accesstoken:{valType:\"string\",noBlank:!0,strict:!0},style:{valType:\"any\",values:oJ.styleValuesMapbox.concat(oJ.styleValuesNonMapbox),dflt:oJ.styleValueDflt},center:{lon:{valType:\"number\",dflt:0},lat:{valType:\"number\",dflt:0}},zoom:{valType:\"number\",dflt:1},bearing:{valType:\"number\",dflt:0},pitch:{valType:\"number\",dflt:0},bounds:{west:{valType:\"number\"},east:{valType:\"number\"},south:{valType:\"number\"},north:{valType:\"number\"}},layers:cjt(\"layer\",{visible:{valType:\"boolean\",dflt:!0},sourcetype:{valType:\"enumerated\",values:[\"geojson\",\"vector\",\"raster\",\"image\"],dflt:\"geojson\"},source:{valType:\"any\"},sourcelayer:{valType:\"string\",dflt:\"\"},sourceattribution:{valType:\"string\"},type:{valType:\"enumerated\",values:[\"circle\",\"line\",\"fill\",\"symbol\",\"raster\"],dflt:\"circle\"},coordinates:{valType:\"any\"},below:{valType:\"string\"},color:{valType:\"color\",dflt:OVe},opacity:{valType:\"number\",min:0,max:1,dflt:1},minzoom:{valType:\"number\",min:0,max:24,dflt:0},maxzoom:{valType:\"number\",min:0,max:24,dflt:24},circle:{radius:{valType:\"number\",dflt:15}},line:{width:{valType:\"number\",dflt:2},dash:{valType:\"data_array\"}},fill:{outlinecolor:{valType:\"color\",dflt:OVe}},symbol:{icon:{valType:\"string\",dflt:\"marker\"},iconsize:{valType:\"number\",dflt:10},text:{valType:\"string\",dflt:\"\"},placement:{valType:\"enumerated\",values:[\"point\",\"line\",\"line-center\"],dflt:\"point\"},textfont:qVe,textposition:zVe.extendFlat({},ljt,{arrayOk:!1})}})},\"plot\",\"from-root\");fjt.uirevision={valType:\"any\",editType:\"none\"}});var Kz=ye((bxr,GVe)=>{\"use strict\";var{hovertemplateAttrs:hjt,texttemplateAttrs:djt,templatefallbackAttrs:NVe}=Ll(),vjt=Pg(),Yk=ew(),E5=pf(),UVe=Zk(),pjt=Gl(),gjt=Tu(),fw=Ao().extendFlat,mjt=mc().overrideAll,yjt=Zk(),VVe=Yk.line,k5=Yk.marker;GVe.exports=mjt({lon:Yk.lon,lat:Yk.lat,cluster:{enabled:{valType:\"boolean\"},maxzoom:fw({},yjt.layers.maxzoom,{}),step:{valType:\"number\",arrayOk:!0,dflt:-1,min:-1},size:{valType:\"number\",arrayOk:!0,dflt:20,min:0},color:{valType:\"color\",arrayOk:!0},opacity:fw({},k5.opacity,{dflt:1})},mode:fw({},E5.mode,{dflt:\"markers\"}),text:fw({},E5.text,{}),texttemplate:djt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"text\"]}),texttemplatefallback:NVe({editType:\"plot\"}),hovertext:fw({},E5.hovertext,{}),line:{color:VVe.color,width:VVe.width},connectgaps:E5.connectgaps,marker:fw({symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},angle:{valType:\"number\",dflt:\"auto\",arrayOk:!0},allowoverlap:{valType:\"boolean\",dflt:!1},opacity:k5.opacity,size:k5.size,sizeref:k5.sizeref,sizemin:k5.sizemin,sizemode:k5.sizemode},gjt(\"marker\")),fill:Yk.fill,fillcolor:vjt(),textfont:UVe.layers.symbol.textfont,textposition:UVe.layers.symbol.textposition,below:{valType:\"string\"},selected:{marker:E5.selected.marker},unselected:{marker:E5.unselected.marker},hoverinfo:fw({},pjt.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]}),hovertemplate:hjt(),hovertemplatefallback:NVe()},\"calc\",\"nested\")});var sJ=ye((wxr,HVe)=>{\"use strict\";var _jt=[\"Metropolis Black Italic\",\"Metropolis Black\",\"Metropolis Bold Italic\",\"Metropolis Bold\",\"Metropolis Extra Bold Italic\",\"Metropolis Extra Bold\",\"Metropolis Extra Light Italic\",\"Metropolis Extra Light\",\"Metropolis Light Italic\",\"Metropolis Light\",\"Metropolis Medium Italic\",\"Metropolis Medium\",\"Metropolis Regular Italic\",\"Metropolis Regular\",\"Metropolis Semi Bold Italic\",\"Metropolis Semi Bold\",\"Metropolis Thin Italic\",\"Metropolis Thin\",\"Open Sans Bold Italic\",\"Open Sans Bold\",\"Open Sans Extrabold Italic\",\"Open Sans Extrabold\",\"Open Sans Italic\",\"Open Sans Light Italic\",\"Open Sans Light\",\"Open Sans Regular\",\"Open Sans Semibold Italic\",\"Open Sans Semibold\",\"Klokantech Noto Sans Bold\",\"Klokantech Noto Sans CJK Bold\",\"Klokantech Noto Sans CJK Regular\",\"Klokantech Noto Sans Italic\",\"Klokantech Noto Sans Regular\"];HVe.exports={isSupportedFont:function(e){return _jt.indexOf(e)!==-1}}});var XVe=ye((Txr,WVe)=>{\"use strict\";var Kk=Dr(),lJ=Ru(),xjt=$p(),bjt=D0(),wjt=F0(),Tjt=Fg(),jVe=Kz(),Ajt=sJ().isSupportedFont;WVe.exports=function(t,r,n,i){function a(p,k){return Kk.coerce(t,r,jVe,p,k)}function o(p,k){return Kk.coerce2(t,r,jVe,p,k)}var s=Sjt(t,r,a);if(!s){r.visible=!1;return}if(a(\"text\"),a(\"texttemplate\"),a(\"texttemplatefallback\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"mode\"),a(\"below\"),lJ.hasMarkers(r)){xjt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a(\"marker.allowoverlap\"),a(\"marker.angle\");var l=r.marker;l.symbol!==\"circle\"&&(Kk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Kk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}lJ.hasLines(r)&&(bjt(t,r,n,i,a,{noDash:!0}),a(\"connectgaps\"));var u=o(\"cluster.maxzoom\"),c=o(\"cluster.step\"),f=o(\"cluster.color\",r.marker&&r.marker.color||n),h=o(\"cluster.size\"),d=o(\"cluster.opacity\"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a(\"cluster.enabled\",v);if(_||lJ.hasText(r)){var b=i.font.family;wjt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:Ajt(b)?b:\"Open Sans Regular\",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a(\"fill\"),r.fill!==\"none\"&&Tjt(t,r,n,a),Kk.coerceSelectionMarkerOpacity(r,a)};function Sjt(e,t,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var uJ=ye((Axr,YVe)=>{\"use strict\";var ZVe=ho();YVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=ZVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=ZVe.tickText(o,o.c2l(s[1]),!0).text,i}});var cJ=ye((Sxr,JVe)=>{\"use strict\";var KVe=Dr();JVe.exports=function(t,r){var n=t.split(\" \"),i=n[0],a=n[1],o=KVe.isArrayOrTypedArray(r)?KVe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=[\"\",\"\"],c=[0,0];switch(i){case\"top\":u[0]=\"top\",c[1]=-l;break;case\"bottom\":u[0]=\"bottom\",c[1]=l;break}switch(a){case\"left\":u[1]=\"right\",c[0]=-s;break;case\"right\":u[1]=\"left\",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join(\"-\"):u[0]?f=u[0]:u[1]?f=u[1]:f=\"center\",{anchor:f,offset:c}}});var iGe=ye((Mxr,rGe)=>{\"use strict\";var eGe=Eo(),av=Dr(),Mjt=fs().BADNUM,$z=cx(),$Ve=tc(),Ejt=So(),kjt=O3(),Qz=Ru(),Cjt=sJ().isSupportedFont,Ljt=cJ(),Pjt=ip().appendArrayPointValue,Ijt=Zl().NEWLINES,Rjt=Zl().BR_TAG_ALL;rGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!==\"none\",o=Qz.hasLines(n),s=Qz.hasMarkers(n),l=Qz.hasText(n),u=s&&n.marker.symbol===\"circle\",c=s&&n.marker.symbol!==\"circle\",f=n.cluster&&n.cluster.enabled,h=Jz(\"fill\"),d=Jz(\"line\"),v=Jz(\"circle\"),_=Jz(\"symbol\"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=$z.calcTraceToLineCoords(r)),a&&(h.geojson=$z.makePolygon(p),h.layout.visibility=\"visible\",av.extendFlat(h.paint,{\"fill-color\":n.fillcolor})),o&&(d.geojson=$z.makeLine(p),d.layout.visibility=\"visible\",av.extendFlat(d.paint,{\"line-width\":n.line.width,\"line-color\":n.line.color,\"line-opacity\":n.opacity})),u){var k=Djt(r);v.geojson=k.geojson,v.layout.visibility=\"visible\",f&&(v.filter=[\"!\",[\"has\",\"point_count\"]],b.cluster={type:\"circle\",filter:[\"has\",\"point_count\"],layout:{visibility:\"visible\"},paint:{\"circle-color\":hJ(n.cluster.color,n.cluster.step),\"circle-radius\":hJ(n.cluster.size,n.cluster.step),\"circle-opacity\":hJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:\"symbol\",filter:[\"has\",\"point_count\"],paint:{},layout:{\"text-field\":\"{point_count_abbreviated}\",\"text-font\":QVe(n),\"text-size\":12}}),av.extendFlat(v.paint,{\"circle-color\":k.mcc,\"circle-radius\":k.mrc,\"circle-opacity\":k.mo})}if(u&&f&&(v.filter=[\"!\",[\"has\",\"point_count\"]]),(c||l)&&(_.geojson=Fjt(r,t),av.extendFlat(_.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),c&&(av.extendFlat(_.layout,{\"icon-size\":n.marker.size/10}),\"angle\"in n.marker&&n.marker.angle!==\"auto\"&&av.extendFlat(_.layout,{\"icon-rotate\":{type:\"identity\",property:\"angle\"},\"icon-rotation-alignment\":\"map\"}),_.layout[\"icon-allow-overlap\"]=n.marker.allowoverlap,av.extendFlat(_.paint,{\"icon-opacity\":n.opacity*n.marker.opacity,\"icon-color\":n.marker.color})),l)){var E=(n.marker||{}).size,T=Ljt(n.textposition,E);av.extendFlat(_.layout,{\"text-size\":n.textfont.size,\"text-anchor\":T.anchor,\"text-offset\":T.offset,\"text-font\":QVe(n)}),av.extendFlat(_.paint,{\"text-color\":n.textfont.color,\"text-opacity\":n.opacity})}return b};function Jz(e){return{type:e,geojson:$z.makeBlank(),layout:{visibility:\"none\"},filter:null,paint:{}}}function Djt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&($Ve.hasColorscale(t,\"marker\")?c=$Ve.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=kjt(t));var h;o&&(h=function(E){var T=eGe(E)?+av.constrain(E,0,1):0;return l(T)});var d=[];for(s=0;s<e.length;s++){var v=e[s],_=v.lonlat;if(!tGe(_)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:\"Feature\",id:s+1,geometry:{type:\"Point\",coordinates:_},properties:b})}}var p;if(n)for(p=Ejt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;p.selectedOpacityFn&&(k.mo=l(p.selectedOpacityFn(k))),p.selectedColorFn&&(k.mcc=p.selectedColorFn(k)),p.selectedSizeFn&&(k.mrc=p.selectedSizeFn(k))}return{geojson:{type:\"FeatureCollection\",features:d},mcc:i||p&&p.selectedColorFn?{type:\"identity\",property:\"mcc\"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:\"identity\",property:\"mrc\"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:\"identity\",property:\"mo\"}:l(r.opacity)}}function Fjt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!==\"circle\"?fJ(a):e7,l=o!==\"auto\"?fJ(o,!0):e7,u=Qz.hasText(n)?fJ(n.text):e7,c=[],f=0;f<e.length;f++){var h=e[f];if(!tGe(h.lonlat)){var d=n.texttemplate,v;if(d){var _=Array.isArray(d)?d[f]||\"\":d,b=n._module.formatLabels(h,n,r),p={};Pjt(p,n,h.i),v=av.texttemplateString({data:[p,h,n._meta],fallback:n.texttemplatefallback,labels:b,locale:r._d3locale,template:_})}else v=u(f);v&&(v=v.replace(Ijt,\"\").replace(Rjt,`\n",
       "`)),c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:\"FeatureCollection\",features:c}}function fJ(e,t){return av.isArrayOrTypedArray(e)?t?function(r){return eGe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:e7}function e7(){return\"\"}function tGe(e){return e[0]===Mjt}function hJ(e,t){var r;if(av.isArrayOrTypedArray(e)&&av.isArrayOrTypedArray(t)){r=[\"step\",[\"get\",\"point_count\"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function QVe(e){var t=e.textfont,r=t.family,n=t.style,i=t.weight,a=r.split(\" \"),o=a[a.length-1]===\"Italic\";o&&a.pop(),o=o||n===\"italic\";var s=a.join(\" \");i===\"bold\"&&a.indexOf(\"Bold\")===-1?s+=\" Bold\":i<=1e3&&(a[0]===\"Metropolis\"?(s=\"Metropolis\",i>850?s+=\" Black\":i>750?s+=\" Extra Bold\":i>650?s+=\" Bold\":i>550?s+=\" Semi Bold\":i>450?s+=\" Medium\":i>350?s+=\" Regular\":i>250?s+=\" Light\":i>150?s+=\" Extra Light\":s+=\" Thin\"):a.slice(0,2).join(\" \")===\"Open Sans\"?(s=\"Open Sans\",i>750?s+=\" Extrabold\":i>650?s+=\" Bold\":i>550?s+=\" Semibold\":i>350?s+=\" Regular\":s+=\" Light\"):a.slice(0,3).join(\" \")===\"Klokantech Noto Sans\"&&(s=\"Klokantech Noto Sans\",a[3]===\"CJK\"&&(s+=\" CJK\"),s+=i>500?\" Bold\":\" Regular\")),o&&(s+=\" Italic\"),s===\"Open Sans Regular Italic\"?s=\"Open Sans Italic\":s===\"Open Sans Regular Bold\"?s=\"Open Sans Bold\":s===\"Open Sans Regular Bold Italic\"?s=\"Open Sans Bold Italic\":s===\"Klokantech Noto Sans Regular Italic\"&&(s=\"Klokantech Noto Sans Italic\"),Cjt(s)||(s=r);var l=s.split(\", \");return l}});var sGe=ye((Exr,oGe)=>{\"use strict\";var zjt=Dr(),nGe=iGe(),C5=m1().traceLayerPrefix,ng={cluster:[\"cluster\",\"clusterCount\",\"circle\"],nonCluster:[\"fill\",\"line\",\"circle\",\"symbol\"]};function aGe(e,t,r,n){this.type=\"scattermapbox\",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:\"source-\"+t+\"-fill\",line:\"source-\"+t+\"-line\",circle:\"source-\"+t+\"-circle\",symbol:\"source-\"+t+\"-symbol\",cluster:\"source-\"+t+\"-circle\",clusterCount:\"source-\"+t+\"-circle\"},this.layerIds={fill:C5+t+\"-fill\",line:C5+t+\"-line\",circle:C5+t+\"-circle\",symbol:C5+t+\"-symbol\",cluster:C5+t+\"-cluster\",clusterCount:C5+t+\"-cluster-count\"},this.below=null}var Jk=aGe.prototype;Jk.addSource=function(e,t,r){var n={type:\"geojson\",data:t.geojson};r&&r.enabled&&zjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Jk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Jk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,\"setLayoutProperty\",n.layout),n.layout.visibility===\"visible\"&&this.subplot.setOptions(i,\"setPaintProperty\",n.paint)):this.subplot.addLayer(n,r)};Jk.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=nGe(n.gd,t),o=n.belowLookup[\"trace-\"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(E){E||u.addSource(\"circle\",a.circle,r.cluster);for(var T=ng.cluster,L=0;L<T.length;L++){var x=T[L],C=a[x];u.addLayer(x,C,o)}}function f(E){for(var T=ng.cluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var T=ng.nonCluster,L=0;L<T.length;L++){var x=T[L],C=a[x];E||u.addSource(x,C),u.addLayer(x,C,o)}}function d(E){for(var T=ng.nonCluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?ng.cluster:ng.nonCluster,T=0;T<E.length;T++){var L=E[T],x=a[L];x&&(n.setOptions(u.layerIds[L],\"setLayoutProperty\",x.layout),x.layout.visibility===\"visible\"&&(L!==\"cluster\"&&u.setSourceData(L,x),n.setOptions(u.layerIds[L],\"setPaintProperty\",x.paint)))}}var p=this.isHidden,k=r.visible!==!0;k?p||v():p?k||_():l!==s?(v(),_()):(this.below!==o&&(v(!0),_(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};Jk.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ng.cluster:ng.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};oGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new aGe(t,n.uid,i,a),s=nGe(t.gd,r),l=o.below=t.belowLookup[\"trace-\"+n.uid],u,c,f;if(i)for(o.addSource(\"circle\",s.circle,n.cluster),u=0;u<ng.cluster.length;u++)c=ng.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<ng.nonCluster.length;u++)c=ng.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var t7=ye((kxr,uGe)=>{\"use strict\";var Ojt=vf(),dJ=Dr(),qjt=gT(),Bjt=dJ.fillText,Njt=fs().BADNUM,Ujt=m1().traceLayerPrefix;function Vjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Ujt+i.uid+\"-circle\",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===Njt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=dJ.modHalf(g[0],360),A=g[1],z=s.project([P,A]),O=z.x-a.c2p([v,A]),U=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+U*U)-G,1-3/G)}if(Ojt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[dJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=qjt(i,b),e.extraText=lGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function lGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split(\"+\"),a=i.indexOf(\"all\")!==-1,o=i.indexOf(\"lon\")!==-1,s=i.indexOf(\"lat\")!==-1,l=t.lonlat,u=[];function c(f){return f+\"\\xB0\"}return a||o&&s?u.push(\"(\"+c(l[1])+\", \"+c(l[0])+\")\"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf(\"text\")!==-1)&&Bjt(t,e,u),u.join(\"<br>\")}uGe.exports={hoverPoints:Vjt,getExtraText:lGe}});var fGe=ye((Cxr,cGe)=>{\"use strict\";cGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var dGe=ye((Lxr,hGe)=>{\"use strict\";var Gjt=Dr(),Hjt=Ru(),jjt=fs().BADNUM;hGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!Hjt.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==jjt){var f=[Gjt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var gJ=ye((vJ,pJ)=>{(function(e,t){typeof vJ==\"object\"&&typeof pJ!=\"undefined\"?pJ.exports=t():(e=e||self,e.mapboxgl=t())})(vJ,function(){\"use strict\";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o=\"var sharedChunk = {}; (\"+e+\")(sharedChunk); (\"+t+\")(sharedChunk);\",s={};e(s),r=a(s),typeof window!=\"undefined\"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:\"text/javascript\"})))}}return n([\"exports\"],function(i){\"use strict\";function a(m,y){return y={exports:{}},m(y,y.exports),y.exports}var o=\"1.13.4\",s=l;function l(m,y,I,V){this.cx=3*m,this.bx=3*(I-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*y,this.by=3*(V-y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=V,this.p2x=I,this.p2y=V}l.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},l.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},l.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},l.prototype.solveCurveX=function(m,y){typeof y==\"undefined\"&&(y=1e-6);var I,V,$,ae,he;for($=m,he=0;he<8;he++){if(ae=this.sampleCurveX($)-m,Math.abs(ae)<y)return $;var ze=this.sampleCurveDerivativeX($);if(Math.abs(ze)<1e-6)break;$=$-ae/ze}if(I=0,V=1,$=m,$<I)return I;if($>V)return V;for(;I<V;){if(ae=this.sampleCurveX($),Math.abs(ae-m)<y)return $;m>ae?I=$:V=$,$=(V-I)*.5+I}return $},l.prototype.solve=function(m,y){return this.sampleCurveY(this.solveCurveX(m,y))};var u=c;function c(m,y){this.x=m,this.y=y}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,y){return this.clone()._rotateAround(m,y)},matMult:function(m){return this.clone()._matMult(m)},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(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var y=m.x-this.x,I=m.y-this.y;return y*y+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,y){return Math.atan2(this.x*y-this.y*m,this.x*m+this.y*y)},_matMult:function(m){var y=m[0]*this.x+m[1]*this.y,I=m[2]*this.x+m[3]*this.y;return this.x=y,this.y=I,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var y=Math.cos(m),I=Math.sin(m),V=y*this.x-I*this.y,$=I*this.x+y*this.y;return this.x=V,this.y=$,this},_rotateAround:function(m,y){var I=Math.cos(m),V=Math.sin(m),$=y.x+I*(this.x-y.x)-V*(this.y-y.y),ae=y.y+V*(this.x-y.x)+I*(this.y-y.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(m){return m instanceof c?m:Array.isArray(m)?new c(m[0],m[1]):m};var f=typeof self!=\"undefined\"?self:{};function h(m,y){if(Array.isArray(m)){if(!Array.isArray(y)||m.length!==y.length)return!1;for(var I=0;I<m.length;I++)if(!h(m[I],y[I]))return!1;return!0}if(typeof m==\"object\"&&m!==null&&y!==null){if(typeof y!=\"object\")return!1;var V=Object.keys(m);if(V.length!==Object.keys(y).length)return!1;for(var $ in m)if(!h(m[$],y[$]))return!1;return!0}return m===y}var d=Math.pow(2,53)-1;function v(m){if(m<=0)return 0;if(m>=1)return 1;var y=m*m,I=y*m;return 4*(m<.5?I:3*(m-y)+I-.75)}function _(m,y,I,V){var $=new s(m,y,I,V);return function(ae){return $.solve(ae)}}var b=_(.25,.1,.25,1);function p(m,y,I){return Math.min(I,Math.max(y,m))}function k(m,y,I){var V=I-y,$=((m-y)%V+V)%V+y;return $===y?I:$}function E(m,y,I){if(!m.length)return I(null,[]);var V=m.length,$=new Array(m.length),ae=null;m.forEach(function(he,ze){y(he,function(rt,gt){rt&&(ae=rt),$[ze]=gt,--V===0&&I(ae,$)})})}function T(m){var y=[];for(var I in m)y.push(m[I]);return y}function L(m,y){var I=[];for(var V in m)V in y||I.push(V);return I}function x(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var V=0,$=y;V<$.length;V+=1){var ae=$[V];for(var he in ae)m[he]=ae[he]}return m}function C(m,y){for(var I={},V=0;V<y.length;V++){var $=y[V];$ in m&&(I[$]=m[$])}return I}var M=1;function g(){return M++}function P(){function m(y){return y?(y^Math.random()*16>>y/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function A(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function z(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,y){m.forEach(function(I){y[I]&&(y[I]=y[I].bind(y))})}function U(m,y){return m.indexOf(y,m.length-y.length)!==-1}function G(m,y,I){var V={};for(var $ in m)V[$]=y.call(I||this,m[$],$,m);return V}function Z(m,y,I){var V={};for(var $ in m)y.call(I||this,m[$],$,m)&&(V[$]=m[$]);return V}function j(m){return Array.isArray(m)?m.map(j):typeof m==\"object\"&&m?G(m,j):m}function N(m,y){for(var I=0;I<m.length;I++)if(y.indexOf(m[I])>=0)return!0;return!1}var H={};function re(m){H[m]||(typeof console!=\"undefined\"&&console.warn(m),H[m]=!0)}function oe(m,y,I){return(I.y-m.y)*(y.x-m.x)>(y.y-m.y)*(I.x-m.x)}function _e(m){for(var y=0,I=0,V=m.length,$=V-1,ae=void 0,he=void 0;I<V;$=I++)ae=m[I],he=m[$],y+=(he.x-ae.x)*(ae.y+he.y);return y}function Ce(m){var y=m[0],I=m[1],V=m[2];return I+=90,I*=Math.PI/180,V*=Math.PI/180,{x:y*Math.cos(I)*Math.sin(V),y:y*Math.sin(I)*Math.sin(V),z:y*Math.cos(V)}}function Le(){return typeof WorkerGlobalScope!=\"undefined\"&&typeof self!=\"undefined\"&&self instanceof WorkerGlobalScope}function ge(m){var y=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,I={};if(m.replace(y,function($,ae,he,ze){var rt=he||ze;return I[ae]=rt?rt.toLowerCase():!0,\"\"}),I[\"max-age\"]){var V=parseInt(I[\"max-age\"],10);isNaN(V)?delete I[\"max-age\"]:I[\"max-age\"]=V}return I}var ie=null;function Se(m){if(ie==null){var y=m.navigator?m.navigator.userAgent:null;ie=!!m.safari||!!(y&&(/\\b(iPad|iPhone|iPod)\\b/.test(y)||y.match(\"Safari\")&&!y.match(\"Chrome\")))}return ie}function Ee(m){try{var y=f[m];return y.setItem(\"_mapbox_test_\",1),y.removeItem(\"_mapbox_test_\"),!0}catch(I){return!1}}function Ae(m){return f.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(y,I){return String.fromCharCode(+(\"0x\"+I))}))}function Be(m){return decodeURIComponent(f.atob(m).split(\"\").map(function(y){return\"%\"+(\"00\"+y.charCodeAt(0).toString(16)).slice(-2)}).join(\"\"))}var Pe=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,De=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,je,lt={now:Pe,frame:function(y){var I=me(y);return{cancel:function(){return De(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var V=f.document.createElement(\"canvas\"),$=V.getContext(\"2d\");if(!$)throw new Error(\"failed to create canvas 2d context\");return V.width=y.width,V.height=y.height,$.drawImage(y,0,0,y.width,y.height),$.getImageData(-I,-I,y.width+2*I,y.height+2*I)},resolveURL:function(y){return ce||(ce=f.document.createElement(\"a\")),ce.href=y,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(je==null&&(je=f.matchMedia(\"(prefers-reduced-motion: reduce)\")),je.matches):!1}},pt={API_URL:\"https://api.mapbox.com\",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf(\"https://api.mapbox.cn\")===0?\"https://events.mapbox.cn/events/v2\":this.API_URL.indexOf(\"https://api.mapbox.com\")===0?\"https://events.mapbox.com/events/v2\":null:null},FEEDBACK_URL:\"https://apps.mapbox.com/feedback\",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Vt={supported:!1,testSupport:$t},ot,ut=!1,Wt,Nt=!1;f.document&&(Wt=f.document.createElement(\"img\"),Wt.onload=function(){ot&&sr(ot),ot=null,Nt=!0},Wt.onerror=function(){ut=!0,ot=null},Wt.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\");function $t(m){ut||!Wt||(Nt?sr(m):ot=m)}function sr(m){var y=m.createTexture();m.bindTexture(m.TEXTURE_2D,y);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Wt),m.isContextLost())return;Vt.supported=!0}catch(I){}m.deleteTexture(y),ut=!0}var Tr=\"01\";function fr(){for(var m=\"1\",y=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",I=\"\",V=0;V<10;V++)I+=y[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[m,Tr,I].join(\"\"),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var $e=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};$e.prototype._createSkuToken=function(){var y=fr();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},$e.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},$e.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},$e.prototype.normalizeStyleURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path=\"/styles/v1\"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeGlyphsURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path=\"/fonts/v1\"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeSourceURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path=\"/v4/\"+V.authority+\".json\",V.params.push(\"secure\"),this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeSpriteURL=function(y,I,V,$){var ae=er(y);return St(y)?(ae.path=\"/styles/v1\"+ae.path+\"/sprite\"+I+V,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=\"\"+I+V,lr(ae))},$e.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!St(y))return y;var V=er(y),$=/(\\.(png|jpg)\\d*)(?=$)/,ae=/^.+\\/v4\\//,he=lt.devicePixelRatio>=2||I===512?\"@2x\":\"\",ze=Vt.supported?\".webp\":\"$1\";V.path=V.path.replace($,\"\"+he+ze),V.path=V.path.replace(ae,\"/\"),V.path=\"/v4\"+V.path;var rt=this._customAccessToken||It(V.params)||pt.ACCESS_TOKEN;return pt.REQUIRE_ACCESS_TOKEN&&rt&&this._skuToken&&V.params.push(\"sku=\"+this._skuToken),this._makeAPIURL(V,rt)},$e.prototype.canonicalizeTileURL=function(y,I){var V=\"/v4/\",$=/\\.[\\w]+$/,ae=er(y);if(!ae.path.match(/(^\\/v4\\/)/)||!ae.path.match($))return y;var he=\"mapbox://tiles/\";he+=ae.path.replace(V,\"\");var ze=ae.params;return I&&(ze=ze.filter(function(rt){return!rt.match(/^access_token=/)})),ze.length&&(he+=\"?\"+ze.join(\"&\")),he},$e.prototype.canonicalizeTileset=function(y,I){for(var V=I?St(I):!1,$=[],ae=0,he=y.tiles||[];ae<he.length;ae+=1){var ze=he[ae];Gt(ze)?$.push(this.canonicalizeTileURL(ze,V)):$.push(ze)}return $},$e.prototype._makeAPIURL=function(y,I){var V=\"See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\",$=er(pt.API_URL);if(y.protocol=$.protocol,y.authority=$.authority,y.protocol===\"http\"){var ae=y.params.indexOf(\"secure\");ae>=0&&y.params.splice(ae,1)}if($.path!==\"/\"&&(y.path=\"\"+$.path+y.path),!pt.REQUIRE_ACCESS_TOKEN)return lr(y);if(I=I||pt.ACCESS_TOKEN,!I)throw new Error(\"An API access token is required to use Mapbox GL. \"+V);if(I[0]===\"s\")throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+V);return y.params=y.params.filter(function(he){return he.indexOf(\"access_token\")===-1}),y.params.push(\"access_token=\"+I),lr(y)};function St(m){return m.indexOf(\"mapbox:\")===0}var Qt=/^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/|\\?|$)/i;function Gt(m){return Qt.test(m)}function _t(m){return m.indexOf(\"sku=\")>0&&Gt(m)}function It(m){for(var y=0,I=m;y<I.length;y+=1){var V=I[y],$=V.match(/^access_token=(.*)$/);if($)return $[1]}return null}var mt=/^(\\w+):\\/\\/([^/?]*)(\\/[^?]+)?\\??(.+)?/;function er(m){var y=m.match(mt);if(!y)throw new Error(\"Unable to parse URL object\");return{protocol:y[1],authority:y[2],path:y[3]||\"/\",params:y[4]?y[4].split(\"&\"):[]}}function lr(m){var y=m.params.length?\"?\"+m.params.join(\"&\"):\"\";return m.protocol+\"://\"+m.authority+m.path+y}var wr=\"mapbox.eventData\";function Lr(m){if(!m)return null;var y=m.split(\".\");if(!y||y.length!==3)return null;try{var I=JSON.parse(Be(y[1]));return I}catch(V){return null}}var ti=function(y){this.type=y,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ti.prototype.getStorageKey=function(y){var I=Lr(pt.ACCESS_TOKEN),V=\"\";return I&&I.u?V=Ae(I.u):V=pt.ACCESS_TOKEN||\"\",y?wr+\".\"+y+\":\"+V:wr+\":\"+V},ti.prototype.fetchEventData=function(){var y=Ee(\"localStorage\"),I=this.getStorageKey(),V=this.getStorageKey(\"uuid\");if(y)try{var $=f.localStorage.getItem(I);$&&(this.eventData=JSON.parse($));var ae=f.localStorage.getItem(V);ae&&(this.anonId=ae)}catch(he){re(\"Unable to read from LocalStorage\")}},ti.prototype.saveEventData=function(){var y=Ee(\"localStorage\"),I=this.getStorageKey(),V=this.getStorageKey(\"uuid\");if(y)try{f.localStorage.setItem(V,this.anonId),Object.keys(this.eventData).length>=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){re(\"Unable to write to LocalStorage\")}},ti.prototype.processRequests=function(y){},ti.prototype.postEvent=function(y,I,V,$){var ae=this;if(pt.EVENTS_URL){var he=er(pt.EVENTS_URL);he.params.push(\"access_token=\"+($||pt.ACCESS_TOKEN||\"\"));var ze={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:\"mapbox-gl-js\",sdkVersion:o,skuId:Tr,userId:this.anonId},rt=I?x(ze,I):ze,gt={url:lr(he),headers:{\"Content-Type\":\"text/plain\"},body:JSON.stringify([rt])};this.pendingRequest=Qr(gt,function(Et){ae.pendingRequest=null,V(Et),ae.saveEventData(),ae.processRequests($)})}},ti.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Br=function(m){function y(){m.call(this,\"map.load\"),this.success={},this.skuToken=\"\"}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postMapLoadEvent=function(V,$,ae,he){this.skuToken=ae,(pt.EVENTS_URL&&he||pt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ze){return St(ze)||Gt(ze)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},y.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,ze=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(ze,{skuToken:this.skuToken},function(rt){rt||he&&($.success[he]=!0)},V))}},y}(ti),Vr=function(m){function y(I){m.call(this,\"appUserTurnstile\"),this._customAccessToken=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postTurnstileEvent=function(V,$){pt.EVENTS_URL&&pt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return St(ae)||Gt(ae)})&&this.queueRequest(Date.now(),$)},y.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Lr(pt.ACCESS_TOKEN),he=ae?ae.u:pt.ACCESS_TOKEN,ze=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),ze=!0);var rt=this.queue.shift();if(this.eventData.lastSuccess){var gt=new Date(this.eventData.lastSuccess),Et=new Date(rt),or=(rt-this.eventData.lastSuccess)/(24*60*60*1e3);ze=ze||or>=1||or<-1||gt.getDate()!==Et.getDate()}else ze=!0;if(!ze)return this.processRequests();this.postEvent(rt,{\"enabled.telemetry\":!1},function(_r){_r||($.eventData.lastSuccess=rt,$.eventData.tokenU=he)},V)}},y}(ti),dt=new Vr,Ge=dt.postTurnstileEvent.bind(dt),Je=new Br,We=Je.postMapLoadEvent.bind(Je),tt=\"mapbox-tiles\",xt=500,Ie=50,xe=1e3*60*7,ke;function vt(){f.caches&&!ke&&(ke=f.caches.open(tt))}var ir;function ar(m,y){if(ir===void 0)try{new Response(new ReadableStream),ir=!0}catch(I){ir=!1}ir?y(m.body):m.blob().then(y)}function vr(m,y,I){if(vt(),!!ke){var V={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(he,ze){return V.headers.set(ze,he)});var $=ge(y.headers.get(\"Cache-Control\")||\"\");if(!$[\"no-store\"]){$[\"max-age\"]&&V.headers.set(\"Expires\",new Date(I+$[\"max-age\"]*1e3).toUTCString());var ae=new Date(V.headers.get(\"Expires\")).getTime()-I;ae<xe||ar(y,function(he){var ze=new f.Response(he,V);vt(),ke&&ke.then(function(rt){return rt.put(ii(m.url),ze)}).catch(function(rt){return re(rt.message)})})}}}function ii(m){var y=m.indexOf(\"?\");return y<0?m:m.slice(0,y)}function pi(m,y){if(vt(),!ke)return y(null);var I=ii(m.url);ke.then(function(V){V.match(I).then(function($){var ae=$r($);V.delete(I),ae&&V.put(I,$.clone()),y(null,$,ae)}).catch(y)}).catch(y)}function $r(m){if(!m)return!1;var y=new Date(m.headers.get(\"Expires\")||0),I=ge(m.headers.get(\"Cache-Control\")||\"\");return y>Date.now()&&!I[\"no-cache\"]}var di=1/0;function ji(m){di++,di>Ie&&(m.getActor().send(\"enforceCacheSizeLimit\",xt),di=0)}function In(m){vt(),ke&&ke.then(function(y){y.keys().then(function(I){for(var V=0;V<I.length-m;V++)y.delete(I[V])})})}function wi(m){var y=f.caches.delete(tt);m&&y.catch(m).then(function(){return m()})}function On(m,y){xt=m,Ie=y}var qn;function Fn(){return qn==null&&(qn=f.OffscreenCanvas&&new f.OffscreenCanvas(1,1).getContext(\"2d\")&&typeof f.createImageBitmap==\"function\"),qn}var ra={Unknown:\"Unknown\",Style:\"Style\",Source:\"Source\",Tile:\"Tile\",Glyphs:\"Glyphs\",SpriteImage:\"SpriteImage\",SpriteJSON:\"SpriteJSON\",Image:\"Image\"};typeof Object.freeze==\"function\"&&Object.freeze(ra);var la=function(m){function y(I,V,$){V===401&&Gt($)&&(I+=\": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes\"),m.call(this,I),this.status=V,this.url=$,this.name=this.constructor.name,this.message=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.toString=function(){return this.name+\": \"+this.message+\" (\"+this.status+\"): \"+this.url},y}(Error),Ut=Le()?function(){return self.worker&&self.worker.referrer}:function(){return(f.location.protocol===\"blob:\"?f.parent:f).location.href},wt=function(m){return/^file:/.test(m)||/^file:/.test(Ut())&&!/^\\w+:/.test(m)};function rr(m,y){var I=new f.AbortController,V=new f.Request(m.url,{method:m.method||\"GET\",body:m.body,credentials:m.credentials,headers:m.headers,referrer:Ut(),signal:I.signal}),$=!1,ae=!1,he=_t(V.url);m.type===\"json\"&&V.headers.set(\"Accept\",\"application/json\");var ze=function(gt,Et,or){if(!ae){if(gt&&gt.message!==\"SecurityError\"&&re(gt),Et&&or)return rt(Et);var _r=Date.now();f.fetch(V).then(function(pr){if(pr.ok){var Fr=he?pr.clone():null;return rt(pr,Fr,_r)}else return y(new la(pr.statusText,pr.status,m.url))}).catch(function(pr){pr.code!==20&&y(new Error(pr.message))})}},rt=function(gt,Et,or){(m.type===\"arrayBuffer\"?gt.arrayBuffer():m.type===\"json\"?gt.json():gt.text()).then(function(_r){ae||(Et&&or&&vr(V,Et,or),$=!0,y(null,_r,gt.headers.get(\"Cache-Control\"),gt.headers.get(\"Expires\")))}).catch(function(_r){ae||y(new Error(_r.message))})};return he?pi(V,ze):ze(null,null),{cancel:function(){ae=!0,$||I.abort()}}}function nr(m,y){var I=new f.XMLHttpRequest;I.open(m.method||\"GET\",m.url,!0),m.type===\"arrayBuffer\"&&(I.responseType=\"arraybuffer\");for(var V in m.headers)I.setRequestHeader(V,m.headers[V]);return m.type===\"json\"&&(I.responseType=\"text\",I.setRequestHeader(\"Accept\",\"application/json\")),I.withCredentials=m.credentials===\"include\",I.onerror=function(){y(new Error(I.statusText))},I.onload=function(){if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(m.type===\"json\")try{$=JSON.parse(I.response)}catch(ae){return y(ae)}y(null,$,I.getResponseHeader(\"Cache-Control\"),I.getResponseHeader(\"Expires\"))}else y(new la(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var Er=function(m,y){if(!wt(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty(\"signal\"))return rr(m,y);if(Le()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send(\"getResource\",m,y,void 0,I)}}return nr(m,y)},Xr=function(m,y){return Er(x(m,{type:\"json\"}),y)},ri=function(m,y){return Er(x(m,{type:\"arrayBuffer\"}),y)},Qr=function(m,y){return Er(x(m,{method:\"POST\"}),y)};function Oi(m){var y=f.document.createElement(\"a\");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var $i=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";function tn(m,y,I,V){var $=new f.Image,ae=f.URL;$.onload=function(){y(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=$i})},$.onerror=function(){return y(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))};var he=new f.Blob([new Uint8Array(m)],{type:\"image/png\"});$.cacheControl=I,$.expires=V,$.src=m.byteLength?ae.createObjectURL(he):$i}function fn(m,y){var I=new f.Blob([new Uint8Array(m)],{type:\"image/png\"});f.createImageBitmap(I).then(function(V){y(null,V)}).catch(function(V){y(new Error(\"Could not load image because of \"+V.message+\". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))})}var yn,Sn,Ba=function(){yn=[],Sn=0};Ba();var ua=function(m,y){if(Vt.supported&&(m.headers||(m.headers={}),m.headers.accept=\"image/webp,*/*\"),Sn>=pt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Sn++;var V=!1,$=function(){if(!V)for(V=!0,Sn--;yn.length&&Sn<pt.MAX_PARALLEL_IMAGE_REQUESTS;){var he=yn.shift(),ze=he.requestParameters,rt=he.callback,gt=he.cancelled;gt||(he.cancel=ua(ze,rt).cancel)}},ae=ri(m,function(he,ze,rt,gt){$(),he?y(he):ze&&(Fn()?fn(ze,y):tn(ze,y,rt,gt))});return{cancel:function(){ae.cancel(),$()}}},ma=function(m,y){var I=f.document.createElement(\"video\");I.muted=!0,I.onloadstart=function(){y(null,I)};for(var V=0;V<m.length;V++){var $=f.document.createElement(\"source\");Oi(m[V])||(I.crossOrigin=\"Anonymous\"),$.src=m[V],I.appendChild($)}return{cancel:function(){}}};function Wa(m,y,I){var V=I[m]&&I[m].indexOf(y)!==-1;V||(I[m]=I[m]||[],I[m].push(y))}function Fa(m,y,I){if(I&&I[m]){var V=I[m].indexOf(y);V!==-1&&I[m].splice(V,1)}}var Xo=function(y,I){I===void 0&&(I={}),x(this,I),this.type=y},da=function(m){function y(I,V){V===void 0&&(V={}),m.call(this,\"error\",x({error:I},V))}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Xo),Wn=function(){};Wn.prototype.on=function(y,I){return this._listeners=this._listeners||{},Wa(y,I,this._listeners),this},Wn.prototype.off=function(y,I){return Fa(y,I,this._listeners),Fa(y,I,this._oneTimeListeners),this},Wn.prototype.once=function(y,I){return this._oneTimeListeners=this._oneTimeListeners||{},Wa(y,I,this._oneTimeListeners),this},Wn.prototype.fire=function(y,I){typeof y==\"string\"&&(y=new Xo(y,I||{}));var V=y.type;if(this.listens(V)){y.target=this;for(var $=this._listeners&&this._listeners[V]?this._listeners[V].slice():[],ae=0,he=$;ae<he.length;ae+=1){var ze=he[ae];ze.call(this,y)}for(var rt=this._oneTimeListeners&&this._oneTimeListeners[V]?this._oneTimeListeners[V].slice():[],gt=0,Et=rt;gt<Et.length;gt+=1){var or=Et[gt];Fa(V,or,this._oneTimeListeners),or.call(this,y)}var _r=this._eventedParent;_r&&(x(y,typeof this._eventedParentData==\"function\"?this._eventedParentData():this._eventedParentData),_r.fire(y))}else y instanceof da&&console.error(y.error);return this},Wn.prototype.listens=function(y){return this._listeners&&this._listeners[y]&&this._listeners[y].length>0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Wn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ha=8,vo={version:{required:!0,type:\"enum\",values:[8]},name:{type:\"string\"},metadata:{type:\"*\"},center:{type:\"array\",value:\"number\"},zoom:{type:\"number\"},bearing:{type:\"number\",default:0,period:360,units:\"degrees\"},pitch:{type:\"number\",default:0,units:\"degrees\"},light:{type:\"light\"},sources:{required:!0,type:\"sources\"},sprite:{type:\"string\"},glyphs:{type:\"string\"},transition:{type:\"transition\"},layers:{required:!0,type:\"array\",value:\"layer\"}},jn={\"*\":{type:\"source\"}},Mt=[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],kr={type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},Jr={type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},vi={type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{}},default:\"mapbox\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},hn={type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{type:\"*\"},maxzoom:{type:\"number\",default:18},attribution:{type:\"string\"},buffer:{type:\"number\",default:128,maximum:512,minimum:0},filter:{type:\"*\"},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},clusterMinPoints:{type:\"number\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},An={type:{required:!0,type:\"enum\",values:{video:{}}},urls:{required:!0,type:\"array\",value:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},Mn={type:{required:!0,type:\"enum\",values:{image:{}}},url:{required:!0,type:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},Li={id:{type:\"string\",required:!0},type:{type:\"enum\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},_n=[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],ya={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},$n={\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Ma={\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},_o={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},No={\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},po={\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Lo={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},ko={visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},Ds={type:\"array\",value:\"*\"},Fs={type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{},within:{}}},ll={type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},ul={type:\"array\",minimum:0,maximum:24,value:[\"number\",\"color\"],length:2},zl={type:\"array\",value:\"*\",minimum:1},us={anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},il=[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],As={\"fill-antialias\":{type:\"boolean\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},cl={\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},Ks={\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},zs={\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Io={\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},ls={\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Yl={\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},Su={\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},nc={duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},bs={\"*\":{type:\"string\"}},Rn={$version:Ha,$root:vo,sources:jn,source:Mt,source_vector:kr,source_raster:Jr,source_raster_dem:vi,source_geojson:hn,source_video:An,source_image:Mn,layer:Li,layout:_n,layout_background:ya,layout_fill:$n,layout_circle:Ma,layout_heatmap:_o,\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},function_stop:ul,expression:zl,light:us,paint:il,paint_fill:As,\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Yl,paint_background:Su,transition:nc,\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:bs},_a=function(y,I,V,$){this.message=(y?y+\": \":\"\")+V,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(m){var y=m.key,I=m.value;return I?[new _a(y,I,\"constants have been deprecated as of v8\")]:[]}function Ol(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var V=0,$=y;V<$.length;V+=1){var ae=$[V];for(var he in ae)m[he]=ae[he]}return m}function xo(m){return m instanceof Number||m instanceof String||m instanceof Boolean?m.valueOf():m}function Kl(m){if(Array.isArray(m))return m.map(Kl);if(m instanceof Object&&!(m instanceof Number||m instanceof String||m instanceof Boolean)){var y={};for(var I in m)y[I]=Kl(m[I]);return y}return xo(m)}var Ns=function(m){function y(I,V){m.call(this,V),this.message=V,this.key=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Error),Hl=function(y,I){I===void 0&&(I=[]),this.parent=y,this.bindings={};for(var V=0,$=I;V<$.length;V+=1){var ae=$[V],he=ae[0],ze=ae[1];this.bindings[he]=ze}};Hl.prototype.concat=function(y){return new Hl(this,y)},Hl.prototype.get=function(y){if(this.bindings[y])return this.bindings[y];if(this.parent)return this.parent.get(y);throw new Error(y+\" not found in scope.\")},Hl.prototype.has=function(y){return this.bindings[y]?!0:this.parent?this.parent.has(y):!1};var ac={kind:\"null\"},aa={kind:\"number\"},Oo={kind:\"string\"},qo={kind:\"boolean\"},ql={kind:\"color\"},Pc={kind:\"object\"},Do={kind:\"value\"},rf={kind:\"error\"},Vf={kind:\"collator\"},pl={kind:\"formatted\"},Zc={kind:\"resolvedImage\"};function Jl(m,y){return{kind:\"array\",itemType:m,N:y}}function Os(m){if(m.kind===\"array\"){var y=Os(m.itemType);return typeof m.N==\"number\"?\"array<\"+y+\", \"+m.N+\">\":m.itemType.kind===\"value\"?\"array\":\"array<\"+y+\">\"}else return m.kind}var yu=[ac,aa,Oo,qo,ql,pl,Pc,Jl(Do),Zc];function oc(m,y){if(y.kind===\"error\")return null;if(m.kind===\"array\"){if(y.kind===\"array\"&&(y.N===0&&y.itemType.kind===\"value\"||!oc(m.itemType,y.itemType))&&(typeof m.N!=\"number\"||m.N===y.N))return null}else{if(m.kind===y.kind)return null;if(m.kind===\"value\")for(var I=0,V=yu;I<V.length;I+=1){var $=V[I];if(!oc($,y))return null}}return\"Expected \"+Os(m)+\" but found \"+Os(y)+\" instead.\"}function Cf(m,y){return y.some(function(I){return I.kind===m.kind})}function sc(m,y){return y.some(function(I){return I===\"null\"?m===null:I===\"array\"?Array.isArray(m):I===\"object\"?m&&!Array.isArray(m)&&typeof m==\"object\":I===typeof m})}var jh=a(function(m,y){var I={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 V(gt){return gt=Math.round(gt),gt<0?0:gt>255?255:gt}function $(gt){return gt<0?0:gt>1?1:gt}function ae(gt){return gt[gt.length-1]===\"%\"?V(parseFloat(gt)/100*255):V(parseInt(gt))}function he(gt){return gt[gt.length-1]===\"%\"?$(parseFloat(gt)/100):$(parseFloat(gt))}function ze(gt,Et,or){return or<0?or+=1:or>1&&(or-=1),or*6<1?gt+(Et-gt)*or*6:or*2<1?Et:or*3<2?gt+(Et-gt)*(2/3-or)*6:gt}function rt(gt){var Et=gt.replace(/ /g,\"\").toLowerCase();if(Et in I)return I[Et].slice();if(Et[0]===\"#\"){if(Et.length===4){var or=parseInt(Et.substr(1),16);return or>=0&&or<=4095?[(or&3840)>>4|(or&3840)>>8,or&240|(or&240)>>4,or&15|(or&15)<<4,1]:null}else if(Et.length===7){var or=parseInt(Et.substr(1),16);return or>=0&&or<=16777215?[(or&16711680)>>16,(or&65280)>>8,or&255,1]:null}return null}var _r=Et.indexOf(\"(\"),pr=Et.indexOf(\")\");if(_r!==-1&&pr+1===Et.length){var Fr=Et.substr(0,_r),oi=Et.substr(_r+1,pr-(_r+1)).split(\",\"),Hi=1;switch(Fr){case\"rgba\":if(oi.length!==4)return null;Hi=he(oi.pop());case\"rgb\":return oi.length!==3?null:[ae(oi[0]),ae(oi[1]),ae(oi[2]),Hi];case\"hsla\":if(oi.length!==4)return null;Hi=he(oi.pop());case\"hsl\":if(oi.length!==3)return null;var Ai=(parseFloat(oi[0])%360+360)%360/360,bn=he(oi[1]),nn=he(oi[2]),xn=nn<=.5?nn*(bn+1):nn+bn-nn*bn,Pn=nn*2-xn;return[V(ze(Pn,xn,Ai+1/3)*255),V(ze(Pn,xn,Ai)*255),V(ze(Pn,xn,Ai-1/3)*255),Hi];default:return null}}return null}try{y.parseCSSColor=rt}catch(gt){}}),Lf=jh.parseCSSColor,cs=function(y,I,V,$){$===void 0&&($=1),this.r=y,this.g=I,this.b=V,this.a=$};cs.parse=function(y){if(y){if(y instanceof cs)return y;if(typeof y==\"string\"){var I=Lf(y);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var y=this.toArray(),I=y[0],V=y[1],$=y[2],ae=y[3];return\"rgba(\"+Math.round(I)+\",\"+Math.round(V)+\",\"+Math.round($)+\",\"+ae+\")\"},cs.prototype.toArray=function(){var y=this,I=y.r,V=y.g,$=y.b,ae=y.a;return ae===0?[0,0,0,0]:[I*255/ae,V*255/ae,$*255/ae,ae]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var nf=function(y,I,V){y?this.sensitivity=I?\"variant\":\"case\":this.sensitivity=I?\"accent\":\"base\",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"})};nf.prototype.compare=function(y,I){return this.collator.compare(y,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Gf=function(y,I,V,$,ae){this.text=y,this.image=I,this.scale=V,this.fontStack=$,this.textColor=ae},$l=function(y){this.sections=y};$l.fromString=function(y){return new $l([new Gf(y,null,null,null,null)])},$l.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(y){return y.text.length!==0||y.image&&y.image.name.length!==0})},$l.factory=function(y){return y instanceof $l?y:$l.fromString(y)},$l.prototype.toString=function(){return this.sections.length===0?\"\":this.sections.map(function(y){return y.text}).join(\"\")},$l.prototype.serialize=function(){for(var y=[\"format\"],I=0,V=this.sections;I<V.length;I+=1){var $=V[I];if($.image){y.push([\"image\",$.image.name]);continue}y.push($.text);var ae={};$.fontStack&&(ae[\"text-font\"]=[\"literal\",$.fontStack.split(\",\")]),$.scale&&(ae[\"font-scale\"]=$.scale),$.textColor&&(ae[\"text-color\"]=[\"rgba\"].concat($.textColor.toArray())),y.push(ae)}return y};var fl=function(y){this.name=y.name,this.available=y.available};fl.prototype.toString=function(){return this.name},fl.fromString=function(y){return y?new fl({name:y,available:!1}):null},fl.prototype.serialize=function(){return[\"image\",this.name]};function lc(m,y,I,V){if(!(typeof m==\"number\"&&m>=0&&m<=255&&typeof y==\"number\"&&y>=0&&y<=255&&typeof I==\"number\"&&I>=0&&I<=255)){var $=typeof V==\"number\"?[m,y,I,V]:[m,y,I];return\"Invalid rgba value [\"+$.join(\", \")+\"]: 'r', 'g', and 'b' must be between 0 and 255.\"}return typeof V==\"undefined\"||typeof V==\"number\"&&V>=0&&V<=1?null:\"Invalid rgba value [\"+[m,y,I,V].join(\", \")+\"]: 'a' must be between 0 and 1.\"}function Fu(m){if(m===null)return!0;if(typeof m==\"string\")return!0;if(typeof m==\"boolean\")return!0;if(typeof m==\"number\")return!0;if(m instanceof cs)return!0;if(m instanceof nf)return!0;if(m instanceof $l)return!0;if(m instanceof fl)return!0;if(Array.isArray(m)){for(var y=0,I=m;y<I.length;y+=1){var V=I[y];if(!Fu(V))return!1}return!0}else if(typeof m==\"object\"){for(var $ in m)if(!Fu(m[$]))return!1;return!0}else return!1}function Es(m){if(m===null)return ac;if(typeof m==\"string\")return Oo;if(typeof m==\"boolean\")return qo;if(typeof m==\"number\")return aa;if(m instanceof cs)return ql;if(m instanceof nf)return Vf;if(m instanceof $l)return pl;if(m instanceof fl)return Zc;if(Array.isArray(m)){for(var y=m.length,I,V=0,$=m;V<$.length;V+=1){var ae=$[V],he=Es(ae);if(!I)I=he;else{if(I===he)continue;I=Do;break}}return Jl(I||Do,y)}else return Pc}function Hs(m){var y=typeof m;return m===null?\"\":y===\"string\"||y===\"number\"||y===\"boolean\"?String(m):m instanceof cs||m instanceof $l||m instanceof fl?m.toString():JSON.stringify(m)}var Go=function(y,I){this.type=y,this.value=I};Go.parse=function(y,I){if(y.length!==2)return I.error(\"'literal' expression requires exactly one argument, but found \"+(y.length-1)+\" instead.\");if(!Fu(y[1]))return I.error(\"invalid value\");var V=y[1],$=Es(V),ae=I.expectedType;return $.kind===\"array\"&&$.N===0&&ae&&ae.kind===\"array\"&&(typeof ae.N!=\"number\"||ae.N===0)&&($=ae),new Go($,V)},Go.prototype.evaluate=function(){return this.value},Go.prototype.eachChild=function(){},Go.prototype.outputDefined=function(){return!0},Go.prototype.serialize=function(){return this.type.kind===\"array\"||this.type.kind===\"object\"?[\"literal\",this.value]:this.value instanceof cs?[\"rgba\"].concat(this.value.toArray()):this.value instanceof $l?this.value.serialize():this.value};var ps=function(y){this.name=\"ExpressionEvaluationError\",this.message=y};ps.prototype.toJSON=function(){return this.message};var uc={string:Oo,number:aa,boolean:qo,object:Pc},xl=function(y,I){this.type=y,this.args=I};xl.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var V=1,$,ae=y[0];if(ae===\"array\"){var he;if(y.length>2){var ze=y[1];if(typeof ze!=\"string\"||!(ze in uc)||ze===\"object\")return I.error('The item type argument of \"array\" must be one of string, number, boolean',1);he=uc[ze],V++}else he=Do;var rt;if(y.length>3){if(y[2]!==null&&(typeof y[2]!=\"number\"||y[2]<0||y[2]!==Math.floor(y[2])))return I.error('The length argument to \"array\" must be a positive integer literal',2);rt=y[2],V++}$=Jl(he,rt)}else $=uc[ae];for(var gt=[];V<y.length;V++){var Et=I.parse(y[V],V,Do);if(!Et)return null;gt.push(Et)}return new xl($,gt)},xl.prototype.evaluate=function(y){for(var I=0;I<this.args.length;I++){var V=this.args[I].evaluate(y),$=oc(this.type,Es(V));if($){if(I===this.args.length-1)throw new ps(\"Expected value to be of type \"+Os(this.type)+\", but found \"+Os(Es(V))+\" instead.\")}else return V}return null},xl.prototype.eachChild=function(y){this.args.forEach(y)},xl.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},xl.prototype.serialize=function(){var y=this.type,I=[y.kind];if(y.kind===\"array\"){var V=y.itemType;if(V.kind===\"string\"||V.kind===\"number\"||V.kind===\"boolean\"){I.push(V.kind);var $=y.N;(typeof $==\"number\"||this.args.length>1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(y){this.type=pl,this.sections=y};Gu.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var V=y[1];if(!Array.isArray(V)&&typeof V==\"object\")return I.error(\"First argument must be an image or text section.\");for(var $=[],ae=!1,he=1;he<=y.length-1;++he){var ze=y[he];if(ae&&typeof ze==\"object\"&&!Array.isArray(ze)){ae=!1;var rt=null;if(ze[\"font-scale\"]&&(rt=I.parse(ze[\"font-scale\"],1,aa),!rt))return null;var gt=null;if(ze[\"text-font\"]&&(gt=I.parse(ze[\"text-font\"],1,Jl(Oo)),!gt))return null;var Et=null;if(ze[\"text-color\"]&&(Et=I.parse(ze[\"text-color\"],1,ql),!Et))return null;var or=$[$.length-1];or.scale=rt,or.font=gt,or.textColor=Et}else{var _r=I.parse(y[he],1,Do);if(!_r)return null;var pr=_r.type.kind;if(pr!==\"string\"&&pr!==\"value\"&&pr!==\"null\"&&pr!==\"resolvedImage\")return I.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");ae=!0,$.push({content:_r,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(y){var I=function(V){var $=V.content.evaluate(y);return Es($)===Zc?new Gf(\"\",$,null,null,null):new Gf(Hs($),null,V.scale?V.scale.evaluate(y):null,V.font?V.font.evaluate(y).join(\",\"):null,V.textColor?V.textColor.evaluate(y):null)};return new $l(this.sections.map(I))},Gu.prototype.eachChild=function(y){for(var I=0,V=this.sections;I<V.length;I+=1){var $=V[I];y($.content),$.scale&&y($.scale),$.font&&y($.font),$.textColor&&y($.textColor)}},Gu.prototype.outputDefined=function(){return!1},Gu.prototype.serialize=function(){for(var y=[\"format\"],I=0,V=this.sections;I<V.length;I+=1){var $=V[I];y.push($.content.serialize());var ae={};$.scale&&(ae[\"font-scale\"]=$.scale.serialize()),$.font&&(ae[\"text-font\"]=$.font.serialize()),$.textColor&&(ae[\"text-color\"]=$.textColor.serialize()),y.push(ae)}return y};var qs=function(y){this.type=Zc,this.input=y};qs.parse=function(y,I){if(y.length!==2)return I.error(\"Expected two arguments.\");var V=I.parse(y[1],1,Oo);return V?new qs(V):I.error(\"No image name provided.\")},qs.prototype.evaluate=function(y){var I=this.input.evaluate(y),V=fl.fromString(I);return V&&y.availableImages&&(V.available=y.availableImages.indexOf(I)>-1),V},qs.prototype.eachChild=function(y){y(this.input)},qs.prototype.outputDefined=function(){return!1},qs.prototype.serialize=function(){return[\"image\",this.input.serialize()]};var od={\"to-boolean\":qo,\"to-color\":ql,\"to-number\":aa,\"to-string\":Oo},Po=function(y,I){this.type=y,this.args=I};Po.parse=function(y,I){if(y.length<2)return I.error(\"Expected at least one argument.\");var V=y[0];if((V===\"to-boolean\"||V===\"to-string\")&&y.length!==2)return I.error(\"Expected one argument.\");for(var $=od[V],ae=[],he=1;he<y.length;he++){var ze=I.parse(y[he],he,Do);if(!ze)return null;ae.push(ze)}return new Po($,ae)},Po.prototype.evaluate=function(y){if(this.type.kind===\"boolean\")return!!this.args[0].evaluate(y);if(this.type.kind===\"color\"){for(var I,V,$=0,ae=this.args;$<ae.length;$+=1){var he=ae[$];if(I=he.evaluate(y),V=null,I instanceof cs)return I;if(typeof I==\"string\"){var ze=y.parseColor(I);if(ze)return ze}else if(Array.isArray(I)&&(I.length<3||I.length>4?V=\"Invalid rbga value \"+JSON.stringify(I)+\": expected an array containing either three or four numeric values.\":V=lc(I[0],I[1],I[2],I[3]),!V))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(V||\"Could not parse color from value '\"+(typeof I==\"string\"?I:String(JSON.stringify(I)))+\"'\")}else if(this.type.kind===\"number\"){for(var rt=null,gt=0,Et=this.args;gt<Et.length;gt+=1){var or=Et[gt];if(rt=or.evaluate(y),rt===null)return 0;var _r=Number(rt);if(!isNaN(_r))return _r}throw new ps(\"Could not convert \"+JSON.stringify(rt)+\" to number.\")}else return this.type.kind===\"formatted\"?$l.fromString(Hs(this.args[0].evaluate(y))):this.type.kind===\"resolvedImage\"?fl.fromString(Hs(this.args[0].evaluate(y))):Hs(this.args[0].evaluate(y))},Po.prototype.eachChild=function(y){this.args.forEach(y)},Po.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},Po.prototype.serialize=function(){if(this.type.kind===\"formatted\")return new Gu([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind===\"resolvedImage\")return new qs(this.args[0]).serialize();var y=[\"to-\"+this.type.kind];return this.eachChild(function(I){y.push(I.serialize())}),y};var sd=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],Ko=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ko.prototype.id=function(){return this.feature&&\"id\"in this.feature?this.feature.id:null},Ko.prototype.geometryType=function(){return this.feature?typeof this.feature.type==\"number\"?sd[this.feature.type]:this.feature.type:null},Ko.prototype.geometry=function(){return this.feature&&\"geometry\"in this.feature?this.feature.geometry:null},Ko.prototype.canonicalID=function(){return this.canonical},Ko.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ko.prototype.parseColor=function(y){var I=this._parseColorCache[y];return I||(I=this._parseColorCache[y]=cs.parse(y)),I};var Pa=function(y,I,V,$){this.name=y,this.type=I,this._evaluate=V,this.args=$};Pa.prototype.evaluate=function(y){return this._evaluate(y,this.args)},Pa.prototype.eachChild=function(y){this.args.forEach(y)},Pa.prototype.outputDefined=function(){return!1},Pa.prototype.serialize=function(){return[this.name].concat(this.args.map(function(y){return y.serialize()}))},Pa.parse=function(y,I){var V,$=y[0],ae=Pa.definitions[$];if(!ae)return I.error('Unknown expression \"'+$+'\". If you wanted a literal array, use [\"literal\", [...]].',0);for(var he=Array.isArray(ae)?ae[0]:ae.type,ze=Array.isArray(ae)?[[ae[1],ae[2]]]:ae.overloads,rt=ze.filter(function(to){var ao=to[0];return!Array.isArray(ao)||ao.length===y.length-1}),gt=null,Et=0,or=rt;Et<or.length;Et+=1){var _r=or[Et],pr=_r[0],Fr=_r[1];gt=new ks(I.registry,I.path,null,I.scope);for(var oi=[],Hi=!1,Ai=1;Ai<y.length;Ai++){var bn=y[Ai],nn=Array.isArray(pr)?pr[Ai-1]:pr.type,xn=gt.parse(bn,1+oi.length,nn);if(!xn){Hi=!0;break}oi.push(xn)}if(!Hi){if(Array.isArray(pr)&&pr.length!==oi.length){gt.error(\"Expected \"+pr.length+\" arguments, but found \"+oi.length+\" instead.\");continue}for(var Pn=0;Pn<oi.length;Pn++){var Zn=Array.isArray(pr)?pr[Pn]:pr.type,ga=oi[Pn];gt.concat(Pn+1).checkSubtype(Zn,ga.type)}if(gt.errors.length===0)return new Pa($,he,Fr,oi)}}if(rt.length===1)(V=I.errors).push.apply(V,gt.errors);else{for(var ha=rt.length?rt:ze,eo=ha.map(function(to){var ao=to[0];return af(ao)}).join(\" | \"),za=[],Za=1;Za<y.length;Za++){var Jo=I.parse(y[Za],1+za.length);if(!Jo)return null;za.push(Os(Jo.type))}I.error(\"Expected arguments of type \"+eo+\", but found (\"+za.join(\", \")+\") instead.\")}return null},Pa.register=function(y,I){Pa.definitions=I;for(var V in I)y[V]=Pa};function af(m){return Array.isArray(m)?\"(\"+m.map(Os).join(\", \")+\")\":\"(\"+Os(m.type)+\"...)\"}var Hu=function(y,I,V){this.type=Vf,this.locale=V,this.caseSensitive=y,this.diacriticSensitive=I};Hu.parse=function(y,I){if(y.length!==2)return I.error(\"Expected one argument.\");var V=y[1];if(typeof V!=\"object\"||Array.isArray(V))return I.error(\"Collator options argument must be an object.\");var $=I.parse(V[\"case-sensitive\"]===void 0?!1:V[\"case-sensitive\"],1,qo);if(!$)return null;var ae=I.parse(V[\"diacritic-sensitive\"]===void 0?!1:V[\"diacritic-sensitive\"],1,qo);if(!ae)return null;var he=null;return V.locale&&(he=I.parse(V.locale,1,Oo),!he)?null:new Hu($,ae,he)},Hu.prototype.evaluate=function(y){return new nf(this.caseSensitive.evaluate(y),this.diacriticSensitive.evaluate(y),this.locale?this.locale.evaluate(y):null)},Hu.prototype.eachChild=function(y){y(this.caseSensitive),y(this.diacriticSensitive),this.locale&&y(this.locale)},Hu.prototype.outputDefined=function(){return!1},Hu.prototype.serialize=function(){var y={};return y[\"case-sensitive\"]=this.caseSensitive.serialize(),y[\"diacritic-sensitive\"]=this.diacriticSensitive.serialize(),this.locale&&(y.locale=this.locale.serialize()),[\"collator\",y]};var bl=8192;function Hf(m,y){m[0]=Math.min(m[0],y[0]),m[1]=Math.min(m[1],y[1]),m[2]=Math.max(m[2],y[0]),m[3]=Math.max(m[3],y[1])}function Ic(m){return(180+m)/360}function yf(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function Bl(m,y){return!(m[0]<=y[0]||m[2]>=y[2]||m[1]<=y[1]||m[3]>=y[3])}function Ah(m,y){var I=Ic(m[0]),V=yf(m[1]),$=Math.pow(2,y.z);return[Math.round(I*$*bl),Math.round(V*$*bl)]}function Qf(m,y,I){var V=m[0]-y[0],$=m[1]-y[1],ae=m[0]-I[0],he=m[1]-I[1];return V*he-ae*$===0&&V*ae<=0&&$*he<=0}function _f(m,y,I){return y[1]>m[1]!=I[1]>m[1]&&m[0]<(I[0]-y[0])*(m[1]-y[1])/(I[1]-y[1])+y[0]}function Yc(m,y){for(var I=!1,V=0,$=y.length;V<$;V++)for(var ae=y[V],he=0,ze=ae.length;he<ze-1;he++){if(Qf(m,ae[he],ae[he+1]))return!1;_f(m,ae[he],ae[he+1])&&(I=!I)}return I}function eh(m,y){for(var I=0;I<y.length;I++)if(Yc(m,y[I]))return!0;return!1}function th(m,y){return m[0]*y[1]-m[1]*y[0]}function ju(m,y,I,V){var $=m[0]-I[0],ae=m[1]-I[1],he=y[0]-I[0],ze=y[1]-I[1],rt=V[0]-I[0],gt=V[1]-I[1],Et=$*gt-rt*ae,or=he*gt-rt*ze;return Et>0&&or<0||Et<0&&or>0}function jf(m,y,I,V){var $=[y[0]-m[0],y[1]-m[1]],ae=[V[0]-I[0],V[1]-I[1]];return th(ae,$)===0?!1:!!(ju(m,y,I,V)&&ju(I,V,m,y))}function cc(m,y,I){for(var V=0,$=I;V<$.length;V+=1)for(var ae=$[V],he=0;he<ae.length-1;++he)if(jf(m,y,ae[he],ae[he+1]))return!0;return!1}function of(m,y){for(var I=0;I<m.length;++I)if(!Yc(m[I],y))return!1;for(var V=0;V<m.length-1;++V)if(cc(m[V],m[V+1],y))return!1;return!0}function Nl(m,y){for(var I=0;I<y.length;I++)if(of(m,y[I]))return!0;return!1}function Kc(m,y,I){for(var V=[],$=0;$<m.length;$++){for(var ae=[],he=0;he<m[$].length;he++){var ze=Ah(m[$][he],I);Hf(y,ze),ae.push(ze)}V.push(ae)}return V}function Rc(m,y,I){for(var V=[],$=0;$<m.length;$++){var ae=Kc(m[$],y,I);V.push(ae)}return V}function gs(m,y,I,V){if(m[0]<I[0]||m[0]>I[2]){var $=V*.5,ae=m[0]-I[0]>$?-V:I[0]-m[0]>$?V:0;ae===0&&(ae=m[0]-I[2]>$?-V:I[2]-m[0]>$?V:0),m[0]+=ae}Hf(y,m)}function Wf(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Wh(m,y,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],ze=0,rt=m;ze<rt.length;ze+=1)for(var gt=rt[ze],Et=0,or=gt;Et<or.length;Et+=1){var _r=or[Et],pr=[_r.x+ae[0],_r.y+ae[1]];gs(pr,y,I,$),he.push(pr)}return he}function rh(m,y,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],ze=0,rt=m;ze<rt.length;ze+=1){for(var gt=rt[ze],Et=[],or=0,_r=gt;or<_r.length;or+=1){var pr=_r[or],Fr=[pr.x+ae[0],pr.y+ae[1]];Hf(y,Fr),Et.push(Fr)}he.push(Et)}if(y[2]-y[0]<=$/2){Wf(y);for(var oi=0,Hi=he;oi<Hi.length;oi+=1)for(var Ai=Hi[oi],bn=0,nn=Ai;bn<nn.length;bn+=1){var xn=nn[bn];gs(xn,y,I,$)}}return he}function sf(m,y){var I=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],$=m.canonicalID();if(y.type===\"Polygon\"){var ae=Kc(y.coordinates,V,$),he=Wh(m.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var ze=0,rt=he;ze<rt.length;ze+=1){var gt=rt[ze];if(!Yc(gt,ae))return!1}}if(y.type===\"MultiPolygon\"){var Et=Rc(y.coordinates,V,$),or=Wh(m.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var _r=0,pr=or;_r<pr.length;_r+=1){var Fr=pr[_r];if(!eh(Fr,Et))return!1}}return!0}function Sh(m,y){var I=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],$=m.canonicalID();if(y.type===\"Polygon\"){var ae=Kc(y.coordinates,V,$),he=rh(m.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var ze=0,rt=he;ze<rt.length;ze+=1){var gt=rt[ze];if(!of(gt,ae))return!1}}if(y.type===\"MultiPolygon\"){var Et=Rc(y.coordinates,V,$),or=rh(m.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var _r=0,pr=or;_r<pr.length;_r+=1){var Fr=pr[_r];if(!Nl(Fr,Et))return!1}}return!0}var Mu=function(y,I){this.type=qo,this.geojson=y,this.geometries=I};Mu.parse=function(y,I){if(y.length!==2)return I.error(\"'within' expression requires exactly one argument, but found \"+(y.length-1)+\" instead.\");if(Fu(y[1])){var V=y[1];if(V.type===\"FeatureCollection\")for(var $=0;$<V.features.length;++$){var ae=V.features[$].geometry.type;if(ae===\"Polygon\"||ae===\"MultiPolygon\")return new Mu(V,V.features[$].geometry)}else if(V.type===\"Feature\"){var he=V.geometry.type;if(he===\"Polygon\"||he===\"MultiPolygon\")return new Mu(V,V.geometry)}else if(V.type===\"Polygon\"||V.type===\"MultiPolygon\")return new Mu(V,V)}return I.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\")},Mu.prototype.evaluate=function(y){if(y.geometry()!=null&&y.canonicalID()!=null){if(y.geometryType()===\"Point\")return sf(y,this.geometries);if(y.geometryType()===\"LineString\")return Sh(y,this.geometries)}return!1},Mu.prototype.eachChild=function(){},Mu.prototype.outputDefined=function(){return!0},Mu.prototype.serialize=function(){return[\"within\",this.geojson]};function ih(m){if(m instanceof Pa){if(m.name===\"get\"&&m.args.length===1)return!1;if(m.name===\"feature-state\")return!1;if(m.name===\"has\"&&m.args.length===1)return!1;if(m.name===\"properties\"||m.name===\"geometry-type\"||m.name===\"id\")return!1;if(/^filter-/.test(m.name))return!1}if(m instanceof Mu)return!1;var y=!0;return m.eachChild(function(I){y&&!ih(I)&&(y=!1)}),y}function js(m){if(m instanceof Pa&&m.name===\"feature-state\")return!1;var y=!0;return m.eachChild(function(I){y&&!js(I)&&(y=!1)}),y}function Eu(m,y){if(m instanceof Pa&&y.indexOf(m.name)>=0)return!1;var I=!0;return m.eachChild(function(V){I&&!Eu(V,y)&&(I=!1)}),I}var Dc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Dc.parse=function(y,I){if(y.length!==2||typeof y[1]!=\"string\")return I.error(\"'var' expression requires exactly one string literal argument.\");var V=y[1];return I.scope.has(V)?new Dc(V,I.scope.get(V)):I.error('Unknown variable \"'+V+'\". Make sure \"'+V+'\" has been bound in an enclosing \"let\" expression before using it.',1)},Dc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return[\"var\",this.name]};var ks=function(y,I,V,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=y,this.path=I,this.key=I.map(function(he){return\"[\"+he+\"]\"}).join(\"\"),this.scope=$,this.errors=ae,this.expectedType=V};ks.prototype.parse=function(y,I,V,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,V,$)._parse(y,ae):this._parse(y,ae)},ks.prototype._parse=function(y,I){(y===null||typeof y==\"string\"||typeof y==\"boolean\"||typeof y==\"number\")&&(y=[\"literal\",y]);function V(Et,or,_r){return _r===\"assert\"?new xl(or,[Et]):_r===\"coerce\"?new Po(or,[Et]):Et}if(Array.isArray(y)){if(y.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');var $=y[0];if(typeof $!=\"string\")return this.error(\"Expression name must be a string, but found \"+typeof $+' instead. If you wanted a literal array, use [\"literal\", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(y,this);if(!he)return null;if(this.expectedType){var ze=this.expectedType,rt=he.type;if((ze.kind===\"string\"||ze.kind===\"number\"||ze.kind===\"boolean\"||ze.kind===\"object\"||ze.kind===\"array\")&&rt.kind===\"value\")he=V(he,ze,I.typeAnnotation||\"assert\");else if((ze.kind===\"color\"||ze.kind===\"formatted\"||ze.kind===\"resolvedImage\")&&(rt.kind===\"value\"||rt.kind===\"string\"))he=V(he,ze,I.typeAnnotation||\"coerce\");else if(this.checkSubtype(ze,rt))return null}if(!(he instanceof Go)&&he.type.kind!==\"resolvedImage\"&&bc(he)){var gt=new Ko;try{he=new Go(he.type,he.evaluate(gt))}catch(Et){return this.error(Et.message),null}}return he}return this.error('Unknown expression \"'+$+'\". If you wanted a literal array, use [\"literal\", [...]].',0)}else return typeof y==\"undefined\"?this.error(\"'undefined' value invalid. Use null instead.\"):typeof y==\"object\"?this.error('Bare objects invalid. Use [\"literal\", {...}] instead.'):this.error(\"Expected an array, but found \"+typeof y+\" instead.\")},ks.prototype.concat=function(y,I,V){var $=typeof y==\"number\"?this.path.concat(y):this.path,ae=V?this.scope.concat(V):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(y){for(var I=[],V=arguments.length-1;V-- >0;)I[V]=arguments[V+1];var $=\"\"+this.key+I.map(function(ae){return\"[\"+ae+\"]\"}).join(\"\");this.errors.push(new Ns($,y))},ks.prototype.checkSubtype=function(y,I){var V=oc(y,I);return V&&this.error(V),V};function bc(m){if(m instanceof Dc)return bc(m.boundExpression);if(m instanceof Pa&&m.name===\"error\")return!1;if(m instanceof Hu)return!1;if(m instanceof Mu)return!1;var y=m instanceof Po||m instanceof xl,I=!0;return m.eachChild(function(V){y?I=I&&bc(V):I=I&&V instanceof Go}),I?ih(m)&&Eu(m,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"]):!1}function hu(m,y){for(var I=m.length-1,V=0,$=I,ae=0,he,ze;V<=$;)if(ae=Math.floor((V+$)/2),he=m[ae],ze=m[ae+1],he<=y){if(ae===I||y<ze)return ae;V=ae+1}else if(he>y)$=ae-1;else throw new ps(\"Input is not a number.\");return 0}var _u=function(y,I,V){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=V;$<ae.length;$+=1){var he=ae[$],ze=he[0],rt=he[1];this.labels.push(ze),this.outputs.push(rt)}};_u.parse=function(y,I){if(y.length-1<4)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if((y.length-1)%2!==0)return I.error(\"Expected an even number of arguments.\");var V=I.parse(y[1],1,aa);if(!V)return null;var $=[],ae=null;I.expectedType&&I.expectedType.kind!==\"value\"&&(ae=I.expectedType);for(var he=1;he<y.length;he+=2){var ze=he===1?-1/0:y[he],rt=y[he+1],gt=he,Et=he+1;if(typeof ze!=\"number\")return I.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',gt);if($.length&&$[$.length-1][0]>=ze)return I.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',gt);var or=I.parse(rt,Et,ae);if(!or)return null;ae=ae||or.type,$.push([ze,or])}return new _u(ae,V,$)},_u.prototype.evaluate=function(y){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return V[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(y);var he=hu(I,$);return V[he].evaluate(y)},_u.prototype.eachChild=function(y){y(this.input);for(var I=0,V=this.outputs;I<V.length;I+=1){var $=V[I];y($)}},_u.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})},_u.prototype.serialize=function(){for(var y=[\"step\",this.input.serialize()],I=0;I<this.labels.length;I++)I>0&&y.push(this.labels[I]),y.push(this.outputs[I].serialize());return y};function nl(m,y,I){return m*(1-I)+y*I}function nh(m,y,I){return new cs(nl(m.r,y.r,I),nl(m.g,y.g,I),nl(m.b,y.b,I),nl(m.a,y.a,I))}function Mh(m,y,I){return m.map(function(V,$){return nl(V,y[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Mh}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,Ou=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,lf=180/Math.PI;function Xh(m){return m>bf?Math.pow(m,1/3):m/Ou+xf}function If(m){return m>Pf?m*m*m:Ou*(m-xf)}function Cs(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function du(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function ku(m){var y=du(m.r),I=du(m.g),V=du(m.b),$=Xh((.4124564*y+.3575761*I+.1804375*V)/Fc),ae=Xh((.2126729*y+.7151522*I+.072175*V)/wc),he=Xh((.0193339*y+.119192*I+.9503041*V)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:m.a}}function Xf(m){var y=(m.l+16)/116,I=isNaN(m.a)?y:y+m.a/500,V=isNaN(m.b)?y:y-m.b/200;return y=wc*If(y),I=Fc*If(I),V=bd*If(V),new cs(Cs(3.2404542*I-1.5371385*y-.4985314*V),Cs(-.969266*I+1.8760108*y+.041556*V),Cs(.0556434*I-.2040259*y+1.0572252*V),m.alpha)}function Us(m,y,I){return{l:nl(m.l,y.l,I),a:nl(m.a,y.a,I),b:nl(m.b,y.b,I),alpha:nl(m.alpha,y.alpha,I)}}function wf(m){var y=ku(m),I=y.l,V=y.a,$=y.b,ae=Math.atan2($,V)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+$*$),l:I,alpha:m.a}}function zc(m){var y=m.h*jl,I=m.c,V=m.l;return Xf({l:V,a:Math.cos(y)*I,b:Math.sin(y)*I,alpha:m.alpha})}function Wu(m,y,I){var V=y-m;return m+I*(V>180||V<-180?V-360*Math.round(V/360):V)}function Rf(m,y,I){return{h:Wu(m.h,y.h,I),c:nl(m.c,y.c,I),l:nl(m.l,y.l,I),alpha:nl(m.alpha,y.alpha,I)}}var Xu={forward:ku,reverse:Xf,interpolate:Us},uf={forward:wf,reverse:zc,interpolate:Rf},Zf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(y,I,V,$,ae){this.type=y,this.operator=I,this.interpolation=V,this.input=$,this.labels=[],this.outputs=[];for(var he=0,ze=ae;he<ze.length;he+=1){var rt=ze[he],gt=rt[0],Et=rt[1];this.labels.push(gt),this.outputs.push(Et)}};Wl.interpolationFactor=function(y,I,V,$){var ae=0;if(y.name===\"exponential\")ae=ah(I,y.base,V,$);else if(y.name===\"linear\")ae=ah(I,1,V,$);else if(y.name===\"cubic-bezier\"){var he=y.controlPoints,ze=new s(he[0],he[1],he[2],he[3]);ae=ze.solve(ah(I,1,V,$))}return ae},Wl.parse=function(y,I){var V=y[0],$=y[1],ae=y[2],he=y.slice(3);if(!Array.isArray($)||$.length===0)return I.error(\"Expected an interpolation type expression.\",1);if($[0]===\"linear\")$={name:\"linear\"};else if($[0]===\"exponential\"){var ze=$[1];if(typeof ze!=\"number\")return I.error(\"Exponential interpolation requires a numeric base.\",1,1);$={name:\"exponential\",base:ze}}else if($[0]===\"cubic-bezier\"){var rt=$.slice(1);if(rt.length!==4||rt.some(function(Ai){return typeof Ai!=\"number\"||Ai<0||Ai>1}))return I.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);$={name:\"cubic-bezier\",controlPoints:rt}}else return I.error(\"Unknown interpolation type \"+String($[0]),1,0);if(y.length-1<4)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if((y.length-1)%2!==0)return I.error(\"Expected an even number of arguments.\");if(ae=I.parse(ae,2,aa),!ae)return null;var gt=[],Et=null;V===\"interpolate-hcl\"||V===\"interpolate-lab\"?Et=ql:I.expectedType&&I.expectedType.kind!==\"value\"&&(Et=I.expectedType);for(var or=0;or<he.length;or+=2){var _r=he[or],pr=he[or+1],Fr=or+3,oi=or+4;if(typeof _r!=\"number\")return I.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Fr);if(gt.length&&gt[gt.length-1][0]>=_r)return I.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',Fr);var Hi=I.parse(pr,oi,Et);if(!Hi)return null;Et=Et||Hi.type,gt.push([_r,Hi])}return Et.kind!==\"number\"&&Et.kind!==\"color\"&&!(Et.kind===\"array\"&&Et.itemType.kind===\"number\"&&typeof Et.N==\"number\")?I.error(\"Type \"+Os(Et)+\" is not interpolatable.\"):new Wl(Et,V,$,ae,gt)},Wl.prototype.evaluate=function(y){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return V[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(y);var he=hu(I,$),ze=I[he],rt=I[he+1],gt=Wl.interpolationFactor(this.interpolation,$,ze,rt),Et=V[he].evaluate(y),or=V[he+1].evaluate(y);return this.operator===\"interpolate\"?zu[this.type.kind.toLowerCase()](Et,or,gt):this.operator===\"interpolate-hcl\"?uf.reverse(uf.interpolate(uf.forward(Et),uf.forward(or),gt)):Xu.reverse(Xu.interpolate(Xu.forward(Et),Xu.forward(or),gt))},Wl.prototype.eachChild=function(y){y(this.input);for(var I=0,V=this.outputs;I<V.length;I+=1){var $=V[I];y($)}},Wl.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})},Wl.prototype.serialize=function(){var y;this.interpolation.name===\"linear\"?y=[\"linear\"]:this.interpolation.name===\"exponential\"?this.interpolation.base===1?y=[\"linear\"]:y=[\"exponential\",this.interpolation.base]:y=[\"cubic-bezier\"].concat(this.interpolation.controlPoints);for(var I=[this.operator,y,this.input.serialize()],V=0;V<this.labels.length;V++)I.push(this.labels[V],this.outputs[V].serialize());return I};function ah(m,y,I,V){var $=V-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Zu=function(y,I){this.type=y,this.args=I};Zu.parse=function(y,I){if(y.length<2)return I.error(\"Expectected at least one argument.\");var V=null,$=I.expectedType;$&&$.kind!==\"value\"&&(V=$);for(var ae=[],he=0,ze=y.slice(1);he<ze.length;he+=1){var rt=ze[he],gt=I.parse(rt,1+ae.length,V,void 0,{typeAnnotation:\"omit\"});if(!gt)return null;V=V||gt.type,ae.push(gt)}var Et=$&&ae.some(function(or){return oc($,or.type)});return Et?new Zu(Do,ae):new Zu(V,ae)},Zu.prototype.evaluate=function(y){for(var I=null,V=0,$,ae=0,he=this.args;ae<he.length;ae+=1){var ze=he[ae];if(V++,I=ze.evaluate(y),I&&I instanceof fl&&!I.available&&($||($=I.name),I=null,V===this.args.length&&(I=$)),I!==null)break}return I},Zu.prototype.eachChild=function(y){this.args.forEach(y)},Zu.prototype.outputDefined=function(){return this.args.every(function(y){return y.outputDefined()})},Zu.prototype.serialize=function(){var y=[\"coalesce\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Oc=function(y,I){this.type=I.type,this.bindings=[].concat(y),this.result=I};Oc.prototype.evaluate=function(y){return this.result.evaluate(y)},Oc.prototype.eachChild=function(y){for(var I=0,V=this.bindings;I<V.length;I+=1){var $=V[I];y($[1])}y(this.result)},Oc.parse=function(y,I){if(y.length<4)return I.error(\"Expected at least 3 arguments, but found \"+(y.length-1)+\" instead.\");for(var V=[],$=1;$<y.length-1;$+=2){var ae=y[$];if(typeof ae!=\"string\")return I.error(\"Expected string, but found \"+typeof ae+\" instead.\",$);if(/[^a-zA-Z0-9_]/.test(ae))return I.error(\"Variable names must contain only alphanumeric characters or '_'.\",$);var he=I.parse(y[$+1],$+1);if(!he)return null;V.push([ae,he])}var ze=I.parse(y[y.length-1],y.length-1,I.expectedType,V);return ze?new Oc(V,ze):null},Oc.prototype.outputDefined=function(){return this.result.outputDefined()},Oc.prototype.serialize=function(){for(var y=[\"let\"],I=0,V=this.bindings;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];y.push(ae,he.serialize())}return y.push(this.result.serialize()),y};var Tc=function(y,I,V){this.type=y,this.index=I,this.input=V};Tc.parse=function(y,I){if(y.length!==3)return I.error(\"Expected 2 arguments, but found \"+(y.length-1)+\" instead.\");var V=I.parse(y[1],1,aa),$=I.parse(y[2],2,Jl(I.expectedType||Do));if(!V||!$)return null;var ae=$.type;return new Tc(ae.itemType,V,$)},Tc.prototype.evaluate=function(y){var I=this.index.evaluate(y),V=this.input.evaluate(y);if(I<0)throw new ps(\"Array index out of bounds: \"+I+\" < 0.\");if(I>=V.length)throw new ps(\"Array index out of bounds: \"+I+\" > \"+(V.length-1)+\".\");if(I!==Math.floor(I))throw new ps(\"Array index must be an integer, but found \"+I+\" instead.\");return V[I]},Tc.prototype.eachChild=function(y){y(this.index),y(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return[\"at\",this.index.serialize(),this.input.serialize()]};var wl=function(y,I){this.type=qo,this.needle=y,this.haystack=I};wl.parse=function(y,I){if(y.length!==3)return I.error(\"Expected 2 arguments, but found \"+(y.length-1)+\" instead.\");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);return!V||!$?null:Cf(V.type,[qo,Oo,aa,ac,Do])?new wl(V,$):I.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Os(V.type)+\" instead\")},wl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),V=this.haystack.evaluate(y);if(!V)return!1;if(!sc(I,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ps(\"Expected first argument to be of type boolean, string, number or null, but found \"+Os(Es(I))+\" instead.\");if(!sc(V,[\"string\",\"array\"]))throw new ps(\"Expected second argument to be of type array or string, but found \"+Os(Es(V))+\" instead.\");return V.indexOf(I)>=0},wl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return[\"in\",this.needle.serialize(),this.haystack.serialize()]};var vu=function(y,I,V){this.type=aa,this.needle=y,this.haystack=I,this.fromIndex=V};vu.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error(\"Expected 3 or 4 arguments, but found \"+(y.length-1)+\" instead.\");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);if(!V||!$)return null;if(!Cf(V.type,[qo,Oo,aa,ac,Do]))return I.error(\"Expected first argument to be of type boolean, string, number or null, but found \"+Os(V.type)+\" instead\");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new vu(V,$,ae):null}else return new vu(V,$)},vu.prototype.evaluate=function(y){var I=this.needle.evaluate(y),V=this.haystack.evaluate(y);if(!sc(I,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ps(\"Expected first argument to be of type boolean, string, number or null, but found \"+Os(Es(I))+\" instead.\");if(!sc(V,[\"string\",\"array\"]))throw new ps(\"Expected second argument to be of type array or string, but found \"+Os(Es(V))+\" instead.\");if(this.fromIndex){var $=this.fromIndex.evaluate(y);return V.indexOf(I,$)}return V.indexOf(I)},vu.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var y=this.fromIndex.serialize();return[\"index-of\",this.needle.serialize(),this.haystack.serialize(),y]}return[\"index-of\",this.needle.serialize(),this.haystack.serialize()]};var qc=function(y,I,V,$,ae,he){this.inputType=y,this.type=I,this.input=V,this.cases=$,this.outputs=ae,this.otherwise=he};qc.parse=function(y,I){if(y.length<5)return I.error(\"Expected at least 4 arguments, but found only \"+(y.length-1)+\".\");if(y.length%2!==1)return I.error(\"Expected an even number of arguments.\");var V,$;I.expectedType&&I.expectedType.kind!==\"value\"&&($=I.expectedType);for(var ae={},he=[],ze=2;ze<y.length-1;ze+=2){var rt=y[ze],gt=y[ze+1];Array.isArray(rt)||(rt=[rt]);var Et=I.concat(ze);if(rt.length===0)return Et.error(\"Expected at least one branch label.\");for(var or=0,_r=rt;or<_r.length;or+=1){var pr=_r[or];if(typeof pr!=\"number\"&&typeof pr!=\"string\")return Et.error(\"Branch labels must be numbers or strings.\");if(typeof pr==\"number\"&&Math.abs(pr)>Number.MAX_SAFE_INTEGER)return Et.error(\"Branch labels must be integers no larger than \"+Number.MAX_SAFE_INTEGER+\".\");if(typeof pr==\"number\"&&Math.floor(pr)!==pr)return Et.error(\"Numeric branch labels must be integer values.\");if(!V)V=Es(pr);else if(Et.checkSubtype(V,Es(pr)))return null;if(typeof ae[String(pr)]!=\"undefined\")return Et.error(\"Branch labels must be unique.\");ae[String(pr)]=he.length}var Fr=I.parse(gt,ze,$);if(!Fr)return null;$=$||Fr.type,he.push(Fr)}var oi=I.parse(y[1],1,Do);if(!oi)return null;var Hi=I.parse(y[y.length-1],y.length-1,$);return!Hi||oi.type.kind!==\"value\"&&I.concat(1).checkSubtype(V,oi.type)?null:new qc(V,$,oi,ae,he,Hi)},qc.prototype.evaluate=function(y){var I=this.input.evaluate(y),V=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return V.evaluate(y)},qc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},qc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},qc.prototype.serialize=function(){for(var y=this,I=[\"match\",this.input.serialize()],V=Object.keys(this.cases).sort(),$=[],ae={},he=0,ze=V;he<ze.length;he+=1){var rt=ze[he],gt=ae[this.cases[rt]];gt===void 0?(ae[this.cases[rt]]=$.length,$.push([this.cases[rt],[rt]])):$[gt][1].push(rt)}for(var Et=function(oi){return y.inputType.kind===\"number\"?Number(oi):oi},or=0,_r=$;or<_r.length;or+=1){var pr=_r[or],gt=pr[0],Fr=pr[1];Fr.length===1?I.push(Et(Fr[0])):I.push(Fr.map(Et)),I.push(this.outputs[outputIndex$1].serialize())}return I.push(this.otherwise.serialize()),I};var cf=function(y,I,V){this.type=y,this.branches=I,this.otherwise=V};cf.parse=function(y,I){if(y.length<4)return I.error(\"Expected at least 3 arguments, but found only \"+(y.length-1)+\".\");if(y.length%2!==0)return I.error(\"Expected an odd number of arguments.\");var V;I.expectedType&&I.expectedType.kind!==\"value\"&&(V=I.expectedType);for(var $=[],ae=1;ae<y.length-1;ae+=2){var he=I.parse(y[ae],ae,qo);if(!he)return null;var ze=I.parse(y[ae+1],ae+1,V);if(!ze)return null;$.push([he,ze]),V=V||ze.type}var rt=I.parse(y[y.length-1],y.length-1,V);return rt?new cf(V,$,rt):null},cf.prototype.evaluate=function(y){for(var I=0,V=this.branches;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];if(ae.evaluate(y))return he.evaluate(y)}return this.otherwise.evaluate(y)},cf.prototype.eachChild=function(y){for(var I=0,V=this.branches;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];y(ae),y(he)}y(this.otherwise)},cf.prototype.outputDefined=function(){return this.branches.every(function(y){var I=y[0],V=y[1];return V.outputDefined()})&&this.otherwise.outputDefined()},cf.prototype.serialize=function(){var y=[\"case\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var fc=function(y,I,V,$){this.type=y,this.input=I,this.beginIndex=V,this.endIndex=$};fc.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error(\"Expected 3 or 4 arguments, but found \"+(y.length-1)+\" instead.\");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,aa);if(!V||!$)return null;if(!Cf(V.type,[Jl(Do),Oo,Do]))return I.error(\"Expected first argument to be of type array or string, but found \"+Os(V.type)+\" instead\");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new fc(V.type,V,$,ae):null}else return new fc(V.type,V,$)},fc.prototype.evaluate=function(y){var I=this.input.evaluate(y),V=this.beginIndex.evaluate(y);if(!sc(I,[\"string\",\"array\"]))throw new ps(\"Expected first argument to be of type array or string, but found \"+Os(Es(I))+\" instead.\");if(this.endIndex){var $=this.endIndex.evaluate(y);return I.slice(V,$)}return I.slice(V)},fc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var y=this.endIndex.serialize();return[\"slice\",this.input.serialize(),this.beginIndex.serialize(),y]}return[\"slice\",this.input.serialize(),this.beginIndex.serialize()]};function Bc(m,y){return m===\"==\"||m===\"!=\"?y.kind===\"boolean\"||y.kind===\"string\"||y.kind===\"number\"||y.kind===\"null\"||y.kind===\"value\":y.kind===\"string\"||y.kind===\"number\"||y.kind===\"value\"}function At(m,y,I){return y===I}function Xt(m,y,I){return y!==I}function Cr(m,y,I){return y<I}function Ar(m,y,I){return y>I}function Kr(m,y,I){return y<=I}function ki(m,y,I){return y>=I}function Xi(m,y,I,V){return V.compare(y,I)===0}function dn(m,y,I,V){return!Xi(m,y,I,V)}function wn(m,y,I,V){return V.compare(y,I)<0}function Nn(m,y,I,V){return V.compare(y,I)>0}function Yi(m,y,I,V){return V.compare(y,I)<=0}function Qi(m,y,I,V){return V.compare(y,I)>=0}function on(m,y,I){var V=m!==\"==\"&&m!==\"!=\";return function(){function $(ae,he,ze){this.type=qo,this.lhs=ae,this.rhs=he,this.collator=ze,this.hasUntypedArgument=ae.type.kind===\"value\"||he.type.kind===\"value\"}return $.parse=function(he,ze){if(he.length!==3&&he.length!==4)return ze.error(\"Expected two or three arguments.\");var rt=he[0],gt=ze.parse(he[1],1,Do);if(!gt)return null;if(!Bc(rt,gt.type))return ze.concat(1).error('\"'+rt+`\" comparisons are not supported for type '`+Os(gt.type)+\"'.\");var Et=ze.parse(he[2],2,Do);if(!Et)return null;if(!Bc(rt,Et.type))return ze.concat(2).error('\"'+rt+`\" comparisons are not supported for type '`+Os(Et.type)+\"'.\");if(gt.type.kind!==Et.type.kind&&gt.type.kind!==\"value\"&&Et.type.kind!==\"value\")return ze.error(\"Cannot compare types '\"+Os(gt.type)+\"' and '\"+Os(Et.type)+\"'.\");V&&(gt.type.kind===\"value\"&&Et.type.kind!==\"value\"?gt=new xl(Et.type,[gt]):gt.type.kind!==\"value\"&&Et.type.kind===\"value\"&&(Et=new xl(gt.type,[Et])));var or=null;if(he.length===4){if(gt.type.kind!==\"string\"&&Et.type.kind!==\"string\"&&gt.type.kind!==\"value\"&&Et.type.kind!==\"value\")return ze.error(\"Cannot use collator to compare non-string types.\");if(or=ze.parse(he[3],3,Vf),!or)return null}return new $(gt,Et,or)},$.prototype.evaluate=function(he){var ze=this.lhs.evaluate(he),rt=this.rhs.evaluate(he);if(V&&this.hasUntypedArgument){var gt=Es(ze),Et=Es(rt);if(gt.kind!==Et.kind||!(gt.kind===\"string\"||gt.kind===\"number\"))throw new ps('Expected arguments for \"'+m+'\" to be (string, string) or (number, number), but found ('+gt.kind+\", \"+Et.kind+\") instead.\")}if(this.collator&&!V&&this.hasUntypedArgument){var or=Es(ze),_r=Es(rt);if(or.kind!==\"string\"||_r.kind!==\"string\")return y(he,ze,rt)}return this.collator?I(he,ze,rt,this.collator.evaluate(he)):y(he,ze,rt)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[m];return this.eachChild(function(ze){he.push(ze.serialize())}),he},$}()}var Fi=on(\"==\",At,Xi),Qn=on(\"!=\",Xt,dn),Ca=on(\"<\",Cr,wn),Ra=on(\">\",Ar,Nn),La=on(\"<=\",Kr,Yi),Na=on(\">=\",ki,Qi),Yn=function(y,I,V,$,ae){this.type=Oo,this.number=y,this.locale=I,this.currency=V,this.minFractionDigits=$,this.maxFractionDigits=ae};Yn.parse=function(y,I){if(y.length!==3)return I.error(\"Expected two arguments.\");var V=I.parse(y[1],1,aa);if(!V)return null;var $=y[2];if(typeof $!=\"object\"||Array.isArray($))return I.error(\"NumberFormat options argument must be an object.\");var ae=null;if($.locale&&(ae=I.parse($.locale,1,Oo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,Oo),!he))return null;var ze=null;if($[\"min-fraction-digits\"]&&(ze=I.parse($[\"min-fraction-digits\"],1,aa),!ze))return null;var rt=null;return $[\"max-fraction-digits\"]&&(rt=I.parse($[\"max-fraction-digits\"],1,aa),!rt)?null:new Yn(V,ae,he,ze,rt)},Yn.prototype.evaluate=function(y){return new Intl.NumberFormat(this.locale?this.locale.evaluate(y):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(y):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(y):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(y):void 0}).format(this.number.evaluate(y))},Yn.prototype.eachChild=function(y){y(this.number),this.locale&&y(this.locale),this.currency&&y(this.currency),this.minFractionDigits&&y(this.minFractionDigits),this.maxFractionDigits&&y(this.maxFractionDigits)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var y={};return this.locale&&(y.locale=this.locale.serialize()),this.currency&&(y.currency=this.currency.serialize()),this.minFractionDigits&&(y[\"min-fraction-digits\"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(y[\"max-fraction-digits\"]=this.maxFractionDigits.serialize()),[\"number-format\",this.number.serialize(),y]};var Dn=function(y){this.type=aa,this.input=y};Dn.parse=function(y,I){if(y.length!==2)return I.error(\"Expected 1 argument, but found \"+(y.length-1)+\" instead.\");var V=I.parse(y[1],1);return V?V.type.kind!==\"array\"&&V.type.kind!==\"string\"&&V.type.kind!==\"value\"?I.error(\"Expected argument of type string or array, but found \"+Os(V.type)+\" instead.\"):new Dn(V):null},Dn.prototype.evaluate=function(y){var I=this.input.evaluate(y);if(typeof I==\"string\")return I.length;if(Array.isArray(I))return I.length;throw new ps(\"Expected value to be of type string or array, but found \"+Os(Es(I))+\" instead.\")},Dn.prototype.eachChild=function(y){y(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var y=[\"length\"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ka={\"==\":Fi,\"!=\":Qn,\">\":Ra,\"<\":Ca,\">=\":Na,\"<=\":La,array:xl,at:Tc,boolean:xl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:qs,in:wl,\"index-of\":vu,interpolate:Wl,\"interpolate-hcl\":Wl,\"interpolate-lab\":Wl,length:Dn,let:Oc,literal:Go,match:qc,number:xl,\"number-format\":Yn,object:xl,slice:fc,step:_u,string:xl,\"to-boolean\":Po,\"to-color\":Po,\"to-number\":Po,\"to-string\":Po,var:Dc,within:Mu};function bo(m,y){var I=y[0],V=y[1],$=y[2],ae=y[3];I=I.evaluate(m),V=V.evaluate(m),$=$.evaluate(m);var he=ae?ae.evaluate(m):1,ze=lc(I,V,$,he);if(ze)throw new ps(ze);return new cs(I/255*he,V/255*he,$/255*he,he)}function Zo(m,y){return m in y}function Ss(m,y){var I=y[m];return typeof I==\"undefined\"?null:I}function as(m,y,I,V){for(;I<=V;){var $=I+V>>1;if(y[$]===m)return!0;y[$]>m?V=$-1:I=$+1}return!1}function ws(m){return{type:m}}Pa.register(Ka,{error:[rf,[Oo],function(m,y){var I=y[0];throw new ps(I.evaluate(m))}],typeof:[Oo,[Do],function(m,y){var I=y[0];return Os(Es(I.evaluate(m)))}],\"to-rgba\":[Jl(aa,4),[ql],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[ql,[aa,aa,aa],bo],rgba:[ql,[aa,aa,aa,aa],bo],has:{type:qo,overloads:[[[Oo],function(m,y){var I=y[0];return Zo(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],V=y[1];return Zo(I.evaluate(m),V.evaluate(m))}]]},get:{type:Do,overloads:[[[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],V=y[1];return Ss(I.evaluate(m),V.evaluate(m))}]]},\"feature-state\":[Do,[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.featureState||{})}],properties:[Pc,[],function(m){return m.properties()}],\"geometry-type\":[Oo,[],function(m){return m.geometryType()}],id:[Do,[],function(m){return m.id()}],zoom:[aa,[],function(m){return m.globals.zoom}],\"heatmap-density\":[aa,[],function(m){return m.globals.heatmapDensity||0}],\"line-progress\":[aa,[],function(m){return m.globals.lineProgress||0}],accumulated:[Do,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],\"+\":[aa,ws(aa),function(m,y){for(var I=0,V=0,$=y;V<$.length;V+=1){var ae=$[V];I+=ae.evaluate(m)}return I}],\"*\":[aa,ws(aa),function(m,y){for(var I=1,V=0,$=y;V<$.length;V+=1){var ae=$[V];I*=ae.evaluate(m)}return I}],\"-\":{type:aa,overloads:[[[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)-V.evaluate(m)}],[[aa],function(m,y){var I=y[0];return-I.evaluate(m)}]]},\"/\":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)/V.evaluate(m)}],\"%\":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)%V.evaluate(m)}],ln2:[aa,[],function(){return Math.LN2}],pi:[aa,[],function(){return Math.PI}],e:[aa,[],function(){return Math.E}],\"^\":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return Math.pow(I.evaluate(m),V.evaluate(m))}],sqrt:[aa,[aa],function(m,y){var I=y[0];return Math.sqrt(I.evaluate(m))}],log10:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN10}],ln:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))}],log2:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN2}],sin:[aa,[aa],function(m,y){var I=y[0];return Math.sin(I.evaluate(m))}],cos:[aa,[aa],function(m,y){var I=y[0];return Math.cos(I.evaluate(m))}],tan:[aa,[aa],function(m,y){var I=y[0];return Math.tan(I.evaluate(m))}],asin:[aa,[aa],function(m,y){var I=y[0];return Math.asin(I.evaluate(m))}],acos:[aa,[aa],function(m,y){var I=y[0];return Math.acos(I.evaluate(m))}],atan:[aa,[aa],function(m,y){var I=y[0];return Math.atan(I.evaluate(m))}],min:[aa,ws(aa),function(m,y){return Math.min.apply(Math,y.map(function(I){return I.evaluate(m)}))}],max:[aa,ws(aa),function(m,y){return Math.max.apply(Math,y.map(function(I){return I.evaluate(m)}))}],abs:[aa,[aa],function(m,y){var I=y[0];return Math.abs(I.evaluate(m))}],round:[aa,[aa],function(m,y){var I=y[0],V=I.evaluate(m);return V<0?-Math.round(-V):Math.round(V)}],floor:[aa,[aa],function(m,y){var I=y[0];return Math.floor(I.evaluate(m))}],ceil:[aa,[aa],function(m,y){var I=y[0];return Math.ceil(I.evaluate(m))}],\"filter-==\":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1];return m.properties()[I.value]===V.value}],\"filter-id-==\":[qo,[Do],function(m,y){var I=y[0];return m.id()===I.value}],\"filter-type-==\":[qo,[Oo],function(m,y){var I=y[0];return m.geometryType()===I.value}],\"filter-<\":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<ae}],\"filter-id-<\":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V<$}],\"filter->\":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>ae}],\"filter-id->\":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V>$}],\"filter-<=\":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<=ae}],\"filter-id-<=\":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V<=$}],\"filter->=\":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>=ae}],\"filter-id->=\":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V>=$}],\"filter-has\":[qo,[Do],function(m,y){var I=y[0];return I.value in m.properties()}],\"filter-has-id\":[qo,[],function(m){return m.id()!==null&&m.id()!==void 0}],\"filter-type-in\":[qo,[Jl(Oo)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],\"filter-id-in\":[qo,[Jl(Do)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],\"filter-in-small\":[qo,[Oo,Jl(Do)],function(m,y){var I=y[0],V=y[1];return V.value.indexOf(m.properties()[I.value])>=0}],\"filter-in-large\":[qo,[Oo,Jl(Do)],function(m,y){var I=y[0],V=y[1];return as(m.properties()[I.value],V.value,0,V.value.length-1)}],all:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)&&V.evaluate(m)}],[ws(qo),function(m,y){for(var I=0,V=y;I<V.length;I+=1){var $=V[I];if(!$.evaluate(m))return!1}return!0}]]},any:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)||V.evaluate(m)}],[ws(qo),function(m,y){for(var I=0,V=y;I<V.length;I+=1){var $=V[I];if($.evaluate(m))return!0}return!1}]]},\"!\":[qo,[qo],function(m,y){var I=y[0];return!I.evaluate(m)}],\"is-supported-script\":[qo,[Oo],function(m,y){var I=y[0],V=m.globals&&m.globals.isSupportedScript;return V?V(I.evaluate(m)):!0}],upcase:[Oo,[Oo],function(m,y){var I=y[0];return I.evaluate(m).toUpperCase()}],downcase:[Oo,[Oo],function(m,y){var I=y[0];return I.evaluate(m).toLowerCase()}],concat:[Oo,ws(Do),function(m,y){return y.map(function(I){return Hs(I.evaluate(m))}).join(\"\")}],\"resolved-locale\":[Oo,[Vf],function(m,y){var I=y[0];return I.evaluate(m).resolvedLocale()}]});function Ho(m){return{result:\"success\",value:m}}function ml(m){return{result:\"error\",value:m}}function Ws(m){return m[\"property-type\"]===\"data-driven\"||m[\"property-type\"]===\"cross-faded-data-driven\"}function Ls(m){return!!m.expression&&m.expression.parameters.indexOf(\"zoom\")>-1}function va(m){return!!m.expression&&m.expression.interpolated}function no(m){return m instanceof Number?\"number\":m instanceof String?\"string\":m instanceof Boolean?\"boolean\":Array.isArray(m)?\"array\":m===null?\"null\":typeof m}function ys(m){return typeof m==\"object\"&&m!==null&&!Array.isArray(m)}function rs(m){return m}function Ql(m,y){var I=y.type===\"color\",V=m.stops&&typeof m.stops[0][0]==\"object\",$=V||m.property!==void 0,ae=V||!$,he=m.type||(va(y)?\"exponential\":\"interval\");if(I&&(m=Ol({},m),m.stops&&(m.stops=m.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),m.default?m.default=cs.parse(m.default):m.default=cs.parse(y.default)),m.colorSpace&&m.colorSpace!==\"rgb\"&&!Zf[m.colorSpace])throw new Error(\"Unknown color space: \"+m.colorSpace);var ze,rt,gt;if(he===\"exponential\")ze=pu;else if(he===\"interval\")ze=Nc;else if(he===\"categorical\"){ze=Yu,rt=Object.create(null);for(var Et=0,or=m.stops;Et<or.length;Et+=1){var _r=or[Et];rt[_r[0]]=_r[1]}gt=typeof m.stops[0][0]}else if(he===\"identity\")ze=Uc;else throw new Error('Unknown function type \"'+he+'\"');if(V){for(var pr={},Fr=[],oi=0;oi<m.stops.length;oi++){var Hi=m.stops[oi],Ai=Hi[0].zoom;pr[Ai]===void 0&&(pr[Ai]={zoom:Ai,type:m.type,property:m.property,default:m.default,stops:[]},Fr.push(Ai)),pr[Ai].stops.push([Hi[0].value,Hi[1]])}for(var bn=[],nn=0,xn=Fr;nn<xn.length;nn+=1){var Pn=xn[nn];bn.push([pr[Pn].zoom,Ql(pr[Pn],y)])}var Zn={name:\"linear\"};return{kind:\"composite\",interpolationType:Zn,interpolationFactor:Wl.interpolationFactor.bind(void 0,Zn),zoomStops:bn.map(function(ha){return ha[0]}),evaluate:function(eo,za){var Za=eo.zoom;return pu({stops:bn,base:m.base},y,Za).evaluate(Za,za)}}}else if(ae){var ga=he===\"exponential\"?{name:\"exponential\",base:m.base!==void 0?m.base:1}:null;return{kind:\"camera\",interpolationType:ga,interpolationFactor:Wl.interpolationFactor.bind(void 0,ga),zoomStops:m.stops.map(function(ha){return ha[0]}),evaluate:function(ha){var eo=ha.zoom;return ze(m,y,eo,rt,gt)}}}else return{kind:\"source\",evaluate:function(eo,za){var Za=za&&za.properties?za.properties[m.property]:void 0;return Za===void 0?Cu(m.default,y.default):ze(m,y,Za,rt,gt)}}}function Cu(m,y,I){if(m!==void 0)return m;if(y!==void 0)return y;if(I!==void 0)return I}function Yu(m,y,I,V,$){var ae=typeof I===$?V[I]:void 0;return Cu(ae,m.default,y.default)}function Nc(m,y,I){if(no(I)!==\"number\")return Cu(m.default,y.default);var V=m.stops.length;if(V===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[V-1][0])return m.stops[V-1][1];var $=hu(m.stops.map(function(ae){return ae[0]}),I);return m.stops[$][1]}function pu(m,y,I){var V=m.base!==void 0?m.base:1;if(no(I)!==\"number\")return Cu(m.default,y.default);var $=m.stops.length;if($===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[$-1][0])return m.stops[$-1][1];var ae=hu(m.stops.map(function(or){return or[0]}),I),he=xu(I,V,m.stops[ae][0],m.stops[ae+1][0]),ze=m.stops[ae][1],rt=m.stops[ae+1][1],gt=zu[y.type]||rs;if(m.colorSpace&&m.colorSpace!==\"rgb\"){var Et=Zf[m.colorSpace];gt=function(or,_r){return Et.reverse(Et.interpolate(Et.forward(or),Et.forward(_r),he))}}return typeof ze.evaluate==\"function\"?{evaluate:function(){for(var _r=[],pr=arguments.length;pr--;)_r[pr]=arguments[pr];var Fr=ze.evaluate.apply(void 0,_r),oi=rt.evaluate.apply(void 0,_r);if(!(Fr===void 0||oi===void 0))return gt(Fr,oi,he)}}:gt(ze,rt,he)}function Uc(m,y,I){return y.type===\"color\"?I=cs.parse(I):y.type===\"formatted\"?I=$l.fromString(I.toString()):y.type===\"resolvedImage\"?I=fl.fromString(I.toString()):no(I)!==y.type&&(y.type!==\"enum\"||!y.values[I])&&(I=void 0),Cu(I,m.default,y.default)}function xu(m,y,I,V){var $=V-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Ac=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type===\"enum\"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=V,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(y,I,V,$,ae,he){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=V||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var ze=this.expression.evaluate(this._evaluator);if(ze==null||typeof ze==\"number\"&&ze!==ze)return this._defaultValue;if(this._enumValues&&!(ze in this._enumValues))throw new ps(\"Expected value to be one of \"+Object.keys(this._enumValues).map(function(rt){return JSON.stringify(rt)}).join(\", \")+\", but found \"+JSON.stringify(ze)+\" instead.\");return ze}catch(rt){return this._warningHistory[rt.message]||(this._warningHistory[rt.message]=!0,typeof console!=\"undefined\"&&console.warn(rt.message)),this._defaultValue}};function Ua(m){return Array.isArray(m)&&m.length>0&&typeof m[0]==\"string\"&&m[0]in Ka}function oo(m,y){var I=new ks(Ka,[],y?Q(y):void 0),V=I.parse(m,void 0,void 0,void 0,y&&y.type===\"string\"?{typeAnnotation:\"coerce\"}:void 0);return V?Ho(new Ac(V,y)):ml(I.errors)}var Vc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!==\"constant\"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,V,$,ae,he)},Vc.prototype.evaluate=function(y,I,V,$,ae,he){return this._styleExpression.evaluate(y,I,V,$,ae,he)};var hc=function(y,I,V,$){this.kind=y,this.zoomStops=V,this._styleExpression=I,this.isStateDependent=y!==\"camera\"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,V,$,ae,he)},hc.prototype.evaluate=function(y,I,V,$,ae,he){return this._styleExpression.evaluate(y,I,V,$,ae,he)},hc.prototype.interpolationFactor=function(y,I,V){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,y,I,V):0};function Ku(m,y){if(m=oo(m,y),m.result===\"error\")return m;var I=m.value.expression,V=ih(I);if(!V&&!Ws(y))return ml([new Ns(\"\",\"data expressions not supported\")]);var $=Eu(I,[\"zoom\"]);if(!$&&!Ls(y))return ml([new Ns(\"\",\"zoom expressions not supported\")]);var ae=B(I);if(!ae&&!$)return ml([new Ns(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);if(ae instanceof Ns)return ml([ae]);if(ae instanceof Wl&&!va(y))return ml([new Ns(\"\",'\"interpolate\" expressions cannot be used with this property')]);if(!ae)return Ho(V?new Vc(\"constant\",m.value):new Vc(\"source\",m.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(V?new hc(\"camera\",m.value,ae.labels,he):new hc(\"composite\",m.value,ae.labels,he))}var ue=function(y,I){this._parameters=y,this._specification=I,Ol(this,Ql(this._parameters,this._specification))};ue.deserialize=function(y){return new ue(y._parameters,y._specification)},ue.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(ys(m))return new ue(m,y);if(Ua(m)){var I=Ku(m,y);if(I.result===\"error\")throw new Error(I.value.map(function($){return $.key+\": \"+$.message}).join(\", \"));return I.value}else{var V=m;return typeof m==\"string\"&&y.type===\"color\"&&(V=cs.parse(m)),{kind:\"constant\",evaluate:function(){return V}}}}function B(m){var y=null;if(m instanceof Oc)y=B(m.result);else if(m instanceof Zu)for(var I=0,V=m.args;I<V.length;I+=1){var $=V[I];if(y=B($),y)break}else(m instanceof _u||m instanceof Wl)&&m.input instanceof Pa&&m.input.name===\"zoom\"&&(y=m);return y instanceof Ns||m.eachChild(function(ae){var he=B(ae);he instanceof Ns?y=he:!y&&he?y=new Ns(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):y&&he&&y!==he&&(y=new Ns(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'))}),y}function Q(m){var y={color:ql,string:Oo,number:aa,enum:Oo,boolean:qo,formatted:pl,resolvedImage:Zc};return m.type===\"array\"?Jl(y[m.value]||Do,m.length):y[m.type]}function ee(m){return m.type===\"color\"&&ys(m.default)?new cs(0,0,0,0):m.type===\"color\"?cs.parse(m.default)||null:m.default===void 0?null:m.default}function le(m){var y=m.key,I=m.value,V=m.valueSpec||{},$=m.objectElementValidators||{},ae=m.style,he=m.styleSpec,ze=[],rt=no(I);if(rt!==\"object\")return[new _a(y,I,\"object expected, \"+rt+\" found\")];for(var gt in I){var Et=gt.split(\".\")[0],or=V[Et]||V[\"*\"],_r=void 0;if($[Et])_r=$[Et];else if(V[Et])_r=Qa;else if($[\"*\"])_r=$[\"*\"];else if(V[\"*\"])_r=Qa;else{ze.push(new _a(y,I[gt],'unknown property \"'+gt+'\"'));continue}ze=ze.concat(_r({key:(y&&y+\".\")+gt,value:I[gt],valueSpec:or,style:ae,styleSpec:he,object:I,objectKey:gt},I))}for(var pr in V)$[pr]||V[pr].required&&V[pr].default===void 0&&I[pr]===void 0&&ze.push(new _a(y,I,'missing required property \"'+pr+'\"'));return ze}function Oe(m){var y=m.value,I=m.valueSpec,V=m.style,$=m.styleSpec,ae=m.key,he=m.arrayElementValidator||Qa;if(no(y)!==\"array\")return[new _a(ae,y,\"array expected, \"+no(y)+\" found\")];if(I.length&&y.length!==I.length)return[new _a(ae,y,\"array length \"+I.length+\" expected, length \"+y.length+\" found\")];if(I[\"min-length\"]&&y.length<I[\"min-length\"])return[new _a(ae,y,\"array length at least \"+I[\"min-length\"]+\" expected, length \"+y.length+\" found\")];var ze={type:I.value,values:I.values};$.$version<7&&(ze.function=I.function),no(I.value)===\"object\"&&(ze=I.value);for(var rt=[],gt=0;gt<y.length;gt++)rt=rt.concat(he({array:y,arrayIndex:gt,value:y[gt],valueSpec:ze,style:V,styleSpec:$,key:ae+\"[\"+gt+\"]\"}));return rt}function Ze(m){var y=m.key,I=m.value,V=m.valueSpec,$=no(I);return $===\"number\"&&I!==I&&($=\"NaN\"),$!==\"number\"?[new _a(y,I,\"number expected, \"+$+\" found\")]:\"minimum\"in V&&I<V.minimum?[new _a(y,I,I+\" is less than the minimum value \"+V.minimum)]:\"maximum\"in V&&I>V.maximum?[new _a(y,I,I+\" is greater than the maximum value \"+V.maximum)]:[]}function st(m){var y=m.valueSpec,I=xo(m.value.type),V,$={},ae,he,ze=I!==\"categorical\"&&m.value.property===void 0,rt=!ze,gt=no(m.value.stops)===\"array\"&&no(m.value.stops[0])===\"array\"&&no(m.value.stops[0][0])===\"object\",Et=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:or,default:Fr}});return I===\"identity\"&&ze&&Et.push(new _a(m.key,m.value,'missing required property \"property\"')),I!==\"identity\"&&!m.value.stops&&Et.push(new _a(m.key,m.value,'missing required property \"stops\"')),I===\"exponential\"&&m.valueSpec.expression&&!va(m.valueSpec)&&Et.push(new _a(m.key,m.value,\"exponential functions not supported\")),m.styleSpec.$version>=8&&(rt&&!Ws(m.valueSpec)?Et.push(new _a(m.key,m.value,\"property functions not supported\")):ze&&!Ls(m.valueSpec)&&Et.push(new _a(m.key,m.value,\"zoom functions not supported\"))),(I===\"categorical\"||gt)&&m.value.property===void 0&&Et.push(new _a(m.key,m.value,'\"property\" property is required')),Et;function or(oi){if(I===\"identity\")return[new _a(oi.key,oi.value,'identity function may not have a \"stops\" property')];var Hi=[],Ai=oi.value;return Hi=Hi.concat(Oe({key:oi.key,value:Ai,valueSpec:oi.valueSpec,style:oi.style,styleSpec:oi.styleSpec,arrayElementValidator:_r})),no(Ai)===\"array\"&&Ai.length===0&&Hi.push(new _a(oi.key,Ai,\"array must have at least one stop\")),Hi}function _r(oi){var Hi=[],Ai=oi.value,bn=oi.key;if(no(Ai)!==\"array\")return[new _a(bn,Ai,\"array expected, \"+no(Ai)+\" found\")];if(Ai.length!==2)return[new _a(bn,Ai,\"array length 2 expected, length \"+Ai.length+\" found\")];if(gt){if(no(Ai[0])!==\"object\")return[new _a(bn,Ai,\"object expected, \"+no(Ai[0])+\" found\")];if(Ai[0].zoom===void 0)return[new _a(bn,Ai,\"object stop key must have zoom\")];if(Ai[0].value===void 0)return[new _a(bn,Ai,\"object stop key must have value\")];if(he&&he>xo(Ai[0].zoom))return[new _a(bn,Ai[0].zoom,\"stop zoom values must appear in ascending order\")];xo(Ai[0].zoom)!==he&&(he=xo(Ai[0].zoom),ae=void 0,$={}),Hi=Hi.concat(le({key:bn+\"[0]\",value:Ai[0],valueSpec:{zoom:{}},style:oi.style,styleSpec:oi.styleSpec,objectElementValidators:{zoom:Ze,value:pr}}))}else Hi=Hi.concat(pr({key:bn+\"[0]\",value:Ai[0],valueSpec:{},style:oi.style,styleSpec:oi.styleSpec},Ai));return Ua(Kl(Ai[1]))?Hi.concat([new _a(bn+\"[1]\",Ai[1],\"expressions are not allowed in function stops.\")]):Hi.concat(Qa({key:bn+\"[1]\",value:Ai[1],valueSpec:y,style:oi.style,styleSpec:oi.styleSpec}))}function pr(oi,Hi){var Ai=no(oi.value),bn=xo(oi.value),nn=oi.value!==null?oi.value:Hi;if(!V)V=Ai;else if(Ai!==V)return[new _a(oi.key,nn,Ai+\" stop domain type must match previous stop domain type \"+V)];if(Ai!==\"number\"&&Ai!==\"string\"&&Ai!==\"boolean\")return[new _a(oi.key,nn,\"stop domain value must be a number, string, or boolean\")];if(Ai!==\"number\"&&I!==\"categorical\"){var xn=\"number expected, \"+Ai+\" found\";return Ws(y)&&I===void 0&&(xn+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new _a(oi.key,nn,xn)]}return I===\"categorical\"&&Ai===\"number\"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(oi.key,nn,\"integer expected, found \"+bn)]:I!==\"categorical\"&&Ai===\"number\"&&ae!==void 0&&bn<ae?[new _a(oi.key,nn,\"stop domain values must appear in ascending order\")]:(ae=bn,I===\"categorical\"&&bn in $?[new _a(oi.key,nn,\"stop domain values must be unique\")]:($[bn]=!0,[]))}function Fr(oi){return Qa({key:oi.key,value:oi.value,valueSpec:y,style:oi.style,styleSpec:oi.styleSpec})}}function Tt(m){var y=(m.expressionContext===\"property\"?Ku:oo)(Kl(m.value),m.valueSpec);if(y.result===\"error\")return y.value.map(function(V){return new _a(\"\"+m.key+V.key,m.value,V.message)});var I=y.value.expression||y.value._styleExpression.expression;if(m.expressionContext===\"property\"&&m.propertyKey===\"text-font\"&&!I.outputDefined())return[new _a(m.key,m.value,'Invalid data expression for \"'+m.propertyKey+'\". Output values must be contained as literals within the expression.')];if(m.expressionContext===\"property\"&&m.propertyType===\"layout\"&&!js(I))return[new _a(m.key,m.value,'\"feature-state\" data expressions are not supported with layout properties.')];if(m.expressionContext===\"filter\"&&!js(I))return[new _a(m.key,m.value,'\"feature-state\" data expressions are not supported with filters.')];if(m.expressionContext&&m.expressionContext.indexOf(\"cluster\")===0){if(!Eu(I,[\"zoom\",\"feature-state\"]))return[new _a(m.key,m.value,'\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];if(m.expressionContext===\"cluster-initial\"&&!ih(I))return[new _a(m.key,m.value,\"Feature data expressions are not supported with initial expression part of cluster properties.\")]}return[]}function Yt(m){var y=m.value,I=m.key,V=no(y);return V!==\"boolean\"?[new _a(I,y,\"boolean expected, \"+V+\" found\")]:[]}function Kt(m){var y=m.key,I=m.value,V=no(I);return V!==\"string\"?[new _a(y,I,\"color expected, \"+V+\" found\")]:Lf(I)===null?[new _a(y,I,'color expected, \"'+I+'\" found')]:[]}function xr(m){var y=m.key,I=m.value,V=m.valueSpec,$=[];return Array.isArray(V.values)?V.values.indexOf(xo(I))===-1&&$.push(new _a(y,I,\"expected one of [\"+V.values.join(\", \")+\"], \"+JSON.stringify(I)+\" found\")):Object.keys(V.values).indexOf(xo(I))===-1&&$.push(new _a(y,I,\"expected one of [\"+Object.keys(V.values).join(\", \")+\"], \"+JSON.stringify(I)+\" found\")),$}function Ir(m){if(m===!0||m===!1)return!0;if(!Array.isArray(m)||m.length===0)return!1;switch(m[0]){case\"has\":return m.length>=2&&m[1]!==\"$id\"&&m[1]!==\"$type\";case\"in\":return m.length>=3&&(typeof m[1]!=\"string\"||Array.isArray(m[2]));case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case\"any\":case\"all\":for(var y=0,I=m.slice(1);y<I.length;y+=1){var V=I[y];if(!Ir(V)&&typeof V!=\"boolean\")return!1}return!0;default:return!0}}var ve={type:\"boolean\",default:!1,transition:!1,\"property-type\":\"data-driven\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]}};function be(m){if(m==null)return{filter:function(){return!0},needGeometry:!1};Ir(m)||(m=et(m));var y=oo(m,ve);if(y.result===\"error\")throw new Error(y.value.map(function(V){return V.key+\": \"+V.message}).join(\", \"));var I=qe(m);return{filter:function(V,$,ae){return y.value.evaluate(V,$,{},ae)},needGeometry:I}}function Re(m,y){return m<y?-1:m>y?1:0}function qe(m){if(!Array.isArray(m))return!1;if(m[0]===\"within\")return!0;for(var y=1;y<m.length;y++)if(qe(m[y]))return!0;return!1}function et(m){if(!m)return!0;var y=m[0];if(m.length<=1)return y!==\"any\";var I=y===\"==\"?Xe(m[1],m[2],\"==\"):y===\"!=\"?tr(Xe(m[1],m[2],\"==\")):y===\"<\"||y===\">\"||y===\"<=\"||y===\">=\"?Xe(m[1],m[2],y):y===\"any\"?it(m.slice(1)):y===\"all\"?[\"all\"].concat(m.slice(1).map(et)):y===\"none\"?[\"all\"].concat(m.slice(1).map(et).map(tr)):y===\"in\"?Ft(m[1],m.slice(2)):y===\"!in\"?tr(Ft(m[1],m.slice(2))):y===\"has\"?Ht(m[1]):y===\"!has\"?tr(Ht(m[1])):y===\"within\"?m:!0;return I}function Xe(m,y,I){switch(m){case\"$type\":return[\"filter-type-\"+I,y];case\"$id\":return[\"filter-id-\"+I,y];default:return[\"filter-\"+I,m,y]}}function it(m){return[\"any\"].concat(m.map(et))}function Ft(m,y){if(y.length===0)return!1;switch(m){case\"$type\":return[\"filter-type-in\",[\"literal\",y]];case\"$id\":return[\"filter-id-in\",[\"literal\",y]];default:return y.length>200&&!y.some(function(I){return typeof I!=typeof y[0]})?[\"filter-in-large\",m,[\"literal\",y.sort(Re)]]:[\"filter-in-small\",m,[\"literal\",y]]}}function Ht(m){switch(m){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",m]}}function tr(m){return[\"!\",m]}function dr(m){return Ir(Kl(m.value))?Tt(Ol({},m,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):Sr(m)}function Sr(m){var y=m.value,I=m.key;if(no(y)!==\"array\")return[new _a(I,y,\"array expected, \"+no(y)+\" found\")];var V=m.styleSpec,$,ae=[];if(y.length<1)return[new _a(I,y,\"filter array must have at least 1 element\")];switch(ae=ae.concat(xr({key:I+\"[0]\",value:y[0],valueSpec:V.filter_operator,style:m.style,styleSpec:m.styleSpec})),xo(y[0])){case\"<\":case\"<=\":case\">\":case\">=\":y.length>=2&&xo(y[1])===\"$type\"&&ae.push(new _a(I,y,'\"$type\" cannot be use with operator \"'+y[0]+'\"'));case\"==\":case\"!=\":y.length!==3&&ae.push(new _a(I,y,'filter array for operator \"'+y[0]+'\" must have 3 elements'));case\"in\":case\"!in\":y.length>=2&&($=no(y[1]),$!==\"string\"&&ae.push(new _a(I+\"[1]\",y[1],\"string expected, \"+$+\" found\")));for(var he=2;he<y.length;he++)$=no(y[he]),xo(y[1])===\"$type\"?ae=ae.concat(xr({key:I+\"[\"+he+\"]\",value:y[he],valueSpec:V.geometry_type,style:m.style,styleSpec:m.styleSpec})):$!==\"string\"&&$!==\"number\"&&$!==\"boolean\"&&ae.push(new _a(I+\"[\"+he+\"]\",y[he],\"string, number, or boolean expected, \"+$+\" found\"));break;case\"any\":case\"all\":case\"none\":for(var ze=1;ze<y.length;ze++)ae=ae.concat(Sr({key:I+\"[\"+ze+\"]\",value:y[ze],style:m.style,styleSpec:m.styleSpec}));break;case\"has\":case\"!has\":$=no(y[1]),y.length!==2?ae.push(new _a(I,y,'filter array for \"'+y[0]+'\" operator must have 2 elements')):$!==\"string\"&&ae.push(new _a(I+\"[1]\",y[1],\"string expected, \"+$+\" found\"));break;case\"within\":$=no(y[1]),y.length!==2?ae.push(new _a(I,y,'filter array for \"'+y[0]+'\" operator must have 2 elements')):$!==\"object\"&&ae.push(new _a(I+\"[1]\",y[1],\"object expected, \"+$+\" found\"));break}return ae}function Or(m,y){var I=m.key,V=m.style,$=m.styleSpec,ae=m.value,he=m.objectKey,ze=$[y+\"_\"+m.layerType];if(!ze)return[];var rt=he.match(/^(.*)-transition$/);if(y===\"paint\"&&rt&&ze[rt[1]]&&ze[rt[1]].transition)return Qa({key:I,value:ae,valueSpec:$.transition,style:V,styleSpec:$});var gt=m.valueSpec||ze[he];if(!gt)return[new _a(I,ae,'unknown property \"'+he+'\"')];var Et;if(no(ae)===\"string\"&&Ws(gt)&&!gt.tokens&&(Et=/^{([^}]+)}$/.exec(ae)))return[new _a(I,ae,'\"'+he+'\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": '+JSON.stringify(Et[1])+\" }`.\")];var or=[];return m.layerType===\"symbol\"&&(he===\"text-field\"&&V&&!V.glyphs&&or.push(new _a(I,ae,'use of \"text-field\" requires a style \"glyphs\" property')),he===\"text-font\"&&ys(Kl(ae))&&xo(ae.type)===\"identity\"&&or.push(new _a(I,ae,'\"text-font\" does not support identity functions'))),or.concat(Qa({key:m.key,value:ae,valueSpec:gt,style:V,styleSpec:$,expressionContext:\"property\",propertyType:y,propertyKey:he}))}function Wr(m){return Or(m,\"paint\")}function ni(m){return Or(m,\"layout\")}function Pi(m){var y=[],I=m.value,V=m.key,$=m.style,ae=m.styleSpec;!I.type&&!I.ref&&y.push(new _a(V,I,'either \"type\" or \"ref\" is required'));var he=xo(I.type),ze=xo(I.ref);if(I.id)for(var rt=xo(I.id),gt=0;gt<m.arrayIndex;gt++){var Et=$.layers[gt];xo(Et.id)===rt&&y.push(new _a(V,I.id,'duplicate layer id \"'+I.id+'\", previously used at line '+Et.id.__line__))}if(\"ref\"in I){[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(function(Fr){Fr in I&&y.push(new _a(V,I[Fr],'\"'+Fr+'\" is prohibited for ref layers'))});var or;$.layers.forEach(function(Fr){xo(Fr.id)===ze&&(or=Fr)}),or?or.ref?y.push(new _a(V,I.ref,\"ref cannot reference another ref layer\")):he=xo(or.type):y.push(new _a(V,I.ref,'ref layer \"'+ze+'\" not found'))}else if(he!==\"background\")if(!I.source)y.push(new _a(V,I,'missing required property \"source\"'));else{var _r=$.sources&&$.sources[I.source],pr=_r&&xo(_r.type);_r?pr===\"vector\"&&he===\"raster\"?y.push(new _a(V,I.source,'layer \"'+I.id+'\" requires a raster source')):pr===\"raster\"&&he!==\"raster\"?y.push(new _a(V,I.source,'layer \"'+I.id+'\" requires a vector source')):pr===\"vector\"&&!I[\"source-layer\"]?y.push(new _a(V,I,'layer \"'+I.id+'\" must specify a \"source-layer\"')):pr===\"raster-dem\"&&he!==\"hillshade\"?y.push(new _a(V,I.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):he===\"line\"&&I.paint&&I.paint[\"line-gradient\"]&&(pr!==\"geojson\"||!_r.lineMetrics)&&y.push(new _a(V,I,'layer \"'+I.id+'\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):y.push(new _a(V,I.source,'source \"'+I.source+'\" not found'))}return y=y.concat(le({key:V,value:I,valueSpec:ae.layer,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{\"*\":function(){return[]},type:function(){return Qa({key:V+\".type\",value:I.type,valueSpec:ae.layer.type,style:m.style,styleSpec:m.styleSpec,object:I,objectKey:\"type\"})},filter:dr,layout:function(oi){return le({layer:I,key:oi.key,value:oi.value,style:oi.style,styleSpec:oi.styleSpec,objectElementValidators:{\"*\":function(Ai){return ni(Ol({layerType:he},Ai))}}})},paint:function(oi){return le({layer:I,key:oi.key,value:oi.value,style:oi.style,styleSpec:oi.styleSpec,objectElementValidators:{\"*\":function(Ai){return Wr(Ol({layerType:he},Ai))}}})}}})),y}function cn(m){var y=m.value,I=m.key,V=no(y);return V!==\"string\"?[new _a(I,y,\"string expected, \"+V+\" found\")]:[]}var ln={promoteId:Kn};function Cn(m){var y=m.value,I=m.key,V=m.styleSpec,$=m.style;if(!y.type)return[new _a(I,y,'\"type\" is required')];var ae=xo(y.type),he;switch(ae){case\"vector\":case\"raster\":case\"raster-dem\":return he=le({key:I,value:y,valueSpec:V[\"source_\"+ae.replace(\"-\",\"_\")],style:m.style,styleSpec:V,objectElementValidators:ln}),he;case\"geojson\":if(he=le({key:I,value:y,valueSpec:V.source_geojson,style:$,styleSpec:V,objectElementValidators:ln}),y.cluster)for(var ze in y.clusterProperties){var rt=y.clusterProperties[ze],gt=rt[0],Et=rt[1],or=typeof gt==\"string\"?[gt,[\"accumulated\"],[\"get\",ze]]:gt;he.push.apply(he,Tt({key:I+\".\"+ze+\".map\",value:Et,expressionContext:\"cluster-map\"})),he.push.apply(he,Tt({key:I+\".\"+ze+\".reduce\",value:or,expressionContext:\"cluster-reduce\"}))}return he;case\"video\":return le({key:I,value:y,valueSpec:V.source_video,style:$,styleSpec:V});case\"image\":return le({key:I,value:y,valueSpec:V.source_image,style:$,styleSpec:V});case\"canvas\":return[new _a(I,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")];default:return xr({key:I+\".type\",value:y.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:$,styleSpec:V})}}function Kn(m){var y=m.key,I=m.value;if(no(I)===\"string\")return cn({key:y,value:I});var V=[];for(var $ in I)V.push.apply(V,cn({key:y+\".\"+$,value:I[$]}));return V}function Aa(m){var y=m.value,I=m.styleSpec,V=I.light,$=m.style,ae=[],he=no(y);if(y===void 0)return ae;if(he!==\"object\")return ae=ae.concat([new _a(\"light\",y,\"object expected, \"+he+\" found\")]),ae;for(var ze in y){var rt=ze.match(/^(.*)-transition$/);rt&&V[rt[1]]&&V[rt[1]].transition?ae=ae.concat(Qa({key:ze,value:y[ze],valueSpec:I.transition,style:$,styleSpec:I})):V[ze]?ae=ae.concat(Qa({key:ze,value:y[ze],valueSpec:V[ze],style:$,styleSpec:I})):ae=ae.concat([new _a(ze,y[ze],'unknown property \"'+ze+'\"')])}return ae}function fa(m){return cn(m).length===0?[]:Tt(m)}function $a(m){return cn(m).length===0?[]:Tt(m)}var Co={\"*\":function(){return[]},array:Oe,boolean:Yt,number:Ze,color:Kt,constants:Vu,enum:xr,filter:dr,function:st,layer:Pi,object:le,source:Cn,light:Aa,string:cn,formatted:fa,resolvedImage:$a};function Qa(m){var y=m.value,I=m.valueSpec,V=m.styleSpec;if(I.expression&&ys(xo(y)))return st(m);if(I.expression&&Ua(Kl(y)))return Tt(m);if(I.type&&Co[I.type])return Co[I.type](m);var $=le(Ol({},m,{valueSpec:I.type?V[I.type]:I}));return $}function mo(m){var y=m.value,I=m.key,V=cn(m);return V.length||(y.indexOf(\"{fontstack}\")===-1&&V.push(new _a(I,y,'\"glyphs\" url must include a \"{fontstack}\" token')),y.indexOf(\"{range}\")===-1&&V.push(new _a(I,y,'\"glyphs\" url must include a \"{range}\" token'))),V}function Bo(m,y){y===void 0&&(y=Rn);var I=[];return I=I.concat(Qa({key:\"\",value:m,valueSpec:y.$root,styleSpec:y,style:m,objectElementValidators:{glyphs:mo,\"*\":function(){return[]}}})),m.constants&&(I=I.concat(Vu({key:\"constants\",value:m.constants,style:m,styleSpec:y}))),Ps(I)}Bo.source=Ts(Cn),Bo.light=Ts(Aa),Bo.layer=Ts(Pi),Bo.filter=Ts(dr),Bo.paintProperty=Ts(Wr),Bo.layoutProperty=Ts(ni);function Ps(m){return[].concat(m).sort(function(y,I){return y.line-I.line})}function Ts(m){return function(){for(var y=[],I=arguments.length;I--;)y[I]=arguments[I];return Ps(m.apply(this,y))}}var wo=Bo,To=wo.light,hl=wo.paintProperty,Ul=wo.layoutProperty;function Lu(m,y){var I=!1;if(y&&y.length)for(var V=0,$=y;V<$.length;V+=1){var ae=$[V];m.fire(new da(new Error(ae.message))),I=!0}return I}var au=eu,Js=3;function eu(m,y,I){var V=this.cells=[];if(m instanceof ArrayBuffer){this.arrayBuffer=m;var $=new Int32Array(this.arrayBuffer);m=$[0],y=$[1],I=$[2],this.d=y+2*I;for(var ae=0;ae<this.d*this.d;ae++){var he=$[Js+ae],ze=$[Js+ae+1];V.push(he===ze?null:$.subarray(he,ze))}var rt=$[Js+V.length],gt=$[Js+V.length+1];this.keys=$.subarray(rt,gt),this.bboxes=$.subarray(gt),this.insert=this._insertReadonly}else{this.d=y+2*I;for(var Et=0;Et<this.d*this.d;Et++)V.push([]);this.keys=[],this.bboxes=[]}this.n=y,this.extent=m,this.padding=I,this.scale=y/m,this.uid=0;var or=I/y*m;this.min=-or,this.max=m+or}eu.prototype.insert=function(m,y,I,V,$){this._forEachCell(y,I,V,$,this._insertCell,this.uid++),this.keys.push(m),this.bboxes.push(y),this.bboxes.push(I),this.bboxes.push(V),this.bboxes.push($)},eu.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},eu.prototype._insertCell=function(m,y,I,V,$,ae){this.cells[$].push(ae)},eu.prototype.query=function(m,y,I,V,$){var ae=this.min,he=this.max;if(m<=ae&&y<=ae&&he<=I&&he<=V&&!$)return Array.prototype.slice.call(this.keys);var ze=[],rt={};return this._forEachCell(m,y,I,V,this._queryCell,ze,rt,$),ze},eu.prototype._queryCell=function(m,y,I,V,$,ae,he,ze){var rt=this.cells[$];if(rt!==null)for(var gt=this.keys,Et=this.bboxes,or=0;or<rt.length;or++){var _r=rt[or];if(he[_r]===void 0){var pr=_r*4;(ze?ze(Et[pr+0],Et[pr+1],Et[pr+2],Et[pr+3]):m<=Et[pr+2]&&y<=Et[pr+3]&&I>=Et[pr+0]&&V>=Et[pr+1])?(he[_r]=!0,ae.push(gt[_r])):he[_r]=!1}}},eu.prototype._forEachCell=function(m,y,I,V,$,ae,he,ze){for(var rt=this._convertToCellCoord(m),gt=this._convertToCellCoord(y),Et=this._convertToCellCoord(I),or=this._convertToCellCoord(V),_r=rt;_r<=Et;_r++)for(var pr=gt;pr<=or;pr++){var Fr=this.d*pr+_r;if(!(ze&&!ze(this._convertFromCellCoord(_r),this._convertFromCellCoord(pr),this._convertFromCellCoord(_r+1),this._convertFromCellCoord(pr+1)))&&$.call(this,m,y,I,V,Fr,ae,he,ze))return}},eu.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},eu.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},eu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=Js+this.cells.length+1+1,I=0,V=0;V<this.cells.length;V++)I+=this.cells[V].length;var $=new Int32Array(y+I+this.keys.length+this.bboxes.length);$[0]=this.extent,$[1]=this.n,$[2]=this.padding;for(var ae=y,he=0;he<m.length;he++){var ze=m[he];$[Js+he]=ae,$.set(ze,ae),ae+=ze.length}return $[Js+m.length]=ae,$.set(this.keys,ae),ae+=this.keys.length,$[Js+m.length+1]=ae,$.set(this.bboxes,ae),ae+=this.bboxes.length,$.buffer};var dc=f.ImageData,Tl=f.ImageBitmap,Al={};function X(m,y,I){I===void 0&&(I={}),Object.defineProperty(y,\"_classRegistryKey\",{value:m,writeable:!1}),Al[m]={klass:y,omit:I.omit||[],shallow:I.shallow||[]}}X(\"Object\",Object),au.serialize=function(y,I){var V=y.toArrayBuffer();return I&&I.push(V),{buffer:V}},au.deserialize=function(y){return new au(y.buffer)},X(\"Grid\",au),X(\"Color\",cs),X(\"Error\",Error),X(\"ResolvedImage\",fl),X(\"StylePropertyFunction\",ue),X(\"StyleExpression\",Ac,{omit:[\"_evaluator\"]}),X(\"ZoomDependentExpression\",hc),X(\"ZoomConstantExpression\",Vc),X(\"CompoundExpression\",Pa,{omit:[\"_evaluate\"]});for(var se in Ka)Ka[se]._classRegistryKey||X(\"Expression_\"+se,Ka[se]);function Te(m){return m&&typeof ArrayBuffer!=\"undefined\"&&(m instanceof ArrayBuffer||m.constructor&&m.constructor.name===\"ArrayBuffer\")}function Ne(m){return Tl&&m instanceof Tl}function He(m,y){if(m==null||typeof m==\"boolean\"||typeof m==\"number\"||typeof m==\"string\"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp)return m;if(Te(m)||Ne(m))return y&&y.push(m),m;if(ArrayBuffer.isView(m)){var I=m;return y&&y.push(I.buffer),I}if(m instanceof dc)return y&&y.push(m.data.buffer),m;if(Array.isArray(m)){for(var V=[],$=0,ae=m;$<ae.length;$+=1){var he=ae[$];V.push(He(he,y))}return V}if(typeof m==\"object\"){var ze=m.constructor,rt=ze._classRegistryKey;if(!rt)throw new Error(\"can't serialize object of unregistered class\");var gt=ze.serialize?ze.serialize(m,y):{};if(!ze.serialize){for(var Et in m)if(m.hasOwnProperty(Et)&&!(Al[rt].omit.indexOf(Et)>=0)){var or=m[Et];gt[Et]=Al[rt].shallow.indexOf(Et)>=0?or:He(or,y)}m instanceof Error&&(gt.message=m.message)}if(gt.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return rt!==\"Object\"&&(gt.$name=rt),gt}throw new Error(\"can't serialize object of type \"+typeof m)}function Ye(m){if(m==null||typeof m==\"boolean\"||typeof m==\"number\"||typeof m==\"string\"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Te(m)||Ne(m)||ArrayBuffer.isView(m)||m instanceof dc)return m;if(Array.isArray(m))return m.map(Ye);if(typeof m==\"object\"){var y=m.$name||\"Object\",I=Al[y],V=I.klass;if(!V)throw new Error(\"can't deserialize unregistered class \"+y);if(V.deserialize)return V.deserialize(m);for(var $=Object.create(V.prototype),ae=0,he=Object.keys(m);ae<he.length;ae+=1){var ze=he[ae];if(ze!==\"$name\"){var rt=m[ze];$[ze]=Al[y].shallow.indexOf(ze)>=0?rt:Ye(rt)}}return $}throw new Error(\"can't deserialize object of type \"+typeof m)}var kt=function(){this.first=!0};kt.prototype.update=function(y,I){var V=Math.floor(y);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=y,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=I):this.lastFloorZoom<V&&(this.lastIntegerZoom=V,this.lastIntegerZoomTime=I),y!==this.lastZoom?(this.lastZoom=y,this.lastFloorZoom=V,!0):!1)};var nt={\"Latin-1 Supplement\":function(m){return m>=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},\"Arabic Supplement\":function(m){return m>=1872&&m<=1919},\"Arabic Extended-A\":function(m){return m>=2208&&m<=2303},\"Hangul Jamo\":function(m){return m>=4352&&m<=4607},\"Unified Canadian Aboriginal Syllabics\":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},\"Unified Canadian Aboriginal Syllabics Extended\":function(m){return m>=6320&&m<=6399},\"General Punctuation\":function(m){return m>=8192&&m<=8303},\"Letterlike Symbols\":function(m){return m>=8448&&m<=8527},\"Number Forms\":function(m){return m>=8528&&m<=8591},\"Miscellaneous Technical\":function(m){return m>=8960&&m<=9215},\"Control Pictures\":function(m){return m>=9216&&m<=9279},\"Optical Character Recognition\":function(m){return m>=9280&&m<=9311},\"Enclosed Alphanumerics\":function(m){return m>=9312&&m<=9471},\"Geometric Shapes\":function(m){return m>=9632&&m<=9727},\"Miscellaneous Symbols\":function(m){return m>=9728&&m<=9983},\"Miscellaneous Symbols and Arrows\":function(m){return m>=11008&&m<=11263},\"CJK Radicals Supplement\":function(m){return m>=11904&&m<=12031},\"Kangxi Radicals\":function(m){return m>=12032&&m<=12255},\"Ideographic Description Characters\":function(m){return m>=12272&&m<=12287},\"CJK Symbols and Punctuation\":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},\"Hangul Compatibility Jamo\":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},\"Bopomofo Extended\":function(m){return m>=12704&&m<=12735},\"CJK Strokes\":function(m){return m>=12736&&m<=12783},\"Katakana Phonetic Extensions\":function(m){return m>=12784&&m<=12799},\"Enclosed CJK Letters and Months\":function(m){return m>=12800&&m<=13055},\"CJK Compatibility\":function(m){return m>=13056&&m<=13311},\"CJK Unified Ideographs Extension A\":function(m){return m>=13312&&m<=19903},\"Yijing Hexagram Symbols\":function(m){return m>=19904&&m<=19967},\"CJK Unified Ideographs\":function(m){return m>=19968&&m<=40959},\"Yi Syllables\":function(m){return m>=40960&&m<=42127},\"Yi Radicals\":function(m){return m>=42128&&m<=42191},\"Hangul Jamo Extended-A\":function(m){return m>=43360&&m<=43391},\"Hangul Syllables\":function(m){return m>=44032&&m<=55215},\"Hangul Jamo Extended-B\":function(m){return m>=55216&&m<=55295},\"Private Use Area\":function(m){return m>=57344&&m<=63743},\"CJK Compatibility Ideographs\":function(m){return m>=63744&&m<=64255},\"Arabic Presentation Forms-A\":function(m){return m>=64336&&m<=65023},\"Vertical Forms\":function(m){return m>=65040&&m<=65055},\"CJK Compatibility Forms\":function(m){return m>=65072&&m<=65103},\"Small Form Variants\":function(m){return m>=65104&&m<=65135},\"Arabic Presentation Forms-B\":function(m){return m>=65136&&m<=65279},\"Halfwidth and Fullwidth Forms\":function(m){return m>=65280&&m<=65519}};function jt(m){for(var y=0,I=m;y<I.length;y+=1){var V=I[y];if(qr(V.charCodeAt(0)))return!0}return!1}function gr(m){for(var y=0,I=m;y<I.length;y+=1){var V=I[y];if(!yr(V.charCodeAt(0)))return!1}return!0}function yr(m){return!(nt.Arabic(m)||nt[\"Arabic Supplement\"](m)||nt[\"Arabic Extended-A\"](m)||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m))}function Hr(m){return m<11904?!1:!!(nt[\"Bopomofo Extended\"](m)||nt.Bopomofo(m)||nt[\"CJK Compatibility Forms\"](m)||nt[\"CJK Compatibility Ideographs\"](m)||nt[\"CJK Compatibility\"](m)||nt[\"CJK Radicals Supplement\"](m)||nt[\"CJK Strokes\"](m)||nt[\"CJK Symbols and Punctuation\"](m)||nt[\"CJK Unified Ideographs Extension A\"](m)||nt[\"CJK Unified Ideographs\"](m)||nt[\"Enclosed CJK Letters and Months\"](m)||nt[\"Halfwidth and Fullwidth Forms\"](m)||nt.Hiragana(m)||nt[\"Ideographic Description Characters\"](m)||nt[\"Kangxi Radicals\"](m)||nt[\"Katakana Phonetic Extensions\"](m)||nt.Katakana(m)||nt[\"Vertical Forms\"](m)||nt[\"Yi Radicals\"](m)||nt[\"Yi Syllables\"](m))}function qr(m){return m===746||m===747?!0:m<4352?!1:!!(nt[\"Bopomofo Extended\"](m)||nt.Bopomofo(m)||nt[\"CJK Compatibility Forms\"](m)&&!(m>=65097&&m<=65103)||nt[\"CJK Compatibility Ideographs\"](m)||nt[\"CJK Compatibility\"](m)||nt[\"CJK Radicals Supplement\"](m)||nt[\"CJK Strokes\"](m)||nt[\"CJK Symbols and Punctuation\"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||nt[\"CJK Unified Ideographs Extension A\"](m)||nt[\"CJK Unified Ideographs\"](m)||nt[\"Enclosed CJK Letters and Months\"](m)||nt[\"Hangul Compatibility Jamo\"](m)||nt[\"Hangul Jamo Extended-A\"](m)||nt[\"Hangul Jamo Extended-B\"](m)||nt[\"Hangul Jamo\"](m)||nt[\"Hangul Syllables\"](m)||nt.Hiragana(m)||nt[\"Ideographic Description Characters\"](m)||nt.Kanbun(m)||nt[\"Kangxi Radicals\"](m)||nt[\"Katakana Phonetic Extensions\"](m)||nt.Katakana(m)&&m!==12540||nt[\"Halfwidth and Fullwidth Forms\"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||nt[\"Small Form Variants\"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||nt[\"Unified Canadian Aboriginal Syllabics\"](m)||nt[\"Unified Canadian Aboriginal Syllabics Extended\"](m)||nt[\"Vertical Forms\"](m)||nt[\"Yijing Hexagram Symbols\"](m)||nt[\"Yi Syllables\"](m)||nt[\"Yi Radicals\"](m))}function _i(m){return!!(nt[\"Latin-1 Supplement\"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||nt[\"General Punctuation\"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||nt[\"Letterlike Symbols\"](m)||nt[\"Number Forms\"](m)||nt[\"Miscellaneous Technical\"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||nt[\"Control Pictures\"](m)&&m!==9251||nt[\"Optical Character Recognition\"](m)||nt[\"Enclosed Alphanumerics\"](m)||nt[\"Geometric Shapes\"](m)||nt[\"Miscellaneous Symbols\"](m)&&!(m>=9754&&m<=9759)||nt[\"Miscellaneous Symbols and Arrows\"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||nt[\"CJK Symbols and Punctuation\"](m)||nt.Katakana(m)||nt[\"Private Use Area\"](m)||nt[\"CJK Compatibility Forms\"](m)||nt[\"Small Form Variants\"](m)||nt[\"Halfwidth and Fullwidth Forms\"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function bi(m){return!(qr(m)||_i(m))}function Zr(m){return nt.Arabic(m)||nt[\"Arabic Supplement\"](m)||nt[\"Arabic Extended-A\"](m)||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m)}function ai(m){return m>=1424&&m<=2303||nt[\"Arabic Presentation Forms-A\"](m)||nt[\"Arabic Presentation Forms-B\"](m)}function gi(m,y){return!(!y&&ai(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||nt.Khmer(m))}function Ii(m){for(var y=0,I=m;y<I.length;y+=1){var V=I[y];if(ai(V.charCodeAt(0)))return!0}return!1}function Si(m,y){for(var I=0,V=m;I<V.length;I+=1){var $=V[I];if(!gi($.charCodeAt(0),y))return!1}return!0}var ei={unavailable:\"unavailable\",deferred:\"deferred\",loading:\"loading\",loaded:\"loaded\",error:\"error\"},Ln=null,En=ei.unavailable,Un=null,ia=function(m){m&&typeof m==\"string\"&&m.indexOf(\"NetworkError\")>-1&&(En=ei.error),Ln&&Ln(m)};function Ea(){Ia.fire(new Xo(\"pluginStateChange\",{pluginStatus:En,pluginURL:Un}))}var Ia=new Wn,yo=function(){return En},Da=function(m){return m({pluginStatus:En,pluginURL:Un}),Ia.on(\"pluginStateChange\",m),m},go=function(m,y,I){if(I===void 0&&(I=!1),En===ei.deferred||En===ei.loading||En===ei.loaded)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");Un=lt.resolveURL(m),En=ei.deferred,Ln=y,Ea(),I||Is()},Is=function(){if(En!==ei.deferred||!Un)throw new Error(\"rtl-text-plugin cannot be downloaded unless a pluginURL is specified\");En=ei.loading,Ea(),Un&&ri({url:Un},function(m){m?ia(m):(En=ei.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return En===ei.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return En===ei.loading},setState:function(y){En=y.pluginStatus,Un=y.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Un}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()===\"deferred\"&&Is()},Gn=function(y,I){this.zoom=y,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new kt,this.transition={})};Gn.prototype.isSupportedScript=function(y){return Si(y,Ms.isLoaded())},Gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Gn.prototype.getCrossfadeParameters=function(){var y=this.zoom,I=y-Math.floor(y),V=this.crossFadingFactor();return y>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*I}};var ja=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind===\"source\"||this.expression.kind===\"composite\"},ja.prototype.possiblyEvaluate=function(y,I,V){return this.property.possiblyEvaluate(this,y,I,V)};var Fo=function(y){this.property=y,this.value=new ja(y,void 0)};Fo.prototype.transitioned=function(y,I){return new $s(this.property,this.value,I,x({},y.transition,this.transition),y.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(y){return j(this._values[y].value.value)},Uo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].value=new ja(this._values[y].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(y){return j(this._values[y].transition)},Uo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var y={},I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I],ae=this.getValue($);ae!==void 0&&(y[$]=ae);var he=this.getTransition($);he!==void 0&&(y[$+\"-transition\"]=he)}return y},Uo.prototype.transitioned=function(y,I){for(var V=new Sl(this._properties),$=0,ae=Object.keys(this._values);$<ae.length;$+=1){var he=ae[$];V._values[he]=this._values[he].transitioned(y,I._values[he])}return V},Uo.prototype.untransitioned=function(){for(var y=new Sl(this._properties),I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I];y._values[$]=this._values[$].untransitioned()}return y};var $s=function(y,I,V,$,ae){this.property=y,this.value=I,this.begin=ae+$.delay||0,this.end=this.begin+$.duration||0,y.specification.transition&&($.delay||$.duration)&&(this.prior=V)};$s.prototype.possiblyEvaluate=function(y,I,V){var $=y.now||0,ae=this.value.possiblyEvaluate(y,I,V),he=this.prior;if(he){if($>this.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($<this.begin)return he.possiblyEvaluate(y,I,V);var ze=($-this.begin)/(this.end-this.begin);return this.property.interpolate(he.possiblyEvaluate(y,I,V),ae,v(ze))}else return ae};var Sl=function(y){this._properties=y,this._values=Object.create(y.defaultTransitioningPropertyValues)};Sl.prototype.possiblyEvaluate=function(y,I,V){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var ze=he[ae];$._values[ze]=this._values[ze].possiblyEvaluate(y,I,V)}return $},Sl.prototype.hasTransition=function(){for(var y=0,I=Object.keys(this._values);y<I.length;y+=1){var V=I[y];if(this._values[V].prior)return!0}return!1};var bu=function(y){this._properties=y,this._values=Object.create(y.defaultPropertyValues)};bu.prototype.getValue=function(y){return j(this._values[y].value)},bu.prototype.setValue=function(y,I){this._values[y]=new ja(this._values[y].property,I===null?void 0:j(I))},bu.prototype.serialize=function(){for(var y={},I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I],ae=this.getValue($);ae!==void 0&&(y[$]=ae)}return y},bu.prototype.possiblyEvaluate=function(y,I,V){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var ze=he[ae];$._values[ze]=this._values[ze].possiblyEvaluate(y,I,V)}return $};var dl=function(y,I,V){this.property=y,this.value=I,this.parameters=V};dl.prototype.isConstant=function(){return this.value.kind===\"constant\"},dl.prototype.constantOr=function(y){return this.value.kind===\"constant\"?this.value.value:y},dl.prototype.evaluate=function(y,I,V,$){return this.property.evaluate(this.value,this.parameters,y,I,V,$)};var Sc=function(y){this._properties=y,this._values=Object.create(y.defaultPossiblyEvaluatedValues)};Sc.prototype.get=function(y){return this._values[y]};var Me=function(y){this.specification=y};Me.prototype.possiblyEvaluate=function(y,I){return y.expression.evaluate(I)},Me.prototype.interpolate=function(y,I,V){var $=zu[this.specification.type];return $?$(y,I,V):y};var bt=function(y,I){this.specification=y,this.overrides=I};bt.prototype.possiblyEvaluate=function(y,I,V,$){return y.expression.kind===\"constant\"||y.expression.kind===\"camera\"?new dl(this,{kind:\"constant\",value:y.expression.evaluate(I,null,{},V,$)},I):new dl(this,y.expression,I)},bt.prototype.interpolate=function(y,I,V){if(y.value.kind!==\"constant\"||I.value.kind!==\"constant\")return y;if(y.value.value===void 0||I.value.value===void 0)return new dl(this,{kind:\"constant\",value:void 0},y.parameters);var $=zu[this.specification.type];return $?new dl(this,{kind:\"constant\",value:$(y.value.value,I.value.value,V)},y.parameters):y},bt.prototype.evaluate=function(y,I,V,$,ae,he){return y.kind===\"constant\"?y.value:y.evaluate(I,V,$,ae,he)};var zt=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(V,$,ae,he){if(V.value===void 0)return new dl(this,{kind:\"constant\",value:void 0},$);if(V.expression.kind===\"constant\"){var ze=V.expression.evaluate($,null,{},ae,he),rt=V.property.specification.type===\"resolvedImage\",gt=rt&&typeof ze!=\"string\"?ze.name:ze,Et=this._calculate(gt,gt,gt,$);return new dl(this,{kind:\"constant\",value:Et},$)}else if(V.expression.kind===\"camera\"){var or=this._calculate(V.expression.evaluate({zoom:$.zoom-1}),V.expression.evaluate({zoom:$.zoom}),V.expression.evaluate({zoom:$.zoom+1}),$);return new dl(this,{kind:\"constant\",value:or},$)}else return new dl(this,V.expression,$)},y.prototype.evaluate=function(V,$,ae,he,ze,rt){if(V.kind===\"source\"){var gt=V.evaluate($,ae,he,ze,rt);return this._calculate(gt,gt,gt,$)}else return V.kind===\"composite\"?this._calculate(V.evaluate({zoom:Math.floor($.zoom)-1},ae,he),V.evaluate({zoom:Math.floor($.zoom)},ae,he),V.evaluate({zoom:Math.floor($.zoom)+1},ae,he),$):V.value},y.prototype._calculate=function(V,$,ae,he){var ze=he.zoom;return ze>he.zoomHistory.lastIntegerZoom?{from:V,to:$}:{from:ae,to:$}},y.prototype.interpolate=function(V){return V},y}(bt),Rr=function(y){this.specification=y};Rr.prototype.possiblyEvaluate=function(y,I,V,$){if(y.value!==void 0)if(y.expression.kind===\"constant\"){var ae=y.expression.evaluate(I,null,{},V,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(y.expression.evaluate(new Gn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom+1),I)),I)},Rr.prototype._calculate=function(y,I,V,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:V,to:I}},Rr.prototype.interpolate=function(y){return y};var jr=function(y){this.specification=y};jr.prototype.possiblyEvaluate=function(y,I,V,$){return!!y.expression.evaluate(I,null,{},V,$)},jr.prototype.interpolate=function(){return!1};var Nr=function(y){this.properties=y,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in y){var V=y[I];V.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(V,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(V);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X(\"DataDrivenProperty\",bt),X(\"DataConstantProperty\",Me),X(\"CrossFadedDataDrivenProperty\",zt),X(\"CrossFadedProperty\",Rr),X(\"ColorRampProperty\",jr);var Gr=\"-transition\",mi=function(m){function y(I,V){if(m.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!==\"custom\"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!==\"background\"&&(this.source=I.source,this.sourceLayer=I[\"source-layer\"],this.filter=I.filter),V.layout&&(this._unevaluatedLayout=new bu(V.layout)),V.paint)){this._transitionablePaint=new Uo(V.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(V.paint)}}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},y.prototype.getLayoutProperty=function(V){return V===\"visibility\"?this.visibility:this._unevaluatedLayout.getValue(V)},y.prototype.setLayoutProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he=\"layers.\"+this.id+\".layout.\"+V;if(this._validate(Ul,he,V,$,ae))return}if(V===\"visibility\"){this.visibility=$;return}this._unevaluatedLayout.setValue(V,$)},y.prototype.getPaintProperty=function(V){return U(V,Gr)?this._transitionablePaint.getTransition(V.slice(0,-Gr.length)):this._transitionablePaint.getValue(V)},y.prototype.setPaintProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he=\"layers.\"+this.id+\".paint.\"+V;if(this._validate(hl,he,V,$,ae))return!1}if(U(V,Gr))return this._transitionablePaint.setTransition(V.slice(0,-Gr.length),$||void 0),!1;var ze=this._transitionablePaint._values[V],rt=ze.property.specification[\"property-type\"]===\"cross-faded-data-driven\",gt=ze.value.isDataDriven(),Et=ze.value;this._transitionablePaint.setValue(V,$),this._handleSpecialPaintPropertyUpdate(V);var or=this._transitionablePaint._values[V].value,_r=or.isDataDriven();return _r||gt||rt||this._handleOverridablePaintPropertyUpdate(V,Et,or)},y.prototype._handleSpecialPaintPropertyUpdate=function(V){},y.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!1},y.prototype.isHidden=function(V){return this.minzoom&&V<this.minzoom||this.maxzoom&&V>=this.maxzoom?!0:this.visibility===\"none\"},y.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},y.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},y.prototype.recalculate=function(V,$){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,$)},y.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),Z(V,function($,ae){return $!==void 0&&!(ae===\"layout\"&&!Object.keys($).length)&&!(ae===\"paint\"&&!Object.keys($).length)})},y.prototype._validate=function(V,$,ae,he,ze){return ze===void 0&&(ze={}),ze&&ze.validate===!1?!1:Lu(this,V.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},y.prototype.is3D=function(){return!1},y.prototype.isTileClipped=function(){return!1},y.prototype.hasOffscreenPass=function(){return!1},y.prototype.resize=function(){},y.prototype.isStateDependent=function(){for(var V in this.paint._values){var $=this.paint.get(V);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind===\"source\"||$.value.kind===\"composite\")&&$.value.isStateDependent)return!0}return!1},y}(Wn),Ui={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(y,I){this._structArray=y,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ei=128,Hn=5,en=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};en.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},en.deserialize=function(y){var I=Object.create(this.prototype);return I.arrayBuffer=y.arrayBuffer,I.length=y.length,I.capacity=y.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},en.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},en.prototype.clear=function(){this.length=0},en.prototype.resize=function(y){this.reserve(y),this.length=y},en.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*Hn),Ei),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},en.prototype._refreshViews=function(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")};function Wi(m,y){y===void 0&&(y=1);var I=0,V=0,$=m.map(function(he){var ze=si(he.type),rt=I=Mr(I,Math.max(y,ze)),gt=he.components||1;return V=Math.max(V,ze),I+=ze*gt,{name:he.name,type:he.type,components:gt,offset:rt}}),ae=Mr(I,Math.max(V,y));return{members:$,size:ae,alignment:y}}function si(m){return Ui[m].BYTES_PER_ELEMENT}function Mr(m,y){return Math.ceil(m/y)*y}var Yr=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.int16[he+0]=$,this.int16[he+1]=ae,V},y}(en);Yr.prototype.bytesPerElement=4,X(\"StructArrayLayout2i4\",Yr);var xi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*4;return this.int16[rt+0]=$,this.int16[rt+1]=ae,this.int16[rt+2]=he,this.int16[rt+3]=ze,V},y}(en);xi.prototype.bytesPerElement=8,X(\"StructArrayLayout4i8\",xi);var Ri=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=ze,this.int16[Et+4]=rt,this.int16[Et+5]=gt,V},y}(en);Ri.prototype.bytesPerElement=12,X(\"StructArrayLayout2i4i12\",Ri);var ci=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*4,or=V*8;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.uint8[or+4]=he,this.uint8[or+5]=ze,this.uint8[or+6]=rt,this.uint8[or+7]=gt,V},y}(en);ci.prototype.bytesPerElement=8,X(\"StructArrayLayout2i4ub8\",ci);var an=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.float32[he+0]=$,this.float32[he+1]=ae,V},y}(en);an.prototype.bytesPerElement=8,X(\"StructArrayLayout2f8\",an);var Zi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r){var pr=this.length;return this.resize(pr+1),this.emplace(pr,V,$,ae,he,ze,rt,gt,Et,or,_r)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr){var Fr=V*10;return this.uint16[Fr+0]=$,this.uint16[Fr+1]=ae,this.uint16[Fr+2]=he,this.uint16[Fr+3]=ze,this.uint16[Fr+4]=rt,this.uint16[Fr+5]=gt,this.uint16[Fr+6]=Et,this.uint16[Fr+7]=or,this.uint16[Fr+8]=_r,this.uint16[Fr+9]=pr,V},y}(en);Zi.prototype.bytesPerElement=20,X(\"StructArrayLayout10ui20\",Zi);var Bn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr){var oi=this.length;return this.resize(oi+1),this.emplace(oi,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi){var Hi=V*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=ae,this.int16[Hi+2]=he,this.int16[Hi+3]=ze,this.uint16[Hi+4]=rt,this.uint16[Hi+5]=gt,this.uint16[Hi+6]=Et,this.uint16[Hi+7]=or,this.int16[Hi+8]=_r,this.int16[Hi+9]=pr,this.int16[Hi+10]=Fr,this.int16[Hi+11]=oi,V},y}(en);Bn.prototype.bytesPerElement=24,X(\"StructArrayLayout4i4ui4i24\",Bn);var hi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.float32[ze+0]=$,this.float32[ze+1]=ae,this.float32[ze+2]=he,V},y}(en);hi.prototype.bytesPerElement=12,X(\"StructArrayLayout3f12\",hi);var li=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.uint32[ae+0]=$,V},y}(en);li.prototype.bytesPerElement=4,X(\"StructArrayLayout1ul4\",li);var mn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.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)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or){var _r=this.length;return this.resize(_r+1),this.emplace(_r,V,$,ae,he,ze,rt,gt,Et,or)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r){var pr=V*10,Fr=V*5;return this.int16[pr+0]=$,this.int16[pr+1]=ae,this.int16[pr+2]=he,this.int16[pr+3]=ze,this.int16[pr+4]=rt,this.int16[pr+5]=gt,this.uint32[Fr+3]=Et,this.uint16[pr+8]=or,this.uint16[pr+9]=_r,V},y}(en);mn.prototype.bytesPerElement=20,X(\"StructArrayLayout6i1ul2ui20\",mn);var Ji=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=ze,this.int16[Et+4]=rt,this.int16[Et+5]=gt,V},y}(en);Ji.prototype.bytesPerElement=12,X(\"StructArrayLayout2i2i2i12\",Ji);var Vi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze){var rt=this.length;return this.resize(rt+1),this.emplace(rt,V,$,ae,he,ze)},y.prototype.emplace=function(V,$,ae,he,ze,rt){var gt=V*4,Et=V*8;return this.float32[gt+0]=$,this.float32[gt+1]=ae,this.float32[gt+2]=he,this.int16[Et+6]=ze,this.int16[Et+7]=rt,V},y}(en);Vi.prototype.bytesPerElement=16,X(\"StructArrayLayout2f1f2i16\",Vi);var Ni=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*12,gt=V*3;return this.uint8[rt+0]=$,this.uint8[rt+1]=ae,this.float32[gt+1]=he,this.float32[gt+2]=ze,V},y}(en);Ni.prototype.bytesPerElement=12,X(\"StructArrayLayout2ub2f12\",Ni);var pn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.uint16[ze+0]=$,this.uint16[ze+1]=ae,this.uint16[ze+2]=he,V},y}(en);pn.prototype.bytesPerElement=6,X(\"StructArrayLayout3ui6\",pn);var Vn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.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)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn){var Pn=V*24,Zn=V*12,ga=V*48;return this.int16[Pn+0]=$,this.int16[Pn+1]=ae,this.uint16[Pn+2]=he,this.uint16[Pn+3]=ze,this.uint32[Zn+2]=rt,this.uint32[Zn+3]=gt,this.uint32[Zn+4]=Et,this.uint16[Pn+10]=or,this.uint16[Pn+11]=_r,this.uint16[Pn+12]=pr,this.float32[Zn+7]=Fr,this.float32[Zn+8]=oi,this.uint8[ga+36]=Hi,this.uint8[ga+37]=Ai,this.uint8[ga+38]=bn,this.uint32[Zn+10]=nn,this.int16[Pn+22]=xn,V},y}(en);Vn.prototype.bytesPerElement=48,X(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",Vn);var na=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.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)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao,_s){var jo=V*34,El=V*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=ze,this.int16[jo+4]=rt,this.int16[jo+5]=gt,this.int16[jo+6]=Et,this.int16[jo+7]=or,this.uint16[jo+8]=_r,this.uint16[jo+9]=pr,this.uint16[jo+10]=Fr,this.uint16[jo+11]=oi,this.uint16[jo+12]=Hi,this.uint16[jo+13]=Ai,this.uint16[jo+14]=bn,this.uint16[jo+15]=nn,this.uint16[jo+16]=xn,this.uint16[jo+17]=Pn,this.uint16[jo+18]=Zn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Jo,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,V},y}(en);na.prototype.bytesPerElement=68,X(\"StructArrayLayout8i15ui1ul4f68\",na);var Ki=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.float32[ae+0]=$,V},y}(en);Ki.prototype.bytesPerElement=4,X(\"StructArrayLayout1f4\",Ki);var kn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.int16[ze+0]=$,this.int16[ze+1]=ae,this.int16[ze+2]=he,V},y}(en);kn.prototype.bytesPerElement=6,X(\"StructArrayLayout3i6\",kn);var ta=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*2,rt=V*4;return this.uint32[ze+0]=$,this.uint16[rt+2]=ae,this.uint16[rt+3]=he,V},y}(en);ta.prototype.bytesPerElement=8,X(\"StructArrayLayout1ul2ui8\",ta);var oa=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,V},y}(en);oa.prototype.bytesPerElement=4,X(\"StructArrayLayout2ui4\",oa);var ba=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.uint16[ae+0]=$,V},y}(en);ba.prototype.bytesPerElement=2,X(\"StructArrayLayout1ui2\",ba);var is=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*4;return this.float32[rt+0]=$,this.float32[rt+1]=ae,this.float32[rt+2]=he,this.float32[rt+3]=ze,V},y}(en);is.prototype.bytesPerElement=16,X(\"StructArrayLayout4f16\",is);var Zs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={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},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(y.prototype,I),y}(qi);Zs.prototype.size=20;var Va=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Zs(this,V)},y}(mn);X(\"CollisionBoxArray\",Va);var Ml=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={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},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(y.prototype,I),y}(qi);Ml.prototype.size=48;var zo=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Ml(this,V)},y}(Vn);X(\"PlacedSymbolArray\",zo);var Qs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(y.prototype,I),y}(qi);Qs.prototype.size=68;var al=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Qs(this,V)},y}(na);X(\"SymbolInstanceArray\",al);var Vl=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getoffsetX=function(V){return this.float32[V*1+0]},y}(Ki);X(\"GlyphOffsetArray\",Vl);var ss=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getx=function(V){return this.int16[V*3+0]},y.prototype.gety=function(V){return this.int16[V*3+1]},y.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},y}(kn);X(\"SymbolLineVertexArray\",ss);var Vs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(y.prototype,I),y}(qi);Vs.prototype.size=8;var Ys=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Vs(this,V)},y}(ta);X(\"FeatureIndexArray\",Ys);var wa=Wi([{name:\"a_pos\",components:2,type:\"Int16\"}],4),ol=wa.members,io=function(y){y===void 0&&(y=[]),this.segments=y};io.prototype.prepareSegment=function(y,I,V,$){var ae=this.segments[this.segments.length-1];return y>io.MAX_VERTEX_ARRAY_LENGTH&&re(\"Max vertices per segment is \"+io.MAX_VERTEX_ARRAY_LENGTH+\": bucket requested \"+y),(!ae||ae.vertexLength+y>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var y=0,I=this.segments;y<I.length;y+=1){var V=I[y];for(var $ in V.vaos)V.vaos[$].destroy()}},io.simpleSegment=function(y,I,V,$){return new io([{vertexOffset:y,primitiveOffset:I,vertexLength:V,primitiveLength:$,vaos:{},sortKey:0}])},io.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,X(\"SegmentVector\",io);function Y(m,y){return m=p(Math.floor(m),0,255),y=p(Math.floor(y),0,255),256*m+y}var D=Wi([{name:\"a_pattern_from\",components:4,type:\"Uint16\"},{name:\"a_pattern_to\",components:4,type:\"Uint16\"},{name:\"a_pixel_ratio_from\",components:1,type:\"Uint16\"},{name:\"a_pixel_ratio_to\",components:1,type:\"Uint16\"}]),J=a(function(m){function y(I,V){var $,ae,he,ze,rt,gt,Et,or;for($=I.length&3,ae=I.length-$,he=V,rt=3432918353,gt=461845907,or=0;or<ae;)Et=I.charCodeAt(or)&255|(I.charCodeAt(++or)&255)<<8|(I.charCodeAt(++or)&255)<<16|(I.charCodeAt(++or)&255)<<24,++or,Et=(Et&65535)*rt+(((Et>>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et,he=he<<13|he>>>19,ze=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(ze&65535)+27492+(((ze>>>16)+58964&65535)<<16);switch(Et=0,$){case 3:Et^=(I.charCodeAt(or+2)&255)<<16;case 2:Et^=(I.charCodeAt(or+1)&255)<<8;case 1:Et^=I.charCodeAt(or)&255,Et=(Et&65535)*rt+(((Et>>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}m.exports=y}),q=a(function(m){function y(I,V){for(var $=I.length,ae=V^$,he=0,ze;$>=4;)ze=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,ze=(ze&65535)*1540483477+(((ze>>>16)*1540483477&65535)<<16),ze^=ze>>>24,ze=(ze&65535)*1540483477+(((ze>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^ze,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}m.exports=y}),K=J,de=J,ne=q;K.murmur3=de,K.murmur2=ne;var we=function(){this.ids=[],this.positions=[],this.indexed=!1};we.prototype.add=function(y,I,V,$){this.ids.push(ft(y)),this.positions.push(I,V,$)},we.prototype.getPositions=function(y){for(var I=ft(y),V=0,$=this.ids.length-1;V<$;){var ae=V+$>>1;this.ids[ae]>=I?$=ae:V=ae+1}for(var he=[];this.ids[V]===I;){var ze=this.positions[3*V],rt=this.positions[3*V+1],gt=this.positions[3*V+2];he.push({index:ze,start:rt,end:gt}),V++}return he},we.serialize=function(y,I){var V=new Float64Array(y.ids),$=new Uint32Array(y.positions);return Zt(V,$,0,V.length-1),I&&I.push(V.buffer,$.buffer),{ids:V,positions:$}},we.deserialize=function(y){var I=new we;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var Ue=Math.pow(2,53)-1;function ft(m){var y=+m;return!isNaN(y)&&y<=Ue?y:K(String(m))}function Zt(m,y,I,V){for(;I<V;){for(var $=m[I+V>>1],ae=I-1,he=V+1;;){do ae++;while(m[ae]<$);do he--;while(m[he]>$);if(ae>=he)break;hr(m,ae,he),hr(y,3*ae,3*he),hr(y,3*ae+1,3*he+1),hr(y,3*ae+2,3*he+2)}he-I<V-he?(Zt(m,y,I,he),I=he+1):(Zt(m,y,he+1,V),V=he)}}function hr(m,y,I){var V=m[y];m[y]=m[I],m[I]=V}X(\"FeaturePositionMap\",we);var qt=function(y,I){this.gl=y.gl,this.location=I},Ve=function(m){function y(I,V){m.call(this,I,V),this.current=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1i(this.location,V))},y}(qt),Qe=function(m){function y(I,V){m.call(this,I,V),this.current=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1f(this.location,V))},y}(qt),at=function(m){function y(I,V){m.call(this,I,V),this.current=[0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){(V[0]!==this.current[0]||V[1]!==this.current[1])&&(this.current=V,this.gl.uniform2f(this.location,V[0],V[1]))},y}(qt),Ct=function(m){function y(I,V){m.call(this,I,V),this.current=[0,0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){(V[0]!==this.current[0]||V[1]!==this.current[1]||V[2]!==this.current[2])&&(this.current=V,this.gl.uniform3f(this.location,V[0],V[1],V[2]))},y}(qt),Ot=function(m){function y(I,V){m.call(this,I,V),this.current=[0,0,0,0]}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){(V[0]!==this.current[0]||V[1]!==this.current[1]||V[2]!==this.current[2]||V[3]!==this.current[3])&&(this.current=V,this.gl.uniform4f(this.location,V[0],V[1],V[2],V[3]))},y}(qt),Rt=function(m){function y(I,V){m.call(this,I,V),this.current=cs.transparent}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){(V.r!==this.current.r||V.g!==this.current.g||V.b!==this.current.b||V.a!==this.current.a)&&(this.current=V,this.gl.uniform4f(this.location,V.r,V.g,V.b,V.a))},y}(qt),Bt=new Float32Array(16),Dt=function(m){function y(I,V){m.call(this,I,V),this.current=Bt}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.set=function(V){if(V[12]!==this.current[12]||V[0]!==this.current[0]){this.current=V,this.gl.uniformMatrix4fv(this.location,!1,V);return}for(var $=1;$<16;$++)if(V[$]!==this.current[$]){this.current=V,this.gl.uniformMatrix4fv(this.location,!1,V);break}},y}(qt);function yt(m){return[Y(255*m.r,255*m.g),Y(255*m.b,255*m.a)]}var Pt=function(y,I,V){this.value=y,this.uniformNames=I.map(function($){return\"u_\"+$}),this.type=V};Pt.prototype.setUniform=function(y,I,V){y.set(V.constantOr(this.value))},Pt.prototype.getBinding=function(y,I,V){return this.type===\"color\"?new Rt(y,I):new Qe(y,I)};var ht=function(y,I){this.uniformNames=I.map(function(V){return\"u_\"+V}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ht.prototype.setConstantPatternPositions=function(y,I){this.pixelRatioFrom=I.pixelRatio,this.pixelRatioTo=y.pixelRatio,this.patternFrom=I.tlbr,this.patternTo=y.tlbr},ht.prototype.setUniform=function(y,I,V,$){var ae=$===\"u_pattern_to\"?this.patternTo:$===\"u_pattern_from\"?this.patternFrom:$===\"u_pixel_ratio_to\"?this.pixelRatioTo:$===\"u_pixel_ratio_from\"?this.pixelRatioFrom:null;ae&&y.set(ae)},ht.prototype.getBinding=function(y,I,V){return V.substr(0,9)===\"u_pattern\"?new Ot(y,I):new Qe(y,I)};var ur=function(y,I,V,$){this.expression=y,this.type=V,this.maxValue=0,this.paintVertexAttributes=I.map(function(ae){return{name:\"a_\"+ae,type:\"Float32\",components:V===\"color\"?2:1,offset:0}}),this.paintVertexArray=new $};ur.prototype.populatePaintArray=function(y,I,V,$,ae){var he=this.paintVertexArray.length,ze=this.expression.evaluate(new Gn(0),I,{},$,[],ae);this.paintVertexArray.resize(y),this._setPaintValue(he,y,ze)},ur.prototype.updatePaintArray=function(y,I,V,$){var ae=this.expression.evaluate({zoom:0},V,$);this._setPaintValue(y,I,ae)},ur.prototype._setPaintValue=function(y,I,V){if(this.type===\"color\")for(var $=yt(V),ae=y;ae<I;ae++)this.paintVertexArray.emplace(ae,$[0],$[1]);else{for(var he=y;he<I;he++)this.paintVertexArray.emplace(he,V);this.maxValue=Math.max(this.maxValue,Math.abs(V))}},ur.prototype.upload=function(y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ur.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var br=function(y,I,V,$,ae,he){this.expression=y,this.uniformNames=I.map(function(ze){return\"u_\"+ze+\"_t\"}),this.type=V,this.useIntegerZoom=$,this.zoom=ae,this.maxValue=0,this.paintVertexAttributes=I.map(function(ze){return{name:\"a_\"+ze,type:\"Float32\",components:V===\"color\"?4:2,offset:0}}),this.paintVertexArray=new he};br.prototype.populatePaintArray=function(y,I,V,$,ae){var he=this.expression.evaluate(new Gn(this.zoom),I,{},$,[],ae),ze=this.expression.evaluate(new Gn(this.zoom+1),I,{},$,[],ae),rt=this.paintVertexArray.length;this.paintVertexArray.resize(y),this._setPaintValue(rt,y,he,ze)},br.prototype.updatePaintArray=function(y,I,V,$){var ae=this.expression.evaluate({zoom:this.zoom},V,$),he=this.expression.evaluate({zoom:this.zoom+1},V,$);this._setPaintValue(y,I,ae,he)},br.prototype._setPaintValue=function(y,I,V,$){if(this.type===\"color\")for(var ae=yt(V),he=yt($),ze=y;ze<I;ze++)this.paintVertexArray.emplace(ze,ae[0],ae[1],he[0],he[1]);else{for(var rt=y;rt<I;rt++)this.paintVertexArray.emplace(rt,V,$);this.maxValue=Math.max(this.maxValue,Math.abs(V),Math.abs($))}},br.prototype.upload=function(y){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=y.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},br.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},br.prototype.setUniform=function(y,I){var V=this.useIntegerZoom?Math.floor(I.zoom):I.zoom,$=p(this.expression.interpolationFactor(V,this.zoom,this.zoom+1),0,1);y.set($)},br.prototype.getBinding=function(y,I,V){return new Qe(y,I)};var Ur=function(y,I,V,$,ae,he){this.expression=y,this.type=I,this.useIntegerZoom=V,this.zoom=$,this.layerId=he,this.zoomInPaintVertexArray=new ae,this.zoomOutPaintVertexArray=new ae};Ur.prototype.populatePaintArray=function(y,I,V){var $=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(y),this.zoomOutPaintVertexArray.resize(y),this._setPaintValues($,y,I.patterns&&I.patterns[this.layerId],V)},Ur.prototype.updatePaintArray=function(y,I,V,$,ae){this._setPaintValues(y,I,V.patterns&&V.patterns[this.layerId],ae)},Ur.prototype._setPaintValues=function(y,I,V,$){if(!(!$||!V)){var ae=V.min,he=V.mid,ze=V.max,rt=$[ae],gt=$[he],Et=$[ze];if(!(!rt||!gt||!Et))for(var or=y;or<I;or++)this.zoomInPaintVertexArray.emplace(or,gt.tl[0],gt.tl[1],gt.br[0],gt.br[1],rt.tl[0],rt.tl[1],rt.br[0],rt.br[1],gt.pixelRatio,rt.pixelRatio),this.zoomOutPaintVertexArray.emplace(or,gt.tl[0],gt.tl[1],gt.br[0],gt.br[1],Et.tl[0],Et.tl[1],Et.br[0],Et.br[1],gt.pixelRatio,Et.pixelRatio)}},Ur.prototype.upload=function(y){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=y.createVertexBuffer(this.zoomInPaintVertexArray,D.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=y.createVertexBuffer(this.zoomOutPaintVertexArray,D.members,this.expression.isStateDependent))},Ur.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Di=function(y,I,V){this.binders={},this._buffers=[];var $=[];for(var ae in y.paint._values)if(V(ae)){var he=y.paint.get(ae);if(!(!(he instanceof dl)||!Ws(he.property.specification))){var ze=Ti(ae,y.type),rt=he.value,gt=he.property.specification.type,Et=he.property.useIntegerZoom,or=he.property.specification[\"property-type\"],_r=or===\"cross-faded\"||or===\"cross-faded-data-driven\";if(rt.kind===\"constant\")this.binders[ae]=_r?new ht(rt.value,ze):new Pt(rt.value,ze,gt),$.push(\"/u_\"+ae);else if(rt.kind===\"source\"||_r){var pr=rn(ae,gt,\"source\");this.binders[ae]=_r?new Ur(rt,gt,Et,I,pr,y.id):new ur(rt,ze,gt,pr),$.push(\"/a_\"+ae)}else{var Fr=rn(ae,gt,\"composite\");this.binders[ae]=new br(rt,ze,gt,Et,I,Fr),$.push(\"/z_\"+ae)}}}this.cacheKey=$.sort().join(\"\")};Di.prototype.getMaxValue=function(y){var I=this.binders[y];return I instanceof ur||I instanceof br?I.maxValue:0},Di.prototype.populatePaintArrays=function(y,I,V,$,ae){for(var he in this.binders){var ze=this.binders[he];(ze instanceof ur||ze instanceof br||ze instanceof Ur)&&ze.populatePaintArray(y,I,V,$,ae)}},Di.prototype.setConstantPatternPositions=function(y,I){for(var V in this.binders){var $=this.binders[V];$ instanceof ht&&$.setConstantPatternPositions(y,I)}},Di.prototype.updatePaintArrays=function(y,I,V,$,ae){var he=!1;for(var ze in y)for(var rt=I.getPositions(ze),gt=0,Et=rt;gt<Et.length;gt+=1){var or=Et[gt],_r=V.feature(or.index);for(var pr in this.binders){var Fr=this.binders[pr];if((Fr instanceof ur||Fr instanceof br||Fr instanceof Ur)&&Fr.expression.isStateDependent===!0){var oi=$.paint.get(pr);Fr.expression=oi.value,Fr.updatePaintArray(or.start,or.end,_r,y[ze],ae),he=!0}}}return he},Di.prototype.defines=function(){var y=[];for(var I in this.binders){var V=this.binders[I];(V instanceof Pt||V instanceof ht)&&y.push.apply(y,V.uniformNames.map(function($){return\"#define HAS_UNIFORM_\"+$}))}return y},Di.prototype.getBinderAttributes=function(){var y=[];for(var I in this.binders){var V=this.binders[I];if(V instanceof ur||V instanceof br)for(var $=0;$<V.paintVertexAttributes.length;$++)y.push(V.paintVertexAttributes[$].name);else if(V instanceof Ur)for(var ae=0;ae<D.members.length;ae++)y.push(D.members[ae].name)}return y},Di.prototype.getBinderUniforms=function(){var y=[];for(var I in this.binders){var V=this.binders[I];if(V instanceof Pt||V instanceof ht||V instanceof br)for(var $=0,ae=V.uniformNames;$<ae.length;$+=1){var he=ae[$];y.push(he)}}return y},Di.prototype.getPaintVertexBuffers=function(){return this._buffers},Di.prototype.getUniforms=function(y,I){var V=[];for(var $ in this.binders){var ae=this.binders[$];if(ae instanceof Pt||ae instanceof ht||ae instanceof br)for(var he=0,ze=ae.uniformNames;he<ze.length;he+=1){var rt=ze[he];if(I[rt]){var gt=ae.getBinding(y,I[rt],rt);V.push({name:rt,property:$,binding:gt})}}}return V},Di.prototype.setUniforms=function(y,I,V,$){for(var ae=0,he=I;ae<he.length;ae+=1){var ze=he[ae],rt=ze.name,gt=ze.property,Et=ze.binding;this.binders[gt].setUniform(Et,$,V.get(gt),rt)}},Di.prototype.updatePaintBuffers=function(y){this._buffers=[];for(var I in this.binders){var V=this.binders[I];if(y&&V instanceof Ur){var $=y.fromScale===2?V.zoomInPaintVertexBuffer:V.zoomOutPaintVertexBuffer;$&&this._buffers.push($)}else(V instanceof ur||V instanceof br)&&V.paintVertexBuffer&&this._buffers.push(V.paintVertexBuffer)}},Di.prototype.upload=function(y){for(var I in this.binders){var V=this.binders[I];(V instanceof ur||V instanceof br||V instanceof Ur)&&V.upload(y)}this.updatePaintBuffers()},Di.prototype.destroy=function(){for(var y in this.binders){var I=this.binders[y];(I instanceof ur||I instanceof br||I instanceof Ur)&&I.destroy()}};var fi=function(y,I,V){V===void 0&&(V=function(){return!0}),this.programConfigurations={};for(var $=0,ae=y;$<ae.length;$+=1){var he=ae[$];this.programConfigurations[he.id]=new Di(he,I,V)}this.needsUpload=!1,this._featureMap=new we,this._bufferOffset=0};fi.prototype.populatePaintArrays=function(y,I,V,$,ae,he){for(var ze in this.programConfigurations)this.programConfigurations[ze].populatePaintArrays(y,I,$,ae,he);I.id!==void 0&&this._featureMap.add(I.id,V,this._bufferOffset,y),this._bufferOffset=y,this.needsUpload=!0},fi.prototype.updatePaintArrays=function(y,I,V,$){for(var ae=0,he=V;ae<he.length;ae+=1){var ze=he[ae];this.needsUpload=this.programConfigurations[ze.id].updatePaintArrays(y,this._featureMap,I,ze,$)||this.needsUpload}},fi.prototype.get=function(y){return this.programConfigurations[y]},fi.prototype.upload=function(y){if(this.needsUpload){for(var I in this.programConfigurations)this.programConfigurations[I].upload(y);this.needsUpload=!1}},fi.prototype.destroy=function(){for(var y in this.programConfigurations)this.programConfigurations[y].destroy()};function Ti(m,y){var I={\"text-opacity\":[\"opacity\"],\"icon-opacity\":[\"opacity\"],\"text-color\":[\"fill_color\"],\"icon-color\":[\"fill_color\"],\"text-halo-color\":[\"halo_color\"],\"icon-halo-color\":[\"halo_color\"],\"text-halo-blur\":[\"halo_blur\"],\"icon-halo-blur\":[\"halo_blur\"],\"text-halo-width\":[\"halo_width\"],\"icon-halo-width\":[\"halo_width\"],\"line-gap-width\":[\"gapwidth\"],\"line-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-extrusion-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"]};return I[m]||[m.replace(y+\"-\",\"\").replace(/-/g,\"_\")]}function gn(m){var y={\"line-pattern\":{source:Zi,composite:Zi},\"fill-pattern\":{source:Zi,composite:Zi},\"fill-extrusion-pattern\":{source:Zi,composite:Zi}};return y[m]}function rn(m,y,I){var V={color:{source:an,composite:is},number:{source:Ki,composite:an}},$=gn(m);return $&&$[I]||V[y][I]}X(\"ConstantBinder\",Pt),X(\"CrossFadedConstantBinder\",ht),X(\"SourceExpressionBinder\",ur),X(\"CrossFadedCompositeBinder\",Ur),X(\"CompositeExpressionBinder\",br),X(\"ProgramConfiguration\",Di,{omit:[\"_buffers\"]}),X(\"ProgramConfigurationSet\",fi);var Ci=8192,Bi=15,Gi=Math.pow(2,Bi-1)-1,sn=-Gi-1;function zn(m){for(var y=Ci/m.extent,I=m.loadGeometry(),V=0;V<I.length;V++)for(var $=I[V],ae=0;ae<$.length;ae++){var he=$[ae],ze=Math.round(he.x*y),rt=Math.round(he.y*y);he.x=p(ze,sn,Gi),he.y=p(rt,sn,Gi),(ze<he.x||ze>he.x+1||rt<he.y||rt>he.y+1)&&re(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return I}function Ja(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?zn(m):[]}}function co(m,y,I,V,$){m.emplaceBack(y*2+(V+1)/2,I*2+($+1)/2)}var ts=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Yr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new fi(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(y,I,V){var $=this.layers[0],ae=[],he=null;$.type===\"circle\"&&(he=$.layout.get(\"circle-sort-key\"));for(var ze=0,rt=y;ze<rt.length;ze+=1){var gt=rt[ze],Et=gt.feature,or=gt.id,_r=gt.index,pr=gt.sourceLayerIndex,Fr=this.layers[0]._featureFilter.needGeometry,oi=Ja(Et,Fr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),oi,V)){var Hi=he?he.evaluate(oi,{},V):void 0,Ai={id:or,properties:Et.properties,type:Et.type,sourceLayerIndex:pr,index:_r,geometry:Fr?oi.geometry:zn(Et),patterns:{},sortKey:Hi};ae.push(Ai)}}he&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var bn=0,nn=ae;bn<nn.length;bn+=1){var xn=nn[bn],Pn=xn,Zn=Pn.geometry,ga=Pn.index,ha=Pn.sourceLayerIndex,eo=y[ga].feature;this.addFeature(xn,Zn,ga,V),I.featureIndex.insert(eo,Zn,ga,ha,this.index)}},ts.prototype.update=function(y,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,V)},ts.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ts.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ts.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,ol),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},ts.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ts.prototype.addFeature=function(y,I,V,$){for(var ae=0,he=I;ae<he.length;ae+=1)for(var ze=he[ae],rt=0,gt=ze;rt<gt.length;rt+=1){var Et=gt[rt],or=Et.x,_r=Et.y;if(!(or<0||or>=Ci||_r<0||_r>=Ci)){var pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Fr=pr.vertexLength;co(this.layoutVertexArray,or,_r,-1,-1),co(this.layoutVertexArray,or,_r,1,-1),co(this.layoutVertexArray,or,_r,1,1),co(this.layoutVertexArray,or,_r,-1,1),this.indexArray.emplaceBack(Fr,Fr+1,Fr+2),this.indexArray.emplaceBack(Fr,Fr+3,Fr+2),pr.vertexLength+=4,pr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,V,{},$)},X(\"CircleBucket\",ts,{omit:[\"layers\"]});function so(m,y){for(var I=0;I<m.length;I++)if(Td(y,m[I]))return!0;for(var V=0;V<y.length;V++)if(Td(m,y[V]))return!0;return!!Lv(m,y)}function Yo(m,y,I){return!!(Td(m,y)||Kv(y,m,I))}function ms(m,y){if(m.length===1)return gp(y,m[0]);for(var I=0;I<y.length;I++)for(var V=y[I],$=0;$<V.length;$++)if(Td(m,V[$]))return!0;for(var ae=0;ae<m.length;ae++)if(gp(y,m[ae]))return!0;for(var he=0;he<y.length;he++)if(Lv(m,y[he]))return!0;return!1}function ou(m,y,I){for(var V=0;V<y.length;V++){var $=y[V];if(m.length>=3){for(var ae=0;ae<$.length;ae++)if(Td(m,$[ae]))return!0}if(Cv(m,$,I))return!0}return!1}function Cv(m,y,I){if(m.length>1){if(Lv(m,y))return!0;for(var V=0;V<y.length;V++)if(Kv(y[V],m,I))return!0}for(var $=0;$<m.length;$++)if(Kv(m[$],y,I))return!0;return!1}function Lv(m,y){if(m.length===0||y.length===0)return!1;for(var I=0;I<m.length-1;I++)for(var V=m[I],$=m[I+1],ae=0;ae<y.length-1;ae++){var he=y[ae],ze=y[ae+1];if(wd(V,$,he,ze))return!0}return!1}function wd(m,y,I,V){return oe(m,I,V)!==oe(y,I,V)&&oe(m,y,I)!==oe(m,y,V)}function Kv(m,y,I){var V=I*I;if(y.length===1)return m.distSqr(y[0])<V;for(var $=1;$<y.length;$++){var ae=y[$-1],he=y[$];if(hg(m,ae,he)<V)return!0}return!1}function hg(m,y,I){var V=y.distSqr(I);if(V===0)return m.distSqr(y);var $=((m.x-y.x)*(I.x-y.x)+(m.y-y.y)*(I.y-y.y))/V;return $<0?m.distSqr(y):$>1?m.distSqr(I):m.distSqr(I.sub(y)._mult($)._add(y))}function gp(m,y){for(var I=!1,V,$,ae,he=0;he<m.length;he++){V=m[he];for(var ze=0,rt=V.length-1;ze<V.length;rt=ze++)$=V[ze],ae=V[rt],$.y>y.y!=ae.y>y.y&&y.x<(ae.x-$.x)*(y.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(m,y){for(var I=!1,V=0,$=m.length-1;V<m.length;$=V++){var ae=m[V],he=m[$];ae.y>y.y!=he.y>y.y&&y.x<(he.x-ae.x)*(y.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function mp(m,y,I,V,$){for(var ae=0,he=m;ae<he.length;ae+=1){var ze=he[ae];if(y<=ze.x&&I<=ze.y&&V>=ze.x&&$>=ze.y)return!0}var rt=[new u(y,I),new u(y,$),new u(V,$),new u(V,I)];if(m.length>2)for(var gt=0,Et=rt;gt<Et.length;gt+=1){var or=Et[gt];if(Td(m,or))return!0}for(var _r=0;_r<m.length-1;_r++){var pr=m[_r],Fr=m[_r+1];if(Ud(pr,Fr,rt))return!0}return!1}function Ud(m,y,I){var V=I[0],$=I[2];if(m.x<V.x&&y.x<V.x||m.x>$.x&&y.x>$.x||m.y<V.y&&y.y<V.y||m.y>$.y&&y.y>$.y)return!1;var ae=oe(m,y,I[0]);return ae!==oe(m,y,I[1])||ae!==oe(m,y,I[2])||ae!==oe(m,y,I[3])}function Ad(m,y,I){var V=y.paint.get(m).value;return V.kind===\"constant\"?V.value:I.programConfigurations.get(y.id).getMaxValue(m)}function Pv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Jv(m,y,I,V,$){if(!y[0]&&!y[1])return m;var ae=u.convert(y)._mult($);I===\"viewport\"&&ae._rotate(-V);for(var he=[],ze=0;ze<m.length;ze++){var rt=m[ze];he.push(rt.sub(ae))}return he}var Iv=new Nr({\"circle-sort-key\":new bt(Rn.layout_circle[\"circle-sort-key\"])}),fy=new Nr({\"circle-radius\":new bt(Rn.paint_circle[\"circle-radius\"]),\"circle-color\":new bt(Rn.paint_circle[\"circle-color\"]),\"circle-blur\":new bt(Rn.paint_circle[\"circle-blur\"]),\"circle-opacity\":new bt(Rn.paint_circle[\"circle-opacity\"]),\"circle-translate\":new Me(Rn.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new Me(Rn.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new Me(Rn.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new Me(Rn.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new bt(Rn.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new bt(Rn.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new bt(Rn.paint_circle[\"circle-stroke-opacity\"])}),dg={paint:fy,layout:Iv},oh=typeof Float32Array!=\"undefined\"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var m=arguments,y=0,I=arguments.length;I--;)y+=m[I]*m[I];return Math.sqrt(y)});function vg(){var m=new oh(4);return oh!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}function hy(m,y,I){var V=y[0],$=y[1],ae=y[2],he=y[3],ze=Math.sin(I),rt=Math.cos(I);return m[0]=V*rt+ae*ze,m[1]=$*rt+he*ze,m[2]=V*-ze+ae*rt,m[3]=$*-ze+he*rt,m}function Zh(){var m=new oh(9);return oh!=Float32Array&&(m[1]=0,m[2]=0,m[3]=0,m[5]=0,m[6]=0,m[7]=0),m[0]=1,m[4]=1,m[8]=1,m}function am(m,y){var I=Math.sin(y),V=Math.cos(y);return m[0]=V,m[1]=I,m[2]=0,m[3]=-I,m[4]=V,m[5]=0,m[6]=0,m[7]=0,m[8]=1,m}function k1(){var m=new oh(16);return oh!=Float32Array&&(m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[11]=0,m[12]=0,m[13]=0,m[14]=0),m[0]=1,m[5]=1,m[10]=1,m[15]=1,m}function C1(m){var y=new oh(16);return y[0]=m[0],y[1]=m[1],y[2]=m[2],y[3]=m[3],y[4]=m[4],y[5]=m[5],y[6]=m[6],y[7]=m[7],y[8]=m[8],y[9]=m[9],y[10]=m[10],y[11]=m[11],y[12]=m[12],y[13]=m[13],y[14]=m[14],y[15]=m[15],y}function dy(m){return m[0]=1,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=1,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=1,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}function om(m,y){var I=y[0],V=y[1],$=y[2],ae=y[3],he=y[4],ze=y[5],rt=y[6],gt=y[7],Et=y[8],or=y[9],_r=y[10],pr=y[11],Fr=y[12],oi=y[13],Hi=y[14],Ai=y[15],bn=I*ze-V*he,nn=I*rt-$*he,xn=I*gt-ae*he,Pn=V*rt-$*ze,Zn=V*gt-ae*ze,ga=$*gt-ae*rt,ha=Et*oi-or*Fr,eo=Et*Hi-_r*Fr,za=Et*Ai-pr*Fr,Za=or*Hi-_r*oi,Jo=or*Ai-pr*oi,to=_r*Ai-pr*Hi,ao=bn*to-nn*Jo+xn*Za+Pn*za-Zn*eo+ga*ha;return ao?(ao=1/ao,m[0]=(ze*to-rt*Jo+gt*Za)*ao,m[1]=($*Jo-V*to-ae*Za)*ao,m[2]=(oi*ga-Hi*Zn+Ai*Pn)*ao,m[3]=(_r*Zn-or*ga-pr*Pn)*ao,m[4]=(rt*za-he*to-gt*eo)*ao,m[5]=(I*to-$*za+ae*eo)*ao,m[6]=(Hi*xn-Fr*ga-Ai*nn)*ao,m[7]=(Et*ga-_r*xn+pr*nn)*ao,m[8]=(he*Jo-ze*za+gt*ha)*ao,m[9]=(V*za-I*Jo-ae*ha)*ao,m[10]=(Fr*Zn-oi*xn+Ai*bn)*ao,m[11]=(or*xn-Et*Zn-pr*bn)*ao,m[12]=(ze*eo-he*Za-rt*ha)*ao,m[13]=(I*Za-V*eo+$*ha)*ao,m[14]=(oi*nn-Fr*Pn-Hi*bn)*ao,m[15]=(Et*Pn-or*nn+_r*bn)*ao,m):null}function sm(m,y,I){var V=y[0],$=y[1],ae=y[2],he=y[3],ze=y[4],rt=y[5],gt=y[6],Et=y[7],or=y[8],_r=y[9],pr=y[10],Fr=y[11],oi=y[12],Hi=y[13],Ai=y[14],bn=y[15],nn=I[0],xn=I[1],Pn=I[2],Zn=I[3];return m[0]=nn*V+xn*ze+Pn*or+Zn*oi,m[1]=nn*$+xn*rt+Pn*_r+Zn*Hi,m[2]=nn*ae+xn*gt+Pn*pr+Zn*Ai,m[3]=nn*he+xn*Et+Pn*Fr+Zn*bn,nn=I[4],xn=I[5],Pn=I[6],Zn=I[7],m[4]=nn*V+xn*ze+Pn*or+Zn*oi,m[5]=nn*$+xn*rt+Pn*_r+Zn*Hi,m[6]=nn*ae+xn*gt+Pn*pr+Zn*Ai,m[7]=nn*he+xn*Et+Pn*Fr+Zn*bn,nn=I[8],xn=I[9],Pn=I[10],Zn=I[11],m[8]=nn*V+xn*ze+Pn*or+Zn*oi,m[9]=nn*$+xn*rt+Pn*_r+Zn*Hi,m[10]=nn*ae+xn*gt+Pn*pr+Zn*Ai,m[11]=nn*he+xn*Et+Pn*Fr+Zn*bn,nn=I[12],xn=I[13],Pn=I[14],Zn=I[15],m[12]=nn*V+xn*ze+Pn*or+Zn*oi,m[13]=nn*$+xn*rt+Pn*_r+Zn*Hi,m[14]=nn*ae+xn*gt+Pn*pr+Zn*Ai,m[15]=nn*he+xn*Et+Pn*Fr+Zn*bn,m}function vc(m,y,I){var V=I[0],$=I[1],ae=I[2],he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai;return y===m?(m[12]=y[0]*V+y[4]*$+y[8]*ae+y[12],m[13]=y[1]*V+y[5]*$+y[9]*ae+y[13],m[14]=y[2]*V+y[6]*$+y[10]*ae+y[14],m[15]=y[3]*V+y[7]*$+y[11]*ae+y[15]):(he=y[0],ze=y[1],rt=y[2],gt=y[3],Et=y[4],or=y[5],_r=y[6],pr=y[7],Fr=y[8],oi=y[9],Hi=y[10],Ai=y[11],m[0]=he,m[1]=ze,m[2]=rt,m[3]=gt,m[4]=Et,m[5]=or,m[6]=_r,m[7]=pr,m[8]=Fr,m[9]=oi,m[10]=Hi,m[11]=Ai,m[12]=he*V+Et*$+Fr*ae+y[12],m[13]=ze*V+or*$+oi*ae+y[13],m[14]=rt*V+_r*$+Hi*ae+y[14],m[15]=gt*V+pr*$+Ai*ae+y[15]),m}function tu(m,y,I){var V=I[0],$=I[1],ae=I[2];return m[0]=y[0]*V,m[1]=y[1]*V,m[2]=y[2]*V,m[3]=y[3]*V,m[4]=y[4]*$,m[5]=y[5]*$,m[6]=y[6]*$,m[7]=y[7]*$,m[8]=y[8]*ae,m[9]=y[9]*ae,m[10]=y[10]*ae,m[11]=y[11]*ae,m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15],m}function Sd(m,y,I){var V=Math.sin(I),$=Math.cos(I),ae=y[4],he=y[5],ze=y[6],rt=y[7],gt=y[8],Et=y[9],or=y[10],_r=y[11];return y!==m&&(m[0]=y[0],m[1]=y[1],m[2]=y[2],m[3]=y[3],m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15]),m[4]=ae*$+gt*V,m[5]=he*$+Et*V,m[6]=ze*$+or*V,m[7]=rt*$+_r*V,m[8]=gt*$-ae*V,m[9]=Et*$-he*V,m[10]=or*$-ze*V,m[11]=_r*$-rt*V,m}function vy(m,y,I){var V=Math.sin(I),$=Math.cos(I),ae=y[0],he=y[1],ze=y[2],rt=y[3],gt=y[4],Et=y[5],or=y[6],_r=y[7];return y!==m&&(m[8]=y[8],m[9]=y[9],m[10]=y[10],m[11]=y[11],m[12]=y[12],m[13]=y[13],m[14]=y[14],m[15]=y[15]),m[0]=ae*$+gt*V,m[1]=he*$+Et*V,m[2]=ze*$+or*V,m[3]=rt*$+_r*V,m[4]=gt*$-ae*V,m[5]=Et*$-he*V,m[6]=or*$-ze*V,m[7]=_r*$-rt*V,m}function L1(m,y,I,V,$){var ae=1/Math.tan(y/2),he;return m[0]=ae/I,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=ae,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[11]=-1,m[12]=0,m[13]=0,m[15]=0,$!=null&&$!==1/0?(he=1/(V-$),m[10]=($+V)*he,m[14]=2*$*V*he):(m[10]=-1,m[14]=-2*V),m}function wu(m,y,I,V,$,ae,he){var ze=1/(y-I),rt=1/(V-$),gt=1/(ae-he);return m[0]=-2*ze,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=-2*rt,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=2*gt,m[11]=0,m[12]=(y+I)*ze,m[13]=($+V)*rt,m[14]=(he+ae)*gt,m[15]=1,m}var Yx=sm;function lm(){var m=new oh(3);return oh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0),m}function Ow(m){var y=new oh(3);return y[0]=m[0],y[1]=m[1],y[2]=m[2],y}function Rv(m,y,I){return m[0]=y[0]+I[0],m[1]=y[1]+I[1],m[2]=y[2]+I[2],m}function um(m,y,I){return m[0]=y[0]-I[0],m[1]=y[1]-I[1],m[2]=y[2]-I[2],m}function qw(m,y,I){return m[0]=y[0]*I,m[1]=y[1]*I,m[2]=y[2]*I,m}function Kx(m,y){var I=y[0],V=y[1],$=y[2],ae=I*I+V*V+$*$;return ae>0&&(ae=1/Math.sqrt(ae)),m[0]=y[0]*ae,m[1]=y[1]*ae,m[2]=y[2]*ae,m}function V9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function G9(m,y,I){var V=y[0],$=y[1],ae=y[2],he=I[0],ze=I[1],rt=I[2];return m[0]=$*rt-ae*ze,m[1]=ae*he-V*rt,m[2]=V*ze-$*he,m}function H9(m,y,I){var V=y[0],$=y[1],ae=y[2];return m[0]=V*I[0]+$*I[3]+ae*I[6],m[1]=V*I[1]+$*I[4]+ae*I[7],m[2]=V*I[2]+$*I[5]+ae*I[8],m}var j9=um,OQ=function(){var m=lm();return function(y,I,V,$,ae,he){var ze,rt;for(I||(I=3),V||(V=0),$?rt=Math.min($*I+V,y.length):rt=y.length,ze=V;ze<rt;ze+=I)m[0]=y[ze],m[1]=y[ze+1],m[2]=y[ze+2],ae(m,m,he),y[ze]=m[0],y[ze+1]=m[1],y[ze+2]=m[2];return y}}();function W9(){var m=new oh(4);return oh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0,m[3]=0),m}function X9(m,y,I){return m[0]=y[0]*I,m[1]=y[1]*I,m[2]=y[2]*I,m[3]=y[3]*I,m}function Z9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]+m[3]*y[3]}function py(m,y,I){var V=y[0],$=y[1],ae=y[2],he=y[3];return m[0]=I[0]*V+I[4]*$+I[8]*ae+I[12]*he,m[1]=I[1]*V+I[5]*$+I[9]*ae+I[13]*he,m[2]=I[2]*V+I[6]*$+I[10]*ae+I[14]*he,m[3]=I[3]*V+I[7]*$+I[11]*ae+I[15]*he,m}var Jx=function(){var m=W9();return function(y,I,V,$,ae,he){var ze,rt;for(I||(I=4),V||(V=0),$?rt=Math.min($*I+V,y.length):rt=y.length,ze=V;ze<rt;ze+=I)m[0]=y[ze],m[1]=y[ze+1],m[2]=y[ze+2],m[3]=y[ze+3],ae(m,m,he),y[ze]=m[0],y[ze+1]=m[1],y[ze+2]=m[2],y[ze+3]=m[3];return y}}();function SC(){var m=new oh(2);return oh!=Float32Array&&(m[0]=0,m[1]=0),m}function lS(m){var y=m[0],I=m[1];return y*y+I*I}var uS=lS,qQ=function(){var m=SC();return function(y,I,V,$,ae,he){var ze,rt;for(I||(I=2),V||(V=0),$?rt=Math.min($*I+V,y.length):rt=y.length,ze=V;ze<rt;ze+=I)m[0]=y[ze],m[1]=y[ze+1],ae(m,m,he),y[ze]=m[0],y[ze+1]=m[1];return y}}(),Y9=function(m){function y(I){m.call(this,I,dg)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(V){return new ts(V)},y.prototype.queryRadius=function(V){var $=V;return Ad(\"circle-radius\",this,$)+Ad(\"circle-stroke-width\",this,$)+Pv(this.paint.get(\"circle-translate\"))},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt,Et){for(var or=Jv(V,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),rt.angle,gt),_r=this.paint.get(\"circle-radius\").evaluate($,ae),pr=this.paint.get(\"circle-stroke-width\").evaluate($,ae),Fr=_r+pr,oi=this.paint.get(\"circle-pitch-alignment\")===\"map\",Hi=oi?or:EC(or,Et),Ai=oi?Fr*gt:Fr,bn=0,nn=he;bn<nn.length;bn+=1)for(var xn=nn[bn],Pn=0,Zn=xn;Pn<Zn.length;Pn+=1){var ga=Zn[Pn],ha=oi?ga:MC(ga,Et),eo=Ai,za=py([],[ga.x,ga.y,0,1],Et);if(this.paint.get(\"circle-pitch-scale\")===\"viewport\"&&this.paint.get(\"circle-pitch-alignment\")===\"map\"?eo*=za[3]/rt.cameraToCenterDistance:this.paint.get(\"circle-pitch-scale\")===\"map\"&&this.paint.get(\"circle-pitch-alignment\")===\"viewport\"&&(eo*=rt.cameraToCenterDistance/za[3]),Yo(Hi,ha,eo))return!0}return!1},y}(mi);function MC(m,y){var I=py([],[m.x,m.y,0,1],y);return new u(I[0]/I[3],I[1]/I[3])}function EC(m,y){return m.map(function(I){return MC(I,y)})}var cS=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(ts);X(\"HeatmapBucket\",cS,{omit:[\"layers\"]});function Md(m,y,I,V){var $=y.width,ae=y.height;if(!V)V=new Uint8Array($*ae*I);else if(V instanceof Uint8ClampedArray)V=new Uint8Array(V.buffer);else if(V.length!==$*ae*I)throw new RangeError(\"mismatched image size\");return m.width=$,m.height=ae,m.data=V,m}function Bw(m,y,I){var V=y.width,$=y.height;if(!(V===m.width&&$===m.height)){var ae=Md({},{width:V,height:$},I);Nw(m,ae,{x:0,y:0},{x:0,y:0},{width:Math.min(m.width,V),height:Math.min(m.height,$)},I),m.width=V,m.height=$,m.data=ae.data}}function Nw(m,y,I,V,$,ae){if($.width===0||$.height===0)return y;if($.width>m.width||$.height>m.height||I.x>m.width-$.width||I.y>m.height-$.height)throw new RangeError(\"out of range source coordinates for image copy\");if($.width>y.width||$.height>y.height||V.x>y.width-$.width||V.y>y.height-$.height)throw new RangeError(\"out of range destination coordinates for image copy\");for(var he=m.data,ze=y.data,rt=0;rt<$.height;rt++)for(var gt=((I.y+rt)*m.width+I.x)*ae,Et=((V.y+rt)*y.width+V.x)*ae,or=0;or<$.width*ae;or++)ze[Et+or]=he[gt+or];return y}var Dv=function(y,I){Md(this,y,1,I)};Dv.prototype.resize=function(y){Bw(this,y,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(y,I,V,$,ae){Nw(y,I,V,$,ae,1)};var Eh=function(y,I){Md(this,y,4,I)};Eh.prototype.resize=function(y){Bw(this,y,4)},Eh.prototype.replace=function(y,I){I?this.data.set(y):y instanceof Uint8ClampedArray?this.data=new Uint8Array(y.buffer):this.data=y},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(y,I,V,$,ae){Nw(y,I,V,$,ae,4)},X(\"AlphaImage\",Dv),X(\"RGBAImage\",Eh);var $x=new Nr({\"heatmap-radius\":new bt(Rn.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new bt(Rn.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new Me(Rn.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new jr(Rn.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new Me(Rn.paint_heatmap[\"heatmap-opacity\"])}),P1={paint:$x};function Qx(m){var y={},I=m.resolution||256,V=m.clips?m.clips.length:1,$=m.image||new Eh({width:I,height:V}),ae=function(bn,nn,xn){y[m.evaluationKey]=xn;var Pn=m.expression.evaluate(y);$.data[bn+nn+0]=Math.floor(Pn.r*255/Pn.a),$.data[bn+nn+1]=Math.floor(Pn.g*255/Pn.a),$.data[bn+nn+2]=Math.floor(Pn.b*255/Pn.a),$.data[bn+nn+3]=Math.floor(Pn.a*255)};if(m.clips)for(var gt=0,Et=0;gt<V;++gt,Et+=I*4)for(var or=0,_r=0;or<I;or++,_r+=4){var pr=or/(I-1),Fr=m.clips[gt],oi=Fr.start,Hi=Fr.end,Ai=oi*(1-pr)+Hi*pr;ae(Et,_r,Ai)}else for(var he=0,ze=0;he<I;he++,ze+=4){var rt=he/(I-1);ae(0,ze,rt)}return $}var Uw=function(m){function y(I){m.call(this,I,P1),this._updateColorRamp()}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(V){return new cS(V)},y.prototype._handleSpecialPaintPropertyUpdate=function(V){V===\"heatmap-color\"&&this._updateColorRamp()},y.prototype._updateColorRamp=function(){var V=this._transitionablePaint._values[\"heatmap-color\"].value.expression;this.colorRamp=Qx({expression:V,evaluationKey:\"heatmapDensity\",image:this.colorRamp}),this.colorRampTexture=null},y.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},y.prototype.queryRadius=function(){return 0},y.prototype.queryIntersectsFeature=function(){return!1},y.prototype.hasOffscreenPass=function(){return this.paint.get(\"heatmap-opacity\")!==0&&this.visibility!==\"none\"},y}(mi),K9=new Nr({\"hillshade-illumination-direction\":new Me(Rn.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new Me(Rn.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new Me(Rn.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new Me(Rn.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new Me(Rn.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new Me(Rn.paint_hillshade[\"hillshade-accent-color\"])}),J9={paint:K9},kC=function(m){function y(I){m.call(this,I,J9)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.hasOffscreenPass=function(){return this.paint.get(\"hillshade-exaggeration\")!==0&&this.visibility!==\"none\"},y}(mi),CC=Wi([{name:\"a_pos\",components:2,type:\"Int16\"}],4),$9=CC.members,Vw=I1,LC=I1;function I1(m,y,I){I=I||2;var V=y&&y.length,$=V?y[0]*I:m.length,ae=Gw(m,0,$,I,!0),he=[];if(!ae||ae.next===ae.prev)return he;var ze,rt,gt,Et,or,_r,pr;if(V&&(ae=fm(m,y,ae,I)),m.length>80*I){ze=gt=m[0],rt=Et=m[1];for(var Fr=I;Fr<$;Fr+=I)or=m[Fr],_r=m[Fr+1],or<ze&&(ze=or),_r<rt&&(rt=_r),or>gt&&(gt=or),_r>Et&&(Et=_r);pr=Math.max(gt-ze,Et-rt),pr=pr!==0?1/pr:0}return eb(ae,he,I,ze,rt,pr),he}function Gw(m,y,I,V,$){var ae,he;if($===mS(m,y,I,V)>0)for(ae=y;ae<I;ae+=V)he=FC(ae,m[ae],m[ae+1],he);else for(ae=I-V;ae>=y;ae-=V)he=FC(ae,m[ae],m[ae+1],he);return he&&rb(he,he.next)&&(ab(he),he=he.next),he}function cm(m,y){if(!m)return m;y||(y=m);var I=m,V;do if(V=!1,!I.steiner&&(rb(I,I.next)||Tf(I.prev,I,I.next)===0)){if(ab(I),I=y=I.prev,I===I.next)break;V=!0}else I=I.next;while(V||I!==y);return y}function eb(m,y,I,V,$,ae,he){if(m){!he&&ae&&Hw(m,V,$,ae);for(var ze=m,rt,gt;m.prev!==m.next;){if(rt=m.prev,gt=m.next,ae?IC(m,V,$,ae):PC(m)){y.push(rt.i/I),y.push(m.i/I),y.push(gt.i/I),ab(m),m=gt.next,ze=gt.next;continue}if(m=gt,m===ze){he?he===1?(m=tb(cm(m),y,I),eb(m,y,I,V,$,ae,2)):he===2&&v0(m,y,I,V,$,ae):eb(cm(m),y,I,V,$,ae,1);break}}}}function PC(m){var y=m.prev,I=m,V=m.next;if(Tf(y,I,V)>=0)return!1;for(var $=m.next.next;$!==m.prev;){if(hm(y.x,y.y,I.x,I.y,V.x,V.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function IC(m,y,I,V){var $=m.prev,ae=m,he=m.next;if(Tf($,ae,he)>=0)return!1;for(var ze=$.x<ae.x?$.x<he.x?$.x:he.x:ae.x<he.x?ae.x:he.x,rt=$.y<ae.y?$.y<he.y?$.y:he.y:ae.y<he.y?ae.y:he.y,gt=$.x>ae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Et=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,or=dS(ze,rt,y,I,V),_r=dS(gt,Et,y,I,V),pr=m.prevZ,Fr=m.nextZ;pr&&pr.z>=or&&Fr&&Fr.z<=_r;){if(pr!==m.prev&&pr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0||(pr=pr.prevZ,Fr!==m.prev&&Fr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0))return!1;Fr=Fr.nextZ}for(;pr&&pr.z>=or;){if(pr!==m.prev&&pr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0)return!1;pr=pr.prevZ}for(;Fr&&Fr.z<=_r;){if(Fr!==m.prev&&Fr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0)return!1;Fr=Fr.nextZ}return!0}function tb(m,y,I){var V=m;do{var $=V.prev,ae=V.next.next;!rb($,ae)&&jw($,V,V.next,ae)&&nb($,ae)&&nb(ae,$)&&(y.push($.i/I),y.push(V.i/I),y.push(ae.i/I),ab(V),ab(V.next),V=m=ae),V=V.next}while(V!==m);return cm(V)}function v0(m,y,I,V,$,ae){var he=m;do{for(var ze=he.next.next;ze!==he.prev;){if(he.i!==ze.i&&R1(he,ze)){var rt=pS(he,ze);he=cm(he,he.next),rt=cm(rt,rt.next),eb(he,y,I,V,$,ae),eb(rt,y,I,V,$,ae);return}ze=ze.next}he=he.next}while(he!==m)}function fm(m,y,I,V){var $=[],ae,he,ze,rt,gt;for(ae=0,he=y.length;ae<he;ae++)ze=y[ae]*V,rt=ae<he-1?y[ae+1]*V:m.length,gt=Gw(m,ze,rt,V,!1),gt===gt.next&&(gt.steiner=!0),$.push(vS(gt));for($.sort(RC),ae=0;ae<$.length;ae++)fS($[ae],I),I=cm(I,I.next);return I}function RC(m,y){return m.x-y.x}function fS(m,y){if(y=Q9(m,y),y){var I=pS(y,m);cm(y,y.next),cm(I,I.next)}}function Q9(m,y){var I=y,V=m.x,$=m.y,ae=-1/0,he;do{if($<=I.y&&$>=I.next.y&&I.next.y!==I.y){var ze=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(ze<=V&&ze>ae){if(ae=ze,ze===V){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x<I.next.x?I:I.next}}I=I.next}while(I!==y);if(!he)return null;if(V===ae)return he;var rt=he,gt=he.x,Et=he.y,or=1/0,_r;I=he;do V>=I.x&&I.x>=gt&&V!==I.x&&hm($<Et?V:ae,$,gt,Et,$<Et?ae:V,$,I.x,I.y)&&(_r=Math.abs($-I.y)/(V-I.x),nb(I,m)&&(_r<or||_r===or&&(I.x>he.x||I.x===he.x&&eO(he,I)))&&(he=I,or=_r)),I=I.next;while(I!==rt);return he}function eO(m,y){return Tf(m.prev,m,y.prev)<0&&Tf(y.next,m,m.next)<0}function Hw(m,y,I,V){var $=m;do $.z===null&&($.z=dS($.x,$.y,y,I,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==m);$.prevZ.nextZ=null,$.prevZ=null,hS($)}function hS(m){var y,I,V,$,ae,he,ze,rt,gt=1;do{for(I=m,m=null,ae=null,he=0;I;){for(he++,V=I,ze=0,y=0;y<gt&&(ze++,V=V.nextZ,!!V);y++);for(rt=gt;ze>0||rt>0&&V;)ze!==0&&(rt===0||!V||I.z<=V.z)?($=I,I=I.nextZ,ze--):($=V,V=V.nextZ,rt--),ae?ae.nextZ=$:m=$,$.prevZ=ae,ae=$;I=V}ae.nextZ=null,gt*=2}while(he>1);return m}function dS(m,y,I,V,$){return m=32767*(m-I)*$,y=32767*(y-V)*$,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,m|y<<1}function vS(m){var y=m,I=m;do(y.x<I.x||y.x===I.x&&y.y<I.y)&&(I=y),y=y.next;while(y!==m);return I}function hm(m,y,I,V,$,ae,he,ze){return($-he)*(y-ze)-(m-he)*(ae-ze)>=0&&(m-he)*(V-ze)-(I-he)*(y-ze)>=0&&(I-he)*(ae-ze)-($-he)*(V-ze)>=0}function R1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!DC(m,y)&&(nb(m,y)&&nb(y,m)&&tO(m,y)&&(Tf(m.prev,m,y.prev)||Tf(m,y.prev,y))||rb(m,y)&&Tf(m.prev,m,m.next)>0&&Tf(y.prev,y,y.next)>0)}function Tf(m,y,I){return(y.y-m.y)*(I.x-y.x)-(y.x-m.x)*(I.y-y.y)}function rb(m,y){return m.x===y.x&&m.y===y.y}function jw(m,y,I,V){var $=gy(Tf(m,y,I)),ae=gy(Tf(m,y,V)),he=gy(Tf(I,V,m)),ze=gy(Tf(I,V,y));return!!($!==ae&&he!==ze||$===0&&ib(m,I,y)||ae===0&&ib(m,V,y)||he===0&&ib(I,m,V)||ze===0&&ib(I,y,V))}function ib(m,y,I){return y.x<=Math.max(m.x,I.x)&&y.x>=Math.min(m.x,I.x)&&y.y<=Math.max(m.y,I.y)&&y.y>=Math.min(m.y,I.y)}function gy(m){return m>0?1:m<0?-1:0}function DC(m,y){var I=m;do{if(I.i!==m.i&&I.next.i!==m.i&&I.i!==y.i&&I.next.i!==y.i&&jw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function nb(m,y){return Tf(m.prev,m,m.next)<0?Tf(m,y,m.next)>=0&&Tf(m,m.prev,y)>=0:Tf(m,y,m.prev)<0||Tf(m,m.next,y)<0}function tO(m,y){var I=m,V=!1,$=(m.x+y.x)/2,ae=(m.y+y.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(V=!V),I=I.next;while(I!==m);return V}function pS(m,y){var I=new gS(m.i,m.x,m.y),V=new gS(y.i,y.x,y.y),$=m.next,ae=y.prev;return m.next=y,y.prev=m,I.next=$,$.prev=I,V.next=I,I.prev=V,ae.next=V,V.prev=ae,V}function FC(m,y,I,V){var $=new gS(m,y,I);return V?($.next=V.next,$.prev=V,V.next.prev=$,V.next=$):($.prev=$,$.next=$),$}function ab(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function gS(m,y,I){this.i=m,this.x=y,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}I1.deviation=function(m,y,I,V){var $=y&&y.length,ae=$?y[0]*I:m.length,he=Math.abs(mS(m,0,ae,I));if($)for(var ze=0,rt=y.length;ze<rt;ze++){var gt=y[ze]*I,Et=ze<rt-1?y[ze+1]*I:m.length;he-=Math.abs(mS(m,gt,Et,I))}var or=0;for(ze=0;ze<V.length;ze+=3){var _r=V[ze]*I,pr=V[ze+1]*I,Fr=V[ze+2]*I;or+=Math.abs((m[_r]-m[Fr])*(m[pr+1]-m[_r+1])-(m[_r]-m[pr])*(m[Fr+1]-m[_r+1]))}return he===0&&or===0?0:Math.abs((or-he)/he)};function mS(m,y,I,V){for(var $=0,ae=y,he=I-V;ae<I;ae+=V)$+=(m[he]-m[ae])*(m[ae+1]+m[he+1]),he=ae;return $}I1.flatten=function(m){for(var y=m[0][0].length,I={vertices:[],holes:[],dimensions:y},V=0,$=0;$<m.length;$++){for(var ae=0;ae<m[$].length;ae++)for(var he=0;he<y;he++)I.vertices.push(m[$][ae][he]);$>0&&(V+=m[$-1].length,I.holes.push(V))}return I},Vw.default=LC;function yS(m,y,I,V,$){pg(m,y,I||0,V||m.length-1,$||zC)}function pg(m,y,I,V,$){for(;V>I;){if(V-I>600){var ae=V-I+1,he=y-I+1,ze=Math.log(ae),rt=.5*Math.exp(2*ze/3),gt=.5*Math.sqrt(ze*rt*(ae-rt)/ae)*(he-ae/2<0?-1:1),Et=Math.max(I,Math.floor(y-he*rt/ae+gt)),or=Math.min(V,Math.floor(y+(ae-he)*rt/ae+gt));pg(m,y,Et,or,$)}var _r=m[y],pr=I,Fr=V;for(D1(m,I,y),$(m[V],_r)>0&&D1(m,I,V);pr<Fr;){for(D1(m,pr,Fr),pr++,Fr--;$(m[pr],_r)<0;)pr++;for(;$(m[Fr],_r)>0;)Fr--}$(m[I],_r)===0?D1(m,I,Fr):(Fr++,D1(m,Fr,V)),Fr<=y&&(I=Fr+1),y<=Fr&&(V=Fr-1)}}function D1(m,y,I){var V=m[y];m[y]=m[I],m[I]=V}function zC(m,y){return m<y?-1:m>y?1:0}function Ww(m,y){var I=m.length;if(I<=1)return[m];for(var V=[],$,ae,he=0;he<I;he++){var ze=_e(m[he]);ze!==0&&(m[he].area=Math.abs(ze),ae===void 0&&(ae=ze<0),ae===ze<0?($&&V.push($),$=[m[he]]):$.push(m[he]))}if($&&V.push($),y>1)for(var rt=0;rt<V.length;rt++)V[rt].length<=y||(yS(V[rt],y,1,V[rt].length-1,OC),V[rt]=V[rt].slice(0,y));return V}function OC(m,y){return y.area-m.area}function Xw(m,y,I){for(var V=I.patternDependencies,$=!1,ae=0,he=y;ae<he.length;ae+=1){var ze=he[ae],rt=ze.paint.get(m+\"-pattern\");rt.isConstant()||($=!0);var gt=rt.constantOr(null);gt&&($=!0,V[gt.to]=!0,V[gt.from]=!0)}return $}function ob(m,y,I,V,$){for(var ae=$.patternDependencies,he=0,ze=y;he<ze.length;he+=1){var rt=ze[he],gt=rt.paint.get(m+\"-pattern\"),Et=gt.value;if(Et.kind!==\"constant\"){var or=Et.evaluate({zoom:V-1},I,{},$.availableImages),_r=Et.evaluate({zoom:V},I,{},$.availableImages),pr=Et.evaluate({zoom:V+1},I,{},$.availableImages);or=or&&or.name?or.name:or,_r=_r&&_r.name?_r.name:_r,pr=pr&&pr.name?pr.name:pr,ae[or]=!0,ae[_r]=!0,ae[pr]=!0,I.patterns[rt.id]={min:or,mid:_r,max:pr}}}return I}var sb=500,yp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yr,this.indexArray=new pn,this.indexArray2=new oa,this.programConfigurations=new fi(y.layers,y.zoom),this.segments=new io,this.segments2=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};yp.prototype.populate=function(y,I,V){this.hasPattern=Xw(\"fill\",this.layers,I);for(var $=this.layers[0].layout.get(\"fill-sort-key\"),ae=[],he=0,ze=y;he<ze.length;he+=1){var rt=ze[he],gt=rt.feature,Et=rt.id,or=rt.index,_r=rt.sourceLayerIndex,pr=this.layers[0]._featureFilter.needGeometry,Fr=Ja(gt,pr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),Fr,V)){var oi=$?$.evaluate(Fr,{},V,I.availableImages):void 0,Hi={id:Et,properties:gt.properties,type:gt.type,sourceLayerIndex:_r,index:or,geometry:pr?Fr.geometry:zn(gt),patterns:{},sortKey:oi};ae.push(Hi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var Ai=0,bn=ae;Ai<bn.length;Ai+=1){var nn=bn[Ai],xn=nn,Pn=xn.geometry,Zn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=ob(\"fill\",this.layers,nn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(nn,Pn,Zn,V,{});var eo=y[Zn].feature;I.featureIndex.insert(eo,Pn,Zn,ga,this.index)}},yp.prototype.update=function(y,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,V)},yp.prototype.addFeatures=function(y,I,V){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,V)}},yp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},yp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},yp.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,$9),this.indexBuffer=y.createIndexBuffer(this.indexArray),this.indexBuffer2=y.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(y),this.uploaded=!0},yp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},yp.prototype.addFeature=function(y,I,V,$,ae){for(var he=0,ze=Ww(I,sb);he<ze.length;he+=1){for(var rt=ze[he],gt=0,Et=0,or=rt;Et<or.length;Et+=1){var _r=or[Et];gt+=_r.length}for(var pr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray),Fr=pr.vertexLength,oi=[],Hi=[],Ai=0,bn=rt;Ai<bn.length;Ai+=1){var nn=bn[Ai];if(nn.length!==0){nn!==rt[0]&&Hi.push(oi.length/2);var xn=this.segments2.prepareSegment(nn.length,this.layoutVertexArray,this.indexArray2),Pn=xn.vertexLength;this.layoutVertexArray.emplaceBack(nn[0].x,nn[0].y),this.indexArray2.emplaceBack(Pn+nn.length-1,Pn),oi.push(nn[0].x),oi.push(nn[0].y);for(var Zn=1;Zn<nn.length;Zn++)this.layoutVertexArray.emplaceBack(nn[Zn].x,nn[Zn].y),this.indexArray2.emplaceBack(Pn+Zn-1,Pn+Zn),oi.push(nn[Zn].x),oi.push(nn[Zn].y);xn.vertexLength+=nn.length,xn.primitiveLength+=nn.length}}for(var ga=Vw(oi,Hi),ha=0;ha<ga.length;ha+=3)this.indexArray.emplaceBack(Fr+ga[ha],Fr+ga[ha+1],Fr+ga[ha+2]);pr.vertexLength+=gt,pr.primitiveLength+=ga.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,V,ae,$)},X(\"FillBucket\",yp,{omit:[\"layers\",\"patternFeatures\"]});var _S=new Nr({\"fill-sort-key\":new bt(Rn.layout_fill[\"fill-sort-key\"])}),qC=new Nr({\"fill-antialias\":new Me(Rn.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new bt(Rn.paint_fill[\"fill-opacity\"]),\"fill-color\":new bt(Rn.paint_fill[\"fill-color\"]),\"fill-outline-color\":new bt(Rn.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new Me(Rn.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new Me(Rn.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new zt(Rn.paint_fill[\"fill-pattern\"])}),$v={paint:qC,layout:_S},lb=function(m){function y(I){m.call(this,I,$v)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(V,$){m.prototype.recalculate.call(this,V,$);var ae=this.paint._values[\"fill-outline-color\"];ae.value.kind===\"constant\"&&ae.value.value===void 0&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"])},y.prototype.createBucket=function(V){return new yp(V)},y.prototype.queryRadius=function(){return Pv(this.paint.get(\"fill-translate\"))},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt){var Et=Jv(V,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),rt.angle,gt);return ms(Et,he)},y.prototype.isTileClipped=function(){return!0},y}(mi),BC=Wi([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4),NC=BC.members,xS=my;function my(m,y,I,V,$){this.properties={},this.extent=I,this.type=0,this._pbf=m,this._geometry=-1,this._keys=V,this._values=$,m.readFields(UC,this,y)}function UC(m,y,I){m==1?y.id=I.readVarint():m==2?VC(I,y):m==3?y.type=I.readVarint():m==4&&(y._geometry=I.pos)}function VC(m,y){for(var I=m.readVarint()+m.pos;m.pos<I;){var V=y._keys[m.readVarint()],$=y._values[m.readVarint()];y.properties[V]=$}}my.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],my.prototype.loadGeometry=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,V=0,$=0,ae=0,he=[],ze;m.pos<y;){if(V<=0){var rt=m.readVarint();I=rt&7,V=rt>>3}if(V--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),I===1&&(ze&&he.push(ze),ze=[]),ze.push(new u($,ae));else if(I===7)ze&&ze.push(ze[0].clone());else throw new Error(\"unknown command \"+I)}return ze&&he.push(ze),he},my.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,V=0,$=0,ae=0,he=1/0,ze=-1/0,rt=1/0,gt=-1/0;m.pos<y;){if(V<=0){var Et=m.readVarint();I=Et&7,V=Et>>3}if(V--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),$<he&&(he=$),$>ze&&(ze=$),ae<rt&&(rt=ae),ae>gt&&(gt=ae);else if(I!==7)throw new Error(\"unknown command \"+I)}return[he,rt,ze,gt]},my.prototype.toGeoJSON=function(m,y,I){var V=this.extent*Math.pow(2,I),$=this.extent*m,ae=this.extent*y,he=this.loadGeometry(),ze=my.types[this.type],rt,gt;function Et(pr){for(var Fr=0;Fr<pr.length;Fr++){var oi=pr[Fr],Hi=180-(oi.y+ae)*360/V;pr[Fr]=[(oi.x+$)*360/V-180,360/Math.PI*Math.atan(Math.exp(Hi*Math.PI/180))-90]}}switch(this.type){case 1:var or=[];for(rt=0;rt<he.length;rt++)or[rt]=he[rt][0];he=or,Et(he);break;case 2:for(rt=0;rt<he.length;rt++)Et(he[rt]);break;case 3:for(he=rO(he),rt=0;rt<he.length;rt++)for(gt=0;gt<he[rt].length;gt++)Et(he[rt][gt]);break}he.length===1?he=he[0]:ze=\"Multi\"+ze;var _r={type:\"Feature\",geometry:{type:ze,coordinates:he},properties:this.properties};return\"id\"in this&&(_r.id=this.id),_r};function rO(m){var y=m.length;if(y<=1)return[m];for(var I=[],V,$,ae=0;ae<y;ae++){var he=GC(m[ae]);he!==0&&($===void 0&&($=he<0),$===he<0?(V&&I.push(V),V=[m[ae]]):V.push(m[ae]))}return V&&I.push(V),I}function GC(m){for(var y=0,I=0,V=m.length,$=V-1,ae,he;I<V;$=I++)ae=m[I],he=m[$],y+=(he.x-ae.x)*(ae.y+he.y);return y}var gg=bS;function bS(m,y){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=m,this._keys=[],this._values=[],this._features=[],m.readFields(HC,this,y),this.length=this._features.length}function HC(m,y,I){m===15?y.version=I.readVarint():m===1?y.name=I.readString():m===5?y.extent=I.readVarint():m===2?y._features.push(I.pos):m===3?y._keys.push(I.readString()):m===4&&y._values.push(jC(I))}function jC(m){for(var y=null,I=m.readVarint()+m.pos;m.pos<I;){var V=m.readVarint()>>3;y=V===1?m.readString():V===2?m.readFloat():V===3?m.readDouble():V===4?m.readVarint64():V===5?m.readVarint():V===6?m.readSVarint():V===7?m.readBoolean():null}return y}bS.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[m];var y=this._pbf.readVarint()+this._pbf.pos;return new xS(this._pbf,y,this.extent,this._keys,this._values)};var WC=iO;function iO(m,y){this.layers=m.readFields(nO,{},y)}function nO(m,y,I){if(m===3){var V=new gg(I,I.readVarint()+I.pos);V.length&&(y[V.name]=V)}}var XC=WC,F1=xS,ZC=gg,mg={VectorTile:XC,VectorTileFeature:F1,VectorTileLayer:ZC},YC=mg.VectorTileFeature.types,Zw=500,z1=Math.pow(2,13);function dm(m,y,I,V,$,ae,he,ze){m.emplaceBack(y,I,Math.floor(V*z1)*2+he,$*z1*2,ae*z1*2,Math.round(ze))}var Vp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new pn,this.programConfigurations=new fi(y.layers,y.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(y,I,V){this.features=[],this.hasPattern=Xw(\"fill-extrusion\",this.layers,I);for(var $=0,ae=y;$<ae.length;$+=1){var he=ae[$],ze=he.feature,rt=he.id,gt=he.index,Et=he.sourceLayerIndex,or=this.layers[0]._featureFilter.needGeometry,_r=Ja(ze,or);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),_r,V)){var pr={id:rt,sourceLayerIndex:Et,index:gt,geometry:or?_r.geometry:zn(ze),properties:ze.properties,type:ze.type,patterns:{}};this.hasPattern?this.features.push(ob(\"fill-extrusion\",this.layers,pr,this.zoom,I)):this.addFeature(pr,pr.geometry,gt,V,{}),I.featureIndex.insert(ze,pr.geometry,gt,Et,this.index,!0)}}},Vp.prototype.addFeatures=function(y,I,V){for(var $=0,ae=this.features;$<ae.length;$+=1){var he=ae[$],ze=he.geometry;this.addFeature(he,ze,he.index,I,V)}},Vp.prototype.update=function(y,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,V)},Vp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Vp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Vp.prototype.upload=function(y){this.uploaded||(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,NC),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},Vp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Vp.prototype.addFeature=function(y,I,V,$,ae){for(var he=0,ze=Ww(I,Zw);he<ze.length;he+=1){for(var rt=ze[he],gt=0,Et=0,or=rt;Et<or.length;Et+=1){var _r=or[Et];gt+=_r.length}for(var pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Fr=0,oi=rt;Fr<oi.length;Fr+=1){var Hi=oi[Fr];if(Hi.length!==0&&!oO(Hi))for(var Ai=0,bn=0;bn<Hi.length;bn++){var nn=Hi[bn];if(bn>=1){var xn=Hi[bn-1];if(!aO(nn,xn)){pr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Pn=nn.sub(xn)._perp()._unit(),Zn=xn.dist(nn);Ai+Zn>32768&&(Ai=0),dm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,0,Ai),dm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,1,Ai),Ai+=Zn,dm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,0,Ai),dm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,1,Ai);var ga=pr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),pr.vertexLength+=4,pr.primitiveLength+=2}}}}if(pr.vertexLength+gt>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray)),YC[y.type]===\"Polygon\"){for(var ha=[],eo=[],za=pr.vertexLength,Za=0,Jo=rt;Za<Jo.length;Za+=1){var to=Jo[Za];if(to.length!==0){to!==rt[0]&&eo.push(ha.length/2);for(var ao=0;ao<to.length;ao++){var _s=to[ao];dm(this.layoutVertexArray,_s.x,_s.y,0,0,1,1,0),ha.push(_s.x),ha.push(_s.y)}}}for(var jo=Vw(ha,eo),El=0;El<jo.length;El+=3)this.indexArray.emplaceBack(za+jo[El],za+jo[El+2],za+jo[El+1]);pr.primitiveLength+=jo.length/3,pr.vertexLength+=gt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,V,ae,$)},X(\"FillExtrusionBucket\",Vp,{omit:[\"layers\",\"features\"]});function aO(m,y){return m.x===y.x&&(m.x<0||m.x>Ci)||m.y===y.y&&(m.y<0||m.y>Ci)}function oO(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>Ci})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>Ci})}var O1=new Nr({\"fill-extrusion-opacity\":new Me(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new bt(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new Me(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new Me(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new zt(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new bt(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new bt(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\"fill-extrusion-vertical-gradient\":new Me(Rn[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"])}),ld={paint:O1},vm=function(m){function y(I){m.call(this,I,ld)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(V){return new Vp(V)},y.prototype.queryRadius=function(){return Pv(this.paint.get(\"fill-extrusion-translate\"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt,Et){var or=Jv(V,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),rt.angle,gt),_r=this.paint.get(\"fill-extrusion-height\").evaluate($,ae),pr=this.paint.get(\"fill-extrusion-base\").evaluate($,ae),Fr=sO(or,Et,rt,0),oi=TS(he,pr,_r,Et),Hi=oi[0],Ai=oi[1];return KC(Hi,Ai,Fr)},y}(mi);function yy(m,y){return m.x*y.x+m.y*y.y}function wS(m,y){if(m.length===1){for(var I=0,V=y[I++],$;!$||V.equals($);)if($=y[I++],!$)return 1/0;for(;I<y.length;I++){var ae=y[I],he=m[0],ze=$.sub(V),rt=ae.sub(V),gt=he.sub(V),Et=yy(ze,ze),or=yy(ze,rt),_r=yy(rt,rt),pr=yy(gt,ze),Fr=yy(gt,rt),oi=Et*_r-or*or,Hi=(_r*pr-or*Fr)/oi,Ai=(Et*Fr-or*pr)/oi,bn=1-Hi-Ai,nn=V.z*bn+$.z*Hi+ae.z*Ai;if(isFinite(nn))return nn}return 1/0}else{for(var xn=1/0,Pn=0,Zn=y;Pn<Zn.length;Pn+=1){var ga=Zn[Pn];xn=Math.min(xn,ga.z)}return xn}}function KC(m,y,I){var V=1/0;ms(I,y)&&(V=wS(I,y[0]));for(var $=0;$<y.length;$++)for(var ae=y[$],he=m[$],ze=0;ze<ae.length-1;ze++){var rt=ae[ze],gt=ae[ze+1],Et=he[ze],or=he[ze+1],_r=[rt,gt,or,Et,rt];so(I,_r)&&(V=Math.min(V,wS(I,_r)))}return V===1/0?!1:V}function TS(m,y,I,V){for(var $=[],ae=[],he=V[8]*y,ze=V[9]*y,rt=V[10]*y,gt=V[11]*y,Et=V[8]*I,or=V[9]*I,_r=V[10]*I,pr=V[11]*I,Fr=0,oi=m;Fr<oi.length;Fr+=1){for(var Hi=oi[Fr],Ai=[],bn=[],nn=0,xn=Hi;nn<xn.length;nn+=1){var Pn=xn[nn],Zn=Pn.x,ga=Pn.y,ha=V[0]*Zn+V[4]*ga+V[12],eo=V[1]*Zn+V[5]*ga+V[13],za=V[2]*Zn+V[6]*ga+V[14],Za=V[3]*Zn+V[7]*ga+V[15],Jo=ha+he,to=eo+ze,ao=za+rt,_s=Za+gt,jo=ha+Et,El=eo+or,Iu=za+_r,kl=Za+pr,Cl=new u(Jo/_s,to/_s);Cl.z=ao/_s,Ai.push(Cl);var yl=new u(jo/kl,El/kl);yl.z=Iu/kl,bn.push(yl)}$.push(Ai),ae.push(bn)}return[$,ae]}function sO(m,y,I,V){for(var $=[],ae=0,he=m;ae<he.length;ae+=1){var ze=he[ae],rt=[ze.x,ze.y,V,1];py(rt,rt,y),$.push(new u(rt[0]/rt[3],rt[1]/rt[3]))}return $}var JC=Wi([{name:\"a_pos_normal\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4),$C=JC.members,lO=Wi([{name:\"a_uv_x\",components:1,type:\"Float32\"},{name:\"a_split_index\",components:1,type:\"Float32\"}]),QC=lO.members,AS=mg.VectorTileFeature.types,Yw=63,e6=Math.cos(75/2*(Math.PI/180)),ub=15,SS=20,t6=15,Kw=1/2,cb=Math.pow(2,t6-1)/Kw,sh=function(y){var I=this;this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=y.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(V){I.gradients[V.id]={}}),this.layoutVertexArray=new ci,this.layoutVertexArray2=new an,this.indexArray=new pn,this.programConfigurations=new fi(y.layers,y.zoom),this.segments=new io,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};sh.prototype.populate=function(y,I,V){this.hasPattern=Xw(\"line\",this.layers,I);for(var $=this.layers[0].layout.get(\"line-sort-key\"),ae=[],he=0,ze=y;he<ze.length;he+=1){var rt=ze[he],gt=rt.feature,Et=rt.id,or=rt.index,_r=rt.sourceLayerIndex,pr=this.layers[0]._featureFilter.needGeometry,Fr=Ja(gt,pr);if(this.layers[0]._featureFilter.filter(new Gn(this.zoom),Fr,V)){var oi=$?$.evaluate(Fr,{},V):void 0,Hi={id:Et,properties:gt.properties,type:gt.type,sourceLayerIndex:_r,index:or,geometry:pr?Fr.geometry:zn(gt),patterns:{},sortKey:oi};ae.push(Hi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var Ai=0,bn=ae;Ai<bn.length;Ai+=1){var nn=bn[Ai],xn=nn,Pn=xn.geometry,Zn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=ob(\"line\",this.layers,nn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(nn,Pn,Zn,V,{});var eo=y[Zn].feature;I.featureIndex.insert(eo,Pn,Zn,ga,this.index)}},sh.prototype.update=function(y,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(y,I,this.stateDependentLayers,V)},sh.prototype.addFeatures=function(y,I,V){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,V)}},sh.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},sh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},sh.prototype.upload=function(y){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=y.createVertexBuffer(this.layoutVertexArray2,QC)),this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,$C),this.indexBuffer=y.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(y),this.uploaded=!0},sh.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},sh.prototype.lineFeatureClips=function(y){if(y.properties&&y.properties.hasOwnProperty(\"mapbox_clip_start\")&&y.properties.hasOwnProperty(\"mapbox_clip_end\")){var I=+y.properties.mapbox_clip_start,V=+y.properties.mapbox_clip_end;return{start:I,end:V}}},sh.prototype.addFeature=function(y,I,V,$,ae){var he=this.layers[0].layout,ze=he.get(\"line-join\").evaluate(y,{}),rt=he.get(\"line-cap\"),gt=he.get(\"line-miter-limit\"),Et=he.get(\"line-round-limit\");this.lineClips=this.lineFeatureClips(y);for(var or=0,_r=I;or<_r.length;or+=1){var pr=_r[or];this.addLine(pr,y,ze,rt,gt,Et)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,V,ae,$)},sh.prototype.addLine=function(y,I,V,$,ae,he){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var ze=0;ze<y.length-1;ze++)this.totalDistance+=y[ze].dist(y[ze+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var rt=AS[I.type]===\"Polygon\",gt=y.length;gt>=2&&y[gt-1].equals(y[gt-2]);)gt--;for(var Et=0;Et<gt-1&&y[Et].equals(y[Et+1]);)Et++;if(!(gt<(rt?3:2))){V===\"bevel\"&&(ae=1.05);var or=this.overscaling<=16?ub*Ci/(512*this.overscaling):0,_r=this.segments.prepareSegment(gt*10,this.layoutVertexArray,this.indexArray),pr,Fr=void 0,oi=void 0,Hi=void 0,Ai=void 0;this.e1=this.e2=-1,rt&&(pr=y[gt-2],Ai=y[Et].sub(pr)._unit()._perp());for(var bn=Et;bn<gt;bn++)if(oi=bn===gt-1?rt?y[Et+1]:void 0:y[bn+1],!(oi&&y[bn].equals(oi))){Ai&&(Hi=Ai),pr&&(Fr=pr),pr=y[bn],Ai=oi?oi.sub(pr)._unit()._perp():Hi,Hi=Hi||Ai;var nn=Hi.add(Ai);(nn.x!==0||nn.y!==0)&&nn._unit();var xn=Hi.x*Ai.x+Hi.y*Ai.y,Pn=nn.x*Ai.x+nn.y*Ai.y,Zn=Pn!==0?1/Pn:1/0,ga=2*Math.sqrt(2-2*Pn),ha=Pn<e6&&Fr&&oi,eo=Hi.x*Ai.y-Hi.y*Ai.x>0;if(ha&&bn>Et){var za=pr.dist(Fr);if(za>2*or){var Za=pr.sub(pr.sub(Fr)._mult(or/za)._round());this.updateDistance(Fr,Za),this.addCurrentVertex(Za,Hi,0,0,_r),Fr=Za}}var Jo=Fr&&oi,to=Jo?V:rt?\"butt\":$;if(Jo&&to===\"round\"&&(Zn<he?to=\"miter\":Zn<=2&&(to=\"fakeround\")),to===\"miter\"&&Zn>ae&&(to=\"bevel\"),to===\"bevel\"&&(Zn>2&&(to=\"flipbevel\"),Zn<ae&&(to=\"miter\")),Fr&&this.updateDistance(Fr,pr),to===\"miter\")nn._mult(Zn),this.addCurrentVertex(pr,nn,0,0,_r);else if(to===\"flipbevel\"){if(Zn>100)nn=Ai.mult(-1);else{var ao=Zn*Hi.add(Ai).mag()/Hi.sub(Ai).mag();nn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(pr,nn,0,0,_r),this.addCurrentVertex(pr,nn.mult(-1),0,0,_r)}else if(to===\"bevel\"||to===\"fakeround\"){var _s=-Math.sqrt(Zn*Zn-1),jo=eo?_s:0,El=eo?0:_s;if(Fr&&this.addCurrentVertex(pr,Hi,jo,El,_r),to===\"fakeround\")for(var Iu=Math.round(ga*180/Math.PI/SS),kl=1;kl<Iu;kl++){var Cl=kl/Iu;if(Cl!==.5){var yl=Cl-.5,Qu=1.0904+xn*(-3.2452+xn*(3.55645-xn*1.43519)),gc=.848013+xn*(-1.06021+xn*.215638);Cl=Cl+Cl*yl*(Cl-1)*(Qu*yl*yl+gc)}var Sf=Ai.sub(Hi)._mult(Cl)._add(Hi)._unit()._mult(eo?-1:1);this.addHalfVertex(pr,Sf.x,Sf.y,!1,eo,0,_r)}oi&&this.addCurrentVertex(pr,Ai,-jo,-El,_r)}else if(to===\"butt\")this.addCurrentVertex(pr,nn,0,0,_r);else if(to===\"square\"){var Ff=Fr?1:-1;this.addCurrentVertex(pr,nn,Ff,Ff,_r)}else to===\"round\"&&(Fr&&(this.addCurrentVertex(pr,Hi,0,0,_r),this.addCurrentVertex(pr,Hi,1,1,_r,!0)),oi&&(this.addCurrentVertex(pr,Ai,-1,-1,_r,!0),this.addCurrentVertex(pr,Ai,0,0,_r)));if(ha&&bn<gt-1){var $h=pr.dist(oi);if($h>2*or){var ch=pr.add(oi.sub(pr)._mult(or/$h)._round());this.updateDistance(pr,ch),this.addCurrentVertex(ch,Ai,0,0,_r),pr=ch}}}}},sh.prototype.addCurrentVertex=function(y,I,V,$,ae,he){he===void 0&&(he=!1);var ze=I.x+I.y*V,rt=I.y-I.x*V,gt=-I.x+I.y*$,Et=-I.y-I.x*$;this.addHalfVertex(y,ze,rt,he,!1,V,ae),this.addHalfVertex(y,gt,Et,he,!0,-$,ae),this.distance>cb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,V,$,ae,he))},sh.prototype.addHalfVertex=function(y,I,V,$,ae,he,ze){var rt=y.x,gt=y.y,Et=this.lineClips?this.scaledDistance*(cb-1):this.scaledDistance,or=Et*Kw;if(this.layoutVertexArray.emplaceBack((rt<<1)+($?1:0),(gt<<1)+(ae?1:0),Math.round(Yw*I)+128,Math.round(Yw*V)+128,(he===0?0:he<0?-1:1)+1|(or&63)<<2,or>>6),this.lineClips){var _r=this.scaledDistance-this.lineClips.start,pr=this.lineClips.end-this.lineClips.start,Fr=_r/pr;this.layoutVertexArray2.emplaceBack(Fr,this.lineClipsArray.length)}var oi=ze.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,oi),ze.primitiveLength++),ae?this.e2=oi:this.e1=oi},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},X(\"LineBucket\",sh,{omit:[\"layers\",\"patternFeatures\"]});var MS=new Nr({\"line-cap\":new Me(Rn.layout_line[\"line-cap\"]),\"line-join\":new bt(Rn.layout_line[\"line-join\"]),\"line-miter-limit\":new Me(Rn.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new Me(Rn.layout_line[\"line-round-limit\"]),\"line-sort-key\":new bt(Rn.layout_line[\"line-sort-key\"])}),ES=new Nr({\"line-opacity\":new bt(Rn.paint_line[\"line-opacity\"]),\"line-color\":new bt(Rn.paint_line[\"line-color\"]),\"line-translate\":new Me(Rn.paint_line[\"line-translate\"]),\"line-translate-anchor\":new Me(Rn.paint_line[\"line-translate-anchor\"]),\"line-width\":new bt(Rn.paint_line[\"line-width\"]),\"line-gap-width\":new bt(Rn.paint_line[\"line-gap-width\"]),\"line-offset\":new bt(Rn.paint_line[\"line-offset\"]),\"line-blur\":new bt(Rn.paint_line[\"line-blur\"]),\"line-dasharray\":new Rr(Rn.paint_line[\"line-dasharray\"]),\"line-pattern\":new zt(Rn.paint_line[\"line-pattern\"]),\"line-gradient\":new jr(Rn.paint_line[\"line-gradient\"])}),Jw={paint:ES,layout:MS},uO=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(V,$){return $=new Gn(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),m.prototype.possiblyEvaluate.call(this,V,$)},y.prototype.evaluate=function(V,$,ae,he){return $=x({},$,{zoom:Math.floor($.zoom)}),m.prototype.evaluate.call(this,V,$,ae,he)},y}(bt),R=new uO(Jw.paint.properties[\"line-width\"].specification);R.useIntegerZoom=!0;var S=function(m){function y(I){m.call(this,I,Jw),this.gradientVersion=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V===\"line-gradient\"){var $=this._transitionablePaint._values[\"line-gradient\"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values[\"line-gradient\"].value.expression},y.prototype.recalculate=function(V,$){m.prototype.recalculate.call(this,V,$),this.paint._values[\"line-floorwidth\"]=R.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,V)},y.prototype.createBucket=function(V){return new sh(V)},y.prototype.queryRadius=function(V){var $=V,ae=F(Ad(\"line-width\",this,$),Ad(\"line-gap-width\",this,$)),he=Ad(\"line-offset\",this,$);return ae/2+Math.abs(he)+Pv(this.paint.get(\"line-translate\"))},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt){var Et=Jv(V,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),rt.angle,gt),or=gt/2*F(this.paint.get(\"line-width\").evaluate($,ae),this.paint.get(\"line-gap-width\").evaluate($,ae)),_r=this.paint.get(\"line-offset\").evaluate($,ae);return _r&&(he=W(he,_r*gt)),ou(Et,he,or)},y.prototype.isTileClipped=function(){return!0},y}(mi);function F(m,y){return y>0?y+2*m:m}function W(m,y){for(var I=[],V=new u(0,0),$=0;$<m.length;$++){for(var ae=m[$],he=[],ze=0;ze<ae.length;ze++){var rt=ae[ze-1],gt=ae[ze],Et=ae[ze+1],or=ze===0?V:gt.sub(rt)._unit()._perp(),_r=ze===ae.length-1?V:Et.sub(gt)._unit()._perp(),pr=or._add(_r)._unit(),Fr=pr.x*_r.x+pr.y*_r.y;pr._mult(1/Fr),he.push(pr._mult(y)._add(gt))}I.push(he)}return I}var te=Wi([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),fe=Wi([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4),pe=Wi([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4),Fe=Wi([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"}]),Ke=Wi([{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]),ct=Wi([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4),Lt=Wi([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4),Jt=Wi([{name:\"triangle\",components:3,type:\"Uint16\"}]),cr=Wi([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),mr=Wi([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",components:2,name:\"textOffset\"},{type:\"Float32\",name:\"collisionCircleDiameter\"}]),Pr=Wi([{type:\"Float32\",name:\"offsetX\"}]),zr=Wi([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]);function ui(m,y,I){var V=y.layout.get(\"text-transform\").evaluate(I,{});return V===\"uppercase\"?m=m.toLocaleUpperCase():V===\"lowercase\"&&(m=m.toLocaleLowerCase()),Ms.applyArabicShaping&&(m=Ms.applyArabicShaping(m)),m}function yi(m,y,I){return m.sections.forEach(function(V){V.text=ui(V.text,y,I)}),m}function vn(m){var y={},I={},V=[],$=0;function ae(Ai){V.push(m[Ai]),$++}function he(Ai,bn,nn){var xn=I[Ai];return delete I[Ai],I[bn]=xn,V[xn].geometry[0].pop(),V[xn].geometry[0]=V[xn].geometry[0].concat(nn[0]),xn}function ze(Ai,bn,nn){var xn=y[bn];return delete y[bn],y[Ai]=xn,V[xn].geometry[0].shift(),V[xn].geometry[0]=nn[0].concat(V[xn].geometry[0]),xn}function rt(Ai,bn,nn){var xn=nn?bn[0][bn[0].length-1]:bn[0][0];return Ai+\":\"+xn.x+\":\"+xn.y}for(var gt=0;gt<m.length;gt++){var Et=m[gt],or=Et.geometry,_r=Et.text?Et.text.toString():null;if(!_r){ae(gt);continue}var pr=rt(_r,or),Fr=rt(_r,or,!0);if(pr in I&&Fr in y&&I[pr]!==y[Fr]){var oi=ze(pr,Fr,or),Hi=he(pr,Fr,V[oi].geometry);delete y[pr],delete I[Fr],I[rt(_r,V[Hi].geometry,!0)]=Hi,V[oi].geometry=null}else pr in I?he(pr,Fr,or):Fr in y?ze(pr,Fr,or):(ae(gt),y[pr]=$-1,I[Fr]=$-1)}return V.filter(function(Ai){return Ai.geometry})}var zi={\"!\":\"\\uFE15\",\"#\":\"\\uFF03\",$:\"\\uFF04\",\"%\":\"\\uFF05\",\"&\":\"\\uFF06\",\"(\":\"\\uFE35\",\")\":\"\\uFE36\",\"*\":\"\\uFF0A\",\"+\":\"\\uFF0B\",\",\":\"\\uFE10\",\"-\":\"\\uFE32\",\".\":\"\\u30FB\",\"/\":\"\\uFF0F\",\":\":\"\\uFE13\",\";\":\"\\uFE14\",\"<\":\"\\uFE3F\",\"=\":\"\\uFF1D\",\">\":\"\\uFE40\",\"?\":\"\\uFE16\",\"@\":\"\\uFF20\",\"[\":\"\\uFE47\",\"\\\\\":\"\\uFF3C\",\"]\":\"\\uFE48\",\"^\":\"\\uFF3E\",_:\"\\uFE33\",\"`\":\"\\uFF40\",\"{\":\"\\uFE37\",\"|\":\"\\u2015\",\"}\":\"\\uFE38\",\"~\":\"\\uFF5E\",\"\\xA2\":\"\\uFFE0\",\"\\xA3\":\"\\uFFE1\",\"\\xA5\":\"\\uFFE5\",\"\\xA6\":\"\\uFFE4\",\"\\xAC\":\"\\uFFE2\",\"\\xAF\":\"\\uFFE3\",\"\\u2013\":\"\\uFE32\",\"\\u2014\":\"\\uFE31\",\"\\u2018\":\"\\uFE43\",\"\\u2019\":\"\\uFE44\",\"\\u201C\":\"\\uFE41\",\"\\u201D\":\"\\uFE42\",\"\\u2026\":\"\\uFE19\",\"\\u2027\":\"\\u30FB\",\"\\u20A9\":\"\\uFFE6\",\"\\u3001\":\"\\uFE11\",\"\\u3002\":\"\\uFE12\",\"\\u3008\":\"\\uFE3F\",\"\\u3009\":\"\\uFE40\",\"\\u300A\":\"\\uFE3D\",\"\\u300B\":\"\\uFE3E\",\"\\u300C\":\"\\uFE41\",\"\\u300D\":\"\\uFE42\",\"\\u300E\":\"\\uFE43\",\"\\u300F\":\"\\uFE44\",\"\\u3010\":\"\\uFE3B\",\"\\u3011\":\"\\uFE3C\",\"\\u3014\":\"\\uFE39\",\"\\u3015\":\"\\uFE3A\",\"\\u3016\":\"\\uFE17\",\"\\u3017\":\"\\uFE18\",\"\\uFF01\":\"\\uFE15\",\"\\uFF08\":\"\\uFE35\",\"\\uFF09\":\"\\uFE36\",\"\\uFF0C\":\"\\uFE10\",\"\\uFF0D\":\"\\uFE32\",\"\\uFF0E\":\"\\u30FB\",\"\\uFF1A\":\"\\uFE13\",\"\\uFF1B\":\"\\uFE14\",\"\\uFF1C\":\"\\uFE3F\",\"\\uFF1E\":\"\\uFE40\",\"\\uFF1F\":\"\\uFE16\",\"\\uFF3B\":\"\\uFE47\",\"\\uFF3D\":\"\\uFE48\",\"\\uFF3F\":\"\\uFE33\",\"\\uFF5B\":\"\\uFE37\",\"\\uFF5C\":\"\\u2015\",\"\\uFF5D\":\"\\uFE38\",\"\\uFF5F\":\"\\uFE35\",\"\\uFF60\":\"\\uFE36\",\"\\uFF61\":\"\\uFE12\",\"\\uFF62\":\"\\uFE41\",\"\\uFF63\":\"\\uFE42\"};function un(m){for(var y=\"\",I=0;I<m.length;I++){var V=m.charCodeAt(I+1)||null,$=m.charCodeAt(I-1)||null,ae=(!V||!bi(V)||zi[m[I+1]])&&(!$||!bi($)||zi[m[I-1]]);ae&&zi[m[I]]?y+=zi[m[I]]:y+=m[I]}return y}var Tn=24,pa=function(m,y,I,V,$){var ae,he,ze=$*8-V-1,rt=(1<<ze)-1,gt=rt>>1,Et=-7,or=I?$-1:0,_r=I?-1:1,pr=m[y+or];for(or+=_r,ae=pr&(1<<-Et)-1,pr>>=-Et,Et+=ze;Et>0;ae=ae*256+m[y+or],or+=_r,Et-=8);for(he=ae&(1<<-Et)-1,ae>>=-Et,Et+=V;Et>0;he=he*256+m[y+or],or+=_r,Et-=8);if(ae===0)ae=1-gt;else{if(ae===rt)return he?NaN:(pr?-1:1)*(1/0);he=he+Math.pow(2,V),ae=ae-gt}return(pr?-1:1)*he*Math.pow(2,ae-V)},ro=function(m,y,I,V,$,ae){var he,ze,rt,gt=ae*8-$-1,Et=(1<<gt)-1,or=Et>>1,_r=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,pr=V?0:ae-1,Fr=V?1:-1,oi=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(ze=isNaN(y)?1:0,he=Et):(he=Math.floor(Math.log(y)/Math.LN2),y*(rt=Math.pow(2,-he))<1&&(he--,rt*=2),he+or>=1?y+=_r/rt:y+=_r*Math.pow(2,1-or),y*rt>=2&&(he++,rt/=2),he+or>=Et?(ze=0,he=Et):he+or>=1?(ze=(y*rt-1)*Math.pow(2,$),he=he+or):(ze=y*Math.pow(2,or-1)*Math.pow(2,$),he=0));$>=8;m[I+pr]=ze&255,pr+=Fr,ze/=256,$-=8);for(he=he<<$|ze,gt+=$;gt>0;m[I+pr]=he&255,pr+=Fr,he/=256,gt-=8);m[I+pr-Fr]|=oi*128},Vo={read:pa,write:ro},Xa=sa;function sa(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}sa.Varint=0,sa.Fixed64=1,sa.Bytes=2,sa.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Xn=typeof TextDecoder==\"undefined\"?null:new TextDecoder(\"utf8\");sa.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos<I;){var V=this.readVarint(),$=V>>3,ae=this.pos;this.type=V&7,m($,y,this),this.pos===ae&&this.skip(V)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Yh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Fv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readSFixed64:function(){var m=Yh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readFloat:function(){var m=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var y=this.buf,I,V;return V=y[this.pos++],I=V&127,V<128||(V=y[this.pos++],I|=(V&127)<<7,V<128)||(V=y[this.pos++],I|=(V&127)<<14,V<128)||(V=y[this.pos++],I|=(V&127)<<21,V<128)?I:(V=y[this.pos],I|=(V&15)<<28,Ro(I,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,y=this.pos;return this.pos=m,m-y>=lo&&Xn?ru(this.buf,y,m):lv(this.buf,y,m)},readBytes:function(){var m=this.readVarint()+this.pos,y=this.buf.subarray(this.pos,m);return this.pos=m,y},readPackedVarint:function(m,y){if(this.type!==sa.Bytes)return m.push(this.readVarint(y));var I=uo(this);for(m=m||[];this.pos<I;)m.push(this.readVarint(y));return m},readPackedSVarint:function(m){if(this.type!==sa.Bytes)return m.push(this.readSVarint());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSVarint());return m},readPackedBoolean:function(m){if(this.type!==sa.Bytes)return m.push(this.readBoolean());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readBoolean());return m},readPackedFloat:function(m){if(this.type!==sa.Bytes)return m.push(this.readFloat());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFloat());return m},readPackedDouble:function(m){if(this.type!==sa.Bytes)return m.push(this.readDouble());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readDouble());return m},readPackedFixed32:function(m){if(this.type!==sa.Bytes)return m.push(this.readFixed32());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFixed32());return m},readPackedSFixed32:function(m){if(this.type!==sa.Bytes)return m.push(this.readSFixed32());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSFixed32());return m},readPackedFixed64:function(m){if(this.type!==sa.Bytes)return m.push(this.readFixed64());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readFixed64());return m},readPackedSFixed64:function(m){if(this.type!==sa.Bytes)return m.push(this.readSFixed64());var y=uo(this);for(m=m||[];this.pos<y;)m.push(this.readSFixed64());return m},skip:function(m){var y=m&7;if(y===sa.Varint)for(;this.buf[this.pos++]>127;);else if(y===sa.Bytes)this.pos=this.readVarint()+this.pos;else if(y===sa.Fixed32)this.pos+=4;else if(y===sa.Fixed64)this.pos+=8;else throw new Error(\"Unimplemented type: \"+y)},writeTag:function(m,y){this.writeVarint(m<<3|y)},realloc:function(m){for(var y=this.length||16;y<this.pos+m;)y*=2;if(y!==this.length){var I=new Uint8Array(y);I.set(this.buf),this.buf=I,this.length=y}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(m){this.realloc(4),Df(this.buf,m,this.pos),this.pos+=4},writeSFixed32:function(m){this.realloc(4),Df(this.buf,m,this.pos),this.pos+=4},writeFixed64:function(m){this.realloc(8),Df(this.buf,m&-1,this.pos),Df(this.buf,Math.floor(m*fo),this.pos+4),this.pos+=8},writeSFixed64:function(m){this.realloc(8),Df(this.buf,m&-1,this.pos),Df(this.buf,Math.floor(m*fo),this.pos+4),this.pos+=8},writeVarint:function(m){if(m=+m||0,m>268435455||m<0){Ju(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var y=this.pos;this.pos=pc(this.buf,m,this.pos);var I=this.pos-y;I>=128&&Qv(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Vo.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Vo.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var y=m.length;this.writeVarint(y),this.realloc(y);for(var I=0;I<y;I++)this.buf[this.pos++]=m[I]},writeRawMessage:function(m,y){this.pos++;var I=this.pos;m(y,this);var V=this.pos-I;V>=128&&Qv(I,V,this),this.pos=I-1,this.writeVarint(V),this.pos+=V},writeMessage:function(m,y,I){this.writeTag(m,sa.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,ud,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,Ch,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Vd,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Gd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,Af,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,Lh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Ed,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,cd,y)},writeBytesField:function(m,y){this.writeTag(m,sa.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,sa.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,sa.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function Ro(m,y,I){var V=I.buf,$,ae;if(ae=V[I.pos++],$=(ae&112)>>4,ae<128||(ae=V[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=V[I.pos++],$|=(ae&1)<<31,ae<128))return $o(m,$,y);throw new Error(\"Expected varint not more than 10 bytes\")}function uo(m){return m.type===sa.Bytes?m.readVarint()+m.pos:m.pos+1}function $o(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function Ju(m,y){var I,V;if(m>=0?(I=m%4294967296|0,V=m/4294967296|0):(I=~(-m%4294967296),V=~(-m/4294967296),I^4294967295?I=I+1|0:(I=0,V=V+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error(\"Given varint doesn't fit into 10 bytes\");y.realloc(10),qu(I,V,y),kh(V,y)}function qu(m,y,I){I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos]=m&127}function kh(m,y){var I=(m&7)<<4;y.buf[y.pos++]|=I|((m>>>=3)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127)))))}function Qv(m,y,I){var V=y<=16383?1:y<=2097151?2:y<=268435455?3:Math.floor(Math.log(y)/(Math.LN2*7));I.realloc(V);for(var $=I.pos-1;$>=m;$--)I.buf[$+V]=I.buf[$]}function ud(m,y){for(var I=0;I<m.length;I++)y.writeVarint(m[I])}function Ch(m,y){for(var I=0;I<m.length;I++)y.writeSVarint(m[I])}function Vd(m,y){for(var I=0;I<m.length;I++)y.writeFloat(m[I])}function Gd(m,y){for(var I=0;I<m.length;I++)y.writeDouble(m[I])}function Hd(m,y){for(var I=0;I<m.length;I++)y.writeBoolean(m[I])}function Af(m,y){for(var I=0;I<m.length;I++)y.writeFixed32(m[I])}function Lh(m,y){for(var I=0;I<m.length;I++)y.writeSFixed32(m[I])}function Ed(m,y){for(var I=0;I<m.length;I++)y.writeFixed64(m[I])}function cd(m,y){for(var I=0;I<m.length;I++)y.writeSFixed64(m[I])}function Yh(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+m[y+3]*16777216}function Df(m,y,I){m[I]=y,m[I+1]=y>>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Fv(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+(m[y+3]<<24)}function lv(m,y,I){for(var V=\"\",$=y;$<I;){var ae=m[$],he=null,ze=ae>239?4:ae>223?3:ae>191?2:1;if($+ze>I)break;var rt,gt,Et;ze===1?ae<128&&(he=ae):ze===2?(rt=m[$+1],(rt&192)===128&&(he=(ae&31)<<6|rt&63,he<=127&&(he=null))):ze===3?(rt=m[$+1],gt=m[$+2],(rt&192)===128&&(gt&192)===128&&(he=(ae&15)<<12|(rt&63)<<6|gt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):ze===4&&(rt=m[$+1],gt=m[$+2],Et=m[$+3],(rt&192)===128&&(gt&192)===128&&(Et&192)===128&&(he=(ae&15)<<18|(rt&63)<<12|(gt&63)<<6|Et&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,ze=1):he>65535&&(he-=65536,V+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),V+=String.fromCharCode(he),$+=ze}return V}function ru(m,y,I){return Xn.decode(m.subarray(y,I))}function pc(m,y,I){for(var V=0,$,ae;V<y.length;V++){if($=y.charCodeAt(V),$>55295&&$<57344)if(ae)if($<56320){m[I++]=239,m[I++]=191,m[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||V+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ae=$;continue}else ae&&(m[I++]=239,m[I++]=191,m[I++]=189,ae=null);$<128?m[I++]=$:($<2048?m[I++]=$>>6|192:($<65536?m[I++]=$>>12|224:(m[I++]=$>>18|240,m[I++]=$>>12&63|128),m[I++]=$>>6&63|128),m[I++]=$&63|128)}return I}var $u=3;function zv(m,y,I){m===1&&I.readMessage(ff,y)}function ff(m,y,I){if(m===3){var V=I.readMessage(q1,{}),$=V.id,ae=V.bitmap,he=V.width,ze=V.height,rt=V.left,gt=V.top,Et=V.advance;y.push({id:$,bitmap:new Dv({width:he+2*$u,height:ze+2*$u},ae),metrics:{width:he,height:ze,left:rt,top:gt,advance:Et}})}}function q1(m,y,I){m===1?y.id=I.readVarint():m===2?y.bitmap=I.readBytes():m===3?y.width=I.readVarint():m===4?y.height=I.readVarint():m===5?y.left=I.readSVarint():m===6?y.top=I.readSVarint():m===7&&(y.advance=I.readVarint())}function p0(m){return new Xa(m).readFields(zv,[])}var Gp=$u;function ep(m){for(var y=0,I=0,V=0,$=m;V<$.length;V+=1){var ae=$[V];y+=ae.w*ae.h,I=Math.max(I,ae.w)}m.sort(function(Hi,Ai){return Ai.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(y/.95)),I),ze=[{x:0,y:0,w:he,h:1/0}],rt=0,gt=0,Et=0,or=m;Et<or.length;Et+=1)for(var _r=or[Et],pr=ze.length-1;pr>=0;pr--){var Fr=ze[pr];if(!(_r.w>Fr.w||_r.h>Fr.h)){if(_r.x=Fr.x,_r.y=Fr.y,gt=Math.max(gt,_r.y+_r.h),rt=Math.max(rt,_r.x+_r.w),_r.w===Fr.w&&_r.h===Fr.h){var oi=ze.pop();pr<ze.length&&(ze[pr]=oi)}else _r.h===Fr.h?(Fr.x+=_r.w,Fr.w-=_r.w):_r.w===Fr.w?(Fr.y+=_r.h,Fr.h-=_r.h):(ze.push({x:Fr.x+_r.w,y:Fr.y,w:Fr.w-_r.w,h:_r.h}),Fr.y+=_r.h,Fr.h-=_r.h);break}}return{w:rt,h:gt,fill:y/(rt*gt)||0}}var Gc=1,Yf=function(y,I){var V=I.pixelRatio,$=I.version,ae=I.stretchX,he=I.stretchY,ze=I.content;this.paddedRect=y,this.pixelRatio=V,this.stretchX=ae,this.stretchY=he,this.content=ze,this.version=$},tp={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};tp.tl.get=function(){return[this.paddedRect.x+Gc,this.paddedRect.y+Gc]},tp.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Gc,this.paddedRect.y+this.paddedRect.h-Gc]},tp.tlbr.get=function(){return this.tl.concat(this.br)},tp.displaySize.get=function(){return[(this.paddedRect.w-Gc*2)/this.pixelRatio,(this.paddedRect.h-Gc*2)/this.pixelRatio]},Object.defineProperties(Yf.prototype,tp);var yg=function(y,I){var V={},$={};this.haveRenderCallbacks=[];var ae=[];this.addImages(y,V,ae),this.addImages(I,$,ae);var he=ep(ae),ze=he.w,rt=he.h,gt=new Eh({width:ze||1,height:rt||1});for(var Et in y){var or=y[Et],_r=V[Et].paddedRect;Eh.copy(or.data,gt,{x:0,y:0},{x:_r.x+Gc,y:_r.y+Gc},or.data)}for(var pr in I){var Fr=I[pr],oi=$[pr].paddedRect,Hi=oi.x+Gc,Ai=oi.y+Gc,bn=Fr.data.width,nn=Fr.data.height;Eh.copy(Fr.data,gt,{x:0,y:0},{x:Hi,y:Ai},Fr.data),Eh.copy(Fr.data,gt,{x:0,y:nn-1},{x:Hi,y:Ai-1},{width:bn,height:1}),Eh.copy(Fr.data,gt,{x:0,y:0},{x:Hi,y:Ai+nn},{width:bn,height:1}),Eh.copy(Fr.data,gt,{x:bn-1,y:0},{x:Hi-1,y:Ai},{width:1,height:nn}),Eh.copy(Fr.data,gt,{x:0,y:0},{x:Hi+bn,y:Ai},{width:1,height:nn})}this.image=gt,this.iconPositions=V,this.patternPositions=$};yg.prototype.addImages=function(y,I,V){for(var $ in y){var ae=y[$],he={x:0,y:0,w:ae.data.width+2*Gc,h:ae.data.height+2*Gc};V.push(he),I[$]=new Yf(he,ae),ae.hasRenderCallback&&this.haveRenderCallbacks.push($)}},yg.prototype.patchUpdatedImages=function(y,I){y.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var V in y.updatedImages)this.patchUpdatedImage(this.iconPositions[V],y.getImage(V),I),this.patchUpdatedImage(this.patternPositions[V],y.getImage(V),I)},yg.prototype.patchUpdatedImage=function(y,I,V){if(!(!y||!I)&&y.version!==I.version){y.version=I.version;var $=y.tl,ae=$[0],he=$[1];V.update(I.data,void 0,{x:ae,y:he})}},X(\"ImagePosition\",Yf),X(\"ImageAtlas\",yg);var uv={horizontal:1,vertical:2,horizontalOnly:3},B1=-17;function kS(m){for(var y=0,I=m;y<I.length;y+=1){var V=I[y];if(V.positionedGlyphs.length!==0)return!1}return!0}var $w=57344,g0=63743,_y=function(){this.scale=1,this.fontStack=\"\",this.imageName=null};_y.forText=function(y,I){var V=new _y;return V.scale=y||1,V.fontStack=I,V},_y.forImage=function(y){var I=new _y;return I.imageName=y,I};var Kh=function(){this.text=\"\",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};Kh.fromFeature=function(y,I){for(var V=new Kh,$=0;$<y.sections.length;$++){var ae=y.sections[$];ae.image?V.addImageSection(ae):V.addTextSection(ae,I)}return V},Kh.prototype.length=function(){return this.text.length},Kh.prototype.getSection=function(y){return this.sections[this.sectionIndex[y]]},Kh.prototype.getSectionIndex=function(y){return this.sectionIndex[y]},Kh.prototype.getCharCode=function(y){return this.text.charCodeAt(y)},Kh.prototype.verticalizePunctuation=function(){this.text=un(this.text)},Kh.prototype.trim=function(){for(var y=0,I=0;I<this.text.length&&m0[this.text.charCodeAt(I)];I++)y++;for(var V=this.text.length,$=this.text.length-1;$>=0&&$>=y&&m0[this.text.charCodeAt($)];$--)V--;this.text=this.text.substring(y,V),this.sectionIndex=this.sectionIndex.slice(y,V)},Kh.prototype.substring=function(y,I){var V=new Kh;return V.text=this.text.substring(y,I),V.sectionIndex=this.sectionIndex.slice(y,I),V.sections=this.sections,V},Kh.prototype.toString=function(){return this.text},Kh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,V){return Math.max(I,y.sections[V].scale)},0)},Kh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(_y.forText(y.scale,y.fontStack||I));for(var V=this.sections.length-1,$=0;$<y.text.length;++$)this.sectionIndex.push(V)},Kh.prototype.addImageSection=function(y){var I=y.image?y.image.name:\"\";if(I.length===0){re(\"Can't add FormattedSection with an empty image.\");return}var V=this.getNextImageSectionCharCode();if(!V){re(\"Reached maximum number of images \"+(g0-$w+2));return}this.text+=String.fromCharCode(V),this.sections.push(_y.forImage(I)),this.sectionIndex.push(this.sections.length-1)},Kh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=g0?null:++this.imageSectionID:(this.imageSectionID=$w,this.imageSectionID)};function cO(m,y){for(var I=[],V=m.text,$=0,ae=0,he=y;ae<he.length;ae+=1){var ze=he[ae];I.push(m.substring($,ze)),$=ze}return $<V.length&&I.push(m.substring($,V.length)),I}function Qw(m,y,I,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi){var Hi=Kh.fromFeature(m,$);or===uv.vertical&&Hi.verticalizePunctuation();var Ai,bn=Ms.processBidirectionalText,nn=Ms.processStyledBidirectionalText;if(bn&&Hi.sections.length===1){Ai=[];for(var xn=bn(Hi.toString(),e3(Hi,gt,ae,y,V,pr,Fr)),Pn=0,Zn=xn;Pn<Zn.length;Pn+=1){var ga=Zn[Pn],ha=new Kh;ha.text=ga,ha.sections=Hi.sections;for(var eo=0;eo<ga.length;eo++)ha.sectionIndex.push(0);Ai.push(ha)}}else if(nn){Ai=[];for(var za=nn(Hi.text,Hi.sectionIndex,e3(Hi,gt,ae,y,V,pr,Fr)),Za=0,Jo=za;Za<Jo.length;Za+=1){var to=Jo[Za],ao=new Kh;ao.text=to[0],ao.sectionIndex=to[1],ao.sections=Hi.sections,Ai.push(ao)}}else Ai=cO(Hi,e3(Hi,gt,ae,y,V,pr,Fr));var _s=[],jo={positionedLines:_s,text:Hi.toString(),top:Et[1],bottom:Et[1],left:Et[0],right:Et[0],writingMode:or,iconsInText:!1,verticalizable:!1};return dO(jo,y,I,V,Ai,he,ze,rt,or,gt,_r,oi),kS(_s)?!1:jo}var m0={};m0[9]=!0,m0[10]=!0,m0[11]=!0,m0[12]=!0,m0[13]=!0,m0[32]=!0;var cv={};cv[10]=!0,cv[32]=!0,cv[38]=!0,cv[40]=!0,cv[41]=!0,cv[43]=!0,cv[45]=!0,cv[47]=!0,cv[173]=!0,cv[183]=!0,cv[8203]=!0,cv[8208]=!0,cv[8211]=!0,cv[8231]=!0;function r6(m,y,I,V,$,ae){if(y.imageName){var rt=V[y.imageName];return rt?rt.displaySize[0]*y.scale*Tn/ae+$:0}else{var he=I[y.fontStack],ze=he&&he[m];return ze?ze.metrics.advance*y.scale+$:0}}function fO(m,y,I,V,$,ae){for(var he=0,ze=0;ze<m.length();ze++){var rt=m.getSection(ze);he+=r6(m.getCharCode(ze),rt,V,$,y,ae)}var gt=Math.max(1,Math.ceil(he/I));return he/gt}function i6(m,y,I,V){var $=Math.pow(m-y,2);return V?m<y?$/2:$*2:$+Math.abs(I)*I}function hO(m,y,I){var V=0;return m===10&&(V-=1e4),I&&(V+=150),(m===40||m===65288)&&(V+=50),(y===41||y===65289)&&(V+=50),V}function _p(m,y,I,V,$,ae){for(var he=null,ze=i6(y,I,$,ae),rt=0,gt=V;rt<gt.length;rt+=1){var Et=gt[rt],or=y-Et.x,_r=i6(or,I,$,ae)+Et.badness;_r<=ze&&(he=Et,ze=_r)}return{index:m,x:y,priorBreak:he,badness:ze}}function fb(m){return m?fb(m.priorBreak).concat(m.index):[]}function e3(m,y,I,V,$,ae,he){if(ae!==\"point\")return[];if(!m)return[];for(var ze=[],rt=fO(m,y,I,V,$,he),gt=m.text.indexOf(\"\\u200B\")>=0,Et=0,or=0;or<m.length();or++){var _r=m.getSection(or),pr=m.getCharCode(or);if(m0[pr]||(Et+=r6(pr,_r,V,$,y,he)),or<m.length()-1){var Fr=Hr(pr);(cv[pr]||Fr||_r.imageName)&&ze.push(_p(or+1,Et,rt,ze,hO(pr,m.getCharCode(or+1),Fr&&gt),!1))}}return fb(_p(m.length(),Et,rt,ze,0,!0))}function CS(m){var y=.5,I=.5;switch(m){case\"right\":case\"top-right\":case\"bottom-right\":y=1;break;case\"left\":case\"top-left\":case\"bottom-left\":y=0;break}switch(m){case\"bottom\":case\"bottom-right\":case\"bottom-left\":I=1;break;case\"top\":case\"top-right\":case\"top-left\":I=0;break}return{horizontalAlign:y,verticalAlign:I}}function dO(m,y,I,V,$,ae,he,ze,rt,gt,Et,or){for(var _r=0,pr=B1,Fr=0,oi=0,Hi=ze===\"right\"?1:ze===\"left\"?0:.5,Ai=0,bn=0,nn=$;bn<nn.length;bn+=1){var xn=nn[bn];xn.trim();var Pn=xn.getMaxScale(),Zn=(Pn-1)*Tn,ga={positionedGlyphs:[],lineOffset:0};m.positionedLines[Ai]=ga;var ha=ga.positionedGlyphs,eo=0;if(!xn.length()){pr+=ae,++Ai;continue}for(var za=0;za<xn.length();za++){var Za=xn.getSection(za),Jo=xn.getSectionIndex(za),to=xn.getCharCode(za),ao=0,_s=null,jo=null,El=null,Iu=Tn,kl=!(rt===uv.horizontal||!Et&&!qr(to)||Et&&(m0[to]||Zr(to)));if(Za.imageName){var Sf=V[Za.imageName];if(!Sf)continue;El=Za.imageName,m.iconsInText=m.iconsInText||!0,jo=Sf.paddedRect;var Ff=Sf.displaySize;Za.scale=Za.scale*Tn/or,_s={width:Ff[0],height:Ff[1],left:Gc,top:-Gp,advance:kl?Ff[1]:Ff[0]};var $h=Tn-Ff[1]*Za.scale;ao=Zn+$h,Iu=_s.advance;var ch=kl?Ff[0]*Za.scale-Tn*Pn:Ff[1]*Za.scale-Tn*Pn;ch>0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=y[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(Pn-Za.scale)*Tn}kl?(m.verticalizable=!0,ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),_r+=Iu*Za.scale+gt):(ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),_r+=_s.advance*Za.scale+gt)}if(ha.length!==0){var Wd=_r-gt;Fr=Math.max(Wd,Fr),vO(ha,0,ha.length-1,Hi,eo)}_r=0;var Xd=ae*Pn+eo;ga.lineOffset=Math.max(eo,Zn),pr+=Xd,oi=Math.max(Xd,oi),++Ai}var Qh=pr-B1,fv=CS(he),hv=fv.horizontalAlign,Ph=fv.verticalAlign;kd(m.positionedLines,Hi,hv,Ph,Fr,oi,ae,Qh,$.length),m.top+=-Ph*Qh,m.bottom=m.top+Qh,m.left+=-hv*Fr,m.right=m.left+Fr}function vO(m,y,I,V,$){if(!(!V&&!$))for(var ae=m[I],he=ae.metrics.advance*ae.scale,ze=(m[I].x+he)*V,rt=y;rt<=I;rt++)m[rt].x-=ze,m[rt].y+=$}function kd(m,y,I,V,$,ae,he,ze,rt){var gt=(y-I)*$,Et=0;ae!==he?Et=-ze*V-B1:Et=(-V*rt+.5)*he;for(var or=0,_r=m;or<_r.length;or+=1)for(var pr=_r[or],Fr=0,oi=pr.positionedGlyphs;Fr<oi.length;Fr+=1){var Hi=oi[Fr];Hi.x+=gt,Hi.y+=Et}}function rp(m,y,I){var V=CS(I),$=V.horizontalAlign,ae=V.verticalAlign,he=y[0],ze=y[1],rt=he-m.displaySize[0]*$,gt=rt+m.displaySize[0],Et=ze-m.displaySize[1]*ae,or=Et+m.displaySize[1];return{image:m,top:Et,bottom:or,left:rt,right:gt}}function pm(m,y,I,V,$,ae){var he=m.image,ze;if(he.content){var rt=he.content,gt=he.pixelRatio||1;ze=[rt[0]/gt,rt[1]/gt,he.displaySize[0]-rt[2]/gt,he.displaySize[1]-rt[3]/gt]}var Et=y.left*ae,or=y.right*ae,_r,pr,Fr,oi;I===\"width\"||I===\"both\"?(oi=$[0]+Et-V[3],pr=$[0]+or+V[1]):(oi=$[0]+(Et+or-he.displaySize[0])/2,pr=oi+he.displaySize[0]);var Hi=y.top*ae,Ai=y.bottom*ae;return I===\"height\"||I===\"both\"?(_r=$[1]+Hi-V[0],Fr=$[1]+Ai+V[2]):(_r=$[1]+(Hi+Ai-he.displaySize[1])/2,Fr=_r+he.displaySize[1]),{image:he,top:_r,right:pr,bottom:Fr,left:oi,collisionPadding:ze}}var jd=function(m){function y(I,V,$,ae){m.call(this,I,V),this.angle=$,ae!==void 0&&(this.segment=ae)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.clone=function(){return new y(this.x,this.y,this.angle,this.segment)},y}(u);X(\"Anchor\",jd);var Cd=128;function xp(m,y){var I=y.expression;if(I.kind===\"constant\"){var V=I.evaluate(new Gn(m+1));return{kind:\"constant\",layoutSize:V}}else{if(I.kind===\"source\")return{kind:\"source\"};for(var $=I.zoomStops,ae=I.interpolationType,he=0;he<$.length&&$[he]<=m;)he++;he=Math.max(0,he-1);for(var ze=he;ze<$.length&&$[ze]<m+1;)ze++;ze=Math.min($.length-1,ze);var rt=$[he],gt=$[ze];if(I.kind===\"composite\")return{kind:\"composite\",minZoom:rt,maxZoom:gt,interpolationType:ae};var Et=I.evaluate(new Gn(rt)),or=I.evaluate(new Gn(gt));return{kind:\"camera\",minZoom:rt,maxZoom:gt,minSize:Et,maxSize:or,interpolationType:ae}}}function BQ(m,y,I){var V=y.uSize,$=y.uSizeT,ae=I.lowerSize,he=I.upperSize;return m.kind===\"source\"?ae/Cd:m.kind===\"composite\"?nl(ae/Cd,he/Cd,$):V}function NQ(m,y){var I=0,V=0;if(m.kind===\"constant\")V=m.layoutSize;else if(m.kind!==\"source\"){var $=m.interpolationType,ae=m.minZoom,he=m.maxZoom,ze=$?p(Wl.interpolationFactor($,y,ae,he),0,1):0;m.kind===\"camera\"?V=nl(m.minSize,m.maxSize,ze):I=ze}return{uSizeT:I,uSize:V}}var Ret=Object.freeze({__proto__:null,getSizeData:xp,evaluateSizeForFeature:BQ,evaluateSizeForZoom:NQ,SIZE_PACK_FACTOR:Cd});function UQ(m,y,I,V,$){if(y.segment===void 0)return!0;for(var ae=y,he=y.segment+1,ze=0;ze>-I/2;){if(he--,he<0)return!1;ze-=m[he].dist(ae),ae=m[he]}ze+=m[he].dist(m[he+1]),he++;for(var rt=[],gt=0;ze<I/2;){var Et=m[he-1],or=m[he],_r=m[he+1];if(!_r)return!1;var pr=Et.angleTo(or)-or.angleTo(_r);for(pr=Math.abs((pr+3*Math.PI)%(Math.PI*2)-Math.PI),rt.push({distance:ze,angleDelta:pr}),gt+=pr;ze-rt[0].distance>V;)gt-=rt.shift().angleDelta;if(gt>$)return!1;he++,ze+=or.dist(_r)}return!0}function VQ(m){for(var y=0,I=0;I<m.length-1;I++)y+=m[I].dist(m[I+1]);return y}function GQ(m,y,I){return m?3/5*y*I:0}function HQ(m,y){return Math.max(m?m.right-m.left:0,y?y.right-y.left:0)}function Det(m,y,I,V,$,ae){for(var he=GQ(I,$,ae),ze=HQ(I,V)*ae,rt=0,gt=VQ(m)/2,Et=0;Et<m.length-1;Et++){var or=m[Et],_r=m[Et+1],pr=or.dist(_r);if(rt+pr>gt){var Fr=(gt-rt)/pr,oi=nl(or.x,_r.x,Fr),Hi=nl(or.y,_r.y,Fr),Ai=new jd(oi,Hi,_r.angleTo(or),Et);return Ai._round(),!he||UQ(m,Ai,ze,he,y)?Ai:void 0}rt+=pr}}function Fet(m,y,I,V,$,ae,he,ze,rt){var gt=GQ(V,ae,he),Et=HQ(V,$),or=Et*he,_r=m[0].x===0||m[0].x===rt||m[0].y===0||m[0].y===rt;y-or<y/4&&(y=or+y/4);var pr=ae*2,Fr=_r?y/2*ze%y:(Et/2+pr)*he*ze%y;return jQ(m,Fr,y,gt,I,or,_r,!1,rt)}function jQ(m,y,I,V,$,ae,he,ze,rt){for(var gt=ae/2,Et=VQ(m),or=0,_r=y-I,pr=[],Fr=0;Fr<m.length-1;Fr++){for(var oi=m[Fr],Hi=m[Fr+1],Ai=oi.dist(Hi),bn=Hi.angleTo(oi);_r+I<or+Ai;){_r+=I;var nn=(_r-or)/Ai,xn=nl(oi.x,Hi.x,nn),Pn=nl(oi.y,Hi.y,nn);if(xn>=0&&xn<rt&&Pn>=0&&Pn<rt&&_r-gt>=0&&_r+gt<=Et){var Zn=new jd(xn,Pn,bn,Fr);Zn._round(),(!V||UQ(m,Zn,ae,V,$))&&pr.push(Zn)}}or+=Ai}return!ze&&!pr.length&&!he&&(pr=jQ(m,or/2,I,V,$,ae,he,!0,rt)),pr}function WQ(m,y,I,V,$){for(var ae=[],he=0;he<m.length;he++)for(var ze=m[he],rt=void 0,gt=0;gt<ze.length-1;gt++){var Et=ze[gt],or=ze[gt+1];Et.x<y&&or.x<y||(Et.x<y?Et=new u(y,Et.y+(or.y-Et.y)*((y-Et.x)/(or.x-Et.x)))._round():or.x<y&&(or=new u(y,Et.y+(or.y-Et.y)*((y-Et.x)/(or.x-Et.x)))._round()),!(Et.y<I&&or.y<I)&&(Et.y<I?Et=new u(Et.x+(or.x-Et.x)*((I-Et.y)/(or.y-Et.y)),I)._round():or.y<I&&(or=new u(Et.x+(or.x-Et.x)*((I-Et.y)/(or.y-Et.y)),I)._round()),!(Et.x>=V&&or.x>=V)&&(Et.x>=V?Et=new u(V,Et.y+(or.y-Et.y)*((V-Et.x)/(or.x-Et.x)))._round():or.x>=V&&(or=new u(V,Et.y+(or.y-Et.y)*((V-Et.x)/(or.x-Et.x)))._round()),!(Et.y>=$&&or.y>=$)&&(Et.y>=$?Et=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round():or.y>=$&&(or=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round()),(!rt||!Et.equals(rt[rt.length-1]))&&(rt=[Et],ae.push(rt)),rt.push(or)))))}return ae}var t3=Gc;function XQ(m,y,I,V){var $=[],ae=m.image,he=ae.pixelRatio,ze=ae.paddedRect.w-2*t3,rt=ae.paddedRect.h-2*t3,gt=m.right-m.left,Et=m.bottom-m.top,or=ae.stretchX||[[0,ze]],_r=ae.stretchY||[[0,rt]],pr=function(Cl,yl){return Cl+yl[1]-yl[0]},Fr=or.reduce(pr,0),oi=_r.reduce(pr,0),Hi=ze-Fr,Ai=rt-oi,bn=0,nn=Fr,xn=0,Pn=oi,Zn=0,ga=Hi,ha=0,eo=Ai;if(ae.content&&V){var za=ae.content;bn=n6(or,0,za[0]),xn=n6(_r,0,za[1]),nn=n6(or,za[0],za[2]),Pn=n6(_r,za[1],za[3]),Zn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-nn,eo=za[3]-za[1]-Pn}var Za=function(Cl,yl,Qu,gc){var Sf=a6(Cl.stretch-bn,nn,gt,m.left),Ff=o6(Cl.fixed-Zn,ga,Cl.stretch,Fr),$h=a6(yl.stretch-xn,Pn,Et,m.top),ch=o6(yl.fixed-ha,eo,yl.stretch,oi),Wd=a6(Qu.stretch-bn,nn,gt,m.left),Xd=o6(Qu.fixed-Zn,ga,Qu.stretch,Fr),Qh=a6(gc.stretch-xn,Pn,Et,m.top),fv=o6(gc.fixed-ha,eo,gc.stretch,oi),hv=new u(Sf,$h),Ph=new u(Wd,$h),dv=new u(Wd,Qh),bp=new u(Sf,Qh),wy=new u(Ff/he,ch/he),V1=new u(Xd/he,fv/he),G1=y*Math.PI/180;if(G1){var H1=Math.sin(G1),u3=Math.cos(G1),y0=[u3,-H1,H1,u3];hv._matMult(y0),Ph._matMult(y0),bp._matMult(y0),dv._matMult(y0)}var h6=Cl.stretch+Cl.fixed,wO=Qu.stretch+Qu.fixed,d6=yl.stretch+yl.fixed,TO=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+t3+h6,y:ae.paddedRect.y+t3+d6,w:wO-h6,h:TO-d6},c3=ga/he/gt,v6=eo/he/Et;return{tl:hv,tr:Ph,bl:bp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wy,pixelOffsetBR:V1,minFontScaleX:c3,minFontScaleY:v6,isSDF:I}};if(!V||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ze+1},{fixed:0,stretch:rt+1}));else for(var Jo=ZQ(or,Hi,Fr),to=ZQ(_r,Ai,oi),ao=0;ao<Jo.length-1;ao++)for(var _s=Jo[ao],jo=Jo[ao+1],El=0;El<to.length-1;El++){var Iu=to[El],kl=to[El+1];$.push(Za(_s,Iu,jo,kl))}return $}function n6(m,y,I){for(var V=0,$=0,ae=m;$<ae.length;$+=1){var he=ae[$];V+=Math.max(y,Math.min(I,he[1]))-Math.max(y,Math.min(I,he[0]))}return V}function ZQ(m,y,I){for(var V=[{fixed:-t3,stretch:0}],$=0,ae=m;$<ae.length;$+=1){var he=ae[$],ze=he[0],rt=he[1],gt=V[V.length-1];V.push({fixed:ze-gt.stretch,stretch:gt.stretch}),V.push({fixed:ze-gt.stretch,stretch:gt.stretch+(rt-ze)})}return V.push({fixed:y+t3,stretch:I}),V}function a6(m,y,I,V){return m/y*I+V}function o6(m,y,I,V){return m-y*I/V}function zet(m,y,I,V,$,ae,he,ze){for(var rt=V.layout.get(\"text-rotate\").evaluate(ae,{})*Math.PI/180,gt=[],Et=0,or=y.positionedLines;Et<or.length;Et+=1)for(var _r=or[Et],pr=0,Fr=_r.positionedGlyphs;pr<Fr.length;pr+=1){var oi=Fr[pr];if(oi.rect){var Hi=oi.rect||{},Ai=1,bn=Gp+Ai,nn=!0,xn=1,Pn=0,Zn=($||ze)&&oi.vertical,ga=oi.metrics.advance*oi.scale/2;if(ze&&y.verticalizable){var ha=(oi.scale-1)*Tn,eo=(Tn-oi.metrics.width*oi.scale)/2;Pn=_r.lineOffset/2-(oi.imageName?-eo:ha)}if(oi.imageName){var za=he[oi.imageName];nn=za.sdf,xn=za.pixelRatio,bn=Gc/xn}var Za=$?[oi.x+ga,oi.y]:[0,0],Jo=$?[0,0]:[oi.x+ga+I[0],oi.y+I[1]-Pn],to=[0,0];Zn&&(to=Jo,Jo=[0,0]);var ao=(oi.metrics.left-bn)*oi.scale-ga+Jo[0],_s=(-oi.metrics.top-bn)*oi.scale+Jo[1],jo=ao+Hi.w*oi.scale/xn,El=_s+Hi.h*oi.scale/xn,Iu=new u(ao,_s),kl=new u(jo,_s),Cl=new u(ao,El),yl=new u(jo,El);if(Zn){var Qu=new u(-ga,ga-B1),gc=-Math.PI/2,Sf=Tn/2-ga,Ff=oi.imageName?Sf:0,$h=new u(5-B1-Sf,-Ff),ch=new(Function.prototype.bind.apply(u,[null].concat(to)));Iu._rotateAround(gc,Qu)._add($h)._add(ch),kl._rotateAround(gc,Qu)._add($h)._add(ch),Cl._rotateAround(gc,Qu)._add($h)._add(ch),yl._rotateAround(gc,Qu)._add($h)._add(ch)}if(rt){var Wd=Math.sin(rt),Xd=Math.cos(rt),Qh=[Xd,-Wd,Wd,Xd];Iu._matMult(Qh),kl._matMult(Qh),Cl._matMult(Qh),yl._matMult(Qh)}var fv=new u(0,0),hv=new u(0,0),Ph=0,dv=0;gt.push({tl:Iu,tr:kl,bl:Cl,br:yl,tex:Hi,writingMode:y.writingMode,glyphOffset:Za,sectionIndex:oi.sectionIndex,isSDF:nn,pixelOffsetTL:fv,pixelOffsetBR:hv,minFontScaleX:Ph,minFontScaleY:dv})}}return gt}var s6=function(y,I,V,$,ae,he,ze,rt,gt,Et){if(this.boxStartIndex=y.length,gt){var or=he.top,_r=he.bottom,pr=he.collisionPadding;pr&&(or-=pr[1],_r+=pr[3]);var Fr=_r-or;Fr>0&&(Fr=Math.max(10,Fr),this.circleDiameter=Fr)}else{var oi=he.top*ze-rt,Hi=he.bottom*ze+rt,Ai=he.left*ze-rt,bn=he.right*ze+rt,nn=he.collisionPadding;if(nn&&(Ai-=nn[0]*ze,oi-=nn[1]*ze,bn+=nn[2]*ze,Hi+=nn[3]*ze),Et){var xn=new u(Ai,oi),Pn=new u(bn,oi),Zn=new u(Ai,Hi),ga=new u(bn,Hi),ha=Et*Math.PI/180;xn._rotate(ha),Pn._rotate(ha),Zn._rotate(ha),ga._rotate(ha),Ai=Math.min(xn.x,Pn.x,Zn.x,ga.x),bn=Math.max(xn.x,Pn.x,Zn.x,ga.x),oi=Math.min(xn.y,Pn.y,Zn.y,ga.y),Hi=Math.max(xn.y,Pn.y,Zn.y,ga.y)}y.emplaceBack(I.x,I.y,Ai,oi,bn,Hi,V,$,ae)}this.boxEndIndex=y.length},r3=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=Oet),this.data=y,this.length=this.data.length,this.compare=I,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};r3.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},r3.prototype.pop=function(){if(this.length!==0){var y=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),y}},r3.prototype.peek=function(){return this.data[0]},r3.prototype._up=function(y){for(var I=this,V=I.data,$=I.compare,ae=V[y];y>0;){var he=y-1>>1,ze=V[he];if($(ae,ze)>=0)break;V[y]=ze,y=he}V[y]=ae},r3.prototype._down=function(y){for(var I=this,V=I.data,$=I.compare,ae=this.length>>1,he=V[y];y<ae;){var ze=(y<<1)+1,rt=V[ze],gt=ze+1;if(gt<this.length&&$(V[gt],rt)<0&&(ze=gt,rt=V[gt]),$(rt,he)>=0)break;V[y]=rt,y=ze}V[y]=he};function Oet(m,y){return m<y?-1:m>y?1:0}function qet(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var V=1/0,$=1/0,ae=-1/0,he=-1/0,ze=m[0],rt=0;rt<ze.length;rt++){var gt=ze[rt];(!rt||gt.x<V)&&(V=gt.x),(!rt||gt.y<$)&&($=gt.y),(!rt||gt.x>ae)&&(ae=gt.x),(!rt||gt.y>he)&&(he=gt.y)}var Et=ae-V,or=he-$,_r=Math.min(Et,or),pr=_r/2,Fr=new r3([],Bet);if(_r===0)return new u(V,$);for(var oi=V;oi<ae;oi+=_r)for(var Hi=$;Hi<he;Hi+=_r)Fr.push(new i3(oi+pr,Hi+pr,pr,m));for(var Ai=Uet(m),bn=Fr.length;Fr.length;){var nn=Fr.pop();(nn.d>Ai.d||!Ai.d)&&(Ai=nn,I&&console.log(\"found best %d after %d probes\",Math.round(1e4*nn.d)/1e4,bn)),!(nn.max-Ai.d<=y)&&(pr=nn.h/2,Fr.push(new i3(nn.p.x-pr,nn.p.y-pr,pr,m)),Fr.push(new i3(nn.p.x+pr,nn.p.y-pr,pr,m)),Fr.push(new i3(nn.p.x-pr,nn.p.y+pr,pr,m)),Fr.push(new i3(nn.p.x+pr,nn.p.y+pr,pr,m)),bn+=4)}return I&&(console.log(\"num probes: \"+bn),console.log(\"best distance: \"+Ai.d)),Ai.p}function Bet(m,y){return y.max-m.max}function i3(m,y,I,V){this.p=new u(m,y),this.h=I,this.d=Net(this.p,V),this.max=this.d+this.h*Math.SQRT2}function Net(m,y){for(var I=!1,V=1/0,$=0;$<y.length;$++)for(var ae=y[$],he=0,ze=ae.length,rt=ze-1;he<ze;rt=he++){var gt=ae[he],Et=ae[rt];gt.y>m.y!=Et.y>m.y&&m.x<(Et.x-gt.x)*(m.y-gt.y)/(Et.y-gt.y)+gt.x&&(I=!I),V=Math.min(V,hg(m,gt,Et))}return(I?1:-1)*Math.sqrt(V)}function Uet(m){for(var y=0,I=0,V=0,$=m[0],ae=0,he=$.length,ze=he-1;ae<he;ze=ae++){var rt=$[ae],gt=$[ze],Et=rt.x*gt.y-gt.x*rt.y;I+=(rt.x+gt.x)*Et,V+=(rt.y+gt.y)*Et,y+=Et*3}return new i3(I/y,V/y,0,m)}var n3=7,pO=Number.POSITIVE_INFINITY;function YQ(m,y){function I($,ae){var he=0,ze=0;ae<0&&(ae=0);var rt=ae/Math.sqrt(2);switch($){case\"top-right\":case\"top-left\":ze=rt-n3;break;case\"bottom-right\":case\"bottom-left\":ze=-rt+n3;break;case\"bottom\":ze=-ae+n3;break;case\"top\":ze=ae-n3;break}switch($){case\"top-right\":case\"bottom-right\":he=-rt;break;case\"top-left\":case\"bottom-left\":he=rt;break;case\"left\":he=ae;break;case\"right\":he=-ae;break}return[he,ze]}function V($,ae,he){var ze=0,rt=0;switch(ae=Math.abs(ae),he=Math.abs(he),$){case\"top-right\":case\"top-left\":case\"top\":rt=he-n3;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":rt=-he+n3;break}switch($){case\"top-right\":case\"bottom-right\":case\"right\":ze=-ae;break;case\"top-left\":case\"bottom-left\":case\"left\":ze=ae;break}return[ze,rt]}return y[1]!==pO?V(m,y[0],y[1]):I(m,y[0])}function Vet(m,y,I,V,$,ae,he){m.createArrays();var ze=512*m.overscaling;m.tilePixelRatio=Ci/ze,m.compareText={},m.iconsNeedLinear=!1;var rt=m.layers[0].layout,gt=m.layers[0]._unevaluatedLayout._values,Et={};if(m.textSizeData.kind===\"composite\"){var or=m.textSizeData,_r=or.minZoom,pr=or.maxZoom;Et.compositeTextSizes=[gt[\"text-size\"].possiblyEvaluate(new Gn(_r),he),gt[\"text-size\"].possiblyEvaluate(new Gn(pr),he)]}if(m.iconSizeData.kind===\"composite\"){var Fr=m.iconSizeData,oi=Fr.minZoom,Hi=Fr.maxZoom;Et.compositeIconSizes=[gt[\"icon-size\"].possiblyEvaluate(new Gn(oi),he),gt[\"icon-size\"].possiblyEvaluate(new Gn(Hi),he)]}Et.layoutTextSize=gt[\"text-size\"].possiblyEvaluate(new Gn(m.zoom+1),he),Et.layoutIconSize=gt[\"icon-size\"].possiblyEvaluate(new Gn(m.zoom+1),he),Et.textMaxSize=gt[\"text-size\"].possiblyEvaluate(new Gn(18));for(var Ai=rt.get(\"text-line-height\")*Tn,bn=rt.get(\"text-rotation-alignment\")===\"map\"&&rt.get(\"symbol-placement\")!==\"point\",nn=rt.get(\"text-keep-upright\"),xn=rt.get(\"text-size\"),Pn=function(){var ha=ga[Zn],eo=rt.get(\"text-font\").evaluate(ha,{},he).join(\",\"),za=xn.evaluate(ha,{},he),Za=Et.layoutTextSize.evaluate(ha,{},he),Jo=Et.layoutIconSize.evaluate(ha,{},he),to={horizontal:{},vertical:void 0},ao=ha.text,_s=[0,0];if(ao){var jo=ao.toString(),El=rt.get(\"text-letter-spacing\").evaluate(ha,{},he)*Tn,Iu=gr(jo)?El:0,kl=rt.get(\"text-anchor\").evaluate(ha,{},he),Cl=rt.get(\"text-variable-anchor\");if(!Cl){var yl=rt.get(\"text-radial-offset\").evaluate(ha,{},he);yl?_s=YQ(kl,[yl*Tn,pO]):_s=rt.get(\"text-offset\").evaluate(ha,{},he).map(function(wy){return wy*Tn})}var Qu=bn?\"center\":rt.get(\"text-justify\").evaluate(ha,{},he),gc=rt.get(\"symbol-placement\"),Sf=gc===\"point\"?rt.get(\"text-max-width\").evaluate(ha,{},he)*Tn:0,Ff=function(){m.allowVerticalPlacement&&jt(jo)&&(to.vertical=Qw(ao,y,I,$,eo,Sf,Ai,kl,\"left\",Iu,_s,uv.vertical,!0,gc,Za,za))};if(!bn&&Cl){for(var $h=Qu===\"auto\"?Cl.map(function(wy){return gO(wy)}):[Qu],ch=!1,Wd=0;Wd<$h.length;Wd++){var Xd=$h[Wd];if(!to.horizontal[Xd])if(ch)to.horizontal[Xd]=to.horizontal[0];else{var Qh=Qw(ao,y,I,$,eo,Sf,Ai,\"center\",Xd,Iu,_s,uv.horizontal,!1,gc,Za,za);Qh&&(to.horizontal[Xd]=Qh,ch=Qh.positionedLines.length===1)}}Ff()}else{Qu===\"auto\"&&(Qu=gO(kl));var fv=Qw(ao,y,I,$,eo,Sf,Ai,kl,Qu,Iu,_s,uv.horizontal,!1,gc,Za,za);fv&&(to.horizontal[Qu]=fv),Ff(),jt(jo)&&bn&&nn&&(to.vertical=Qw(ao,y,I,$,eo,Sf,Ai,kl,Qu,Iu,_s,uv.vertical,!1,gc,Za,za))}}var hv=void 0,Ph=!1;if(ha.icon&&ha.icon.name){var dv=V[ha.icon.name];dv&&(hv=rp($[ha.icon.name],rt.get(\"icon-offset\").evaluate(ha,{},he),rt.get(\"icon-anchor\").evaluate(ha,{},he)),Ph=dv.sdf,m.sdfIcons===void 0?m.sdfIcons=dv.sdf:m.sdfIcons!==dv.sdf&&re(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),(dv.pixelRatio!==m.pixelRatio||rt.get(\"icon-rotate\").constantOr(1)!==0)&&(m.iconsNeedLinear=!0))}var bp=JQ(to.horizontal)||to.vertical;m.iconsInText=bp?bp.iconsInText:!1,(bp||hv)&&Get(m,ha,to,hv,V,Et,Za,Jo,_s,Ph,he)},Zn=0,ga=m.features;Zn<ga.length;Zn+=1)Pn();ae&&m.generateCollisionDebugBuffers()}function gO(m){switch(m){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function Get(m,y,I,V,$,ae,he,ze,rt,gt,Et){var or=ae.textMaxSize.evaluate(y,{});or===void 0&&(or=he);var _r=m.layers[0].layout,pr=_r.get(\"icon-offset\").evaluate(y,{},Et),Fr=JQ(I.horizontal),oi=24,Hi=he/oi,Ai=m.tilePixelRatio*Hi,bn=m.tilePixelRatio*or/oi,nn=m.tilePixelRatio*ze,xn=m.tilePixelRatio*_r.get(\"symbol-spacing\"),Pn=_r.get(\"text-padding\")*m.tilePixelRatio,Zn=_r.get(\"icon-padding\")*m.tilePixelRatio,ga=_r.get(\"text-max-angle\")/180*Math.PI,ha=_r.get(\"text-rotation-alignment\")===\"map\"&&_r.get(\"symbol-placement\")!==\"point\",eo=_r.get(\"icon-rotation-alignment\")===\"map\"&&_r.get(\"symbol-placement\")!==\"point\",za=_r.get(\"symbol-placement\"),Za=xn/2,Jo=_r.get(\"icon-text-fit\"),to;V&&Jo!==\"none\"&&(m.allowVerticalPlacement&&I.vertical&&(to=pm(V,I.vertical,Jo,_r.get(\"icon-text-fit-padding\"),pr,Hi)),Fr&&(V=pm(V,Fr,Jo,_r.get(\"icon-text-fit-padding\"),pr,Hi)));var ao=function(u3,y0){y0.x<0||y0.x>=Ci||y0.y<0||y0.y>=Ci||Het(m,y0,u3,I,V,$,to,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,Ai,Pn,ha,rt,nn,Zn,eo,pr,y,ae,gt,Et,he)};if(za===\"line\")for(var _s=0,jo=WQ(y.geometry,0,0,Ci,Ci);_s<jo.length;_s+=1)for(var El=jo[_s],Iu=Fet(El,xn,ga,I.vertical||Fr,V,oi,bn,m.overscaling,Ci),kl=0,Cl=Iu;kl<Cl.length;kl+=1){var yl=Cl[kl],Qu=Fr;(!Qu||!jet(m,Qu.text,Za,yl))&&ao(El,yl)}else if(za===\"line-center\")for(var gc=0,Sf=y.geometry;gc<Sf.length;gc+=1){var Ff=Sf[gc];if(Ff.length>1){var $h=Det(Ff,ga,I.vertical||Fr,V,oi,bn);$h&&ao(Ff,$h)}}else if(y.type===\"Polygon\")for(var ch=0,Wd=Ww(y.geometry,0);ch<Wd.length;ch+=1){var Xd=Wd[ch],Qh=qet(Xd,16);ao(Xd[0],new jd(Qh.x,Qh.y,0))}else if(y.type===\"LineString\")for(var fv=0,hv=y.geometry;fv<hv.length;fv+=1){var Ph=hv[fv];ao(Ph,new jd(Ph[0].x,Ph[0].y,0))}else if(y.type===\"Point\")for(var dv=0,bp=y.geometry;dv<bp.length;dv+=1)for(var wy=bp[dv],V1=0,G1=wy;V1<G1.length;V1+=1){var H1=G1[V1];ao([H1],new jd(H1.x,H1.y,0))}}var LS=255,N1=LS*Cd;function KQ(m,y,I,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr){var oi=zet(y,I,ze,$,ae,he,V,m.allowVerticalPlacement),Hi=m.textSizeData,Ai=null;Hi.kind===\"source\"?(Ai=[Cd*$.layout.get(\"text-size\").evaluate(he,{})],Ai[0]>N1&&re(m.layerIds[0]+': Value for \"text-size\" is >= '+LS+'. Reduce your \"text-size\".')):Hi.kind===\"composite\"&&(Ai=[Cd*pr.compositeTextSizes[0].evaluate(he,{},Fr),Cd*pr.compositeTextSizes[1].evaluate(he,{},Fr)],(Ai[0]>N1||Ai[1]>N1)&&re(m.layerIds[0]+': Value for \"text-size\" is >= '+LS+'. Reduce your \"text-size\".')),m.addSymbols(m.text,oi,Ai,ze,ae,he,gt,y,rt.lineStartIndex,rt.lineLength,_r,Fr);for(var bn=0,nn=Et;bn<nn.length;bn+=1){var xn=nn[bn];or[xn]=m.text.placedSymbolArray.length-1}return oi.length*4}function JQ(m){for(var y in m)return m[y];return null}function Het(m,y,I,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha){var eo,za=m.addToLineVertexArray(y,I),Za,Jo,to,ao,_s=0,jo=0,El=0,Iu=0,kl=-1,Cl=-1,yl={},Qu=K(\"\"),gc=0,Sf=0;if(ze._unevaluatedLayout.getValue(\"text-radial-offset\")===void 0?(eo=ze.layout.get(\"text-offset\").evaluate(xn,{},ga).map(function(RS){return RS*Tn}),gc=eo[0],Sf=eo[1]):(gc=ze.layout.get(\"text-radial-offset\").evaluate(xn,{},ga)*Tn,Sf=pO),m.allowVerticalPlacement&&V.vertical){var Ff=ze.layout.get(\"text-rotate\").evaluate(xn,{},ga),$h=Ff+90,ch=V.vertical;to=new s6(rt,y,gt,Et,or,ch,_r,pr,Fr,$h),he&&(ao=new s6(rt,y,gt,Et,or,he,Hi,Ai,Fr,$h))}if($){var Wd=ze.layout.get(\"icon-rotate\").evaluate(xn,{}),Xd=ze.layout.get(\"icon-text-fit\")!==\"none\",Qh=XQ($,Wd,Zn,Xd),fv=he?XQ(he,Wd,Zn,Xd):void 0;Jo=new s6(rt,y,gt,Et,or,$,Hi,Ai,!1,Wd),_s=Qh.length*4;var hv=m.iconSizeData,Ph=null;hv.kind===\"source\"?(Ph=[Cd*ze.layout.get(\"icon-size\").evaluate(xn,{})],Ph[0]>N1&&re(m.layerIds[0]+': Value for \"icon-size\" is >= '+LS+'. Reduce your \"icon-size\".')):hv.kind===\"composite\"&&(Ph=[Cd*Pn.compositeIconSizes[0].evaluate(xn,{},ga),Cd*Pn.compositeIconSizes[1].evaluate(xn,{},ga)],(Ph[0]>N1||Ph[1]>N1)&&re(m.layerIds[0]+': Value for \"icon-size\" is >= '+LS+'. Reduce your \"icon-size\".')),m.addSymbols(m.icon,Qh,Ph,nn,bn,xn,!1,y,za.lineStartIndex,za.lineLength,-1,ga),kl=m.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,m.addSymbols(m.icon,fv,Ph,nn,bn,xn,uv.vertical,y,za.lineStartIndex,za.lineLength,-1,ga),Cl=m.icon.placedSymbolArray.length-1)}for(var dv in V.horizontal){var bp=V.horizontal[dv];if(!Za){Qu=K(bp.text);var wy=ze.layout.get(\"text-rotate\").evaluate(xn,{},ga);Za=new s6(rt,y,gt,Et,or,bp,_r,pr,Fr,wy)}var V1=bp.positionedLines.length===1;if(El+=KQ(m,y,bp,ae,ze,Fr,xn,oi,za,V.vertical?uv.horizontal:uv.horizontalOnly,V1?Object.keys(V.horizontal):[dv],yl,kl,Pn,ga),V1)break}V.vertical&&(Iu+=KQ(m,y,V.vertical,ae,ze,Fr,xn,oi,za,uv.vertical,[\"vertical\"],yl,Cl,Pn,ga));var G1=Za?Za.boxStartIndex:m.collisionBoxArray.length,H1=Za?Za.boxEndIndex:m.collisionBoxArray.length,u3=to?to.boxStartIndex:m.collisionBoxArray.length,y0=to?to.boxEndIndex:m.collisionBoxArray.length,h6=Jo?Jo.boxStartIndex:m.collisionBoxArray.length,wO=Jo?Jo.boxEndIndex:m.collisionBoxArray.length,d6=ao?ao.boxStartIndex:m.collisionBoxArray.length,TO=ao?ao.boxEndIndex:m.collisionBoxArray.length,Hp=-1,c3=function(RS,dee){return RS&&RS.circleDiameter?Math.max(RS.circleDiameter,dee):dee};Hp=c3(Za,Hp),Hp=c3(to,Hp),Hp=c3(Jo,Hp),Hp=c3(ao,Hp);var v6=Hp>-1?1:0;v6&&(Hp*=ha/Tn),m.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&re(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),xn.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xn.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,G1,H1,u3,y0,h6,wO,d6,TO,gt,El,Iu,_s,jo,v6,0,_r,gc,Sf,Hp)}function jet(m,y,I,V){var $=m.compareText;if(!(y in $))$[y]=[];else for(var ae=$[y],he=ae.length-1;he>=0;he--)if(V.dist(ae[he])<I)return!0;return $[y].push(V),!1}var Wet=mg.VectorTileFeature.types,Xet=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function l6(m,y,I,V,$,ae,he,ze,rt,gt,Et,or,_r){var pr=ze?Math.min(N1,Math.round(ze[0])):0,Fr=ze?Math.min(N1,Math.round(ze[1])):0;m.emplaceBack(y,I,Math.round(V*32),Math.round($*32),ae,he,(pr<<1)+(rt?1:0),Fr,gt*16,Et*16,or*256,_r*256)}function mO(m,y,I){m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I),m.emplaceBack(y.x,y.y,I)}function Zet(m){for(var y=0,I=m.sections;y<I.length;y+=1){var V=I[y];if(Ii(V.text))return!0}return!1}var a3=function(y){this.layoutVertexArray=new Bn,this.indexArray=new pn,this.programConfigurations=y,this.segments=new io,this.dynamicLayoutVertexArray=new hi,this.opacityVertexArray=new li,this.placedSymbolArray=new zo};a3.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},a3.prototype.upload=function(y,I,V,$){this.isEmpty()||(V&&(this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,te.members),this.indexBuffer=y.createIndexBuffer(this.indexArray,I),this.dynamicLayoutVertexBuffer=y.createVertexBuffer(this.dynamicLayoutVertexArray,fe.members,!0),this.opacityVertexBuffer=y.createVertexBuffer(this.opacityVertexArray,Xet,!0),this.opacityVertexBuffer.itemSize=1),(V||$)&&this.programConfigurations.upload(y))},a3.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},X(\"SymbolBuffers\",a3);var PS=function(y,I,V){this.layoutVertexArray=new y,this.layoutAttributes=I,this.indexArray=new V,this.segments=new io,this.collisionVertexArray=new Ni};PS.prototype.upload=function(y){this.layoutVertexBuffer=y.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=y.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=y.createVertexBuffer(this.collisionVertexArray,Fe.members,!0)},PS.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},X(\"CollisionBuffers\",PS);var Pu=function(y){this.collisionBoxArray=y.collisionBoxArray,this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(rt){return rt.id}),this.index=y.index,this.pixelRatio=y.pixelRatio,this.sourceLayerIndex=y.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=dy([]),this.placementViewportMatrix=dy([]);var I=this.layers[0],V=I._unevaluatedLayout._values;this.textSizeData=xp(this.zoom,V[\"text-size\"]),this.iconSizeData=xp(this.zoom,V[\"icon-size\"]);var $=this.layers[0].layout,ae=$.get(\"symbol-sort-key\"),he=$.get(\"symbol-z-order\");this.canOverlap=$.get(\"text-allow-overlap\")||$.get(\"icon-allow-overlap\")||$.get(\"text-ignore-placement\")||$.get(\"icon-ignore-placement\"),this.sortFeaturesByKey=he!==\"viewport-y\"&&ae.constantOr(1)!==void 0;var ze=he===\"viewport-y\"||he===\"auto\"&&!this.sortFeaturesByKey;this.sortFeaturesByY=ze&&this.canOverlap,$.get(\"symbol-placement\")===\"point\"&&(this.writingModes=$.get(\"text-writing-mode\").map(function(rt){return uv[rt]})),this.stateDependentLayerIds=this.layers.filter(function(rt){return rt.isStateDependent()}).map(function(rt){return rt.id}),this.sourceID=y.sourceID};Pu.prototype.createArrays=function(){this.text=new a3(new fi(this.layers,this.zoom,function(y){return/^text/.test(y)})),this.icon=new a3(new fi(this.layers,this.zoom,function(y){return/^icon/.test(y)})),this.glyphOffsetArray=new Vl,this.lineVertexArray=new ss,this.symbolInstances=new al},Pu.prototype.calculateGlyphDependencies=function(y,I,V,$,ae){for(var he=0;he<y.length;he++)if(I[y.charCodeAt(he)]=!0,(V||$)&&ae){var ze=zi[y.charAt(he)];ze&&(I[ze.charCodeAt(0)]=!0)}},Pu.prototype.populate=function(y,I,V){var $=this.layers[0],ae=$.layout,he=ae.get(\"text-font\"),ze=ae.get(\"text-field\"),rt=ae.get(\"icon-image\"),gt=(ze.value.kind!==\"constant\"||ze.value.value instanceof $l&&!ze.value.value.isEmpty()||ze.value.value.toString().length>0)&&(he.value.kind!==\"constant\"||he.value.value.length>0),Et=rt.value.kind!==\"constant\"||!!rt.value.value||Object.keys(rt.parameters).length>0,or=ae.get(\"symbol-sort-key\");if(this.features=[],!(!gt&&!Et)){for(var _r=I.iconDependencies,pr=I.glyphDependencies,Fr=I.availableImages,oi=new Gn(this.zoom),Hi=0,Ai=y;Hi<Ai.length;Hi+=1){var bn=Ai[Hi],nn=bn.feature,xn=bn.id,Pn=bn.index,Zn=bn.sourceLayerIndex,ga=$._featureFilter.needGeometry,ha=Ja(nn,ga);if($._featureFilter.filter(oi,ha,V)){ga||(ha.geometry=zn(nn));var eo=void 0;if(gt){var za=$.getValueAndResolveTokens(\"text-field\",ha,V,Fr),Za=$l.factory(za);Zet(Za)&&(this.hasRTLText=!0),(!this.hasRTLText||yo()===\"unavailable\"||this.hasRTLText&&Ms.isParsed())&&(eo=yi(Za,$,ha))}var Jo=void 0;if(Et){var to=$.getValueAndResolveTokens(\"icon-image\",ha,V,Fr);to instanceof fl?Jo=to:Jo=fl.fromString(to)}if(!(!eo&&!Jo)){var ao=this.sortFeaturesByKey?or.evaluate(ha,{},V):void 0,_s={id:xn,text:eo,icon:Jo,index:Pn,sourceLayerIndex:Zn,geometry:ha.geometry,properties:nn.properties,type:Wet[nn.type],sortKey:ao};if(this.features.push(_s),Jo&&(_r[Jo.name]=!0),eo){var jo=he.evaluate(ha,{},V).join(\",\"),El=ae.get(\"text-rotation-alignment\")===\"map\"&&ae.get(\"symbol-placement\")!==\"point\";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(uv.vertical)>=0;for(var Iu=0,kl=eo.sections;Iu<kl.length;Iu+=1){var Cl=kl[Iu];if(Cl.image)_r[Cl.image.name]=!0;else{var yl=jt(eo.toString()),Qu=Cl.fontStack||jo,gc=pr[Qu]=pr[Qu]||{};this.calculateGlyphDependencies(Cl.text,gc,El,this.allowVerticalPlacement,yl)}}}}}}ae.get(\"symbol-placement\")===\"line\"&&(this.features=vn(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Sf,Ff){return Sf.sortKey-Ff.sortKey})}},Pu.prototype.update=function(y,I,V){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(y,I,this.layers,V),this.icon.programConfigurations.updatePaintArrays(y,I,this.layers,V))},Pu.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Pu.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Pu.prototype.upload=function(y){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(y),this.iconCollisionBox.upload(y)),this.text.upload(y,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(y,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Pu.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Pu.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Pu.prototype.addToLineVertexArray=function(y,I){var V=this.lineVertexArray.length;if(y.segment!==void 0){for(var $=y.dist(I[y.segment+1]),ae=y.dist(I[y.segment]),he={},ze=y.segment+1;ze<I.length;ze++)he[ze]={x:I[ze].x,y:I[ze].y,tileUnitDistanceFromAnchor:$},ze<I.length-1&&($+=I[ze+1].dist(I[ze]));for(var rt=y.segment||0;rt>=0;rt--)he[rt]={x:I[rt].x,y:I[rt].y,tileUnitDistanceFromAnchor:ae},rt>0&&(ae+=I[rt-1].dist(I[rt]));for(var gt=0;gt<I.length;gt++){var Et=he[gt];this.lineVertexArray.emplaceBack(Et.x,Et.y,Et.tileUnitDistanceFromAnchor)}}return{lineStartIndex:V,lineLength:this.lineVertexArray.length-V}},Pu.prototype.addSymbols=function(y,I,V,$,ae,he,ze,rt,gt,Et,or,_r){for(var pr=y.indexArray,Fr=y.layoutVertexArray,oi=y.segments.prepareSegment(4*I.length,Fr,pr,this.canOverlap?he.sortKey:void 0),Hi=this.glyphOffsetArray.length,Ai=oi.vertexLength,bn=this.allowVerticalPlacement&&ze===uv.vertical?Math.PI/2:0,nn=he.text&&he.text.sections,xn=0;xn<I.length;xn++){var Pn=I[xn],Zn=Pn.tl,ga=Pn.tr,ha=Pn.bl,eo=Pn.br,za=Pn.tex,Za=Pn.pixelOffsetTL,Jo=Pn.pixelOffsetBR,to=Pn.minFontScaleX,ao=Pn.minFontScaleY,_s=Pn.glyphOffset,jo=Pn.isSDF,El=Pn.sectionIndex,Iu=oi.vertexLength,kl=_s[1];l6(Fr,rt.x,rt.y,Zn.x,kl+Zn.y,za.x,za.y,V,jo,Za.x,Za.y,to,ao),l6(Fr,rt.x,rt.y,ga.x,kl+ga.y,za.x+za.w,za.y,V,jo,Jo.x,Za.y,to,ao),l6(Fr,rt.x,rt.y,ha.x,kl+ha.y,za.x,za.y+za.h,V,jo,Za.x,Jo.y,to,ao),l6(Fr,rt.x,rt.y,eo.x,kl+eo.y,za.x+za.w,za.y+za.h,V,jo,Jo.x,Jo.y,to,ao),mO(y.dynamicLayoutVertexArray,rt,bn),pr.emplaceBack(Iu,Iu+1,Iu+2),pr.emplaceBack(Iu+1,Iu+2,Iu+3),oi.vertexLength+=4,oi.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_s[0]),(xn===I.length-1||El!==I[xn+1].sectionIndex)&&y.programConfigurations.populatePaintArrays(Fr.length,he,he.index,{},_r,nn&&nn[El])}y.placedSymbolArray.emplaceBack(rt.x,rt.y,Hi,this.glyphOffsetArray.length-Hi,Ai,gt,Et,rt.segment,V?V[0]:0,V?V[1]:0,$[0],$[1],ze,0,!1,0,or)},Pu.prototype._addCollisionDebugVertex=function(y,I,V,$,ae,he){return I.emplaceBack(0,0),y.emplaceBack(V.x,V.y,$,ae,Math.round(he.x),Math.round(he.y))},Pu.prototype.addCollisionDebugVertices=function(y,I,V,$,ae,he,ze){var rt=ae.segments.prepareSegment(4,ae.layoutVertexArray,ae.indexArray),gt=rt.vertexLength,Et=ae.layoutVertexArray,or=ae.collisionVertexArray,_r=ze.anchorX,pr=ze.anchorY;this._addCollisionDebugVertex(Et,or,he,_r,pr,new u(y,I)),this._addCollisionDebugVertex(Et,or,he,_r,pr,new u(V,I)),this._addCollisionDebugVertex(Et,or,he,_r,pr,new u(V,$)),this._addCollisionDebugVertex(Et,or,he,_r,pr,new u(y,$)),rt.vertexLength+=4;var Fr=ae.indexArray;Fr.emplaceBack(gt,gt+1),Fr.emplaceBack(gt+1,gt+2),Fr.emplaceBack(gt+2,gt+3),Fr.emplaceBack(gt+3,gt),rt.primitiveLength+=4},Pu.prototype.addDebugCollisionBoxes=function(y,I,V,$){for(var ae=y;ae<I;ae++){var he=this.collisionBoxArray.get(ae),ze=he.x1,rt=he.y1,gt=he.x2,Et=he.y2;this.addCollisionDebugVertices(ze,rt,gt,Et,$?this.textCollisionBox:this.iconCollisionBox,he.anchorPoint,V)}},Pu.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new PS(Ji,ct.members,oa),this.iconCollisionBox=new PS(Ji,ct.members,oa);for(var y=0;y<this.symbolInstances.length;y++){var I=this.symbolInstances.get(y);this.addDebugCollisionBoxes(I.textBoxStartIndex,I.textBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.verticalTextBoxStartIndex,I.verticalTextBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.iconBoxStartIndex,I.iconBoxEndIndex,I,!1),this.addDebugCollisionBoxes(I.verticalIconBoxStartIndex,I.verticalIconBoxEndIndex,I,!1)}},Pu.prototype._deserializeCollisionBoxesForSymbol=function(y,I,V,$,ae,he,ze,rt,gt){for(var Et={},or=I;or<V;or++){var _r=y.get(or);Et.textBox={x1:_r.x1,y1:_r.y1,x2:_r.x2,y2:_r.y2,anchorPointX:_r.anchorPointX,anchorPointY:_r.anchorPointY},Et.textFeatureIndex=_r.featureIndex;break}for(var pr=$;pr<ae;pr++){var Fr=y.get(pr);Et.verticalTextBox={x1:Fr.x1,y1:Fr.y1,x2:Fr.x2,y2:Fr.y2,anchorPointX:Fr.anchorPointX,anchorPointY:Fr.anchorPointY},Et.verticalTextFeatureIndex=Fr.featureIndex;break}for(var oi=he;oi<ze;oi++){var Hi=y.get(oi);Et.iconBox={x1:Hi.x1,y1:Hi.y1,x2:Hi.x2,y2:Hi.y2,anchorPointX:Hi.anchorPointX,anchorPointY:Hi.anchorPointY},Et.iconFeatureIndex=Hi.featureIndex;break}for(var Ai=rt;Ai<gt;Ai++){var bn=y.get(Ai);Et.verticalIconBox={x1:bn.x1,y1:bn.y1,x2:bn.x2,y2:bn.y2,anchorPointX:bn.anchorPointX,anchorPointY:bn.anchorPointY},Et.verticalIconFeatureIndex=bn.featureIndex;break}return Et},Pu.prototype.deserializeCollisionBoxes=function(y){this.collisionArrays=[];for(var I=0;I<this.symbolInstances.length;I++){var V=this.symbolInstances.get(I);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(y,V.textBoxStartIndex,V.textBoxEndIndex,V.verticalTextBoxStartIndex,V.verticalTextBoxEndIndex,V.iconBoxStartIndex,V.iconBoxEndIndex,V.verticalIconBoxStartIndex,V.verticalIconBoxEndIndex))}},Pu.prototype.hasTextData=function(){return this.text.segments.get().length>0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(y,I){for(var V=y.placedSymbolArray.get(I),$=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae<$;ae+=4)y.indexArray.emplaceBack(ae,ae+1,ae+2),y.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(y){if(this.sortedAngle===y&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(y),V=Math.cos(y),$=[],ae=[],he=[],ze=0;ze<this.symbolInstances.length;++ze){he.push(ze);var rt=this.symbolInstances.get(ze);$.push(Math.round(I*rt.anchorX+V*rt.anchorY)|0),ae.push(rt.featureIndex)}return he.sort(function(gt,Et){return $[gt]-$[Et]||ae[Et]-ae[gt]}),he},Pu.prototype.addToSortKeyRanges=function(y,I){var V=this.sortKeyRanges[this.sortKeyRanges.length-1];V&&V.sortKey===I?V.symbolInstanceEnd=y+1:this.sortKeyRanges.push({sortKey:I,symbolInstanceStart:y,symbolInstanceEnd:y+1})},Pu.prototype.sortFeatures=function(y){var I=this;if(this.sortFeaturesByY&&this.sortedAngle!==y&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(y),this.sortedAngle=y,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,$=this.symbolInstanceIndexes;V<$.length;V+=1){var ae=$[V],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(ze,rt,gt){ze>=0&&gt.indexOf(ze)===rt&&I.addIndicesForPlacedSymbol(I.text,ze)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X(\"SymbolBucket\",Pu,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=mO;function Yet(m,y){return y.replace(/{([^{}]+)}/g,function(I,V){return V in m?String(m[V]):\"\"})}var Ket=new Nr({\"symbol-placement\":new Me(Rn.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new Me(Rn.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new Me(Rn.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new bt(Rn.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new Me(Rn.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new Me(Rn.layout_symbol[\"icon-allow-overlap\"]),\"icon-ignore-placement\":new Me(Rn.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new Me(Rn.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new Me(Rn.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new bt(Rn.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new Me(Rn.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new Me(Rn.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new bt(Rn.layout_symbol[\"icon-image\"]),\"icon-rotate\":new bt(Rn.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new Me(Rn.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new Me(Rn.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new bt(Rn.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new bt(Rn.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new Me(Rn.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new Me(Rn.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new Me(Rn.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new bt(Rn.layout_symbol[\"text-field\"]),\"text-font\":new bt(Rn.layout_symbol[\"text-font\"]),\"text-size\":new bt(Rn.layout_symbol[\"text-size\"]),\"text-max-width\":new bt(Rn.layout_symbol[\"text-max-width\"]),\"text-line-height\":new Me(Rn.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new bt(Rn.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new bt(Rn.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new bt(Rn.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new Me(Rn.layout_symbol[\"text-variable-anchor\"]),\"text-anchor\":new bt(Rn.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new Me(Rn.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new Me(Rn.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new bt(Rn.layout_symbol[\"text-rotate\"]),\"text-padding\":new Me(Rn.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new Me(Rn.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new bt(Rn.layout_symbol[\"text-transform\"]),\"text-offset\":new bt(Rn.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new Me(Rn.layout_symbol[\"text-allow-overlap\"]),\"text-ignore-placement\":new Me(Rn.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new Me(Rn.layout_symbol[\"text-optional\"])}),Jet=new Nr({\"icon-opacity\":new bt(Rn.paint_symbol[\"icon-opacity\"]),\"icon-color\":new bt(Rn.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new bt(Rn.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new bt(Rn.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new bt(Rn.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new Me(Rn.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new Me(Rn.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new bt(Rn.paint_symbol[\"text-opacity\"]),\"text-color\":new bt(Rn.paint_symbol[\"text-color\"],{runtimeType:ql,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),\"text-halo-color\":new bt(Rn.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new bt(Rn.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new bt(Rn.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new Me(Rn.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new Me(Rn.paint_symbol[\"text-translate-anchor\"])}),yO={paint:Jet,layout:Ket},o3=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:ac,this.defaultValue=y};o3.prototype.evaluate=function(y){if(y.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(y.formattedSection))return I.getOverride(y.formattedSection)}return y.feature&&y.featureState?this.defaultValue.evaluate(y.feature,y.featureState):this.defaultValue.property.specification.default},o3.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},o3.prototype.outputDefined=function(){return!1},o3.prototype.serialize=function(){return null},X(\"FormatSectionOverride\",o3,{omit:[\"defaultValue\"]});var $et=function(m){function y(I){m.call(this,I,yO)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(V,$){if(m.prototype.recalculate.call(this,V,$),this.layout.get(\"icon-rotation-alignment\")===\"auto\"&&(this.layout.get(\"symbol-placement\")!==\"point\"?this.layout._values[\"icon-rotation-alignment\"]=\"map\":this.layout._values[\"icon-rotation-alignment\"]=\"viewport\"),this.layout.get(\"text-rotation-alignment\")===\"auto\"&&(this.layout.get(\"symbol-placement\")!==\"point\"?this.layout._values[\"text-rotation-alignment\"]=\"map\":this.layout._values[\"text-rotation-alignment\"]=\"viewport\"),this.layout.get(\"text-pitch-alignment\")===\"auto\"&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")),this.layout.get(\"icon-pitch-alignment\")===\"auto\"&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\")),this.layout.get(\"symbol-placement\")===\"point\"){var ae=this.layout.get(\"text-writing-mode\");if(ae){for(var he=[],ze=0,rt=ae;ze<rt.length;ze+=1){var gt=rt[ze];he.indexOf(gt)<0&&he.push(gt)}this.layout._values[\"text-writing-mode\"]=he}else this.layout._values[\"text-writing-mode\"]=[\"horizontal\"]}this._setPaintOverrides()},y.prototype.getValueAndResolveTokens=function(V,$,ae,he){var ze=this.layout.get(V).evaluate($,{},ae,he),rt=this._unevaluatedLayout._values[V];return!rt.isDataDriven()&&!Ua(rt.value)&&ze?Yet($.properties,ze):ze},y.prototype.createBucket=function(V){return new Pu(V)},y.prototype.queryRadius=function(){return 0},y.prototype.queryIntersectsFeature=function(){return!1},y.prototype._setPaintOverrides=function(){for(var V=0,$=yO.paint.overridableProperties;V<$.length;V+=1){var ae=$[V];if(y.hasPaintOverride(this.layout,ae)){var he=this.paint.get(ae),ze=new o3(he),rt=new Ac(ze,he.property.specification),gt=null;he.value.kind===\"constant\"||he.value.kind===\"source\"?gt=new Vc(\"source\",rt):gt=new hc(\"composite\",rt,he.value.zoomStops,he.value._interpolationType),this.paint._values[ae]=new dl(he.property,gt,he.parameters)}}},y.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!this.layout||$.isDataDriven()||ae.isDataDriven()?!1:y.hasPaintOverride(this.layout,V)},y.hasPaintOverride=function(V,$){var ae=V.get(\"text-field\"),he=yO.paint.properties[$],ze=!1,rt=function(or){for(var _r=0,pr=or;_r<pr.length;_r+=1){var Fr=pr[_r];if(he.overrides&&he.overrides.hasOverride(Fr)){ze=!0;return}}};if(ae.value.kind===\"constant\"&&ae.value.value instanceof $l)rt(ae.value.value.sections);else if(ae.value.kind===\"source\"){var gt=function(or){if(!ze)if(or instanceof Go&&Es(or.value)===pl){var _r=or.value;rt(_r.sections)}else or instanceof Gu?rt(or.sections):or.eachChild(gt)},Et=ae.value;Et._styleExpression&&gt(Et._styleExpression.expression)}return ze},y}(mi),Qet=new Nr({\"background-color\":new Me(Rn.paint_background[\"background-color\"]),\"background-pattern\":new Rr(Rn.paint_background[\"background-pattern\"]),\"background-opacity\":new Me(Rn.paint_background[\"background-opacity\"])}),ett={paint:Qet},ttt=function(m){function y(I){m.call(this,I,ett)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(mi),rtt=new Nr({\"raster-opacity\":new Me(Rn.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new Me(Rn.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new Me(Rn.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new Me(Rn.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new Me(Rn.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new Me(Rn.paint_raster[\"raster-contrast\"]),\"raster-resampling\":new Me(Rn.paint_raster[\"raster-resampling\"]),\"raster-fade-duration\":new Me(Rn.paint_raster[\"raster-fade-duration\"])}),itt={paint:rtt},ntt=function(m){function y(I){m.call(this,I,itt)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(mi);function att(m){var y=[],I=m.id;return I===void 0&&y.push({message:\"layers.\"+I+': missing required property \"id\"'}),m.render===void 0&&y.push({message:\"layers.\"+I+': missing required method \"render\"'}),m.renderingMode&&m.renderingMode!==\"2d\"&&m.renderingMode!==\"3d\"&&y.push({message:\"layers.\"+I+': property \"renderingMode\" must be either \"2d\" or \"3d\"'}),y}var ott=function(m){function y(I){m.call(this,I,{}),this.implementation=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.is3D=function(){return this.implementation.renderingMode===\"3d\"},y.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},y.prototype.recalculate=function(){},y.prototype.updateTransitions=function(){},y.prototype.hasTransition=function(){},y.prototype.serialize=function(){},y.prototype.onAdd=function(V){this.implementation.onAdd&&this.implementation.onAdd(V,V.painter.context.gl)},y.prototype.onRemove=function(V){this.implementation.onRemove&&this.implementation.onRemove(V,V.painter.context.gl)},y}(mi),stt={circle:Y9,heatmap:Uw,hillshade:kC,fill:lb,\"fill-extrusion\":vm,line:S,symbol:$et,background:ttt,raster:ntt};function ltt(m){return m.type===\"custom\"?new ott(m):new stt[m.type](m)}var $Q=f.HTMLImageElement,QQ=f.HTMLCanvasElement,eee=f.HTMLVideoElement,tee=f.ImageData,u6=f.ImageBitmap,hb=function(y,I,V,$){this.context=y,this.format=V,this.texture=y.gl.createTexture(),this.update(I,$)};hb.prototype.update=function(y,I,V){var $=y.width,ae=y.height,he=(!this.size||this.size[0]!==$||this.size[1]!==ae)&&!V,ze=this,rt=ze.context,gt=rt.gl;if(this.useMipmap=!!(I&&I.useMipmap),gt.bindTexture(gt.TEXTURE_2D,this.texture),rt.pixelStoreUnpackFlipY.set(!1),rt.pixelStoreUnpack.set(1),rt.pixelStoreUnpackPremultiplyAlpha.set(this.format===gt.RGBA&&(!I||I.premultiply!==!1)),he)this.size=[$,ae],y instanceof $Q||y instanceof QQ||y instanceof eee||y instanceof tee||u6&&y instanceof u6?gt.texImage2D(gt.TEXTURE_2D,0,this.format,this.format,gt.UNSIGNED_BYTE,y):gt.texImage2D(gt.TEXTURE_2D,0,this.format,$,ae,0,this.format,gt.UNSIGNED_BYTE,y.data);else{var Et=V||{x:0,y:0},or=Et.x,_r=Et.y;y instanceof $Q||y instanceof QQ||y instanceof eee||y instanceof tee||u6&&y instanceof u6?gt.texSubImage2D(gt.TEXTURE_2D,0,or,_r,gt.RGBA,gt.UNSIGNED_BYTE,y):gt.texSubImage2D(gt.TEXTURE_2D,0,or,_r,$,ae,gt.RGBA,gt.UNSIGNED_BYTE,y.data)}this.useMipmap&&this.isSizePowerOfTwo()&&gt.generateMipmap(gt.TEXTURE_2D)},hb.prototype.bind=function(y,I,V){var $=this,ae=$.context,he=ae.gl;he.bindTexture(he.TEXTURE_2D,this.texture),V===he.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(V=he.LINEAR),y!==this.filter&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MAG_FILTER,y),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MIN_FILTER,V||y),this.filter=y),I!==this.wrap&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_S,I),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_T,I),this.wrap=I)},hb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},hb.prototype.destroy=function(){var y=this.context,I=y.gl;I.deleteTexture(this.texture),this.texture=null};var _O=function(y){var I=this;this._callback=y,this._triggered=!1,typeof MessageChannel!=\"undefined\"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){I._triggered=!1,I._callback()})};_O.prototype.trigger=function(){var y=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){y._triggered=!1,y._callback()},0))},_O.prototype.remove=function(){delete this._channel,this._callback=function(){}};var s3=function(y,I,V){this.target=y,this.parent=I,this.mapId=V,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},O([\"receive\",\"process\"],this),this.invoker=new _O(this.process),this.target.addEventListener(\"message\",this.receive,!1),this.globalScope=Le()?y:f};s3.prototype.send=function(y,I,V,$,ae){var he=this;ae===void 0&&(ae=!1);var ze=Math.round(Math.random()*1e18).toString(36).substring(0,10);V&&(this.callbacks[ze]=V);var rt=Se(this.globalScope)?void 0:[];return this.target.postMessage({id:ze,type:y,hasCallback:!!V,targetMapId:$,mustQueue:ae,sourceMapId:this.mapId,data:He(I,rt)},rt),{cancel:function(){V&&delete he.callbacks[ze],he.target.postMessage({id:ze,type:\"<cancel>\",targetMapId:$,sourceMapId:he.mapId})}}},s3.prototype.receive=function(y){var I=y.data,V=I.id;if(V&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===\"<cancel>\"){delete this.tasks[V];var $=this.cancelCallbacks[V];delete this.cancelCallbacks[V],$&&$()}else Le()||I.mustQueue?(this.tasks[V]=I,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,I)},s3.prototype.process=function(){if(this.taskQueue.length){var y=this.taskQueue.shift(),I=this.tasks[y];delete this.tasks[y],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(y,I)}},s3.prototype.processTask=function(y,I){var V=this;if(I.type===\"<response>\"){var $=this.callbacks[y];delete this.callbacks[y],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],ze=I.hasCallback?function(_r,pr){ae=!0,delete V.cancelCallbacks[y],V.target.postMessage({id:y,type:\"<response>\",sourceMapId:V.mapId,error:_r?He(_r):null,data:He(pr,he)},he)}:function(_r){ae=!0},rt=null,gt=Ye(I.data);if(this.parent[I.type])rt=this.parent[I.type](I.sourceMapId,gt,ze);else if(this.parent.getWorkerSource){var Et=I.type.split(\".\"),or=this.parent.getWorkerSource(I.sourceMapId,Et[0],gt.source);rt=or[Et[1]](gt,ze)}else ze(new Error(\"Could not find function \"+I.type));!ae&&rt&&rt.cancel&&(this.cancelCallbacks[y]=rt.cancel)}},s3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener(\"message\",this.receive,!1)};function utt(m,y,I){y=Math.pow(2,I)-y-1;var V=ree(m*256,y*256,I),$=ree((m+1)*256,(y+1)*256,I);return V[0]+\",\"+V[1]+\",\"+$[0]+\",\"+$[1]}function ree(m,y,I){var V=2*Math.PI*6378137/256/Math.pow(2,I),$=m*V-2*Math.PI*6378137/2,ae=y*V-2*Math.PI*6378137/2;return[$,ae]}var lh=function(y,I){y&&(I?this.setSouthWest(y).setNorthEast(I):y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1]))};lh.prototype.setNorthEast=function(y){return this._ne=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.setSouthWest=function(y){return this._sw=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.extend=function(y){var I=this._sw,V=this._ne,$,ae;if(y instanceof Hc)$=y,ae=y;else if(y instanceof lh){if($=y._sw,ae=y._ne,!$||!ae)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var he=y;return this.extend(lh.convert(he))}else{var ze=y;return this.extend(Hc.convert(ze))}return this}return!I&&!V?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(y){var I=Hc.convert(y),V=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=V&&V>=this._ne.lng),ae&&he},lh.convert=function(y){return!y||y instanceof lh?y:new lh(y)};var iee=63710088e-1,Hc=function(y,I){if(isNaN(y)||isNaN(I))throw new Error(\"Invalid LngLat object: (\"+y+\", \"+I+\")\");if(this.lng=+y,this.lat=+I,this.lat>90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},Hc.prototype.distanceTo=function(y){var I=Math.PI/180,V=this.lat*I,$=y.lat*I,ae=Math.sin(V)*Math.sin($)+Math.cos(V)*Math.cos($)*Math.cos((y.lng-this.lng)*I),he=iee*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,V=360*y/I,$=V/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-V),new Hc(this.lng+$,this.lat+V))},Hc.convert=function(y){if(y instanceof Hc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new Hc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y==\"object\"&&y!==null)return new Hc(Number(\"lng\"in y?y.lng:y.lon),Number(y.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")};var nee=2*Math.PI*iee;function aee(m){return nee*Math.cos(m*Math.PI/180)}function oee(m){return(180+m)/360}function see(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function lee(m,y){return m/aee(y)}function ctt(m){return m*360-180}function xO(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function ftt(m,y){return m*aee(xO(y))}function htt(m){return 1/Math.cos(m*Math.PI/180)}var db=function(y,I,V){V===void 0&&(V=0),this.x=+y,this.y=+I,this.z=+V};db.fromLngLat=function(y,I){I===void 0&&(I=0);var V=Hc.convert(y);return new db(oee(V.lng),see(V.lat),lee(I,V.lat))},db.prototype.toLngLat=function(){return new Hc(ctt(this.x),xO(this.y))},db.prototype.toAltitude=function(){return ftt(this.z,this.y)},db.prototype.meterInMercatorCoordinateUnits=function(){return 1/nee*htt(xO(this.y))};var vb=function(y,I,V){this.z=y,this.x=I,this.y=V,this.key=IS(0,y,y,I,V)};vb.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},vb.prototype.url=function(y,I){var V=utt(this.x,this.y,this.z),$=dtt(this.z,this.x,this.y);return y[(this.x+this.y)%y.length].replace(\"{prefix}\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\"{z}\",String(this.z)).replace(\"{x}\",String(this.x)).replace(\"{y}\",String(I===\"tms\"?Math.pow(2,this.z)-this.y-1:this.y)).replace(\"{quadkey}\",$).replace(\"{bbox-epsg-3857}\",V)},vb.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*Ci,(y.y*I-this.y)*Ci)},vb.prototype.toString=function(){return this.z+\"/\"+this.x+\"/\"+this.y};var uee=function(y,I){this.wrap=y,this.canonical=I,this.key=IS(y,I.z,I.z,I.x,I.y)},uh=function(y,I,V,$,ae){this.overscaledZ=y,this.wrap=I,this.canonical=new vb(V,+$,+ae),this.key=IS(I,y,V,$,ae)};uh.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},uh.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new uh(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(y,I){var V=this.canonical.z-y;return y>this.canonical.z?IS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):IS(this.wrap*+I,y,y,this.canonical.x>>V,this.canonical.y>>V)},uh.prototype.isChildOf=function(y){if(y.wrap!==this.wrap)return!1;var I=this.canonical.z-y.canonical.z;return y.overscaledZ===0||y.overscaledZ<this.overscaledZ&&y.canonical.x===this.canonical.x>>I&&y.canonical.y===this.canonical.y>>I},uh.prototype.children=function(y){if(this.overscaledZ>=y)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,V=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,V,$),new uh(I,this.wrap,I,V+1,$),new uh(I,this.wrap,I,V,$+1),new uh(I,this.wrap,I,V+1,$+1)]},uh.prototype.isLessThan=function(y){return this.wrap<y.wrap?!0:this.wrap>y.wrap?!1:this.overscaledZ<y.overscaledZ?!0:this.overscaledZ>y.overscaledZ?!1:this.canonical.x<y.canonical.x?!0:this.canonical.x>y.canonical.x?!1:this.canonical.y<y.canonical.y},uh.prototype.wrapped=function(){return new uh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.unwrapTo=function(y){return new uh(this.overscaledZ,y,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},uh.prototype.toUnwrapped=function(){return new uee(this.wrap,this.canonical)},uh.prototype.toString=function(){return this.overscaledZ+\"/\"+this.canonical.x+\"/\"+this.canonical.y},uh.prototype.getTilePoint=function(y){return this.canonical.getTilePoint(new db(y.x-this.wrap,y.y))};function IS(m,y,I,V,$){m*=2,m<0&&(m=m*-1-1);var ae=1<<I;return(ae*ae*m+ae*$+V).toString(36)+I.toString(36)+y.toString(36)}function dtt(m,y,I){for(var V=\"\",$,ae=m;ae>0;ae--)$=1<<ae-1,V+=(y&$?1:0)+(I&$?2:0);return V}X(\"CanonicalTileID\",vb),X(\"OverscaledTileID\",uh,{omit:[\"posMatrix\"]});var xy=function(y,I,V){if(this.uid=y,I.height!==I.width)throw new RangeError(\"DEM tiles must be square\");if(V&&V!==\"mapbox\"&&V!==\"terrarium\")return re('\"'+V+'\" is not a valid encoding type. Valid types include \"mapbox\" and \"terrarium\".');this.stride=I.height;var $=this.dim=I.height-2;this.data=new Uint32Array(I.data.buffer),this.encoding=V||\"mapbox\";for(var ae=0;ae<$;ae++)this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae)],this.data[this._idx($,ae)]=this.data[this._idx($-1,ae)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae,0)],this.data[this._idx(ae,$)]=this.data[this._idx(ae,$-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx($,-1)]=this.data[this._idx($-1,0)],this.data[this._idx(-1,$)]=this.data[this._idx(0,$-1)],this.data[this._idx($,$)]=this.data[this._idx($-1,$-1)]};xy.prototype.get=function(y,I){var V=new Uint8Array(this.data.buffer),$=this._idx(y,I)*4,ae=this.encoding===\"terrarium\"?this._unpackTerrarium:this._unpackMapbox;return ae(V[$],V[$+1],V[$+2])},xy.prototype.getUnpackVector=function(){return this.encoding===\"terrarium\"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},xy.prototype._idx=function(y,I){if(y<-1||y>=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(I+1)*this.stride+(y+1)},xy.prototype._unpackMapbox=function(y,I,V){return(y*256*256+I*256+V)/10-1e4},xy.prototype._unpackTerrarium=function(y,I,V){return y*256+I+V/256-32768},xy.prototype.getPixels=function(){return new Eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xy.prototype.backfillBorder=function(y,I,V){if(this.dim!==y.dim)throw new Error(\"dem dimension mismatch\");var $=I*this.dim,ae=I*this.dim+this.dim,he=V*this.dim,ze=V*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(V){case-1:he=ze-1;break;case 1:ze=he+1;break}for(var rt=-I*this.dim,gt=-V*this.dim,Et=he;Et<ze;Et++)for(var or=$;or<ae;or++)this.data[this._idx(or,Et)]=y.data[this._idx(or+rt,Et+gt)]},X(\"DEMData\",xy);function vtt(m,y){var I={};if(!y)return I;for(var V=function(){var he=ae[$],ze=he.layerIds.map(function(or){return y.getLayer(or)}).filter(Boolean);if(ze.length!==0){he.layers=ze,he.stateDependentLayerIds&&(he.stateDependentLayers=he.stateDependentLayerIds.map(function(or){return ze.filter(function(_r){return _r.id===or})[0]}));for(var rt=0,gt=ze;rt<gt.length;rt+=1){var Et=gt[rt];I[Et.id]=he}}},$=0,ae=m;$<ae.length;$+=1)V();return I}var c6=function(y){this._stringToNumber={},this._numberToString=[];for(var I=0;I<y.length;I++){var V=y[I];this._stringToNumber[V]=I,this._numberToString[I]=V}};c6.prototype.encode=function(y){return this._stringToNumber[y]},c6.prototype.decode=function(y){return this._numberToString[y]};var f6=function(y,I,V,$,ae){this.type=\"Feature\",this._vectorTileFeature=y,y._z=I,y._x=V,y._y=$,this.properties=y.properties,this.id=ae},bO={geometry:{configurable:!0}};bO.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},bO.geometry.set=function(m){this._geometry=m},f6.prototype.toJSON=function(){var y={geometry:this.geometry};for(var I in this)I===\"_geometry\"||I===\"_vectorTileFeature\"||(y[I]=this[I]);return y},Object.defineProperties(f6.prototype,bO);var l3=function(){this.state={},this.stateChanges={},this.deletedStates={}};l3.prototype.updateState=function(y,I,V){var $=String(I);if(this.stateChanges[y]=this.stateChanges[y]||{},this.stateChanges[y][$]=this.stateChanges[y][$]||{},x(this.stateChanges[y][$],V),this.deletedStates[y]===null){this.deletedStates[y]={};for(var ae in this.state[y])ae!==$&&(this.deletedStates[y][ae]=null)}else{var he=this.deletedStates[y]&&this.deletedStates[y][$]===null;if(he){this.deletedStates[y][$]={};for(var ze in this.state[y][$])V[ze]||(this.deletedStates[y][$][ze]=null)}else for(var rt in V){var gt=this.deletedStates[y]&&this.deletedStates[y][$]&&this.deletedStates[y][$][rt]===null;gt&&delete this.deletedStates[y][$][rt]}}},l3.prototype.removeFeatureState=function(y,I,V){var $=this.deletedStates[y]===null;if(!$){var ae=String(I);if(this.deletedStates[y]=this.deletedStates[y]||{},V&&I!==void 0)this.deletedStates[y][ae]!==null&&(this.deletedStates[y][ae]=this.deletedStates[y][ae]||{},this.deletedStates[y][ae][V]=null);else if(I!==void 0){var he=this.stateChanges[y]&&this.stateChanges[y][ae];if(he){this.deletedStates[y][ae]={};for(V in this.stateChanges[y][ae])this.deletedStates[y][ae][V]=null}else this.deletedStates[y][ae]=null}else this.deletedStates[y]=null}},l3.prototype.getState=function(y,I){var V=String(I),$=this.state[y]||{},ae=this.stateChanges[y]||{},he=x({},$[V],ae[V]);if(this.deletedStates[y]===null)return{};if(this.deletedStates[y]){var ze=this.deletedStates[y][I];if(ze===null)return{};for(var rt in ze)delete he[rt]}return he},l3.prototype.initializeTileState=function(y,I){y.setFeatureState(this.state,I)},l3.prototype.coalesceChanges=function(y,I){var V={};for(var $ in this.stateChanges){this.state[$]=this.state[$]||{};var ae={};for(var he in this.stateChanges[$])this.state[$][he]||(this.state[$][he]={}),x(this.state[$][he],this.stateChanges[$][he]),ae[he]=this.state[$][he];V[$]=ae}for(var ze in this.deletedStates){this.state[ze]=this.state[ze]||{};var rt={};if(this.deletedStates[ze]===null)for(var gt in this.state[ze])rt[gt]={},this.state[ze][gt]={};else for(var Et in this.deletedStates[ze]){var or=this.deletedStates[ze][Et]===null;if(or)this.state[ze][Et]={};else for(var _r=0,pr=Object.keys(this.deletedStates[ze][Et]);_r<pr.length;_r+=1){var Fr=pr[_r];delete this.state[ze][Et][Fr]}rt[Et]=this.state[ze][Et]}V[ze]=V[ze]||{},x(V[ze],rt)}if(this.stateChanges={},this.deletedStates={},Object.keys(V).length!==0)for(var oi in y){var Hi=y[oi];Hi.setFeatureState(V,I)}};var by=function(y,I){this.tileID=y,this.x=y.canonical.x,this.y=y.canonical.y,this.z=y.canonical.z,this.grid=new au(Ci,16,0),this.grid3D=new au(Ci,16,0),this.featureIndexArray=new Ys,this.promoteId=I};by.prototype.insert=function(y,I,V,$,ae,he){var ze=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(V,$,ae);for(var rt=he?this.grid3D:this.grid,gt=0;gt<I.length;gt++){for(var Et=I[gt],or=[1/0,1/0,-1/0,-1/0],_r=0;_r<Et.length;_r++){var pr=Et[_r];or[0]=Math.min(or[0],pr.x),or[1]=Math.min(or[1],pr.y),or[2]=Math.max(or[2],pr.x),or[3]=Math.max(or[3],pr.y)}or[0]<Ci&&or[1]<Ci&&or[2]>=0&&or[3]>=0&&rt.insert(ze,or[0],or[1],or[2],or[3])}},by.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new c6(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers},by.prototype.query=function(y,I,V,$){var ae=this;this.loadVTLayers();for(var he=y.params||{},ze=Ci/y.tileSize/y.scale,rt=be(he.filter),gt=y.queryGeometry,Et=y.queryPadding*ze,or=fee(gt),_r=this.grid.query(or.minX-Et,or.minY-Et,or.maxX+Et,or.maxY+Et),pr=fee(y.cameraQueryGeometry),Fr=this.grid3D.query(pr.minX-Et,pr.minY-Et,pr.maxX+Et,pr.maxY+Et,function(Zn,ga,ha,eo){return mp(y.cameraQueryGeometry,Zn-Et,ga-Et,ha+Et,eo+Et)}),oi=0,Hi=Fr;oi<Hi.length;oi+=1){var Ai=Hi[oi];_r.push(Ai)}_r.sort(ptt);for(var bn={},nn,xn=function(Zn){var ga=_r[Zn];if(ga!==nn){nn=ga;var ha=ae.featureIndexArray.get(ga),eo=null;ae.loadMatchingFeature(bn,ha.bucketIndex,ha.sourceLayerIndex,ha.featureIndex,rt,he.layers,he.availableImages,I,V,$,function(za,Za,Jo){return eo||(eo=zn(za)),Za.queryIntersectsFeature(gt,za,Jo,eo,ae.z,y.transform,ze,y.pixelPosMatrix)})}},Pn=0;Pn<_r.length;Pn++)xn(Pn);return bn},by.prototype.loadMatchingFeature=function(y,I,V,$,ae,he,ze,rt,gt,Et,or){var _r=this.bucketLayerIDs[I];if(!(he&&!N(he,_r))){var pr=this.sourceLayerCoder.decode(V),Fr=this.vtLayers[pr],oi=Fr.feature($);if(ae.needGeometry){var Hi=Ja(oi,!0);if(!ae.filter(new Gn(this.tileID.overscaledZ),Hi,this.tileID.canonical))return}else if(!ae.filter(new Gn(this.tileID.overscaledZ),oi))return;for(var Ai=this.getId(oi,pr),bn=0;bn<_r.length;bn++){var nn=_r[bn];if(!(he&&he.indexOf(nn)<0)){var xn=rt[nn];if(xn){var Pn={};Ai!==void 0&&Et&&(Pn=Et.getState(xn.sourceLayer||\"_geojsonTileLayer\",Ai));var Zn=x({},gt[nn]);Zn.paint=cee(Zn.paint,xn.paint,oi,Pn,ze),Zn.layout=cee(Zn.layout,xn.layout,oi,Pn,ze);var ga=!or||or(oi,xn,Pn);if(ga){var ha=new f6(oi,this.z,this.x,this.y,Ai);ha.layer=Zn;var eo=y[nn];eo===void 0&&(eo=y[nn]=[]),eo.push({featureIndex:$,feature:ha,intersectionZ:ga})}}}}}},by.prototype.lookupSymbolFeatures=function(y,I,V,$,ae,he,ze,rt){var gt={};this.loadVTLayers();for(var Et=be(ae),or=0,_r=y;or<_r.length;or+=1){var pr=_r[or];this.loadMatchingFeature(gt,V,$,pr,Et,he,ze,rt,I)}return gt},by.prototype.hasLayer=function(y){for(var I=0,V=this.bucketLayerIDs;I<V.length;I+=1)for(var $=V[I],ae=0,he=$;ae<he.length;ae+=1){var ze=he[ae];if(y===ze)return!0}return!1},by.prototype.getId=function(y,I){var V=y.id;if(this.promoteId){var $=typeof this.promoteId==\"string\"?this.promoteId:this.promoteId[I];V=y.properties[$],typeof V==\"boolean\"&&(V=Number(V))}return V},X(\"FeatureIndex\",by,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});function cee(m,y,I,V,$){return G(m,function(ae,he){var ze=y instanceof Sc?y.get(he):null;return ze&&ze.evaluate?ze.evaluate(I,V,$):ze})}function fee(m){for(var y=1/0,I=1/0,V=-1/0,$=-1/0,ae=0,he=m;ae<he.length;ae+=1){var ze=he[ae];y=Math.min(y,ze.x),I=Math.min(I,ze.y),V=Math.max(V,ze.x),$=Math.max($,ze.y)}return{minX:y,minY:I,maxX:V,maxY:$}}function ptt(m,y){return y-m}var gtt=3e4,Jh=function(y,I){this.tileID=y,this.uid=g(),this.uses=0,this.tileSize=I,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state=\"loading\"};Jh.prototype.registerFadeDuration=function(y){var I=y+this.timeAdded;I<lt.now()||this.fadeEndTime&&I<this.fadeEndTime||(this.fadeEndTime=I)},Jh.prototype.wasRequested=function(){return this.state===\"errored\"||this.state===\"loaded\"||this.state===\"reloading\"},Jh.prototype.loadVectorData=function(y,I,V){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",!y){this.collisionBoxArray=new Va;return}y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestFeatureIndex.rawTileData=y.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=vtt(y.buckets,I.style),this.hasSymbolBuckets=!1;for(var $ in this.buckets){var ae=this.buckets[$];if(ae instanceof Pu)if(this.hasSymbolBuckets=!0,V)ae.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var he in this.buckets){var ze=this.buckets[he];if(ze instanceof Pu&&ze.hasRTLText){this.hasRTLText=!0,Xs();break}}this.queryPadding=0;for(var rt in this.buckets){var gt=this.buckets[rt];this.queryPadding=Math.max(this.queryPadding,I.style.getLayer(rt).queryRadius(gt))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage)},Jh.prototype.unloadVectorData=function(){for(var y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\"},Jh.prototype.getBucket=function(y){return this.buckets[y.id]},Jh.prototype.upload=function(y){for(var I in this.buckets){var V=this.buckets[I];V.uploadPending()&&V.upload(y)}var $=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new hb(y,this.imageAtlas.image,$.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new hb(y,this.glyphAtlasImage,$.ALPHA),this.glyphAtlasImage=null)},Jh.prototype.prepare=function(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)},Jh.prototype.queryRenderedFeatures=function(y,I,V,$,ae,he,ze,rt,gt,Et){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:$,cameraQueryGeometry:ae,scale:he,tileSize:this.tileSize,pixelPosMatrix:Et,transform:rt,params:ze,queryPadding:this.queryPadding*gt},y,I,V)},Jh.prototype.querySourceFeatures=function(y,I){var V=this.latestFeatureIndex;if(!(!V||!V.rawTileData)){var $=V.loadVTLayers(),ae=I?I.sourceLayer:\"\",he=$._geojsonTileLayer||$[ae];if(he)for(var ze=be(I&&I.filter),rt=this.tileID.canonical,gt=rt.z,Et=rt.x,or=rt.y,_r={z:gt,x:Et,y:or},pr=0;pr<he.length;pr++){var Fr=he.feature(pr);if(ze.needGeometry){var oi=Ja(Fr,!0);if(!ze.filter(new Gn(this.tileID.overscaledZ),oi,this.tileID.canonical))continue}else if(!ze.filter(new Gn(this.tileID.overscaledZ),Fr))continue;var Hi=V.getId(Fr,ae),Ai=new f6(Fr,gt,Et,or,Hi);Ai.tile=_r,y.push(Ai)}}},Jh.prototype.hasData=function(){return this.state===\"loaded\"||this.state===\"reloading\"||this.state===\"expired\"},Jh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Jh.prototype.setExpiryData=function(y){var I=this.expirationTime;if(y.cacheControl){var V=ge(y.cacheControl);V[\"max-age\"]&&(this.expirationTime=Date.now()+V[\"max-age\"]*1e3)}else y.expires&&(this.expirationTime=new Date(y.expires).getTime());if(this.expirationTime){var $=Date.now(),ae=!1;if(this.expirationTime>$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime<I)ae=!0;else{var he=this.expirationTime-I;he?this.expirationTime=$+Math.max(he,gtt):ae=!0}ae?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0}},Jh.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},Jh.prototype.setFeatureState=function(y,I){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(y).length===0)){var V=this.latestFeatureIndex.loadVTLayers();for(var $ in this.buckets)if(I.style.hasLayer($)){var ae=this.buckets[$],he=ae.layers[0].sourceLayer||\"_geojsonTileLayer\",ze=V[he],rt=y[he];if(!(!ze||!rt||Object.keys(rt).length===0)){ae.update(rt,ze,this.imageAtlas&&this.imageAtlas.patternPositions||{});var gt=I&&I.style&&I.style.getLayer($);gt&&(this.queryPadding=Math.max(this.queryPadding,gt.queryRadius(ae)))}}}},Jh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Jh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<lt.now()},Jh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Jh.prototype.setHoldDuration=function(y){this.symbolFadeHoldUntil=lt.now()+y},Jh.prototype.setDependencies=function(y,I){for(var V={},$=0,ae=I;$<ae.length;$+=1){var he=ae[$];V[he]=!0}this.dependencies[y]=V},Jh.prototype.hasDependency=function(y,I){for(var V=0,$=y;V<$.length;V+=1){var ae=$[V],he=this.dependencies[ae];if(he)for(var ze=0,rt=I;ze<rt.length;ze+=1){var gt=rt[ze];if(he[gt])return!0}}return!1};var mtt=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"],U1=f.performance,hee=function(y){this._marks={start:[y.url,\"start\"].join(\"#\"),end:[y.url,\"end\"].join(\"#\"),measure:y.url.toString()},U1.mark(this._marks.start)};hee.prototype.finish=function(){U1.mark(this._marks.end);var y=U1.getEntriesByName(this._marks.measure);return y.length===0&&(U1.measure(this._marks.measure,this._marks.start,this._marks.end),y=U1.getEntriesByName(this._marks.measure),U1.clearMarks(this._marks.start),U1.clearMarks(this._marks.end),U1.clearMeasures(this._marks.measure)),y},i.Actor=s3,i.AlphaImage=Dv,i.CanonicalTileID=vb,i.CollisionBoxArray=Va,i.Color=cs,i.DEMData=xy,i.DataConstantProperty=Me,i.DictionaryCoder=c6,i.EXTENT=Ci,i.ErrorEvent=da,i.EvaluationParameters=Gn,i.Event=Xo,i.Evented=Wn,i.FeatureIndex=by,i.FillBucket=yp,i.FillExtrusionBucket=Vp,i.ImageAtlas=yg,i.ImagePosition=Yf,i.LineBucket=sh,i.LngLat=Hc,i.LngLatBounds=lh,i.MercatorCoordinate=db,i.ONE_EM=Tn,i.OverscaledTileID=uh,i.Point=u,i.Point$1=u,i.Properties=Nr,i.Protobuf=Xa,i.RGBAImage=Eh,i.RequestManager=$e,i.RequestPerformance=hee,i.ResourceType=ra,i.SegmentVector=io,i.SourceFeatureState=l3,i.StructArrayLayout1ui2=ba,i.StructArrayLayout2f1f2i16=Vi,i.StructArrayLayout2i4=Yr,i.StructArrayLayout3ui6=pn,i.StructArrayLayout4i8=xi,i.SymbolBucket=Pu,i.Texture=hb,i.Tile=Jh,i.Transitionable=Uo,i.Uniform1f=Qe,i.Uniform1i=Ve,i.Uniform2f=at,i.Uniform3f=Ct,i.Uniform4f=Ot,i.UniformColor=Rt,i.UniformMatrix4f=Dt,i.UnwrappedTileID=uee,i.ValidationError=_a,i.WritingMode=uv,i.ZoomHistory=kt,i.add=Rv,i.addDynamicAttributes=mO,i.asyncAll=E,i.bezier=_,i.bindAll=O,i.browser=lt,i.cacheEntryPossiblyAdded=ji,i.clamp=p,i.clearTileCache=wi,i.clipLine=WQ,i.clone=C1,i.clone$1=j,i.clone$2=Ow,i.collisionCircleLayout=Lt,i.config=pt,i.create=k1,i.create$1=Zh,i.create$2=vg,i.createCommonjsModule=a,i.createExpression=oo,i.createLayout=Wi,i.createStyleLayer=ltt,i.cross=G9,i.deepEqual=h,i.dot=V9,i.dot$1=Z9,i.ease=b,i.emitValidationErrors=Lu,i.endsWith=U,i.enforceCacheSizeLimit=In,i.evaluateSizeForFeature=BQ,i.evaluateSizeForZoom=NQ,i.evaluateVariableOffset=YQ,i.evented=Ia,i.extend=x,i.featureFilter=be,i.filterObject=Z,i.fromRotation=am,i.getAnchorAlignment=CS,i.getAnchorJustification=gO,i.getArrayBuffer=ri,i.getImage=ua,i.getJSON=Xr,i.getRTLTextPluginStatus=yo,i.getReferrer=Ut,i.getVideo=ma,i.identity=dy,i.invert=om,i.isChar=nt,i.isMapboxURL=St,i.keysDifference=L,i.makeRequest=Er,i.mapObject=G,i.mercatorXfromLng=oee,i.mercatorYfromLat=see,i.mercatorZfromAltitude=lee,i.mul=Yx,i.multiply=sm,i.mvt=mg,i.nextPowerOfTwo=A,i.normalize=Kx,i.number=nl,i.offscreenCanvasSupported=Fn,i.ortho=wu,i.parseGlyphPBF=p0,i.pbf=Xa,i.performSymbolLayout=Vet,i.perspective=L1,i.pick=C,i.plugin=Ms,i.polygonIntersectsPolygon=so,i.postMapLoadEvent=We,i.postTurnstileEvent=Ge,i.potpack=ep,i.refProperties=mtt,i.register=X,i.registerForPluginStateChange=Da,i.renderColorRamp=Qx,i.rotate=hy,i.rotateX=Sd,i.rotateZ=vy,i.scale=tu,i.scale$1=X9,i.scale$2=qw,i.setCacheLimits=On,i.setRTLTextPlugin=go,i.sphericalToCartesian=Ce,i.sqrLen=uS,i.styleSpec=Rn,i.sub=j9,i.symbolSize=Ret,i.transformMat3=H9,i.transformMat4=py,i.translate=vc,i.triggerPluginCompletionEvent=ia,i.uniqueId=g,i.validateCustomStyleLayer=att,i.validateLight=To,i.validateStyle=wo,i.values=T,i.vectorTile=mg,i.version=o,i.warnOnce=re,i.webpSupported=Vt,i.window=f,i.wrap=k}),n([\"./shared\"],function(i){\"use strict\";function a(Ut){var wt=typeof Ut;if(wt===\"number\"||wt===\"boolean\"||wt===\"string\"||Ut===void 0||Ut===null)return JSON.stringify(Ut);if(Array.isArray(Ut)){for(var rr=\"[\",nr=0,Er=Ut;nr<Er.length;nr+=1){var Xr=Er[nr];rr+=a(Xr)+\",\"}return rr+\"]\"}for(var ri=Object.keys(Ut).sort(),Qr=\"{\",Oi=0;Oi<ri.length;Oi++)Qr+=JSON.stringify(ri[Oi])+\":\"+a(Ut[ri[Oi]])+\",\";return Qr+\"}\"}function o(Ut){for(var wt=\"\",rr=0,nr=i.refProperties;rr<nr.length;rr+=1){var Er=nr[rr];wt+=\"/\"+a(Ut[Er])}return wt}function s(Ut,wt){for(var rr={},nr=0;nr<Ut.length;nr++){var Er=wt&&wt[Ut[nr].id]||o(Ut[nr]);wt&&(wt[Ut[nr].id]=Er);var Xr=rr[Er];Xr||(Xr=rr[Er]=[]),Xr.push(Ut[nr])}var ri=[];for(var Qr in rr)ri.push(rr[Qr]);return ri}var l=function(wt){this.keyCache={},wt&&this.replace(wt)};l.prototype.replace=function(wt){this._layerConfigs={},this._layers={},this.update(wt,[])},l.prototype.update=function(wt,rr){for(var nr=this,Er=0,Xr=wt;Er<Xr.length;Er+=1){var ri=Xr[Er];this._layerConfigs[ri.id]=ri;var Qr=this._layers[ri.id]=i.createStyleLayer(ri);Qr._featureFilter=i.featureFilter(Qr.filter),this.keyCache[ri.id]&&delete this.keyCache[ri.id]}for(var Oi=0,$i=rr;Oi<$i.length;Oi+=1){var tn=$i[Oi];delete this.keyCache[tn],delete this._layerConfigs[tn],delete this._layers[tn]}this.familiesBySource={};for(var fn=s(i.values(this._layerConfigs),this.keyCache),yn=0,Sn=fn;yn<Sn.length;yn+=1){var Ba=Sn[yn],ua=Ba.map(function(Wn){return nr._layers[Wn.id]}),ma=ua[0];if(ma.visibility!==\"none\"){var Wa=ma.source||\"\",Fa=this.familiesBySource[Wa];Fa||(Fa=this.familiesBySource[Wa]={});var Xo=ma.sourceLayer||\"_geojsonTileLayer\",da=Fa[Xo];da||(da=Fa[Xo]=[]),da.push(ua)}}};var u=1,c=function(wt){var rr={},nr=[];for(var Er in wt){var Xr=wt[Er],ri=rr[Er]={};for(var Qr in Xr){var Oi=Xr[+Qr];if(!(!Oi||Oi.bitmap.width===0||Oi.bitmap.height===0)){var $i={x:0,y:0,w:Oi.bitmap.width+2*u,h:Oi.bitmap.height+2*u};nr.push($i),ri[Qr]={rect:$i,metrics:Oi.metrics}}}}var tn=i.potpack(nr),fn=tn.w,yn=tn.h,Sn=new i.AlphaImage({width:fn||1,height:yn||1});for(var Ba in wt){var ua=wt[Ba];for(var ma in ua){var Wa=ua[+ma];if(!(!Wa||Wa.bitmap.width===0||Wa.bitmap.height===0)){var Fa=rr[Ba][ma].rect;i.AlphaImage.copy(Wa.bitmap,Sn,{x:0,y:0},{x:Fa.x+u,y:Fa.y+u},Wa.bitmap)}}}this.image=Sn,this.positions=rr};i.register(\"GlyphAtlas\",c);var f=function(wt){this.tileID=new i.OverscaledTileID(wt.tileID.overscaledZ,wt.tileID.wrap,wt.tileID.canonical.z,wt.tileID.canonical.x,wt.tileID.canonical.y),this.uid=wt.uid,this.zoom=wt.zoom,this.pixelRatio=wt.pixelRatio,this.tileSize=wt.tileSize,this.source=wt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=wt.showCollisionBoxes,this.collectResourceTiming=!!wt.collectResourceTiming,this.returnDependencies=!!wt.returnDependencies,this.promoteId=wt.promoteId};f.prototype.parse=function(wt,rr,nr,Er,Xr){var ri=this;this.status=\"parsing\",this.data=wt,this.collisionBoxArray=new i.CollisionBoxArray;var Qr=new i.DictionaryCoder(Object.keys(wt.layers).sort()),Oi=new i.FeatureIndex(this.tileID,this.promoteId);Oi.bucketLayerIDs=[];var $i={},tn={featureIndex:Oi,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:nr},fn=rr.familiesBySource[this.source];for(var yn in fn){var Sn=wt.layers[yn];if(Sn){Sn.version===1&&i.warnOnce('Vector tile source \"'+this.source+'\" layer \"'+yn+'\" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Ba=Qr.encode(yn),ua=[],ma=0;ma<Sn.length;ma++){var Wa=Sn.feature(ma),Fa=Oi.getId(Wa,yn);ua.push({feature:Wa,id:Fa,index:ma,sourceLayerIndex:Ba})}for(var Xo=0,da=fn[yn];Xo<da.length;Xo+=1){var Wn=da[Xo],Ha=Wn[0];if(!(Ha.minzoom&&this.zoom<Math.floor(Ha.minzoom))&&!(Ha.maxzoom&&this.zoom>=Ha.maxzoom)&&Ha.visibility!==\"none\"){h(Wn,this.zoom,nr);var vo=$i[Ha.id]=Ha.createBucket({index:Oi.bucketLayerIDs.length,layers:Wn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,tn,this.tileID.canonical),Oi.bucketLayerIDs.push(Wn.map(function(Li){return Li.id}))}}}}var jn,Mt,kr,Jr,vi=i.mapObject(tn.glyphDependencies,function(Li){return Object.keys(Li).map(Number)});Object.keys(vi).length?Er.send(\"getGlyphs\",{uid:this.uid,stacks:vi},function(Li,_n){jn||(jn=Li,Mt=_n,Mn.call(ri))}):Mt={};var hn=Object.keys(tn.iconDependencies);hn.length?Er.send(\"getImages\",{icons:hn,source:this.source,tileID:this.tileID,type:\"icons\"},function(Li,_n){jn||(jn=Li,kr=_n,Mn.call(ri))}):kr={};var An=Object.keys(tn.patternDependencies);An.length?Er.send(\"getImages\",{icons:An,source:this.source,tileID:this.tileID,type:\"patterns\"},function(Li,_n){jn||(jn=Li,Jr=_n,Mn.call(ri))}):Jr={},Mn.call(this);function Mn(){if(jn)return Xr(jn);if(Mt&&kr&&Jr){var Li=new c(Mt),_n=new i.ImageAtlas(kr,Jr);for(var ya in $i){var $n=$i[ya];$n instanceof i.SymbolBucket?(h($n.layers,this.zoom,nr),i.performSymbolLayout($n,Mt,Li.positions,kr,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):$n.hasPattern&&($n instanceof i.LineBucket||$n instanceof i.FillBucket||$n instanceof i.FillExtrusionBucket)&&(h($n.layers,this.zoom,nr),$n.addFeatures(tn,this.tileID.canonical,_n.patternPositions))}this.status=\"done\",Xr(null,{buckets:i.values($i).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Oi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Li.image,imageAtlas:_n,glyphMap:this.returnDependencies?Mt:null,iconMap:this.returnDependencies?kr:null,glyphPositions:this.returnDependencies?Li.positions:null})}}};function h(Ut,wt,rr){for(var nr=new i.EvaluationParameters(wt),Er=0,Xr=Ut;Er<Xr.length;Er+=1){var ri=Xr[Er];ri.recalculate(nr,rr)}}function d(Ut,wt){var rr=i.getArrayBuffer(Ut.request,function(nr,Er,Xr,ri){nr?wt(nr):Er&&wt(null,{vectorTile:new i.vectorTile.VectorTile(new i.pbf(Er)),rawData:Er,cacheControl:Xr,expires:ri})});return function(){rr.cancel(),wt()}}var v=function(wt,rr,nr,Er){this.actor=wt,this.layerIndex=rr,this.availableImages=nr,this.loadVectorData=Er||d,this.loading={},this.loaded={}};v.prototype.loadTile=function(wt,rr){var nr=this,Er=wt.uid;this.loading||(this.loading={});var Xr=wt&&wt.request&&wt.request.collectResourceTiming?new i.RequestPerformance(wt.request):!1,ri=this.loading[Er]=new f(wt);ri.abort=this.loadVectorData(wt,function(Qr,Oi){if(delete nr.loading[Er],Qr||!Oi)return ri.status=\"done\",nr.loaded[Er]=ri,rr(Qr);var $i=Oi.rawData,tn={};Oi.expires&&(tn.expires=Oi.expires),Oi.cacheControl&&(tn.cacheControl=Oi.cacheControl);var fn={};if(Xr){var yn=Xr.finish();yn&&(fn.resourceTiming=JSON.parse(JSON.stringify(yn)))}ri.vectorTile=Oi.vectorTile,ri.parse(Oi.vectorTile,nr.layerIndex,nr.availableImages,nr.actor,function(Sn,Ba){if(Sn||!Ba)return rr(Sn);rr(null,i.extend({rawTileData:$i.slice(0)},Ba,tn,fn))}),nr.loaded=nr.loaded||{},nr.loaded[Er]=ri})},v.prototype.reloadTile=function(wt,rr){var nr=this,Er=this.loaded,Xr=wt.uid,ri=this;if(Er&&Er[Xr]){var Qr=Er[Xr];Qr.showCollisionBoxes=wt.showCollisionBoxes;var Oi=function($i,tn){var fn=Qr.reloadCallback;fn&&(delete Qr.reloadCallback,Qr.parse(Qr.vectorTile,ri.layerIndex,nr.availableImages,ri.actor,fn)),rr($i,tn)};Qr.status===\"parsing\"?Qr.reloadCallback=Oi:Qr.status===\"done\"&&(Qr.vectorTile?Qr.parse(Qr.vectorTile,this.layerIndex,this.availableImages,this.actor,Oi):Oi())}},v.prototype.abortTile=function(wt,rr){var nr=this.loading,Er=wt.uid;nr&&nr[Er]&&nr[Er].abort&&(nr[Er].abort(),delete nr[Er]),rr()},v.prototype.removeTile=function(wt,rr){var nr=this.loaded,Er=wt.uid;nr&&nr[Er]&&delete nr[Er],rr()};var _=i.window.ImageBitmap,b=function(){this.loaded={}};b.prototype.loadTile=function(wt,rr){var nr=wt.uid,Er=wt.encoding,Xr=wt.rawImageData,ri=_&&Xr instanceof _?this.getImageData(Xr):Xr,Qr=new i.DEMData(nr,ri,Er);this.loaded=this.loaded||{},this.loaded[nr]=Qr,rr(null,Qr)},b.prototype.getImageData=function(wt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(wt.width,wt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext(\"2d\")),this.offscreenCanvas.width=wt.width,this.offscreenCanvas.height=wt.height,this.offscreenCanvasContext.drawImage(wt,0,0,wt.width,wt.height);var rr=this.offscreenCanvasContext.getImageData(-1,-1,wt.width+2,wt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:rr.width,height:rr.height},rr.data)},b.prototype.removeTile=function(wt){var rr=this.loaded,nr=wt.uid;rr&&rr[nr]&&delete rr[nr]};var p=k;function k(Ut,wt){var rr=Ut&&Ut.type,nr;if(rr===\"FeatureCollection\")for(nr=0;nr<Ut.features.length;nr++)k(Ut.features[nr],wt);else if(rr===\"GeometryCollection\")for(nr=0;nr<Ut.geometries.length;nr++)k(Ut.geometries[nr],wt);else if(rr===\"Feature\")k(Ut.geometry,wt);else if(rr===\"Polygon\")E(Ut.coordinates,wt);else if(rr===\"MultiPolygon\")for(nr=0;nr<Ut.coordinates.length;nr++)E(Ut.coordinates[nr],wt);return Ut}function E(Ut,wt){if(Ut.length!==0){T(Ut[0],wt);for(var rr=1;rr<Ut.length;rr++)T(Ut[rr],!wt)}}function T(Ut,wt){for(var rr=0,nr=0,Er=Ut.length,Xr=Er-1;nr<Er;Xr=nr++)rr+=(Ut[nr][0]-Ut[Xr][0])*(Ut[Xr][1]+Ut[nr][1]);rr>=0!=!!wt&&Ut.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,\"id\"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],rr=0,nr=this._feature.geometry;rr<nr.length;rr+=1){var Er=nr[rr];wt.push([new i.Point$1(Er[0],Er[1])])}return wt}else{for(var Xr=[],ri=0,Qr=this._feature.geometry;ri<Qr.length;ri+=1){for(var Oi=Qr[ri],$i=[],tn=0,fn=Oi;tn<fn.length;tn+=1){var yn=fn[tn];$i.push(new i.Point$1(yn[0],yn[1]))}Xr.push($i)}return Xr}},x.prototype.toGeoJSON=function(wt,rr,nr){return L.call(this,wt,rr,nr)};var C=function(wt){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=i.EXTENT,this.length=wt.length,this._features=wt};C.prototype.feature=function(wt){return new x(this._features[wt])};var M=i.vectorTile.VectorTileFeature,g=P;function P(Ut,wt){this.options=wt||{},this.features=Ut,this.length=Ut.length}P.prototype.feature=function(Ut){return new A(this.features[Ut],this.options.extent)};function A(Ut,wt){this.id=typeof Ut.id==\"number\"?Ut.id:void 0,this.type=Ut.type,this.rawGeometry=Ut.type===1?[Ut.geometry]:Ut.geometry,this.properties=Ut.tags,this.extent=wt||4096}A.prototype.loadGeometry=function(){var Ut=this.rawGeometry;this.geometry=[];for(var wt=0;wt<Ut.length;wt++){for(var rr=Ut[wt],nr=[],Er=0;Er<rr.length;Er++)nr.push(new i.Point$1(rr[Er][0],rr[Er][1]));this.geometry.push(nr)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Ut=this.geometry,wt=1/0,rr=-1/0,nr=1/0,Er=-1/0,Xr=0;Xr<Ut.length;Xr++)for(var ri=Ut[Xr],Qr=0;Qr<ri.length;Qr++){var Oi=ri[Qr];wt=Math.min(wt,Oi.x),rr=Math.max(rr,Oi.x),nr=Math.min(nr,Oi.y),Er=Math.max(Er,Oi.y)}return[wt,nr,rr,Er]},A.prototype.toGeoJSON=M.prototype.toGeoJSON;var z=Z,O=Z,U=j,G=g;function Z(Ut){var wt=new i.pbf;return N(Ut,wt),wt.finish()}function j(Ut,wt){wt=wt||{};var rr={};for(var nr in Ut)rr[nr]=new g(Ut[nr].features,wt),rr[nr].name=nr,rr[nr].version=wt.version,rr[nr].extent=wt.extent;return Z({layers:rr})}function N(Ut,wt){for(var rr in Ut.layers)wt.writeMessage(3,H,Ut.layers[rr])}function H(Ut,wt){wt.writeVarintField(15,Ut.version||1),wt.writeStringField(1,Ut.name||\"\"),wt.writeVarintField(5,Ut.extent||4096);var rr,nr={keys:[],values:[],keycache:{},valuecache:{}};for(rr=0;rr<Ut.length;rr++)nr.feature=Ut.feature(rr),wt.writeMessage(2,re,nr);var Er=nr.keys;for(rr=0;rr<Er.length;rr++)wt.writeStringField(3,Er[rr]);var Xr=nr.values;for(rr=0;rr<Xr.length;rr++)wt.writeMessage(4,ge,Xr[rr])}function re(Ut,wt){var rr=Ut.feature;rr.id!==void 0&&wt.writeVarintField(1,rr.id),wt.writeMessage(2,oe,Ut),wt.writeVarintField(3,rr.type),wt.writeMessage(4,Le,rr)}function oe(Ut,wt){var rr=Ut.feature,nr=Ut.keys,Er=Ut.values,Xr=Ut.keycache,ri=Ut.valuecache;for(var Qr in rr.properties){var Oi=Xr[Qr];typeof Oi==\"undefined\"&&(nr.push(Qr),Oi=nr.length-1,Xr[Qr]=Oi),wt.writeVarint(Oi);var $i=rr.properties[Qr],tn=typeof $i;tn!==\"string\"&&tn!==\"boolean\"&&tn!==\"number\"&&($i=JSON.stringify($i));var fn=tn+\":\"+$i,yn=ri[fn];typeof yn==\"undefined\"&&(Er.push($i),yn=Er.length-1,ri[fn]=yn),wt.writeVarint(yn)}}function _e(Ut,wt){return(wt<<3)+(Ut&7)}function Ce(Ut){return Ut<<1^Ut>>31}function Le(Ut,wt){for(var rr=Ut.loadGeometry(),nr=Ut.type,Er=0,Xr=0,ri=rr.length,Qr=0;Qr<ri;Qr++){var Oi=rr[Qr],$i=1;nr===1&&($i=Oi.length),wt.writeVarint(_e(1,$i));for(var tn=nr===3?Oi.length-1:Oi.length,fn=0;fn<tn;fn++){fn===1&&nr!==1&&wt.writeVarint(_e(2,tn-1));var yn=Oi[fn].x-Er,Sn=Oi[fn].y-Xr;wt.writeVarint(Ce(yn)),wt.writeVarint(Ce(Sn)),Er+=yn,Xr+=Sn}nr===3&&wt.writeVarint(_e(7,1))}}function ge(Ut,wt){var rr=typeof Ut;rr===\"string\"?wt.writeStringField(1,Ut):rr===\"boolean\"?wt.writeBooleanField(7,Ut):rr===\"number\"&&(Ut%1!==0?wt.writeDoubleField(3,Ut):Ut<0?wt.writeSVarintField(6,Ut):wt.writeVarintField(5,Ut))}z.fromVectorTileJs=O,z.fromGeojsonVt=U,z.GeoJSONWrapper=G;function ie(Ut,wt,rr,nr,Er,Xr){if(!(Er-nr<=rr)){var ri=nr+Er>>1;Se(Ut,wt,ri,nr,Er,Xr%2),ie(Ut,wt,rr,nr,ri-1,Xr+1),ie(Ut,wt,rr,ri+1,Er,Xr+1)}}function Se(Ut,wt,rr,nr,Er,Xr){for(;Er>nr;){if(Er-nr>600){var ri=Er-nr+1,Qr=rr-nr+1,Oi=Math.log(ri),$i=.5*Math.exp(2*Oi/3),tn=.5*Math.sqrt(Oi*$i*(ri-$i)/ri)*(Qr-ri/2<0?-1:1),fn=Math.max(nr,Math.floor(rr-Qr*$i/ri+tn)),yn=Math.min(Er,Math.floor(rr+(ri-Qr)*$i/ri+tn));Se(Ut,wt,rr,fn,yn,Xr)}var Sn=wt[2*rr+Xr],Ba=nr,ua=Er;for(Ee(Ut,wt,nr,rr),wt[2*Er+Xr]>Sn&&Ee(Ut,wt,nr,Er);Ba<ua;){for(Ee(Ut,wt,Ba,ua),Ba++,ua--;wt[2*Ba+Xr]<Sn;)Ba++;for(;wt[2*ua+Xr]>Sn;)ua--}wt[2*nr+Xr]===Sn?Ee(Ut,wt,nr,ua):(ua++,Ee(Ut,wt,ua,Er)),ua<=rr&&(nr=ua+1),rr<=ua&&(Er=ua-1)}}function Ee(Ut,wt,rr,nr){Ae(Ut,rr,nr),Ae(wt,2*rr,2*nr),Ae(wt,2*rr+1,2*nr+1)}function Ae(Ut,wt,rr){var nr=Ut[wt];Ut[wt]=Ut[rr],Ut[rr]=nr}function Be(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[0,Ut.length-1,0],Oi=[],$i,tn;Qr.length;){var fn=Qr.pop(),yn=Qr.pop(),Sn=Qr.pop();if(yn-Sn<=ri){for(var Ba=Sn;Ba<=yn;Ba++)$i=wt[2*Ba],tn=wt[2*Ba+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[Ba]);continue}var ua=Math.floor((Sn+yn)/2);$i=wt[2*ua],tn=wt[2*ua+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[ua]);var ma=(fn+1)%2;(fn===0?rr<=$i:nr<=tn)&&(Qr.push(Sn),Qr.push(ua-1),Qr.push(ma)),(fn===0?Er>=$i:Xr>=tn)&&(Qr.push(ua+1),Qr.push(yn),Qr.push(ma))}return Oi}function Pe(Ut,wt,rr,nr,Er,Xr){for(var ri=[0,Ut.length-1,0],Qr=[],Oi=Er*Er;ri.length;){var $i=ri.pop(),tn=ri.pop(),fn=ri.pop();if(tn-fn<=Xr){for(var yn=fn;yn<=tn;yn++)me(wt[2*yn],wt[2*yn+1],rr,nr)<=Oi&&Qr.push(Ut[yn]);continue}var Sn=Math.floor((fn+tn)/2),Ba=wt[2*Sn],ua=wt[2*Sn+1];me(Ba,ua,rr,nr)<=Oi&&Qr.push(Ut[Sn]);var ma=($i+1)%2;($i===0?rr-Er<=Ba:nr-Er<=ua)&&(ri.push(fn),ri.push(Sn-1),ri.push(ma)),($i===0?rr+Er>=Ba:nr+Er>=ua)&&(ri.push(Sn+1),ri.push(tn),ri.push(ma))}return Qr}function me(Ut,wt,rr,nr){var Er=Ut-rr,Xr=wt-nr;return Er*Er+Xr*Xr}var De=function(Ut){return Ut[0]},ce=function(Ut){return Ut[1]},je=function(wt,rr,nr,Er,Xr){rr===void 0&&(rr=De),nr===void 0&&(nr=ce),Er===void 0&&(Er=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=Er,this.points=wt;for(var ri=wt.length<65536?Uint16Array:Uint32Array,Qr=this.ids=new ri(wt.length),Oi=this.coords=new Xr(wt.length*2),$i=0;$i<wt.length;$i++)Qr[$i]=$i,Oi[2*$i]=rr(wt[$i]),Oi[2*$i+1]=nr(wt[$i]);ie(Qr,Oi,Er,0,Qr.length-1,0)};je.prototype.range=function(wt,rr,nr,Er){return Be(this.ids,this.coords,wt,rr,nr,Er,this.nodeSize)},je.prototype.within=function(wt,rr,nr){return Pe(this.ids,this.coords,wt,rr,nr,this.nodeSize)};var lt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ut){return Ut}},pt=function(wt){this.options=fr(Object.create(lt),wt),this.trees=new Array(this.options.maxZoom+1)};pt.prototype.load=function(wt){var rr=this.options,nr=rr.log,Er=rr.minZoom,Xr=rr.maxZoom,ri=rr.nodeSize;nr&&console.time(\"total time\");var Qr=\"prepare \"+wt.length+\" points\";nr&&console.time(Qr),this.points=wt;for(var Oi=[],$i=0;$i<wt.length;$i++)wt[$i].geometry&&Oi.push(ot(wt[$i],$i));this.trees[Xr+1]=new je(Oi,$e,St,ri,Float32Array),nr&&console.timeEnd(Qr);for(var tn=Xr;tn>=Er;tn--){var fn=+Date.now();Oi=this._cluster(Oi,tn),this.trees[tn]=new je(Oi,$e,St,ri,Float32Array),nr&&console.log(\"z%d: %d clusters in %dms\",tn,Oi.length,+Date.now()-fn)}return nr&&console.timeEnd(\"total time\"),this},pt.prototype.getClusters=function(wt,rr){var nr=((wt[0]+180)%360+360)%360-180,Er=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ri=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)nr=-180,Xr=180;else if(nr>Xr){var Qr=this.getClusters([nr,Er,180,ri],rr),Oi=this.getClusters([-180,Er,Xr,ri],rr);return Qr.concat(Oi)}for(var $i=this.trees[this._limitZoom(rr)],tn=$i.range(Nt(nr),$t(ri),Nt(Xr),$t(Er)),fn=[],yn=0,Sn=tn;yn<Sn.length;yn+=1){var Ba=Sn[yn],ua=$i.points[Ba];fn.push(ua.numPoints?ut(ua):this.points[ua.index])}return fn},pt.prototype.getChildren=function(wt){var rr=this._getOriginId(wt),nr=this._getOriginZoom(wt),Er=\"No cluster with the specified id.\",Xr=this.trees[nr];if(!Xr)throw new Error(Er);var ri=Xr.points[rr];if(!ri)throw new Error(Er);for(var Qr=this.options.radius/(this.options.extent*Math.pow(2,nr-1)),Oi=Xr.within(ri.x,ri.y,Qr),$i=[],tn=0,fn=Oi;tn<fn.length;tn+=1){var yn=fn[tn],Sn=Xr.points[yn];Sn.parentId===wt&&$i.push(Sn.numPoints?ut(Sn):this.points[Sn.index])}if($i.length===0)throw new Error(Er);return $i},pt.prototype.getLeaves=function(wt,rr,nr){rr=rr||10,nr=nr||0;var Er=[];return this._appendLeaves(Er,wt,rr,nr,0),Er},pt.prototype.getTile=function(wt,rr,nr){var Er=this.trees[this._limitZoom(wt)],Xr=Math.pow(2,wt),ri=this.options,Qr=ri.extent,Oi=ri.radius,$i=Oi/Qr,tn=(nr-$i)/Xr,fn=(nr+1+$i)/Xr,yn={features:[]};return this._addTileFeatures(Er.range((rr-$i)/Xr,tn,(rr+1+$i)/Xr,fn),Er.points,rr,nr,Xr,yn),rr===0&&this._addTileFeatures(Er.range(1-$i/Xr,tn,1,fn),Er.points,Xr,nr,Xr,yn),rr===Xr-1&&this._addTileFeatures(Er.range(0,tn,$i/Xr,fn),Er.points,-1,nr,Xr,yn),yn.features.length?yn:null},pt.prototype.getClusterExpansionZoom=function(wt){for(var rr=this._getOriginZoom(wt)-1;rr<=this.options.maxZoom;){var nr=this.getChildren(wt);if(rr++,nr.length!==1)break;wt=nr[0].properties.cluster_id}return rr},pt.prototype._appendLeaves=function(wt,rr,nr,Er,Xr){for(var ri=this.getChildren(rr),Qr=0,Oi=ri;Qr<Oi.length;Qr+=1){var $i=Oi[Qr],tn=$i.properties;if(tn&&tn.cluster?Xr+tn.point_count<=Er?Xr+=tn.point_count:Xr=this._appendLeaves(wt,tn.cluster_id,nr,Er,Xr):Xr<Er?Xr++:wt.push($i),wt.length===nr)break}return Xr},pt.prototype._addTileFeatures=function(wt,rr,nr,Er,Xr,ri){for(var Qr=0,Oi=wt;Qr<Oi.length;Qr+=1){var $i=Oi[Qr],tn=rr[$i],fn=tn.numPoints,yn={type:1,geometry:[[Math.round(this.options.extent*(tn.x*Xr-nr)),Math.round(this.options.extent*(tn.y*Xr-Er))]],tags:fn?Wt(tn):this.points[tn.index].properties},Sn=void 0;fn?Sn=tn.id:this.options.generateId?Sn=tn.index:this.points[tn.index].id&&(Sn=this.points[tn.index].id),Sn!==void 0&&(yn.id=Sn),ri.features.push(yn)}},pt.prototype._limitZoom=function(wt){return Math.max(this.options.minZoom,Math.min(+wt,this.options.maxZoom+1))},pt.prototype._cluster=function(wt,rr){for(var nr=[],Er=this.options,Xr=Er.radius,ri=Er.extent,Qr=Er.reduce,Oi=Er.minPoints,$i=Xr/(ri*Math.pow(2,rr)),tn=0;tn<wt.length;tn++){var fn=wt[tn];if(!(fn.zoom<=rr)){fn.zoom=rr;for(var yn=this.trees[rr+1],Sn=yn.within(fn.x,fn.y,$i),Ba=fn.numPoints||1,ua=Ba,ma=0,Wa=Sn;ma<Wa.length;ma+=1){var Fa=Wa[ma],Xo=yn.points[Fa];Xo.zoom>rr&&(ua+=Xo.numPoints||1)}if(ua>=Oi){for(var da=fn.x*Ba,Wn=fn.y*Ba,Ha=Qr&&Ba>1?this._map(fn,!0):null,vo=(tn<<5)+(rr+1)+this.points.length,jn=0,Mt=Sn;jn<Mt.length;jn+=1){var kr=Mt[jn],Jr=yn.points[kr];if(!(Jr.zoom<=rr)){Jr.zoom=rr;var vi=Jr.numPoints||1;da+=Jr.x*vi,Wn+=Jr.y*vi,Jr.parentId=vo,Qr&&(Ha||(Ha=this._map(fn,!0)),Qr(Ha,this._map(Jr)))}}fn.parentId=vo,nr.push(Vt(da/ua,Wn/ua,vo,ua,Ha))}else if(nr.push(fn),ua>1)for(var hn=0,An=Sn;hn<An.length;hn+=1){var Mn=An[hn],Li=yn.points[Mn];Li.zoom<=rr||(Li.zoom=rr,nr.push(Li))}}}return nr},pt.prototype._getOriginId=function(wt){return wt-this.points.length>>5},pt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},pt.prototype._map=function(wt,rr){if(wt.numPoints)return rr?fr({},wt.properties):wt.properties;var nr=this.points[wt.index].properties,Er=this.options.map(nr);return rr&&Er===nr?fr({},Er):Er};function Vt(Ut,wt,rr,nr,Er){return{x:Ut,y:wt,zoom:1/0,id:rr,parentId:-1,numPoints:nr,properties:Er}}function ot(Ut,wt){var rr=Ut.geometry.coordinates,nr=rr[0],Er=rr[1];return{x:Nt(nr),y:$t(Er),zoom:1/0,index:wt,parentId:-1}}function ut(Ut){return{type:\"Feature\",id:Ut.id,properties:Wt(Ut),geometry:{type:\"Point\",coordinates:[sr(Ut.x),Tr(Ut.y)]}}}function Wt(Ut){var wt=Ut.numPoints,rr=wt>=1e4?Math.round(wt/1e3)+\"k\":wt>=1e3?Math.round(wt/100)/10+\"k\":wt;return fr(fr({},Ut.properties),{cluster:!0,cluster_id:Ut.id,point_count:wt,point_count_abbreviated:rr})}function Nt(Ut){return Ut/360+.5}function $t(Ut){var wt=Math.sin(Ut*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function sr(Ut){return(Ut-.5)*360}function Tr(Ut){var wt=(180-Ut*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function fr(Ut,wt){for(var rr in wt)Ut[rr]=wt[rr];return Ut}function $e(Ut){return Ut.x}function St(Ut){return Ut.y}function Qt(Ut,wt,rr,nr){for(var Er=nr,Xr=rr-wt>>1,ri=rr-wt,Qr,Oi=Ut[wt],$i=Ut[wt+1],tn=Ut[rr],fn=Ut[rr+1],yn=wt+3;yn<rr;yn+=3){var Sn=Gt(Ut[yn],Ut[yn+1],Oi,$i,tn,fn);if(Sn>Er)Qr=yn,Er=Sn;else if(Sn===Er){var Ba=Math.abs(yn-Xr);Ba<ri&&(Qr=yn,ri=Ba)}}Er>nr&&(Qr-wt>3&&Qt(Ut,wt,Qr,nr),Ut[Qr+2]=Er,rr-Qr>3&&Qt(Ut,Qr,rr,nr))}function Gt(Ut,wt,rr,nr,Er,Xr){var ri=Er-rr,Qr=Xr-nr;if(ri!==0||Qr!==0){var Oi=((Ut-rr)*ri+(wt-nr)*Qr)/(ri*ri+Qr*Qr);Oi>1?(rr=Er,nr=Xr):Oi>0&&(rr+=ri*Oi,nr+=Qr*Oi)}return ri=Ut-rr,Qr=wt-nr,ri*ri+Qr*Qr}function _t(Ut,wt,rr,nr){var Er={id:typeof Ut==\"undefined\"?null:Ut,type:wt,geometry:rr,tags:nr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return It(Er),Er}function It(Ut){var wt=Ut.geometry,rr=Ut.type;if(rr===\"Point\"||rr===\"MultiPoint\"||rr===\"LineString\")mt(Ut,wt);else if(rr===\"Polygon\"||rr===\"MultiLineString\")for(var nr=0;nr<wt.length;nr++)mt(Ut,wt[nr]);else if(rr===\"MultiPolygon\")for(nr=0;nr<wt.length;nr++)for(var Er=0;Er<wt[nr].length;Er++)mt(Ut,wt[nr][Er])}function mt(Ut,wt){for(var rr=0;rr<wt.length;rr+=3)Ut.minX=Math.min(Ut.minX,wt[rr]),Ut.minY=Math.min(Ut.minY,wt[rr+1]),Ut.maxX=Math.max(Ut.maxX,wt[rr]),Ut.maxY=Math.max(Ut.maxY,wt[rr+1])}function er(Ut,wt){var rr=[];if(Ut.type===\"FeatureCollection\")for(var nr=0;nr<Ut.features.length;nr++)lr(rr,Ut.features[nr],wt,nr);else Ut.type===\"Feature\"?lr(rr,Ut,wt):lr(rr,{geometry:Ut},wt);return rr}function lr(Ut,wt,rr,nr){if(wt.geometry){var Er=wt.geometry.coordinates,Xr=wt.geometry.type,ri=Math.pow(rr.tolerance/((1<<rr.maxZoom)*rr.extent),2),Qr=[],Oi=wt.id;if(rr.promoteId?Oi=wt.properties[rr.promoteId]:rr.generateId&&(Oi=nr||0),Xr===\"Point\")wr(Er,Qr);else if(Xr===\"MultiPoint\")for(var $i=0;$i<Er.length;$i++)wr(Er[$i],Qr);else if(Xr===\"LineString\")Lr(Er,Qr,ri,!1);else if(Xr===\"MultiLineString\")if(rr.lineMetrics){for($i=0;$i<Er.length;$i++)Qr=[],Lr(Er[$i],Qr,ri,!1),Ut.push(_t(Oi,\"LineString\",Qr,wt.properties));return}else ti(Er,Qr,ri,!1);else if(Xr===\"Polygon\")ti(Er,Qr,ri,!0);else if(Xr===\"MultiPolygon\")for($i=0;$i<Er.length;$i++){var tn=[];ti(Er[$i],tn,ri,!0),Qr.push(tn)}else if(Xr===\"GeometryCollection\"){for($i=0;$i<wt.geometry.geometries.length;$i++)lr(Ut,{id:Oi,geometry:wt.geometry.geometries[$i],properties:wt.properties},rr,nr);return}else throw new Error(\"Input data is not a valid GeoJSON object.\");Ut.push(_t(Oi,Xr,Qr,wt.properties))}}function wr(Ut,wt){wt.push(Br(Ut[0])),wt.push(Vr(Ut[1])),wt.push(0)}function Lr(Ut,wt,rr,nr){for(var Er,Xr,ri=0,Qr=0;Qr<Ut.length;Qr++){var Oi=Br(Ut[Qr][0]),$i=Vr(Ut[Qr][1]);wt.push(Oi),wt.push($i),wt.push(0),Qr>0&&(nr?ri+=(Er*$i-Oi*Xr)/2:ri+=Math.sqrt(Math.pow(Oi-Er,2)+Math.pow($i-Xr,2))),Er=Oi,Xr=$i}var tn=wt.length-3;wt[2]=1,Qt(wt,0,tn,rr),wt[tn+2]=1,wt.size=Math.abs(ri),wt.start=0,wt.end=wt.size}function ti(Ut,wt,rr,nr){for(var Er=0;Er<Ut.length;Er++){var Xr=[];Lr(Ut[Er],Xr,rr,nr),wt.push(Xr)}}function Br(Ut){return Ut/360+.5}function Vr(Ut){var wt=Math.sin(Ut*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function dt(Ut,wt,rr,nr,Er,Xr,ri,Qr){if(rr/=wt,nr/=wt,Xr>=rr&&ri<nr)return Ut;if(ri<rr||Xr>=nr)return null;for(var Oi=[],$i=0;$i<Ut.length;$i++){var tn=Ut[$i],fn=tn.geometry,yn=tn.type,Sn=Er===0?tn.minX:tn.minY,Ba=Er===0?tn.maxX:tn.maxY;if(Sn>=rr&&Ba<nr){Oi.push(tn);continue}else if(Ba<rr||Sn>=nr)continue;var ua=[];if(yn===\"Point\"||yn===\"MultiPoint\")Ge(fn,ua,rr,nr,Er);else if(yn===\"LineString\")Je(fn,ua,rr,nr,Er,!1,Qr.lineMetrics);else if(yn===\"MultiLineString\")tt(fn,ua,rr,nr,Er,!1);else if(yn===\"Polygon\")tt(fn,ua,rr,nr,Er,!0);else if(yn===\"MultiPolygon\")for(var ma=0;ma<fn.length;ma++){var Wa=[];tt(fn[ma],Wa,rr,nr,Er,!0),Wa.length&&ua.push(Wa)}if(ua.length){if(Qr.lineMetrics&&yn===\"LineString\"){for(ma=0;ma<ua.length;ma++)Oi.push(_t(tn.id,yn,ua[ma],tn.tags));continue}(yn===\"LineString\"||yn===\"MultiLineString\")&&(ua.length===1?(yn=\"LineString\",ua=ua[0]):yn=\"MultiLineString\"),(yn===\"Point\"||yn===\"MultiPoint\")&&(yn=ua.length===3?\"Point\":\"MultiPoint\"),Oi.push(_t(tn.id,yn,ua,tn.tags))}}return Oi.length?Oi:null}function Ge(Ut,wt,rr,nr,Er){for(var Xr=0;Xr<Ut.length;Xr+=3){var ri=Ut[Xr+Er];ri>=rr&&ri<=nr&&(wt.push(Ut[Xr]),wt.push(Ut[Xr+1]),wt.push(Ut[Xr+2]))}}function Je(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=We(Ut),Oi=Er===0?Ie:xe,$i=Ut.start,tn,fn,yn=0;yn<Ut.length-3;yn+=3){var Sn=Ut[yn],Ba=Ut[yn+1],ua=Ut[yn+2],ma=Ut[yn+3],Wa=Ut[yn+4],Fa=Er===0?Sn:Ba,Xo=Er===0?ma:Wa,da=!1;ri&&(tn=Math.sqrt(Math.pow(Sn-ma,2)+Math.pow(Ba-Wa,2))),Fa<rr?Xo>rr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),ri&&(Qr.start=$i+tn*fn)):Fa>nr?Xo<nr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,nr),ri&&(Qr.start=$i+tn*fn)):xt(Qr,Sn,Ba,ua),Xo<rr&&Fa>=rr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),da=!0),Xo>nr&&Fa<=nr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,nr),da=!0),!Xr&&da&&(ri&&(Qr.end=$i+tn*fn),wt.push(Qr),Qr=We(Ut)),ri&&($i+=tn)}var Wn=Ut.length-3;Sn=Ut[Wn],Ba=Ut[Wn+1],ua=Ut[Wn+2],Fa=Er===0?Sn:Ba,Fa>=rr&&Fa<=nr&&xt(Qr,Sn,Ba,ua),Wn=Qr.length-3,Xr&&Wn>=3&&(Qr[Wn]!==Qr[0]||Qr[Wn+1]!==Qr[1])&&xt(Qr,Qr[0],Qr[1],Qr[2]),Qr.length&&wt.push(Qr)}function We(Ut){var wt=[];return wt.size=Ut.size,wt.start=Ut.start,wt.end=Ut.end,wt}function tt(Ut,wt,rr,nr,Er,Xr){for(var ri=0;ri<Ut.length;ri++)Je(Ut[ri],wt,rr,nr,Er,Xr,!1)}function xt(Ut,wt,rr,nr){Ut.push(wt),Ut.push(rr),Ut.push(nr)}function Ie(Ut,wt,rr,nr,Er,Xr){var ri=(Xr-wt)/(nr-wt);return Ut.push(Xr),Ut.push(rr+(Er-rr)*ri),Ut.push(1),ri}function xe(Ut,wt,rr,nr,Er,Xr){var ri=(Xr-rr)/(Er-rr);return Ut.push(wt+(nr-wt)*ri),Ut.push(Xr),Ut.push(1),ri}function ke(Ut,wt){var rr=wt.buffer/wt.extent,nr=Ut,Er=dt(Ut,1,-1-rr,rr,0,-1,2,wt),Xr=dt(Ut,1,1-rr,2+rr,0,-1,2,wt);return(Er||Xr)&&(nr=dt(Ut,1,-rr,1+rr,0,-1,2,wt)||[],Er&&(nr=vt(Er,1).concat(nr)),Xr&&(nr=nr.concat(vt(Xr,-1)))),nr}function vt(Ut,wt){for(var rr=[],nr=0;nr<Ut.length;nr++){var Er=Ut[nr],Xr=Er.type,ri;if(Xr===\"Point\"||Xr===\"MultiPoint\"||Xr===\"LineString\")ri=ir(Er.geometry,wt);else if(Xr===\"MultiLineString\"||Xr===\"Polygon\"){ri=[];for(var Qr=0;Qr<Er.geometry.length;Qr++)ri.push(ir(Er.geometry[Qr],wt))}else if(Xr===\"MultiPolygon\")for(ri=[],Qr=0;Qr<Er.geometry.length;Qr++){for(var Oi=[],$i=0;$i<Er.geometry[Qr].length;$i++)Oi.push(ir(Er.geometry[Qr][$i],wt));ri.push(Oi)}rr.push(_t(Er.id,Xr,ri,Er.tags))}return rr}function ir(Ut,wt){var rr=[];rr.size=Ut.size,Ut.start!==void 0&&(rr.start=Ut.start,rr.end=Ut.end);for(var nr=0;nr<Ut.length;nr+=3)rr.push(Ut[nr]+wt,Ut[nr+1],Ut[nr+2]);return rr}function ar(Ut,wt){if(Ut.transformed)return Ut;var rr=1<<Ut.z,nr=Ut.x,Er=Ut.y,Xr,ri,Qr;for(Xr=0;Xr<Ut.features.length;Xr++){var Oi=Ut.features[Xr],$i=Oi.geometry,tn=Oi.type;if(Oi.geometry=[],tn===1)for(ri=0;ri<$i.length;ri+=2)Oi.geometry.push(vr($i[ri],$i[ri+1],wt,rr,nr,Er));else for(ri=0;ri<$i.length;ri++){var fn=[];for(Qr=0;Qr<$i[ri].length;Qr+=2)fn.push(vr($i[ri][Qr],$i[ri][Qr+1],wt,rr,nr,Er));Oi.geometry.push(fn)}}return Ut.transformed=!0,Ut}function vr(Ut,wt,rr,nr,Er,Xr){return[Math.round(rr*(Ut*nr-Er)),Math.round(rr*(wt*nr-Xr))]}function ii(Ut,wt,rr,nr,Er){for(var Xr=wt===Er.maxZoom?0:Er.tolerance/((1<<wt)*Er.extent),ri={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:rr,y:nr,z:wt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Qr=0;Qr<Ut.length;Qr++){ri.numFeatures++,pi(ri,Ut[Qr],Xr,Er);var Oi=Ut[Qr].minX,$i=Ut[Qr].minY,tn=Ut[Qr].maxX,fn=Ut[Qr].maxY;Oi<ri.minX&&(ri.minX=Oi),$i<ri.minY&&(ri.minY=$i),tn>ri.maxX&&(ri.maxX=tn),fn>ri.maxY&&(ri.maxY=fn)}return ri}function pi(Ut,wt,rr,nr){var Er=wt.geometry,Xr=wt.type,ri=[];if(Xr===\"Point\"||Xr===\"MultiPoint\")for(var Qr=0;Qr<Er.length;Qr+=3)ri.push(Er[Qr]),ri.push(Er[Qr+1]),Ut.numPoints++,Ut.numSimplified++;else if(Xr===\"LineString\")$r(ri,Er,Ut,rr,!1,!1);else if(Xr===\"MultiLineString\"||Xr===\"Polygon\")for(Qr=0;Qr<Er.length;Qr++)$r(ri,Er[Qr],Ut,rr,Xr===\"Polygon\",Qr===0);else if(Xr===\"MultiPolygon\")for(var Oi=0;Oi<Er.length;Oi++){var $i=Er[Oi];for(Qr=0;Qr<$i.length;Qr++)$r(ri,$i[Qr],Ut,rr,!0,Qr===0)}if(ri.length){var tn=wt.tags||null;if(Xr===\"LineString\"&&nr.lineMetrics){tn={};for(var fn in wt.tags)tn[fn]=wt.tags[fn];tn.mapbox_clip_start=Er.start/Er.size,tn.mapbox_clip_end=Er.end/Er.size}var yn={geometry:ri,type:Xr===\"Polygon\"||Xr===\"MultiPolygon\"?3:Xr===\"LineString\"||Xr===\"MultiLineString\"?2:1,tags:tn};wt.id!==null&&(yn.id=wt.id),Ut.features.push(yn)}}function $r(Ut,wt,rr,nr,Er,Xr){var ri=nr*nr;if(nr>0&&wt.size<(Er?ri:nr)){rr.numPoints+=wt.length/3;return}for(var Qr=[],Oi=0;Oi<wt.length;Oi+=3)(nr===0||wt[Oi+2]>ri)&&(rr.numSimplified++,Qr.push(wt[Oi]),Qr.push(wt[Oi+1])),rr.numPoints++;Er&&di(Qr,Xr),Ut.push(Qr)}function di(Ut,wt){for(var rr=0,nr=0,Er=Ut.length,Xr=Er-2;nr<Er;Xr=nr,nr+=2)rr+=(Ut[nr]-Ut[Xr])*(Ut[nr+1]+Ut[Xr+1]);if(rr>0===wt)for(nr=0,Er=Ut.length;nr<Er/2;nr+=2){var ri=Ut[nr],Qr=Ut[nr+1];Ut[nr]=Ut[Er-2-nr],Ut[nr+1]=Ut[Er-1-nr],Ut[Er-2-nr]=ri,Ut[Er-1-nr]=Qr}}function ji(Ut,wt){return new In(Ut,wt)}function In(Ut,wt){wt=this.options=On(Object.create(this.options),wt);var rr=wt.debug;if(rr&&console.time(\"preprocess data\"),wt.maxZoom<0||wt.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");if(wt.promoteId&&wt.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");var nr=er(Ut,wt);this.tiles={},this.tileCoords=[],rr&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",wt.indexMaxZoom,wt.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),nr=ke(nr,wt),nr.length&&this.splitTile(nr,0,0,0),rr&&(nr.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}In.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},In.prototype.splitTile=function(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[Ut,wt,rr,nr],Oi=this.options,$i=Oi.debug;Qr.length;){nr=Qr.pop(),rr=Qr.pop(),wt=Qr.pop(),Ut=Qr.pop();var tn=1<<wt,fn=wi(wt,rr,nr),yn=this.tiles[fn];if(!yn&&($i>1&&console.time(\"creation\"),yn=this.tiles[fn]=ii(Ut,wt,rr,nr,Oi),this.tileCoords.push({z:wt,x:rr,y:nr}),$i)){$i>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",wt,rr,nr,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd(\"creation\"));var Sn=\"z\"+wt;this.stats[Sn]=(this.stats[Sn]||0)+1,this.total++}if(yn.source=Ut,Er){if(wt===Oi.maxZoom||wt===Er)continue;var Ba=1<<Er-wt;if(rr!==Math.floor(Xr/Ba)||nr!==Math.floor(ri/Ba))continue}else if(wt===Oi.indexMaxZoom||yn.numPoints<=Oi.indexMaxPoints)continue;if(yn.source=null,Ut.length!==0){$i>1&&console.time(\"clipping\");var ua=.5*Oi.buffer/Oi.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Xo,da,Wn,Ha,vo,jn;Xo=da=Wn=Ha=null,vo=dt(Ut,tn,rr-ua,rr+Wa,0,yn.minX,yn.maxX,Oi),jn=dt(Ut,tn,rr+ma,rr+Fa,0,yn.minX,yn.maxX,Oi),Ut=null,vo&&(Xo=dt(vo,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),da=dt(vo,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),vo=null),jn&&(Wn=dt(jn,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),Ha=dt(jn,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),jn=null),$i>1&&console.timeEnd(\"clipping\"),Qr.push(Xo||[],wt+1,rr*2,nr*2),Qr.push(da||[],wt+1,rr*2,nr*2+1),Qr.push(Wn||[],wt+1,rr*2+1,nr*2),Qr.push(Ha||[],wt+1,rr*2+1,nr*2+1)}}},In.prototype.getTile=function(Ut,wt,rr){var nr=this.options,Er=nr.extent,Xr=nr.debug;if(Ut<0||Ut>24)return null;var ri=1<<Ut;wt=(wt%ri+ri)%ri;var Qr=wi(Ut,wt,rr);if(this.tiles[Qr])return ar(this.tiles[Qr],Er);Xr>1&&console.log(\"drilling down to z%d-%d-%d\",Ut,wt,rr);for(var Oi=Ut,$i=wt,tn=rr,fn;!fn&&Oi>0;)Oi--,$i=Math.floor($i/2),tn=Math.floor(tn/2),fn=this.tiles[wi(Oi,$i,tn)];return!fn||!fn.source?null:(Xr>1&&console.log(\"found parent tile z%d-%d-%d\",Oi,$i,tn),Xr>1&&console.time(\"drilling down\"),this.splitTile(fn.source,Oi,$i,tn,Ut,wt,rr),Xr>1&&console.timeEnd(\"drilling down\"),this.tiles[Qr]?ar(this.tiles[Qr],Er):null)};function wi(Ut,wt,rr){return((1<<Ut)*rr+wt)*32+Ut}function On(Ut,wt){for(var rr in wt)Ut[rr]=wt[rr];return Ut}function qn(Ut,wt){var rr=Ut.tileID.canonical;if(!this._geoJSONIndex)return wt(null,null);var nr=this._geoJSONIndex.getTile(rr.z,rr.x,rr.y);if(!nr)return wt(null,null);var Er=new C(nr.features),Xr=z(Er);(Xr.byteOffset!==0||Xr.byteLength!==Xr.buffer.byteLength)&&(Xr=new Uint8Array(Xr)),wt(null,{vectorTile:Er,rawData:Xr.buffer})}var Fn=function(Ut){function wt(rr,nr,Er,Xr){Ut.call(this,rr,nr,Er,qn),Xr&&(this.loadGeoJSON=Xr)}return Ut&&(wt.__proto__=Ut),wt.prototype=Object.create(Ut&&Ut.prototype),wt.prototype.constructor=wt,wt.prototype.loadData=function(nr,Er){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Er,this._pendingLoadDataParams=nr,this._state&&this._state!==\"Idle\"?this._state=\"NeedsLoadData\":(this._state=\"Coalescing\",this._loadData())},wt.prototype._loadData=function(){var nr=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Er=this._pendingCallback,Xr=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ri=Xr&&Xr.request&&Xr.request.collectResourceTiming?new i.RequestPerformance(Xr.request):!1;this.loadGeoJSON(Xr,function(Qr,Oi){if(Qr||!Oi)return Er(Qr);if(typeof Oi!=\"object\")return Er(new Error(\"Input data given to '\"+Xr.source+\"' is not a valid GeoJSON object.\"));p(Oi,!0);try{if(Xr.filter){var $i=i.createExpression(Xr.filter,{type:\"boolean\",\"property-type\":\"data-driven\",overridable:!1,transition:!1});if($i.result===\"error\")throw new Error($i.value.map(function(Sn){return Sn.key+\": \"+Sn.message}).join(\", \"));var tn=Oi.features.filter(function(Sn){return $i.value.evaluate({zoom:0},Sn)});Oi={type:\"FeatureCollection\",features:tn}}nr._geoJSONIndex=Xr.cluster?new pt(ra(Xr)).load(Oi.features):ji(Oi,Xr.geojsonVtOptions)}catch(Sn){return Er(Sn)}nr.loaded={};var fn={};if(ri){var yn=ri.finish();yn&&(fn.resourceTiming={},fn.resourceTiming[Xr.source]=JSON.parse(JSON.stringify(yn)))}Er(null,fn)})}},wt.prototype.coalesce=function(){this._state===\"Coalescing\"?this._state=\"Idle\":this._state===\"NeedsLoadData\"&&(this._state=\"Coalescing\",this._loadData())},wt.prototype.reloadTile=function(nr,Er){var Xr=this.loaded,ri=nr.uid;return Xr&&Xr[ri]?Ut.prototype.reloadTile.call(this,nr,Er):this.loadTile(nr,Er)},wt.prototype.loadGeoJSON=function(nr,Er){if(nr.request)i.getJSON(nr.request,Er);else if(typeof nr.data==\"string\")try{return Er(null,JSON.parse(nr.data))}catch(Xr){return Er(new Error(\"Input data given to '\"+nr.source+\"' is not a valid GeoJSON object.\"))}else return Er(new Error(\"Input data given to '\"+nr.source+\"' is not a valid GeoJSON object.\"))},wt.prototype.removeSource=function(nr,Er){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Er()},wt.prototype.getClusterExpansionZoom=function(nr,Er){try{Er(null,this._geoJSONIndex.getClusterExpansionZoom(nr.clusterId))}catch(Xr){Er(Xr)}},wt.prototype.getClusterChildren=function(nr,Er){try{Er(null,this._geoJSONIndex.getChildren(nr.clusterId))}catch(Xr){Er(Xr)}},wt.prototype.getClusterLeaves=function(nr,Er){try{Er(null,this._geoJSONIndex.getLeaves(nr.clusterId,nr.limit,nr.offset))}catch(Xr){Er(Xr)}},wt}(v);function ra(Ut){var wt=Ut.superclusterOptions,rr=Ut.clusterProperties;if(!rr||!wt)return wt;for(var nr={},Er={},Xr={accumulated:null,zoom:0},ri={properties:null},Qr=Object.keys(rr),Oi=0,$i=Qr;Oi<$i.length;Oi+=1){var tn=$i[Oi],fn=rr[tn],yn=fn[0],Sn=fn[1],Ba=i.createExpression(Sn),ua=i.createExpression(typeof yn==\"string\"?[yn,[\"accumulated\"],[\"get\",tn]]:yn);nr[tn]=Ba.value,Er[tn]=ua.value}return wt.map=function(ma){ri.properties=ma;for(var Wa={},Fa=0,Xo=Qr;Fa<Xo.length;Fa+=1){var da=Xo[Fa];Wa[da]=nr[da].evaluate(Xr,ri)}return Wa},wt.reduce=function(ma,Wa){ri.properties=Wa;for(var Fa=0,Xo=Qr;Fa<Xo.length;Fa+=1){var da=Xo[Fa];Xr.accumulated=ma[da],ma[da]=Er[da].evaluate(Xr,ri)}},wt}var la=function(wt){var rr=this;this.self=wt,this.actor=new i.Actor(wt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:v,geojson:Fn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(nr,Er){if(rr.workerSourceTypes[nr])throw new Error('Worker source with name \"'+nr+'\" already registered.');rr.workerSourceTypes[nr]=Er},this.self.registerRTLTextPlugin=function(nr){if(i.plugin.isParsed())throw new Error(\"RTL text plugin already registered.\");i.plugin.applyArabicShaping=nr.applyArabicShaping,i.plugin.processBidirectionalText=nr.processBidirectionalText,i.plugin.processStyledBidirectionalText=nr.processStyledBidirectionalText}};return la.prototype.setReferrer=function(wt,rr){this.referrer=rr},la.prototype.setImages=function(wt,rr,nr){this.availableImages[wt]=rr;for(var Er in this.workerSources[wt]){var Xr=this.workerSources[wt][Er];for(var ri in Xr)Xr[ri].availableImages=rr}nr()},la.prototype.setLayers=function(wt,rr,nr){this.getLayerIndex(wt).replace(rr),nr()},la.prototype.updateLayers=function(wt,rr,nr){this.getLayerIndex(wt).update(rr.layers,rr.removedIds),nr()},la.prototype.loadTile=function(wt,rr,nr){this.getWorkerSource(wt,rr.type,rr.source).loadTile(rr,nr)},la.prototype.loadDEMTile=function(wt,rr,nr){this.getDEMWorkerSource(wt,rr.source).loadTile(rr,nr)},la.prototype.reloadTile=function(wt,rr,nr){this.getWorkerSource(wt,rr.type,rr.source).reloadTile(rr,nr)},la.prototype.abortTile=function(wt,rr,nr){this.getWorkerSource(wt,rr.type,rr.source).abortTile(rr,nr)},la.prototype.removeTile=function(wt,rr,nr){this.getWorkerSource(wt,rr.type,rr.source).removeTile(rr,nr)},la.prototype.removeDEMTile=function(wt,rr){this.getDEMWorkerSource(wt,rr.source).removeTile(rr)},la.prototype.removeSource=function(wt,rr,nr){if(!(!this.workerSources[wt]||!this.workerSources[wt][rr.type]||!this.workerSources[wt][rr.type][rr.source])){var Er=this.workerSources[wt][rr.type][rr.source];delete this.workerSources[wt][rr.type][rr.source],Er.removeSource!==void 0?Er.removeSource(rr,nr):nr()}},la.prototype.loadWorkerSource=function(wt,rr,nr){try{this.self.importScripts(rr.url),nr()}catch(Er){nr(Er.toString())}},la.prototype.syncRTLPluginState=function(wt,rr,nr){try{i.plugin.setState(rr);var Er=i.plugin.getPluginURL();if(i.plugin.isLoaded()&&!i.plugin.isParsed()&&Er!=null){this.self.importScripts(Er);var Xr=i.plugin.isParsed(),ri=Xr?void 0:new Error(\"RTL Text Plugin failed to import scripts from \"+Er);nr(ri,Xr)}}catch(Qr){nr(Qr.toString())}},la.prototype.getAvailableImages=function(wt){var rr=this.availableImages[wt];return rr||(rr=[]),rr},la.prototype.getLayerIndex=function(wt){var rr=this.layerIndexes[wt];return rr||(rr=this.layerIndexes[wt]=new l),rr},la.prototype.getWorkerSource=function(wt,rr,nr){var Er=this;if(this.workerSources[wt]||(this.workerSources[wt]={}),this.workerSources[wt][rr]||(this.workerSources[wt][rr]={}),!this.workerSources[wt][rr][nr]){var Xr={send:function(ri,Qr,Oi){Er.actor.send(ri,Qr,Oi,wt)}};this.workerSources[wt][rr][nr]=new this.workerSourceTypes[rr](Xr,this.getLayerIndex(wt),this.getAvailableImages(wt))}return this.workerSources[wt][rr][nr]},la.prototype.getDEMWorkerSource=function(wt,rr){return this.demWorkerSources[wt]||(this.demWorkerSources[wt]={}),this.demWorkerSources[wt][rr]||(this.demWorkerSources[wt][rr]=new b),this.demWorkerSources[wt][rr]},la.prototype.enforceCacheSizeLimit=function(wt,rr){i.enforceCacheSizeLimit(rr)},typeof WorkerGlobalScope!=\"undefined\"&&typeof self!=\"undefined\"&&self instanceof WorkerGlobalScope&&(self.worker=new la(self)),la}),n([\"./shared\"],function(i){\"use strict\";var a=i.createCommonjsModule(function(Y){Y.exports?Y.exports=D:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=D,window.mapboxgl.notSupportedReason=J);function D(Ct){return!J(Ct)}function J(Ct){if(!q())return\"not a browser\";if(!K())return\"insufficent Array support\";if(!de())return\"insufficient Function support\";if(!ne())return\"insufficient Object support\";if(!we())return\"insufficient JSON support\";if(!Ue())return\"insufficient worker support\";if(!ft())return\"insufficient Uint8ClampedArray support\";if(!Zt())return\"insufficient ArrayBuffer support\";if(!hr())return\"insufficient Canvas/getImageData support\";if(!Ve(Ct&&Ct.failIfMajorPerformanceCaveat))return\"insufficient WebGL support\"}function q(){return typeof window!=\"undefined\"&&typeof document!=\"undefined\"}function K(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function de(){return Function.prototype&&Function.prototype.bind}function ne(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function we(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function Ue(){if(!(\"Worker\"in window&&\"Blob\"in window&&\"URL\"in window))return!1;var Ct=new Blob([\"\"],{type:\"text/javascript\"}),Ot=URL.createObjectURL(Ct),Rt,Bt;try{Bt=new Worker(Ot),Rt=!0}catch(Dt){Rt=!1}return Bt&&Bt.terminate(),URL.revokeObjectURL(Ot),Rt}function ft(){return\"Uint8ClampedArray\"in window}function Zt(){return ArrayBuffer.isView}function hr(){var Ct=document.createElement(\"canvas\");Ct.width=Ct.height=1;var Ot=Ct.getContext(\"2d\");if(!Ot)return!1;var Rt=Ot.getImageData(0,0,1,1);return Rt&&Rt.width===Ct.width}var qt={};function Ve(Ct){return qt[Ct]===void 0&&(qt[Ct]=at(Ct)),qt[Ct]}D.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Qe(Ct){var Ot=document.createElement(\"canvas\"),Rt=Object.create(D.webGLContextAttributes);return Rt.failIfMajorPerformanceCaveat=Ct,Ot.probablySupportsContext?Ot.probablySupportsContext(\"webgl\",Rt)||Ot.probablySupportsContext(\"experimental-webgl\",Rt):Ot.supportsContext?Ot.supportsContext(\"webgl\",Rt)||Ot.supportsContext(\"experimental-webgl\",Rt):Ot.getContext(\"webgl\",Rt)||Ot.getContext(\"experimental-webgl\",Rt)}function at(Ct){var Ot=Qe(Ct);if(!Ot)return!1;var Rt=Ot.createShader(Ot.VERTEX_SHADER);return!Rt||Ot.isContextLost()?!1:(Ot.shaderSource(Rt,\"void main() {}\"),Ot.compileShader(Rt),Ot.getShaderParameter(Rt,Ot.COMPILE_STATUS)===!0)}}),o={};o.create=function(Y,D,J){var q=i.window.document.createElement(Y);return D!==void 0&&(q.className=D),J&&J.appendChild(q),q},o.createNS=function(Y,D){var J=i.window.document.createElementNS(Y,D);return J};var s=i.window.document&&i.window.document.documentElement.style;function l(Y){if(!s)return Y[0];for(var D=0;D<Y.length;D++)if(Y[D]in s)return Y[D];return Y[0]}var u=l([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]),c;o.disableDrag=function(){s&&u&&(c=s[u],s[u]=\"none\")},o.enableDrag=function(){s&&u&&(s[u]=c)};var f=l([\"transform\",\"WebkitTransform\"]);o.setTransform=function(Y,D){Y.style[f]=D};var h=!1;try{var d=Object.defineProperty({},\"passive\",{get:function(){h=!0}});i.window.addEventListener(\"test\",d,d),i.window.removeEventListener(\"test\",d,d)}catch(Y){h=!1}o.addEventListener=function(Y,D,J,q){q===void 0&&(q={}),\"passive\"in q&&h?Y.addEventListener(D,J,q):Y.addEventListener(D,J,q.capture)},o.removeEventListener=function(Y,D,J,q){q===void 0&&(q={}),\"passive\"in q&&h?Y.removeEventListener(D,J,q):Y.removeEventListener(D,J,q.capture)};var v=function(Y){Y.preventDefault(),Y.stopPropagation(),i.window.removeEventListener(\"click\",v,!0)};o.suppressClick=function(){i.window.addEventListener(\"click\",v,!0),i.window.setTimeout(function(){i.window.removeEventListener(\"click\",v,!0)},0)},o.mousePos=function(Y,D){var J=Y.getBoundingClientRect();return new i.Point(D.clientX-J.left-Y.clientLeft,D.clientY-J.top-Y.clientTop)},o.touchPos=function(Y,D){for(var J=Y.getBoundingClientRect(),q=[],K=0;K<D.length;K++)q.push(new i.Point(D[K].clientX-J.left-Y.clientLeft,D[K].clientY-J.top-Y.clientTop));return q},o.mouseButton=function(Y){return typeof i.window.InstallTrigger!=\"undefined\"&&Y.button===2&&Y.ctrlKey&&i.window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function _(Y,D,J){var q,K,de,ne=i.browser.devicePixelRatio>1?\"@2x\":\"\",we=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,\".json\"),i.ResourceType.SpriteJSON),function(Zt,hr){we=null,de||(de=Zt,q=hr,ft())}),Ue=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,\".png\"),i.ResourceType.SpriteImage),function(Zt,hr){Ue=null,de||(de=Zt,K=hr,ft())});function ft(){if(de)J(de);else if(q&&K){var Zt=i.browser.getImageData(K),hr={};for(var qt in q){var Ve=q[qt],Qe=Ve.width,at=Ve.height,Ct=Ve.x,Ot=Ve.y,Rt=Ve.sdf,Bt=Ve.pixelRatio,Dt=Ve.stretchX,yt=Ve.stretchY,Pt=Ve.content,ht=new i.RGBAImage({width:Qe,height:at});i.RGBAImage.copy(Zt,ht,{x:Ct,y:Ot},{x:0,y:0},{width:Qe,height:at}),hr[qt]={data:ht,pixelRatio:Bt,sdf:Rt,stretchX:Dt,stretchY:yt,content:Pt}}J(null,hr)}}return{cancel:function(){we&&(we.cancel(),we=null),Ue&&(Ue.cancel(),Ue=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(q){if(this.loaded!==q&&(this.loaded=q,q)){for(var K=0,de=this.requestors;K<de.length;K+=1){var ne=de[K],we=ne.ids,Ue=ne.callback;this._notify(we,Ue)}this.requestors=[]}},D.prototype.getImage=function(q){return this.images[q]},D.prototype.addImage=function(q,K){this._validate(q,K)&&(this.images[q]=K)},D.prototype._validate=function(q,K){var de=!0;return this._validateStretch(K.stretchX,K.data&&K.data.width)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"stretchX\" value'))),de=!1),this._validateStretch(K.stretchY,K.data&&K.data.height)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"stretchY\" value'))),de=!1),this._validateContent(K.content,K)||(this.fire(new i.ErrorEvent(new Error('Image \"'+q+'\" has invalid \"content\" value'))),de=!1),de},D.prototype._validateStretch=function(q,K){if(!q)return!0;for(var de=0,ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];if(Ue[0]<de||Ue[1]<Ue[0]||K<Ue[1])return!1;de=Ue[1]}return!0},D.prototype._validateContent=function(q,K){return q?!(q.length!==4||q[0]<0||K.data.width<q[0]||q[1]<0||K.data.height<q[1]||q[2]<0||K.data.width<q[2]||q[3]<0||K.data.height<q[3]||q[2]<q[0]||q[3]<q[1]):!0},D.prototype.updateImage=function(q,K){var de=this.images[q];K.version=de.version+1,this.images[q]=K,this.updatedImages[q]=!0},D.prototype.removeImage=function(q){var K=this.images[q];delete this.images[q],delete this.patterns[q],K.userImage&&K.userImage.onRemove&&K.userImage.onRemove()},D.prototype.listImages=function(){return Object.keys(this.images)},D.prototype.getImages=function(q,K){var de=!0;if(!this.isLoaded())for(var ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];this.images[Ue]||(de=!1)}this.isLoaded()||de?this._notify(q,K):this.requestors.push({ids:q,callback:K})},D.prototype._notify=function(q,K){for(var de={},ne=0,we=q;ne<we.length;ne+=1){var Ue=we[ne];this.images[Ue]||this.fire(new i.Event(\"styleimagemissing\",{id:Ue}));var ft=this.images[Ue];ft?de[Ue]={data:ft.data.clone(),pixelRatio:ft.pixelRatio,sdf:ft.sdf,version:ft.version,stretchX:ft.stretchX,stretchY:ft.stretchY,content:ft.content,hasRenderCallback:!!(ft.userImage&&ft.userImage.render)}:i.warnOnce('Image \"'+Ue+'\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.')}K(null,de)},D.prototype.getPixelSize=function(){var q=this.atlasImage,K=q.width,de=q.height;return{width:K,height:de}},D.prototype.getPattern=function(q){var K=this.patterns[q],de=this.getImage(q);if(!de)return null;if(K&&K.position.version===de.version)return K.position;if(K)K.position.version=de.version;else{var ne=de.data.width+p*2,we=de.data.height+p*2,Ue={w:ne,h:we,x:0,y:0},ft=new i.ImagePosition(Ue,de);this.patterns[q]={bin:Ue,position:ft}}return this._updatePatternAtlas(),this.patterns[q].position},D.prototype.bind=function(q){var K=q.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.Texture(q,this.atlasImage,K.RGBA),this.atlasTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE)},D.prototype._updatePatternAtlas=function(){var q=[];for(var K in this.patterns)q.push(this.patterns[K].bin);var de=i.potpack(q),ne=de.w,we=de.h,Ue=this.atlasImage;Ue.resize({width:ne||1,height:we||1});for(var ft in this.patterns){var Zt=this.patterns[ft],hr=Zt.bin,qt=hr.x+p,Ve=hr.y+p,Qe=this.images[ft].data,at=Qe.width,Ct=Qe.height;i.RGBAImage.copy(Qe,Ue,{x:0,y:0},{x:qt,y:Ve},{width:at,height:Ct}),i.RGBAImage.copy(Qe,Ue,{x:0,y:Ct-1},{x:qt,y:Ve-1},{width:at,height:1}),i.RGBAImage.copy(Qe,Ue,{x:0,y:0},{x:qt,y:Ve+Ct},{width:at,height:1}),i.RGBAImage.copy(Qe,Ue,{x:at-1,y:0},{x:qt-1,y:Ve},{width:1,height:Ct}),i.RGBAImage.copy(Qe,Ue,{x:0,y:0},{x:qt+at,y:Ve},{width:1,height:Ct})}this.dirty=!0},D.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},D.prototype.dispatchRenderCallbacks=function(q){for(var K=0,de=q;K<de.length;K+=1){var ne=de[K];if(!this.callbackDispatchedThisFrame[ne]){this.callbackDispatchedThisFrame[ne]=!0;var we=this.images[ne],Ue=b(we);Ue&&this.updateImage(ne,we)}}},D}(i.Evented);function E(Y,D,J,q,K){var de=D*256,ne=de+255,we=q.transformRequest(q.normalizeGlyphsURL(J).replace(\"{fontstack}\",Y).replace(\"{range}\",de+\"-\"+ne),i.ResourceType.Glyphs);i.getArrayBuffer(we,function(Ue,ft){if(Ue)K(Ue);else if(ft){for(var Zt={},hr=0,qt=i.parseGlyphPBF(ft);hr<qt.length;hr+=1){var Ve=qt[hr];Zt[Ve.id]=Ve}K(null,Zt)}})}var T=C,L=C,x=1e20;function C(Y,D,J,q,K,de){this.fontSize=Y||24,this.buffer=D===void 0?3:D,this.cutoff=q||.25,this.fontFamily=K||\"sans-serif\",this.fontWeight=de||\"normal\",this.radius=J||8;var ne=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement(\"canvas\"),this.canvas.width=this.canvas.height=ne,this.ctx=this.canvas.getContext(\"2d\"),this.ctx.font=this.fontWeight+\" \"+this.fontSize+\"px \"+this.fontFamily,this.ctx.textBaseline=\"middle\",this.ctx.fillStyle=\"black\",this.gridOuter=new Float64Array(ne*ne),this.gridInner=new Float64Array(ne*ne),this.f=new Float64Array(ne),this.d=new Float64Array(ne),this.z=new Float64Array(ne+1),this.v=new Int16Array(ne),this.middle=Math.round(ne/2*(navigator.userAgent.indexOf(\"Gecko/\")>=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),q=0;q<this.size*this.size;q++){var K=D.data[q*4+3]/255;this.gridOuter[q]=K===1?0:K===0?x:Math.pow(Math.max(0,.5-K),2),this.gridInner[q]=K===1?x:K===0?0:Math.pow(Math.max(0,K-.5),2)}for(M(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),M(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),q=0;q<this.size*this.size;q++){var de=this.gridOuter[q]-this.gridInner[q];J[q]=Math.max(0,Math.min(255,Math.round(255-255*(de/this.radius+this.cutoff))))}return J};function M(Y,D,J,q,K,de,ne){for(var we=0;we<D;we++){for(var Ue=0;Ue<J;Ue++)q[Ue]=Y[Ue*D+we];for(g(q,K,de,ne,J),Ue=0;Ue<J;Ue++)Y[Ue*D+we]=K[Ue]}for(Ue=0;Ue<J;Ue++){for(we=0;we<D;we++)q[we]=Y[Ue*D+we];for(g(q,K,de,ne,D),we=0;we<D;we++)Y[Ue*D+we]=Math.sqrt(K[we])}}function g(Y,D,J,q,K){J[0]=0,q[0]=-x,q[1]=+x;for(var de=1,ne=0;de<K;de++){for(var we=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);we<=q[ne];)ne--,we=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);ne++,J[ne]=de,q[ne]=we,q[ne+1]=+x}for(de=0,ne=0;de<K;de++){for(;q[ne+1]<de;)ne++;D[de]=(de-J[ne])*(de-J[ne])+Y[J[ne]]}}T.default=L;var P=function(D,J){this.requestManager=D,this.localIdeographFontFamily=J,this.entries={}};P.prototype.setURL=function(D){this.url=D},P.prototype.getGlyphs=function(D,J){var q=this,K=[];for(var de in D)for(var ne=0,we=D[de];ne<we.length;ne+=1){var Ue=we[ne];K.push({stack:de,id:Ue})}i.asyncAll(K,function(ft,Zt){var hr=ft.stack,qt=ft.id,Ve=q.entries[hr];Ve||(Ve=q.entries[hr]={glyphs:{},requests:{},ranges:{}});var Qe=Ve.glyphs[qt];if(Qe!==void 0){Zt(null,{stack:hr,id:qt,glyph:Qe});return}if(Qe=q._tinySDF(Ve,hr,qt),Qe){Ve.glyphs[qt]=Qe,Zt(null,{stack:hr,id:qt,glyph:Qe});return}var at=Math.floor(qt/256);if(at*256>65535){Zt(new Error(\"glyphs > 65535 not supported\"));return}if(Ve.ranges[at]){Zt(null,{stack:hr,id:qt,glyph:Qe});return}var Ct=Ve.requests[at];Ct||(Ct=Ve.requests[at]=[],P.loadGlyphRange(hr,at,q.url,q.requestManager,function(Ot,Rt){if(Rt){for(var Bt in Rt)q._doesCharSupportLocalGlyph(+Bt)||(Ve.glyphs[+Bt]=Rt[+Bt]);Ve.ranges[at]=!0}for(var Dt=0,yt=Ct;Dt<yt.length;Dt+=1){var Pt=yt[Dt];Pt(Ot,Rt)}delete Ve.requests[at]})),Ct.push(function(Ot,Rt){Ot?Zt(Ot):Rt&&Zt(null,{stack:hr,id:qt,glyph:Rt[qt]||null})})},function(ft,Zt){if(ft)J(ft);else if(Zt){for(var hr={},qt=0,Ve=Zt;qt<Ve.length;qt+=1){var Qe=Ve[qt],at=Qe.stack,Ct=Qe.id,Ot=Qe.glyph;(hr[at]||(hr[at]={}))[Ct]=Ot&&{id:Ot.id,bitmap:Ot.bitmap.clone(),metrics:Ot.metrics}}J(null,hr)}})},P.prototype._doesCharSupportLocalGlyph=function(D){return!!this.localIdeographFontFamily&&(i.isChar[\"CJK Unified Ideographs\"](D)||i.isChar[\"Hangul Syllables\"](D)||i.isChar.Hiragana(D)||i.isChar.Katakana(D))},P.prototype._tinySDF=function(D,J,q){var K=this.localIdeographFontFamily;if(K&&this._doesCharSupportLocalGlyph(q)){var de=D.tinySDF;if(!de){var ne=\"400\";/bold/i.test(J)?ne=\"900\":/medium/i.test(J)?ne=\"500\":/light/i.test(J)&&(ne=\"200\"),de=D.tinySDF=new P.TinySDF(24,3,8,.25,K,ne)}return{id:q,bitmap:new i.AlphaImage({width:30,height:30},de.draw(String.fromCharCode(q))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},P.loadGlyphRange=E,P.TinySDF=T;var A=function(){this.specification=i.styleSpec.light.position};A.prototype.possiblyEvaluate=function(D,J){return i.sphericalToCartesian(D.expression.evaluate(J))},A.prototype.interpolate=function(D,J,q){return{x:i.number(D.x,J.x,q),y:i.number(D.y,J.y,q),z:i.number(D.z,J.z,q)}};var z=new i.Properties({anchor:new i.DataConstantProperty(i.styleSpec.light.anchor),position:new A,color:new i.DataConstantProperty(i.styleSpec.light.color),intensity:new i.DataConstantProperty(i.styleSpec.light.intensity)}),O=\"-transition\",U=function(Y){function D(J){Y.call(this),this._transitionable=new i.Transitionable(z),this.setLight(J),this._transitioning=this._transitionable.untransitioned()}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getLight=function(){return this._transitionable.serialize()},D.prototype.setLight=function(q,K){if(K===void 0&&(K={}),!this._validate(i.validateLight,q,K))for(var de in q){var ne=q[de];i.endsWith(de,O)?this._transitionable.setTransition(de.slice(0,-O.length),ne):this._transitionable.setValue(de,ne)}},D.prototype.updateTransitions=function(q){this._transitioning=this._transitionable.transitioned(q,this._transitioning)},D.prototype.hasTransition=function(){return this._transitioning.hasTransition()},D.prototype.recalculate=function(q){this.properties=this._transitioning.possiblyEvaluate(q)},D.prototype._validate=function(q,K,de){return de&&de.validate===!1?!1:i.emitValidationErrors(this,q.call(i.validateStyle,i.extend({value:K,style:{glyphs:!0,sprite:!0},styleSpec:i.styleSpec})))},D}(i.Evented),G=function(D,J){this.width=D,this.height=J,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};G.prototype.getDash=function(D,J){var q=D.join(\",\")+String(J);return this.dashEntry[q]||(this.dashEntry[q]=this.addDash(D,J)),this.dashEntry[q]},G.prototype.getDashRanges=function(D,J,q){var K=D.length%2===1,de=[],ne=K?-D[D.length-1]*q:0,we=D[0]*q,Ue=!0;de.push({left:ne,right:we,isDash:Ue,zeroLength:D[0]===0});for(var ft=D[0],Zt=1;Zt<D.length;Zt++){Ue=!Ue;var hr=D[Zt];ne=ft*q,ft+=hr,we=ft*q,de.push({left:ne,right:we,isDash:Ue,zeroLength:hr===0})}return de},G.prototype.addRoundDash=function(D,J,q){for(var K=J/2,de=-q;de<=q;de++)for(var ne=this.nextRow+q+de,we=this.width*ne,Ue=0,ft=D[Ue],Zt=0;Zt<this.width;Zt++){Zt/ft.right>1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),Qe=void 0,at=de/q*(K+1);if(ft.isDash){var Ct=K-Math.abs(at);Qe=Math.sqrt(Ve*Ve+Ct*Ct)}else Qe=K-Math.sqrt(Ve*Ve+at*at);this.data[we+Zt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var q=D[J],K=D[J+1];q.zeroLength?D.splice(J,1):K&&K.isDash===q.isDash&&(K.left=q.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var we=this.width*this.nextRow,Ue=0,ft=D[Ue],Zt=0;Zt<this.width;Zt++){Zt/ft.right>1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),Qe=ft.isDash?Ve:-Ve;this.data[we+Zt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addDash=function(D,J){var q=J?7:0,K=2*q+1;if(this.nextRow+K>this.height)return i.warnOnce(\"LineAtlas out of space\"),null;for(var de=0,ne=0;ne<D.length;ne++)de+=D[ne];if(de!==0){var we=this.width/de,Ue=this.getDashRanges(D,this.width,we);J?this.addRoundDash(Ue,we,q):this.addRegularDash(Ue)}var ft={y:(this.nextRow+q+.5)/this.height,height:2*q/this.height,width:de};return this.nextRow+=K,this.dirty=!0,ft},G.prototype.bind=function(D){var J=D.gl;this.texture?(J.bindTexture(J.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,J.texSubImage2D(J.TEXTURE_2D,0,0,0,this.width,this.height,J.ALPHA,J.UNSIGNED_BYTE,this.data))):(this.texture=J.createTexture(),J.bindTexture(J.TEXTURE_2D,this.texture),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.ALPHA,this.width,this.height,0,J.ALPHA,J.UNSIGNED_BYTE,this.data))};var Z=function Y(D,J){this.workerPool=D,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var q=this.workerPool.acquire(this.id),K=0;K<q.length;K++){var de=q[K],ne=new Y.Actor(de,J,this.id);ne.name=\"Worker \"+K,this.actors.push(ne)}};Z.prototype.broadcast=function(D,J,q){q=q||function(){},i.asyncAll(this.actors,function(K,de){K.send(D,J,de)},q)},Z.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Z.prototype.remove=function(){this.actors.forEach(function(D){D.remove()}),this.actors=[],this.workerPool.release(this.id)},Z.Actor=i.Actor;function j(Y,D,J){var q=function(K,de){if(K)return J(K);if(de){var ne=i.pick(i.extend(de,Y),[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"mapbox_logo\",\"bounds\",\"scheme\",\"tileSize\",\"encoding\"]);de.vector_layers&&(ne.vectorLayers=de.vector_layers,ne.vectorLayerIds=ne.vectorLayers.map(function(we){return we.id})),ne.tiles=D.canonicalizeTileset(ne,Y.url),J(null,ne)}};return Y.url?i.getJSON(D.transformRequest(D.normalizeSourceURL(Y.url),i.ResourceType.Source),q):i.browser.frame(function(){return q(null,Y)})}var N=function(D,J,q){this.bounds=i.LngLatBounds.convert(this.validateBounds(D)),this.minzoom=J||0,this.maxzoom=q||24};N.prototype.validateBounds=function(D){return!Array.isArray(D)||D.length!==4?[-180,-90,180,90]:[Math.max(-180,D[0]),Math.max(-90,D[1]),Math.min(180,D[2]),Math.min(90,D[3])]},N.prototype.contains=function(D){var J=Math.pow(2,D.z),q={minX:Math.floor(i.mercatorXfromLng(this.bounds.getWest())*J),minY:Math.floor(i.mercatorYfromLat(this.bounds.getNorth())*J),maxX:Math.ceil(i.mercatorXfromLng(this.bounds.getEast())*J),maxY:Math.ceil(i.mercatorYfromLat(this.bounds.getSouth())*J)},K=D.x>=q.minX&&D.x<q.maxX&&D.y>=q.minY&&D.y<q.maxY;return K};var H=function(Y){function D(J,q,K,de){if(Y.call(this),this.id=J,this.dispatcher=K,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,i.extend(this,i.pick(q,[\"url\",\"scheme\",\"tileSize\",\"promoteId\"])),this._options=i.extend({type:\"vector\"},q),this._collectResourceTiming=q.collectResourceTiming,this.tileSize!==512)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(de)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=j(this._options,this.map._requestManager,function(K,de){q._tileJSONRequest=null,q._loaded=!0,K?q.fire(new i.ErrorEvent(K)):de&&(i.extend(q,de),de.bounds&&(q.tileBounds=new N(de.bounds,q.minzoom,q.maxzoom)),i.postTurnstileEvent(de.tiles,q.map._requestManager._customAccessToken),i.postMapLoadEvent(de.tiles,q.map._getMapId(),q.map._requestManager._skuToken,q.map._requestManager._customAccessToken),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setSourceProperty=function(q){this._tileJSONRequest&&this._tileJSONRequest.cancel(),q();var K=this.map.style.sourceCaches[this.id];K.clearTiles(),this.load()},D.prototype.setTiles=function(q){var K=this;return this.setSourceProperty(function(){K._options.tiles=q}),this},D.prototype.setUrl=function(q){var K=this;return this.setSourceProperty(function(){K.url=q,K._options.url=q}),this},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.loadTile=function(q,K){var de=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme)),ne={request:this.map._requestManager.transformRequest(de,i.ResourceType.Tile),uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,tileSize:this.tileSize*q.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ne.request.collectResourceTiming=this._collectResourceTiming,!q.actor||q.state===\"expired\"?(q.actor=this.dispatcher.getActor(),q.request=q.actor.send(\"loadTile\",ne,we.bind(this))):q.state===\"loading\"?q.reloadCallback=K:q.request=q.actor.send(\"reloadTile\",ne,we.bind(this));function we(Ue,ft){if(delete q.request,q.aborted)return K(null);if(Ue&&Ue.status!==404)return K(Ue);ft&&ft.resourceTiming&&(q.resourceTiming=ft.resourceTiming),this.map._refreshExpiredTiles&&ft&&q.setExpiryData(ft),q.loadVectorData(ft,this.map.painter),i.cacheEntryPossiblyAdded(this.dispatcher),K(null),q.reloadCallback&&(this.loadTile(q,q.reloadCallback),q.reloadCallback=null)}},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.actor&&q.actor.send(\"abortTile\",{uid:q.uid,type:this.type,source:this.id},void 0)},D.prototype.unloadTile=function(q){q.unloadVectorData(),q.actor&&q.actor.send(\"removeTile\",{uid:q.uid,type:this.type,source:this.id},void 0)},D.prototype.hasTransition=function(){return!1},D}(i.Evented),re=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.setEventedParent(de),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=i.extend({type:\"raster\"},q),i.extend(this,i.pick(q,[\"url\",\"scheme\",\"tileSize\"]))}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=j(this._options,this.map._requestManager,function(K,de){q._tileJSONRequest=null,q._loaded=!0,K?q.fire(new i.ErrorEvent(K)):de&&(i.extend(q,de),de.bounds&&(q.tileBounds=new N(de.bounds,q.minzoom,q.maxzoom)),i.postTurnstileEvent(de.tiles),i.postMapLoadEvent(de.tiles,q.map._getMapId(),q.map._requestManager._skuToken),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),q.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},D.prototype.loadTile=function(q,K){var de=this,ne=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);q.request=i.getImage(this.map._requestManager.transformRequest(ne,i.ResourceType.Tile),function(we,Ue){if(delete q.request,q.aborted)q.state=\"unloaded\",K(null);else if(we)q.state=\"errored\",K(we);else if(Ue){de.map._refreshExpiredTiles&&q.setExpiryData(Ue),delete Ue.cacheControl,delete Ue.expires;var ft=de.map.painter.context,Zt=ft.gl;q.texture=de.map.painter.getTileTexture(Ue.width),q.texture?q.texture.update(Ue,{useMipmap:!0}):(q.texture=new i.Texture(ft,Ue,Zt.RGBA,{useMipmap:!0}),q.texture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE,Zt.LINEAR_MIPMAP_NEAREST),ft.extTextureFilterAnisotropic&&Zt.texParameterf(Zt.TEXTURE_2D,ft.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ft.extTextureFilterAnisotropicMax)),q.state=\"loaded\",i.cacheEntryPossiblyAdded(de.dispatcher),K(null)}})},D.prototype.abortTile=function(q,K){q.request&&(q.request.cancel(),delete q.request),K()},D.prototype.unloadTile=function(q,K){q.texture&&this.map.painter.saveTileTexture(q.texture),K()},D.prototype.hasTransition=function(){return!1},D}(i.Evented),oe=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),this.type=\"raster-dem\",this.maxzoom=22,this._options=i.extend({type:\"raster-dem\"},q),this.encoding=q.encoding||\"mapbox\"}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.serialize=function(){return{type:\"raster-dem\",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},D.prototype.loadTile=function(q,K){var de=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);q.request=i.getImage(this.map._requestManager.transformRequest(de,i.ResourceType.Tile),ne.bind(this)),q.neighboringTiles=this._getNeighboringTiles(q.tileID);function ne(Ue,ft){if(delete q.request,q.aborted)q.state=\"unloaded\",K(null);else if(Ue)q.state=\"errored\",K(Ue);else if(ft){this.map._refreshExpiredTiles&&q.setExpiryData(ft),delete ft.cacheControl,delete ft.expires;var Zt=i.window.ImageBitmap&&ft instanceof i.window.ImageBitmap&&i.offscreenCanvasSupported(),hr=Zt?ft:i.browser.getImageData(ft,1),qt={uid:q.uid,coord:q.tileID,source:this.id,rawImageData:hr,encoding:this.encoding};(!q.actor||q.state===\"expired\")&&(q.actor=this.dispatcher.getActor(),q.actor.send(\"loadDEMTile\",qt,we.bind(this)))}}function we(Ue,ft){Ue&&(q.state=\"errored\",K(Ue)),ft&&(q.dem=ft,q.needsHillshadePrepare=!0,q.state=\"loaded\",K(null))}},D.prototype._getNeighboringTiles=function(q){var K=q.canonical,de=Math.pow(2,K.z),ne=(K.x-1+de)%de,we=K.x===0?q.wrap-1:q.wrap,Ue=(K.x+1+de)%de,ft=K.x+1===de?q.wrap+1:q.wrap,Zt={};return Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y).key]={backfilled:!1},K.y>0&&(Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y-1).key]={backfilled:!1}),K.y+1<de&&(Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y+1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y+1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y+1).key]={backfilled:!1}),Zt},D.prototype.unloadTile=function(q){q.demTexture&&this.map.painter.saveTileTexture(q.demTexture),q.fbo&&(q.fbo.destroy(),delete q.fbo),q.dem&&delete q.dem,delete q.neighboringTiles,q.state=\"unloaded\",q.actor&&q.actor.send(\"removeDEMTile\",{uid:q.uid,source:this.id})},D}(re),_e=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=K.getActor(),this.setEventedParent(de),this._data=q.data,this._options=i.extend({},q),this._collectResourceTiming=q.collectResourceTiming,this._resourceTiming=[],q.maxzoom!==void 0&&(this.maxzoom=q.maxzoom),q.type&&(this.type=q.type),q.attribution&&(this.attribution=q.attribution),this.promoteId=q.promoteId;var ne=i.EXTENT/this.tileSize;this.workerOptions=i.extend({source:this.id,cluster:q.cluster||!1,geojsonVtOptions:{buffer:(q.buffer!==void 0?q.buffer:128)*ne,tolerance:(q.tolerance!==void 0?q.tolerance:.375)*ne,extent:i.EXTENT,maxZoom:this.maxzoom,lineMetrics:q.lineMetrics||!1,generateId:q.generateId||!1},superclusterOptions:{maxZoom:q.clusterMaxZoom!==void 0?Math.min(q.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,q.clusterMinPoints||2),extent:i.EXTENT,radius:(q.clusterRadius||50)*ne,log:!1,generateId:q.generateId||!1},clusterProperties:q.clusterProperties,filter:q.filter},q.workerOptions)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(K){if(K){q.fire(new i.ErrorEvent(K));return}var de={dataType:\"source\",sourceDataType:\"metadata\"};q._collectResourceTiming&&q._resourceTiming&&q._resourceTiming.length>0&&(de.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new i.Event(\"data\",de))})},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setData=function(q){var K=this;return this._data=q,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:\"source\",sourceDataType:\"content\"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event(\"data\",ne))}),this},D.prototype.getClusterExpansionZoom=function(q,K){return this.actor.send(\"geojson.getClusterExpansionZoom\",{clusterId:q,source:this.id},K),this},D.prototype.getClusterChildren=function(q,K){return this.actor.send(\"geojson.getClusterChildren\",{clusterId:q,source:this.id},K),this},D.prototype.getClusterLeaves=function(q,K,de,ne){return this.actor.send(\"geojson.getClusterLeaves\",{source:this.id,clusterId:q,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(q){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne==\"string\"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+\".loadData\",de,function(we,Ue){K._removed||Ue&&Ue.abandoned||(K._loaded=!0,Ue&&Ue.resourceTiming&&Ue.resourceTiming[K.id]&&(K._resourceTiming=Ue.resourceTiming[K.id].slice(0)),K.actor.send(K.type+\".coalesce\",{source:de.source},null),q(we))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(q,K){var de=this,ne=q.actor?\"reloadTile\":\"loadTile\";q.actor=this.actor;var we={type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};q.request=this.actor.send(ne,we,function(Ue,ft){return delete q.request,q.unloadVectorData(),q.aborted?K(null):Ue?K(Ue):(q.loadVectorData(ft,de.map.painter,ne===\"reloadTile\"),K(null))})},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.aborted=!0},D.prototype.unloadTile=function(q){q.unloadVectorData(),this.actor.send(\"removeTile\",{uid:q.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send(\"removeSource\",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),Ce=i.createLayout([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]),Le=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=q.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(q,K){var de=this;this._loaded=!1,this.fire(new i.Event(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,we){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):we&&(de.image=we,q&&(de.coordinates=q),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(q){var K=this;return!this.image||!q.url?this:(this.options.url=q.url,this.load(q.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})))},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setCoordinates=function(q){var K=this;this.coordinates=q;var de=q.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(we){return K.tileID.getTilePoint(we)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(q,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!==\"loaded\"&&(ne.state=\"loaded\",ne.texture=this.texture)}}},D.prototype.loadTile=function(q,K){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={},K(null)):(q.state=\"errored\",K(null))},D.prototype.serialize=function(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function ge(Y){for(var D=1/0,J=1/0,q=-1/0,K=-1/0,de=0,ne=Y;de<ne.length;de+=1){var we=ne[de];D=Math.min(D,we.x),J=Math.min(J,we.y),q=Math.max(q,we.x),K=Math.max(K,we.y)}var Ue=q-D,ft=K-J,Zt=Math.max(Ue,ft),hr=Math.max(0,Math.floor(-Math.log(Zt)/Math.LN2)),qt=Math.pow(2,hr);return new i.CanonicalTileID(hr,Math.floor((D+q)/2*qt),Math.floor((J+K)/2*qt))}var ie=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),this.roundZoom=!0,this.type=\"video\",this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var q=this;this._loaded=!1;var K=this.options;this.urls=[];for(var de=0,ne=K.urls;de<ne.length;de+=1){var we=ne[de];this.urls.push(this.map._requestManager.transformRequest(we,i.ResourceType.Source).url)}i.getVideo(this.urls,function(Ue,ft){q._loaded=!0,Ue?q.fire(new i.ErrorEvent(Ue)):ft&&(q.video=ft,q.video.loop=!0,q.video.addEventListener(\"playing\",function(){q.map.triggerRepaint()}),q.map&&q.video.play(),q._finishLoading())})},D.prototype.pause=function(){this.video&&this.video.pause()},D.prototype.play=function(){this.video&&this.video.play()},D.prototype.seek=function(q){if(this.video){var K=this.video.seekable;q<K.start(0)||q>K.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+this.id,null,\"Playback for this video can be set only between the \"+K.start(0)+\" and \"+K.end(0)+\"-second mark.\"))):this.video.currentTime=q}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(q){this.map||(this.map=q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(q,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!==\"loaded\"&&(ne.state=\"loaded\",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Le),Se=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),q.coordinates?(!Array.isArray(q.coordinates)||q.coordinates.length!==4||q.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(we){return typeof we!=\"number\"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'missing required property \"coordinates\"'))),q.animate&&typeof q.animate!=\"boolean\"&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'optional \"animate\" property must be a boolean value'))),q.canvas?typeof q.canvas!=\"string\"&&!(q.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError(\"sources.\"+J,null,'missing required property \"canvas\"'))),this.options=q,this.animate=q.animate!==void 0?q.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error(\"Canvas dimensions cannot be less than or equal to zero.\")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var we=this.tiles[ne];we.state!==\"loaded\"&&(we.state=\"loaded\",we.texture=this.texture)}}},D.prototype.serialize=function(){return{type:\"canvas\",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var q=0,K=[this.canvas.width,this.canvas.height];q<K.length;q+=1){var de=K[q];if(isNaN(de)||de<=0)return!0}return!1},D}(Le),Ee={vector:H,raster:re,\"raster-dem\":oe,geojson:_e,video:ie,image:Le,canvas:Se},Ae=function(Y,D,J,q){var K=new Ee[D.type](Y,D,J,q);if(K.id!==Y)throw new Error(\"Expected Source id to be \"+Y+\" instead of \"+K.id);return i.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],K),K},Be=function(Y){return Ee[Y]},Pe=function(Y,D){Ee[Y]=D};function me(Y,D){var J=i.identity([]);return i.translate(J,J,[1,1,0]),i.scale(J,J,[Y.width*.5,Y.height*.5,1]),i.multiply(J,J,Y.calculatePosMatrix(D.toUnwrapped()))}function De(Y,D,J){if(Y)for(var q=0,K=Y;q<K.length;q+=1){var de=K[q],ne=D[de];if(ne&&ne.source===J&&ne.type===\"fill-extrusion\")return!0}else for(var we in D){var Ue=D[we];if(Ue.source===J&&Ue.type===\"fill-extrusion\")return!0}return!1}function ce(Y,D,J,q,K,de){var ne=De(K&&K.layers,D,Y.id),we=de.maxPitchScaleFactor(),Ue=Y.tilesIn(q,we,ne);Ue.sort(pt);for(var ft=[],Zt=0,hr=Ue;Zt<hr.length;Zt+=1){var qt=hr[Zt];ft.push({wrappedTileID:qt.tileID.wrapped().key,queryResults:qt.tile.queryRenderedFeatures(D,J,Y._state,qt.queryGeometry,qt.cameraQueryGeometry,qt.scale,K,de,we,me(Y.transform,qt.tileID))})}var Ve=Vt(ft);for(var Qe in Ve)Ve[Qe].forEach(function(at){var Ct=at.feature,Ot=Y.getFeatureState(Ct.layer[\"source-layer\"],Ct.id);Ct.source=Ct.layer.source,Ct.layer[\"source-layer\"]&&(Ct.sourceLayer=Ct.layer[\"source-layer\"]),Ct.state=Ot});return Ve}function je(Y,D,J,q,K,de,ne){for(var we={},Ue=de.queryRenderedSymbols(q),ft=[],Zt=0,hr=Object.keys(Ue).map(Number);Zt<hr.length;Zt+=1){var qt=hr[Zt];ft.push(ne[qt])}ft.sort(pt);for(var Ve=function(){var Rt=at[Qe],Bt=Rt.featureIndex.lookupSymbolFeatures(Ue[Rt.bucketInstanceId],D,Rt.bucketIndex,Rt.sourceLayerIndex,K.filter,K.layers,K.availableImages,Y);for(var Dt in Bt){var yt=we[Dt]=we[Dt]||[],Pt=Bt[Dt];Pt.sort(function(Ur,Di){var fi=Rt.featureSortOrder;if(fi){var Ti=fi.indexOf(Ur.featureIndex),gn=fi.indexOf(Di.featureIndex);return gn-Ti}else return Di.featureIndex-Ur.featureIndex});for(var ht=0,ur=Pt;ht<ur.length;ht+=1){var br=ur[ht];yt.push(br)}}},Qe=0,at=ft;Qe<at.length;Qe+=1)Ve();var Ct=function(Rt){we[Rt].forEach(function(Bt){var Dt=Bt.feature,yt=Y[Rt],Pt=J[yt.source],ht=Pt.getFeatureState(Dt.layer[\"source-layer\"],Dt.id);Dt.source=Dt.layer.source,Dt.layer[\"source-layer\"]&&(Dt.sourceLayer=Dt.layer[\"source-layer\"]),Dt.state=ht})};for(var Ot in we)Ct(Ot);return we}function lt(Y,D){for(var J=Y.getRenderableIds().map(function(Ue){return Y.getTileByID(Ue)}),q=[],K={},de=0;de<J.length;de++){var ne=J[de],we=ne.tileID.canonical.key;K[we]||(K[we]=!0,ne.querySourceFeatures(q,D))}return q}function pt(Y,D){var J=Y.tileID,q=D.tileID;return J.overscaledZ-q.overscaledZ||J.canonical.y-q.canonical.y||J.wrap-q.wrap||J.canonical.x-q.canonical.x}function Vt(Y){for(var D={},J={},q=0,K=Y;q<K.length;q+=1){var de=K[q],ne=de.queryResults,we=de.wrappedTileID,Ue=J[we]=J[we]||{};for(var ft in ne)for(var Zt=ne[ft],hr=Ue[ft]=Ue[ft]||{},qt=D[ft]=D[ft]||[],Ve=0,Qe=Zt;Ve<Qe.length;Ve+=1){var at=Qe[Ve];hr[at.featureIndex]||(hr[at.featureIndex]=!0,qt.push(at))}}return D}var ot=function(D,J){this.max=D,this.onRemove=J,this.reset()};ot.prototype.reset=function(){for(var D in this.data)for(var J=0,q=this.data[D];J<q.length;J+=1){var K=q[J];K.timeout&&clearTimeout(K.timeout),this.onRemove(K.value)}return this.data={},this.order=[],this},ot.prototype.add=function(D,J,q){var K=this,de=D.wrapped().key;this.data[de]===void 0&&(this.data[de]=[]);var ne={value:J,timeout:void 0};if(q!==void 0&&(ne.timeout=setTimeout(function(){K.remove(D,ne)},q)),this.data[de].push(ne),this.order.push(de),this.order.length>this.max){var we=this._getAndRemoveByKey(this.order[0]);we&&this.onRemove(we)}return this},ot.prototype.has=function(D){return D.wrapped().key in this.data},ot.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},ot.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},ot.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},ot.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},ot.prototype.remove=function(D,J){if(!this.has(D))return this;var q=D.wrapped().key,K=J===void 0?0:this.data[q].indexOf(J),de=this.data[q][K];return this.data[q].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[q].length===0&&delete this.data[q],this.onRemove(de.value),this.order.splice(this.order.indexOf(q),1),this},ot.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},ot.prototype.filter=function(D){var J=[];for(var q in this.data)for(var K=0,de=this.data[q];K<de.length;K+=1){var ne=de[K];D(ne.value)||J.push(ne)}for(var we=0,Ue=J;we<Ue.length;we+=1){var ft=Ue[we];this.remove(ft.value.tileID,ft)}};var ut=function(D,J,q){this.context=D;var K=D.gl;this.buffer=K.createBuffer(),this.dynamicDraw=!!q,this.context.unbindVAO(),D.bindElementBuffer.set(this.buffer),K.bufferData(K.ELEMENT_ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?K.DYNAMIC_DRAW:K.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};ut.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ut.prototype.updateData=function(D){var J=this.context.gl;this.context.unbindVAO(),this.bind(),J.bufferSubData(J.ELEMENT_ARRAY_BUFFER,0,D.arrayBuffer)},ut.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var Wt={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"},Nt=function(D,J,q,K){this.length=J.length,this.attributes=q,this.itemSize=J.bytesPerElement,this.dynamicDraw=K,this.context=D;var de=D.gl;this.buffer=de.createBuffer(),D.bindVertexBuffer.set(this.buffer),de.bufferData(de.ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?de.DYNAMIC_DRAW:de.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};Nt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Nt.prototype.updateData=function(D){var J=this.context.gl;this.bind(),J.bufferSubData(J.ARRAY_BUFFER,0,D.arrayBuffer)},Nt.prototype.enableAttributes=function(D,J){for(var q=0;q<this.attributes.length;q++){var K=this.attributes[q],de=J.attributes[K.name];de!==void 0&&D.enableVertexAttribArray(de)}},Nt.prototype.setVertexAttribPointers=function(D,J,q){for(var K=0;K<this.attributes.length;K++){var de=this.attributes[K],ne=J.attributes[de.name];ne!==void 0&&D.vertexAttribPointer(ne,de.components,D[Wt[de.type]],!1,this.itemSize,de.offset+this.itemSize*(q||0))}},Nt.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var $t=function(D){this.gl=D.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};$t.prototype.get=function(){return this.current},$t.prototype.set=function(D){},$t.prototype.getDefault=function(){return this.default},$t.prototype.setDefault=function(){this.set(this.default)};var sr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(q){var K=this.current;q.r===K.r&&q.g===K.g&&q.b===K.b&&q.a===K.a&&!this.dirty||(this.gl.clearColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},D}($t),Tr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 1},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.clearDepth(q),this.current=q,this.dirty=!1)},D}($t),fr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.clearStencil(q),this.current=q,this.dirty=!1)},D}($t),$e=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[!0,!0,!0,!0]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&q[3]===K[3]&&!this.dirty||(this.gl.colorMask(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},D}($t),St=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.depthMask(q),this.current=q,this.dirty=!1)},D}($t),Qt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 255},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.stencilMask(q),this.current=q,this.dirty=!1)},D}($t),Gt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},D.prototype.set=function(q){var K=this.current;q.func===K.func&&q.ref===K.ref&&q.mask===K.mask&&!this.dirty||(this.gl.stencilFunc(q.func,q.ref,q.mask),this.current=q,this.dirty=!1)},D}($t),_t=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[q.KEEP,q.KEEP,q.KEEP]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&!this.dirty||(this.gl.stencilOp(q[0],q[1],q[2]),this.current=q,this.dirty=!1)},D}($t),It=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.STENCIL_TEST):K.disable(K.STENCIL_TEST),this.current=q,this.dirty=!1}},D}($t),mt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[0,1]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&!this.dirty||(this.gl.depthRange(q[0],q[1]),this.current=q,this.dirty=!1)},D}($t),er=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.DEPTH_TEST):K.disable(K.DEPTH_TEST),this.current=q,this.dirty=!1}},D}($t),lr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.LESS},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.depthFunc(q),this.current=q,this.dirty=!1)},D}($t),wr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.BLEND):K.disable(K.BLEND),this.current=q,this.dirty=!1}},D}($t),Lr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[q.ONE,q.ZERO]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&!this.dirty||(this.gl.blendFunc(q[0],q[1]),this.current=q,this.dirty=!1)},D}($t),ti=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(q){var K=this.current;q.r===K.r&&q.g===K.g&&q.b===K.b&&q.a===K.a&&!this.dirty||(this.gl.blendColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},D}($t),Br=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.FUNC_ADD},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.blendEquation(q),this.current=q,this.dirty=!1)},D}($t),Vr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;q?K.enable(K.CULL_FACE):K.disable(K.CULL_FACE),this.current=q,this.dirty=!1}},D}($t),dt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.BACK},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.cullFace(q),this.current=q,this.dirty=!1)},D}($t),Ge=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.CCW},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.frontFace(q),this.current=q,this.dirty=!1)},D}($t),Je=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.useProgram(q),this.current=q,this.dirty=!1)},D}($t),We=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.TEXTURE0},D.prototype.set=function(q){q===this.current&&!this.dirty||(this.gl.activeTexture(q),this.current=q,this.dirty=!1)},D}($t),tt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var q=this.gl;return[0,0,q.drawingBufferWidth,q.drawingBufferHeight]},D.prototype.set=function(q){var K=this.current;q[0]===K[0]&&q[1]===K[1]&&q[2]===K[2]&&q[3]===K[3]&&!this.dirty||(this.gl.viewport(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},D}($t),xt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindFramebuffer(K.FRAMEBUFFER,q),this.current=q,this.dirty=!1}},D}($t),Ie=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindRenderbuffer(K.RENDERBUFFER,q),this.current=q,this.dirty=!1}},D}($t),xe=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindTexture(K.TEXTURE_2D,q),this.current=q,this.dirty=!1}},D}($t),ke=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.bindBuffer(K.ARRAY_BUFFER,q),this.current=q,this.dirty=!1}},D}($t),vt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){var K=this.gl;K.bindBuffer(K.ELEMENT_ARRAY_BUFFER,q),this.current=q,this.dirty=!1},D}($t),ir=function(Y){function D(J){Y.call(this,J),this.vao=J.extVertexArrayObject}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(q){!this.vao||q===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(q),this.current=q,this.dirty=!1)},D}($t),ar=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 4},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_ALIGNMENT,q),this.current=q,this.dirty=!1}},D}($t),vr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q),this.current=q,this.dirty=!1}},D}($t),ii=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_FLIP_Y_WEBGL,q),this.current=q,this.dirty=!1}},D}($t),pi=function(Y){function D(J,q){Y.call(this,J),this.context=J,this.parent=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D}($t),$r=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.setDirty=function(){this.dirty=!0},D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferTexture2D(K.FRAMEBUFFER,K.COLOR_ATTACHMENT0,K.TEXTURE_2D,q,0),this.current=q,this.dirty=!1}},D}(pi),di=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.set=function(q){if(!(q===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferRenderbuffer(K.FRAMEBUFFER,K.DEPTH_ATTACHMENT,K.RENDERBUFFER,q),this.current=q,this.dirty=!1}},D}(pi),ji=function(D,J,q,K){this.context=D,this.width=J,this.height=q;var de=D.gl,ne=this.framebuffer=de.createFramebuffer();this.colorAttachment=new $r(D,ne),K&&(this.depthAttachment=new di(D,ne))};ji.prototype.destroy=function(){var D=this.context.gl,J=this.colorAttachment.get();if(J&&D.deleteTexture(J),this.depthAttachment){var q=this.depthAttachment.get();q&&D.deleteRenderbuffer(q)}D.deleteFramebuffer(this.framebuffer)};var In=519,wi=function(D,J,q){this.func=D,this.mask=J,this.range=q};wi.ReadOnly=!1,wi.ReadWrite=!0,wi.disabled=new wi(In,wi.ReadOnly,[0,1]);var On=519,qn=7680,Fn=function(D,J,q,K,de,ne){this.test=D,this.ref=J,this.mask=q,this.fail=K,this.depthFail=de,this.pass=ne};Fn.disabled=new Fn({func:On,mask:0},0,0,qn,qn,qn);var ra=0,la=1,Ut=771,wt=function(D,J,q){this.blendFunction=D,this.blendColor=J,this.mask=q};wt.Replace=[la,ra],wt.disabled=new wt(wt.Replace,i.Color.transparent,[!1,!1,!1,!1]),wt.unblended=new wt(wt.Replace,i.Color.transparent,[!0,!0,!0,!0]),wt.alphaBlended=new wt([la,Ut],i.Color.transparent,[!0,!0,!0,!0]);var rr=1029,nr=2305,Er=function(D,J,q){this.enable=D,this.mode=J,this.frontFace=q};Er.disabled=new Er(!1,rr,nr),Er.backCCW=new Er(!0,rr,nr);var Xr=function(D){this.gl=D,this.extVertexArrayObject=this.gl.getExtension(\"OES_vertex_array_object\"),this.clearColor=new sr(this),this.clearDepth=new Tr(this),this.clearStencil=new fr(this),this.colorMask=new $e(this),this.depthMask=new St(this),this.stencilMask=new Qt(this),this.stencilFunc=new Gt(this),this.stencilOp=new _t(this),this.stencilTest=new It(this),this.depthRange=new mt(this),this.depthTest=new er(this),this.depthFunc=new lr(this),this.blend=new wr(this),this.blendFunc=new Lr(this),this.blendColor=new ti(this),this.blendEquation=new Br(this),this.cullFace=new Vr(this),this.cullFaceSide=new dt(this),this.frontFace=new Ge(this),this.program=new Je(this),this.activeTexture=new We(this),this.viewport=new tt(this),this.bindFramebuffer=new xt(this),this.bindRenderbuffer=new Ie(this),this.bindTexture=new xe(this),this.bindVertexBuffer=new ke(this),this.bindElementBuffer=new vt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ir(this),this.pixelStoreUnpack=new ar(this),this.pixelStoreUnpackPremultiplyAlpha=new vr(this),this.pixelStoreUnpackFlipY=new ii(this),this.extTextureFilterAnisotropic=D.getExtension(\"EXT_texture_filter_anisotropic\")||D.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||D.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=D.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=D.getExtension(\"OES_texture_half_float\"),this.extTextureHalfFloat&&(D.getExtension(\"OES_texture_half_float_linear\"),this.extRenderToTextureHalfFloat=D.getExtension(\"EXT_color_buffer_half_float\")),this.extTimerQuery=D.getExtension(\"EXT_disjoint_timer_query\"),this.maxTextureSize=D.getParameter(D.MAX_TEXTURE_SIZE)};Xr.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Xr.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Xr.prototype.createIndexBuffer=function(D,J){return new ut(this,D,J)},Xr.prototype.createVertexBuffer=function(D,J,q){return new Nt(this,D,J,q)},Xr.prototype.createRenderbuffer=function(D,J,q){var K=this.gl,de=K.createRenderbuffer();return this.bindRenderbuffer.set(de),K.renderbufferStorage(K.RENDERBUFFER,D,J,q),this.bindRenderbuffer.set(null),de},Xr.prototype.createFramebuffer=function(D,J,q){return new ji(this,D,J,q)},Xr.prototype.clear=function(D){var J=D.color,q=D.depth,K=this.gl,de=0;J&&(de|=K.COLOR_BUFFER_BIT,this.clearColor.set(J),this.colorMask.set([!0,!0,!0,!0])),typeof q!=\"undefined\"&&(de|=K.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(q),this.depthMask.set(!0)),K.clear(de)},Xr.prototype.setCullFace=function(D){D.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(D.mode),this.frontFace.set(D.frontFace))},Xr.prototype.setDepthMode=function(D){D.func===this.gl.ALWAYS&&!D.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(D.func),this.depthMask.set(D.mask),this.depthRange.set(D.range))},Xr.prototype.setStencilMode=function(D){D.test.func===this.gl.ALWAYS&&!D.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(D.mask),this.stencilOp.set([D.fail,D.depthFail,D.pass]),this.stencilFunc.set({func:D.test.func,ref:D.ref,mask:D.test.mask}))},Xr.prototype.setColorMode=function(D){i.deepEqual(D.blendFunction,wt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(D.blendFunction),this.blendColor.set(D.blendColor)),this.colorMask.set(D.mask)},Xr.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ri=function(Y){function D(J,q,K){var de=this;Y.call(this),this.id=J,this.dispatcher=K,this.on(\"data\",function(ne){ne.dataType===\"source\"&&ne.sourceDataType===\"metadata\"&&(de._sourceLoaded=!0),de._sourceLoaded&&!de._paused&&ne.dataType===\"source\"&&ne.sourceDataType===\"content\"&&(de.reload(),de.transform&&de.update(de.transform))}),this.on(\"error\",function(){de._sourceErrored=!0}),this._source=Ae(J,q,K,this),this._tiles={},this._cache=new ot(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new i.SourceFeatureState}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){this.map=q,this._maxTileCacheSize=q?q._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(q)},D.prototype.onRemove=function(q){this._source&&this._source.onRemove&&this._source.onRemove(q)},D.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var q in this._tiles){var K=this._tiles[q];if(K.state!==\"loaded\"&&K.state!==\"errored\")return!1}return!0},D.prototype.getSource=function(){return this._source},D.prototype.pause=function(){this._paused=!0},D.prototype.resume=function(){if(this._paused){var q=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,q&&this.reload(),this.transform&&this.update(this.transform)}},D.prototype._loadTile=function(q,K){return this._source.loadTile(q,K)},D.prototype._unloadTile=function(q){if(this._source.unloadTile)return this._source.unloadTile(q,function(){})},D.prototype._abortTile=function(q){if(this._source.abortTile)return this._source.abortTile(q,function(){})},D.prototype.serialize=function(){return this._source.serialize()},D.prototype.prepare=function(q){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var K in this._tiles){var de=this._tiles[K];de.upload(q),de.prepare(this.map.style.imageManager)}},D.prototype.getIds=function(){return i.values(this._tiles).map(function(q){return q.tileID}).sort(Qr).map(function(q){return q.key})},D.prototype.getRenderableIds=function(q){var K=this,de=[];for(var ne in this._tiles)this._isIdRenderable(ne,q)&&de.push(this._tiles[ne]);return q?de.sort(function(we,Ue){var ft=we.tileID,Zt=Ue.tileID,hr=new i.Point(ft.canonical.x,ft.canonical.y)._rotate(K.transform.angle),qt=new i.Point(Zt.canonical.x,Zt.canonical.y)._rotate(K.transform.angle);return ft.overscaledZ-Zt.overscaledZ||qt.y-hr.y||qt.x-hr.x}).map(function(we){return we.tileID.key}):de.map(function(we){return we.tileID}).sort(Qr).map(function(we){return we.key})},D.prototype.hasRenderableParent=function(q){var K=this.findLoadedParent(q,0);return K?this._isIdRenderable(K.tileID.key):!1},D.prototype._isIdRenderable=function(q,K){return this._tiles[q]&&this._tiles[q].hasData()&&!this._coveredTiles[q]&&(K||!this._tiles[q].holdingForFade())},D.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var q in this._tiles)this._tiles[q].state!==\"errored\"&&this._reloadTile(q,\"reloading\")},D.prototype._reloadTile=function(q,K){var de=this._tiles[q];de&&(de.state!==\"loading\"&&(de.state=K),this._loadTile(de,this._tileLoaded.bind(this,de,q,K)))},D.prototype._tileLoaded=function(q,K,de,ne){if(ne){q.state=\"errored\",ne.status!==404?this._source.fire(new i.ErrorEvent(ne,{tile:q})):this.update(this.transform);return}q.timeAdded=i.browser.now(),de===\"expired\"&&(q.refreshedUponExpiration=!0),this._setTileReloadTimer(K,q),this.getSource().type===\"raster-dem\"&&q.dem&&this._backfillDEM(q),this._state.initializeTileState(q,this.map?this.map.painter:null),this._source.fire(new i.Event(\"data\",{dataType:\"source\",tile:q,coord:q.tileID}))},D.prototype._backfillDEM=function(q){for(var K=this.getRenderableIds(),de=0;de<K.length;de++){var ne=K[de];if(q.neighboringTiles&&q.neighboringTiles[ne]){var we=this.getTileByID(ne);Ue(q,we),Ue(we,q)}}function Ue(ft,Zt){ft.needsHillshadePrepare=!0;var hr=Zt.tileID.canonical.x-ft.tileID.canonical.x,qt=Zt.tileID.canonical.y-ft.tileID.canonical.y,Ve=Math.pow(2,ft.tileID.canonical.z),Qe=Zt.tileID.key;hr===0&&qt===0||Math.abs(qt)>1||(Math.abs(hr)>1&&(Math.abs(hr+Ve)===1?hr+=Ve:Math.abs(hr-Ve)===1&&(hr-=Ve)),!(!Zt.dem||!ft.dem)&&(ft.dem.backfillBorder(Zt.dem,hr,qt),ft.neighboringTiles&&ft.neighboringTiles[Qe]&&(ft.neighboringTiles[Qe].backfilled=!0)))}},D.prototype.getTile=function(q){return this.getTileByID(q.key)},D.prototype.getTileByID=function(q){return this._tiles[q]},D.prototype._retainLoadedChildren=function(q,K,de,ne){for(var we in this._tiles){var Ue=this._tiles[we];if(!(ne[we]||!Ue.hasData()||Ue.tileID.overscaledZ<=K||Ue.tileID.overscaledZ>de)){for(var ft=Ue.tileID;Ue&&Ue.tileID.overscaledZ>K+1;){var Zt=Ue.tileID.scaledTo(Ue.tileID.overscaledZ-1);Ue=this._tiles[Zt.key],Ue&&Ue.hasData()&&(ft=Zt)}for(var hr=ft;hr.overscaledZ>K;)if(hr=hr.scaledTo(hr.overscaledZ-1),q[hr.key]){ne[ft.key]=ft;break}}}},D.prototype.findLoadedParent=function(q,K){if(q.key in this._loadedParentTiles){var de=this._loadedParentTiles[q.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=q.overscaledZ-1;ne>=K;ne--){var we=q.scaledTo(ne),Ue=this._getLoadedTile(we);if(Ue)return Ue}},D.prototype._getLoadedTile=function(q){var K=this._tiles[q.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(q.wrapped().key);return de},D.prototype.updateCacheSize=function(q){var K=Math.ceil(q.width/this._source.tileSize)+1,de=Math.ceil(q.height/this._source.tileSize)+1,ne=K*de,we=5,Ue=Math.floor(ne*we),ft=typeof this._maxTileCacheSize==\"number\"?Math.min(this._maxTileCacheSize,Ue):Ue;this._cache.setMaxSize(ft)},D.prototype.handleWrapJump=function(q){var K=this._prevLng===void 0?q:this._prevLng,de=q-K,ne=de/360,we=Math.round(ne);if(this._prevLng=q,we){var Ue={};for(var ft in this._tiles){var Zt=this._tiles[ft];Zt.tileID=Zt.tileID.unwrapTo(Zt.tileID.wrap+we),Ue[Zt.tileID.key]=Zt}this._tiles=Ue;for(var hr in this._timers)clearTimeout(this._timers[hr]),delete this._timers[hr];for(var qt in this._tiles){var Ve=this._tiles[qt];this._setTileReloadTimer(qt,Ve)}}},D.prototype.update=function(q){var K=this;if(this.transform=q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ur){return new i.OverscaledTileID(Ur.canonical.z,Ur.wrap,Ur.canonical.z,Ur.canonical.x,Ur.canonical.y)}):(de=q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Ur){return K._source.hasTile(Ur)}))):de=[];var ne=q.coveringZoomLevel(this._source),we=Math.max(ne-D.maxOverzooming,this._source.minzoom),Ue=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ft=this._updateRetainedTiles(de,ne);if(Oi(this._source.type)){for(var Zt={},hr={},qt=Object.keys(ft),Ve=0,Qe=qt;Ve<Qe.length;Ve+=1){var at=Qe[Ve],Ct=ft[at],Ot=this._tiles[at];if(!(!Ot||Ot.fadeEndTime&&Ot.fadeEndTime<=i.browser.now())){var Rt=this.findLoadedParent(Ct,we);Rt&&(this._addTile(Rt.tileID),Zt[Rt.tileID.key]=Rt.tileID),hr[at]=Ct}}this._retainLoadedChildren(hr,ne,Ue,ft);for(var Bt in Zt)ft[Bt]||(this._coveredTiles[Bt]=!0,ft[Bt]=Zt[Bt])}for(var Dt in ft)this._tiles[Dt].clearFadeHold();for(var yt=i.keysDifference(this._tiles,ft),Pt=0,ht=yt;Pt<ht.length;Pt+=1){var ur=ht[Pt],br=this._tiles[ur];br.hasSymbolBuckets&&!br.holdingForFade()?br.setHoldDuration(this.map._fadeDuration):(!br.hasSymbolBuckets||br.symbolFadeFinished())&&this._removeTile(ur)}this._updateLoadedParentTileCache()}},D.prototype.releaseSymbolFadeTiles=function(){for(var q in this._tiles)this._tiles[q].holdingForFade()&&this._removeTile(q)},D.prototype._updateRetainedTiles=function(q,K){for(var de={},ne={},we=Math.max(K-D.maxOverzooming,this._source.minzoom),Ue=Math.max(K+D.maxUnderzooming,this._source.minzoom),ft={},Zt=0,hr=q;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=this._addTile(qt);de[qt.key]=qt,!Ve.hasData()&&K<this._source.maxzoom&&(ft[qt.key]=qt)}this._retainLoadedChildren(ft,K,Ue,de);for(var Qe=0,at=q;Qe<at.length;Qe+=1){var Ct=at[Qe],Ot=this._tiles[Ct.key];if(!Ot.hasData()){if(K+1>this._source.maxzoom){var Rt=Ct.children(this._source.maxzoom)[0],Bt=this.getTile(Rt);if(Bt&&Bt.hasData()){de[Rt.key]=Rt;continue}}else{var Dt=Ct.children(this._source.maxzoom);if(de[Dt[0].key]&&de[Dt[1].key]&&de[Dt[2].key]&&de[Dt[3].key])continue}for(var yt=Ot.wasRequested(),Pt=Ct.overscaledZ-1;Pt>=we;--Pt){var ht=Ct.scaledTo(Pt);if(ne[ht.key]||(ne[ht.key]=!0,Ot=this.getTile(ht),!Ot&&yt&&(Ot=this._addTile(ht)),Ot&&(de[ht.key]=ht,yt=Ot.wasRequested(),Ot.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var q in this._tiles){for(var K=[],de=void 0,ne=this._tiles[q].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var we=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(we),de)break;ne=we}for(var Ue=0,ft=K;Ue<ft.length;Ue+=1){var Zt=ft[Ue];this._loadedParentTiles[Zt]=de}}},D.prototype._addTile=function(q){var K=this._tiles[q.key];if(K)return K;K=this._cache.getAndRemove(q),K&&(this._setTileReloadTimer(q.key,K),K.tileID=q,this._state.initializeTileState(K,this.map?this.map.painter:null),this._cacheTimers[q.key]&&(clearTimeout(this._cacheTimers[q.key]),delete this._cacheTimers[q.key],this._setTileReloadTimer(q.key,K)));var de=!!K;return de||(K=new i.Tile(q,this._source.tileSize*q.overscaleFactor()),this._loadTile(K,this._tileLoaded.bind(this,K,q.key,K.state))),K?(K.uses++,this._tiles[q.key]=K,de||this._source.fire(new i.Event(\"dataloading\",{tile:K,coord:K.tileID,dataType:\"source\"})),K):null},D.prototype._setTileReloadTimer=function(q,K){var de=this;q in this._timers&&(clearTimeout(this._timers[q]),delete this._timers[q]);var ne=K.getExpiryTimeout();ne&&(this._timers[q]=setTimeout(function(){de._reloadTile(q,\"expired\"),delete de._timers[q]},ne))},D.prototype._removeTile=function(q){var K=this._tiles[q];K&&(K.uses--,delete this._tiles[q],this._timers[q]&&(clearTimeout(this._timers[q]),delete this._timers[q]),!(K.uses>0)&&(K.hasData()&&K.state!==\"reloading\"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var q in this._tiles)this._removeTile(q);this._cache.reset()},D.prototype.tilesIn=function(q,K,de){var ne=this,we=[],Ue=this.transform;if(!Ue)return we;for(var ft=de?Ue.getCameraQueryGeometry(q):q,Zt=q.map(function(Pt){return Ue.pointCoordinate(Pt)}),hr=ft.map(function(Pt){return Ue.pointCoordinate(Pt)}),qt=this.getIds(),Ve=1/0,Qe=1/0,at=-1/0,Ct=-1/0,Ot=0,Rt=hr;Ot<Rt.length;Ot+=1){var Bt=Rt[Ot];Ve=Math.min(Ve,Bt.x),Qe=Math.min(Qe,Bt.y),at=Math.max(at,Bt.x),Ct=Math.max(Ct,Bt.y)}for(var Dt=function(Pt){var ht=ne._tiles[qt[Pt]];if(!ht.holdingForFade()){var ur=ht.tileID,br=Math.pow(2,Ue.zoom-ht.tileID.overscaledZ),Ur=K*ht.queryPadding*i.EXTENT/ht.tileSize/br,Di=[ur.getTilePoint(new i.MercatorCoordinate(Ve,Qe)),ur.getTilePoint(new i.MercatorCoordinate(at,Ct))];if(Di[0].x-Ur<i.EXTENT&&Di[0].y-Ur<i.EXTENT&&Di[1].x+Ur>=0&&Di[1].y+Ur>=0){var fi=Zt.map(function(gn){return ur.getTilePoint(gn)}),Ti=hr.map(function(gn){return ur.getTilePoint(gn)});we.push({tile:ht,tileID:ur,queryGeometry:fi,cameraQueryGeometry:Ti,scale:br})}}},yt=0;yt<qt.length;yt++)Dt(yt);return we},D.prototype.getVisibleCoordinates=function(q){for(var K=this,de=this.getRenderableIds(q).map(function(ft){return K._tiles[ft].tileID}),ne=0,we=de;ne<we.length;ne+=1){var Ue=we[ne];Ue.posMatrix=this.transform.calculatePosMatrix(Ue.toUnwrapped())}return de},D.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Oi(this._source.type))for(var q in this._tiles){var K=this._tiles[q];if(K.fadeEndTime!==void 0&&K.fadeEndTime>=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(q,K,de){q=q||\"_geojsonTileLayer\",this._state.updateState(q,K,de)},D.prototype.removeFeatureState=function(q,K,de){q=q||\"_geojsonTileLayer\",this._state.removeFeatureState(q,K,de)},D.prototype.getFeatureState=function(q,K){return q=q||\"_geojsonTileLayer\",this._state.getState(q,K)},D.prototype.setDependencies=function(q,K,de){var ne=this._tiles[q];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(q,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(q,K)&&this._reloadTile(de,\"reloading\")}this._cache.filter(function(we){return!we.hasDependency(q,K)})},D}(i.Evented);ri.maxOverzooming=10,ri.maxUnderzooming=3;function Qr(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),q=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||q-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Oi(Y){return Y===\"raster\"||Y===\"image\"||Y===\"video\"}function $i(){return new i.window.Worker(io.workerUrl)}var tn=\"mapboxgl_preloaded_worker_pool\",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length<fn.workerCount;)this.workers.push(new $i);return this.active[D]=!0,this.workers.slice()},fn.prototype.release=function(D){delete this.active[D],this.numActive()===0&&(this.workers.forEach(function(J){J.terminate()}),this.workers=null)},fn.prototype.isPreloaded=function(){return!!this.active[tn]},fn.prototype.numActive=function(){return Object.keys(this.active).length};var yn=Math.floor(i.browser.hardwareConcurrency/2);fn.workerCount=Math.max(Math.min(yn,6),1);var Sn;function Ba(){return Sn||(Sn=new fn),Sn}function ua(){var Y=Ba();Y.acquire(tn)}function ma(){var Y=Sn;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(tn),Sn=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))}function Wa(Y,D){var J={};for(var q in Y)q!==\"ref\"&&(J[q]=Y[q]);return i.refProperties.forEach(function(K){K in D&&(J[K]=D[K])}),J}function Fa(Y){Y=Y.slice();for(var D=Object.create(null),J=0;J<Y.length;J++)D[Y[J].id]=Y[J];for(var q=0;q<Y.length;q++)\"ref\"in Y[q]&&(Y[q]=Wa(Y[q],D[Y[q].ref]));return Y}function Xo(){var Y={},D=i.styleSpec.$version;for(var J in i.styleSpec.$root){var q=i.styleSpec.$root[J];if(q.required){var K=null;J===\"version\"?K=D:q.type===\"array\"?K=[]:K={},K!=null&&(Y[J]=K)}}return Y}var da={setStyle:\"setStyle\",addLayer:\"addLayer\",removeLayer:\"removeLayer\",setPaintProperty:\"setPaintProperty\",setLayoutProperty:\"setLayoutProperty\",setFilter:\"setFilter\",addSource:\"addSource\",removeSource:\"removeSource\",setGeoJSONSourceData:\"setGeoJSONSourceData\",setLayerZoomRange:\"setLayerZoomRange\",setLayerProperty:\"setLayerProperty\",setCenter:\"setCenter\",setZoom:\"setZoom\",setBearing:\"setBearing\",setPitch:\"setPitch\",setSprite:\"setSprite\",setGlyphs:\"setGlyphs\",setTransition:\"setTransition\",setLight:\"setLight\"};function Wn(Y,D,J){J.push({command:da.addSource,args:[Y,D[Y]]})}function Ha(Y,D,J){D.push({command:da.removeSource,args:[Y]}),J[Y]=!0}function vo(Y,D,J,q){Ha(Y,J,q),Wn(Y,D,J)}function jn(Y,D,J){var q;for(q in Y[J])if(Y[J].hasOwnProperty(q)&&q!==\"data\"&&!i.deepEqual(Y[J][q],D[J][q]))return!1;for(q in D[J])if(D[J].hasOwnProperty(q)&&q!==\"data\"&&!i.deepEqual(Y[J][q],D[J][q]))return!1;return!0}function Mt(Y,D,J,q){Y=Y||{},D=D||{};var K;for(K in Y)Y.hasOwnProperty(K)&&(D.hasOwnProperty(K)||Ha(K,J,q));for(K in D)D.hasOwnProperty(K)&&(Y.hasOwnProperty(K)?i.deepEqual(Y[K],D[K])||(Y[K].type===\"geojson\"&&D[K].type===\"geojson\"&&jn(Y,D,K)?J.push({command:da.setGeoJSONSourceData,args:[K,D[K].data]}):vo(K,D,J,q)):Wn(K,D,J))}function kr(Y,D,J,q,K,de){Y=Y||{},D=D||{};var ne;for(ne in Y)Y.hasOwnProperty(ne)&&(i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[q,ne,D[ne],K]}));for(ne in D)!D.hasOwnProperty(ne)||Y.hasOwnProperty(ne)||i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[q,ne,D[ne],K]})}function Jr(Y){return Y.id}function vi(Y,D){return Y[D.id]=D,Y}function hn(Y,D,J){Y=Y||[],D=D||[];var q=Y.map(Jr),K=D.map(Jr),de=Y.reduce(vi,{}),ne=D.reduce(vi,{}),we=q.slice(),Ue=Object.create(null),ft,Zt,hr,qt,Ve,Qe,at;for(ft=0,Zt=0;ft<q.length;ft++)hr=q[ft],ne.hasOwnProperty(hr)?Zt++:(J.push({command:da.removeLayer,args:[hr]}),we.splice(we.indexOf(hr,Zt),1));for(ft=0,Zt=0;ft<K.length;ft++)hr=K[K.length-1-ft],we[we.length-1-ft]!==hr&&(de.hasOwnProperty(hr)?(J.push({command:da.removeLayer,args:[hr]}),we.splice(we.lastIndexOf(hr,we.length-Zt),1)):Zt++,Qe=we[we.length-ft],J.push({command:da.addLayer,args:[ne[hr],Qe]}),we.splice(we.length-ft,0,hr),Ue[hr]=!0);for(ft=0;ft<K.length;ft++)if(hr=K[ft],qt=de[hr],Ve=ne[hr],!(Ue[hr]||i.deepEqual(qt,Ve))){if(!i.deepEqual(qt.source,Ve.source)||!i.deepEqual(qt[\"source-layer\"],Ve[\"source-layer\"])||!i.deepEqual(qt.type,Ve.type)){J.push({command:da.removeLayer,args:[hr]}),Qe=we[we.lastIndexOf(hr)+1],J.push({command:da.addLayer,args:[Ve,Qe]});continue}kr(qt.layout,Ve.layout,J,hr,null,da.setLayoutProperty),kr(qt.paint,Ve.paint,J,hr,null,da.setPaintProperty),i.deepEqual(qt.filter,Ve.filter)||J.push({command:da.setFilter,args:[hr,Ve.filter]}),(!i.deepEqual(qt.minzoom,Ve.minzoom)||!i.deepEqual(qt.maxzoom,Ve.maxzoom))&&J.push({command:da.setLayerZoomRange,args:[hr,Ve.minzoom,Ve.maxzoom]});for(at in qt)qt.hasOwnProperty(at)&&(at===\"layout\"||at===\"paint\"||at===\"filter\"||at===\"metadata\"||at===\"minzoom\"||at===\"maxzoom\"||(at.indexOf(\"paint.\")===0?kr(qt[at],Ve[at],J,hr,at.slice(6),da.setPaintProperty):i.deepEqual(qt[at],Ve[at])||J.push({command:da.setLayerProperty,args:[hr,at,Ve[at]]})));for(at in Ve)!Ve.hasOwnProperty(at)||qt.hasOwnProperty(at)||at===\"layout\"||at===\"paint\"||at===\"filter\"||at===\"metadata\"||at===\"minzoom\"||at===\"maxzoom\"||(at.indexOf(\"paint.\")===0?kr(qt[at],Ve[at],J,hr,at.slice(6),da.setPaintProperty):i.deepEqual(qt[at],Ve[at])||J.push({command:da.setLayerProperty,args:[hr,at,Ve[at]]}))}}function An(Y,D){if(!Y)return[{command:da.setStyle,args:[D]}];var J=[];try{if(!i.deepEqual(Y.version,D.version))return[{command:da.setStyle,args:[D]}];i.deepEqual(Y.center,D.center)||J.push({command:da.setCenter,args:[D.center]}),i.deepEqual(Y.zoom,D.zoom)||J.push({command:da.setZoom,args:[D.zoom]}),i.deepEqual(Y.bearing,D.bearing)||J.push({command:da.setBearing,args:[D.bearing]}),i.deepEqual(Y.pitch,D.pitch)||J.push({command:da.setPitch,args:[D.pitch]}),i.deepEqual(Y.sprite,D.sprite)||J.push({command:da.setSprite,args:[D.sprite]}),i.deepEqual(Y.glyphs,D.glyphs)||J.push({command:da.setGlyphs,args:[D.glyphs]}),i.deepEqual(Y.transition,D.transition)||J.push({command:da.setTransition,args:[D.transition]}),i.deepEqual(Y.light,D.light)||J.push({command:da.setLight,args:[D.light]});var q={},K=[];Mt(Y.sources,D.sources,K,q);var de=[];Y.layers&&Y.layers.forEach(function(ne){q[ne.source]?J.push({command:da.removeLayer,args:[ne.id]}):de.push(ne)}),J=J.concat(K),hn(de,D.layers,J)}catch(ne){console.warn(\"Unable to compute style diff:\",ne),J=[{command:da.setStyle,args:[D]}]}return J}var Mn=function(D,J){this.reset(D,J)};Mn.prototype.reset=function(D,J){this.points=D||[],this._distances=[0];for(var q=1;q<this.points.length;q++)this._distances[q]=this._distances[q-1]+this.points[q].dist(this.points[q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(J||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Mn.prototype.lerp=function(D){if(this.points.length===1)return this.points[0];D=i.clamp(D,0,1);for(var J=1,q=this._distances[J],K=D*this.paddedLength+this.padding;q<K&&J<this._distances.length;)q=this._distances[++J];var de=J-1,ne=this._distances[de],we=q-ne,Ue=we>0?(K-ne)/we:0;return this.points[de].mult(1-Ue).add(this.points[J].mult(Ue))};var Li=function(D,J,q){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/q),this.yCellCount=Math.ceil(J/q);for(var ne=0;ne<this.xCellCount*this.yCellCount;ne++)K.push([]),de.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=D,this.height=J,this.xScale=this.xCellCount/D,this.yScale=this.yCellCount/J,this.boxUid=0,this.circleUid=0};Li.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Li.prototype.insert=function(D,J,q,K,de){this._forEachCell(J,q,K,de,this._insertBoxCell,this.boxUid++),this.boxKeys.push(D),this.bboxes.push(J),this.bboxes.push(q),this.bboxes.push(K),this.bboxes.push(de)},Li.prototype.insertCircle=function(D,J,q,K){this._forEachCell(J-K,q-K,J+K,q+K,this._insertCircleCell,this.circleUid++),this.circleKeys.push(D),this.circles.push(J),this.circles.push(q),this.circles.push(K)},Li.prototype._insertBoxCell=function(D,J,q,K,de,ne){this.boxCells[de].push(ne)},Li.prototype._insertCircleCell=function(D,J,q,K,de,ne){this.circleCells[de].push(ne)},Li.prototype._query=function(D,J,q,K,de,ne){if(q<0||D>this.width||K<0||J>this.height)return de?!1:[];var we=[];if(D<=0&&J<=0&&this.width<=q&&this.height<=K){if(de)return!0;for(var Ue=0;Ue<this.boxKeys.length;Ue++)we.push({key:this.boxKeys[Ue],x1:this.bboxes[Ue*4],y1:this.bboxes[Ue*4+1],x2:this.bboxes[Ue*4+2],y2:this.bboxes[Ue*4+3]});for(var ft=0;ft<this.circleKeys.length;ft++){var Zt=this.circles[ft*3],hr=this.circles[ft*3+1],qt=this.circles[ft*3+2];we.push({key:this.circleKeys[ft],x1:Zt-qt,y1:hr-qt,x2:Zt+qt,y2:hr+qt})}return ne?we.filter(ne):we}else{var Ve={hitTest:de,seenUids:{box:{},circle:{}}};return this._forEachCell(D,J,q,K,this._queryCell,we,Ve,ne),de?we.length>0:we}},Li.prototype._queryCircle=function(D,J,q,K,de){var ne=D-q,we=D+q,Ue=J-q,ft=J+q;if(we<0||ne>this.width||ft<0||Ue>this.height)return K?!1:[];var Zt=[],hr={hitTest:K,circle:{x:D,y:J,radius:q},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Ue,we,ft,this._queryCellCircle,Zt,hr,de),K?Zt.length>0:Zt},Li.prototype.query=function(D,J,q,K,de){return this._query(D,J,q,K,!1,de)},Li.prototype.hitTest=function(D,J,q,K,de){return this._query(D,J,q,K,!0,de)},Li.prototype.hitTestCircle=function(D,J,q,K){return this._queryCircle(D,J,q,!0,K)},Li.prototype._queryCell=function(D,J,q,K,de,ne,we,Ue){var ft=we.seenUids,Zt=this.boxCells[de];if(Zt!==null)for(var hr=this.bboxes,qt=0,Ve=Zt;qt<Ve.length;qt+=1){var Qe=Ve[qt];if(!ft.box[Qe]){ft.box[Qe]=!0;var at=Qe*4;if(D<=hr[at+2]&&J<=hr[at+3]&&q>=hr[at+0]&&K>=hr[at+1]&&(!Ue||Ue(this.boxKeys[Qe]))){if(we.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[Qe],x1:hr[at],y1:hr[at+1],x2:hr[at+2],y2:hr[at+3]})}}}var Ct=this.circleCells[de];if(Ct!==null)for(var Ot=this.circles,Rt=0,Bt=Ct;Rt<Bt.length;Rt+=1){var Dt=Bt[Rt];if(!ft.circle[Dt]){ft.circle[Dt]=!0;var yt=Dt*3;if(this._circleAndRectCollide(Ot[yt],Ot[yt+1],Ot[yt+2],D,J,q,K)&&(!Ue||Ue(this.circleKeys[Dt]))){if(we.hitTest)return ne.push(!0),!0;var Pt=Ot[yt],ht=Ot[yt+1],ur=Ot[yt+2];ne.push({key:this.circleKeys[Dt],x1:Pt-ur,y1:ht-ur,x2:Pt+ur,y2:ht+ur})}}}},Li.prototype._queryCellCircle=function(D,J,q,K,de,ne,we,Ue){var ft=we.circle,Zt=we.seenUids,hr=this.boxCells[de];if(hr!==null)for(var qt=this.bboxes,Ve=0,Qe=hr;Ve<Qe.length;Ve+=1){var at=Qe[Ve];if(!Zt.box[at]){Zt.box[at]=!0;var Ct=at*4;if(this._circleAndRectCollide(ft.x,ft.y,ft.radius,qt[Ct+0],qt[Ct+1],qt[Ct+2],qt[Ct+3])&&(!Ue||Ue(this.boxKeys[at])))return ne.push(!0),!0}}var Ot=this.circleCells[de];if(Ot!==null)for(var Rt=this.circles,Bt=0,Dt=Ot;Bt<Dt.length;Bt+=1){var yt=Dt[Bt];if(!Zt.circle[yt]){Zt.circle[yt]=!0;var Pt=yt*3;if(this._circlesCollide(Rt[Pt],Rt[Pt+1],Rt[Pt+2],ft.x,ft.y,ft.radius)&&(!Ue||Ue(this.circleKeys[yt])))return ne.push(!0),!0}}},Li.prototype._forEachCell=function(D,J,q,K,de,ne,we,Ue){for(var ft=this._convertToXCellCoord(D),Zt=this._convertToYCellCoord(J),hr=this._convertToXCellCoord(q),qt=this._convertToYCellCoord(K),Ve=ft;Ve<=hr;Ve++)for(var Qe=Zt;Qe<=qt;Qe++){var at=this.xCellCount*Qe+Ve;if(de.call(this,D,J,q,K,at,ne,we,Ue))return}},Li.prototype._convertToXCellCoord=function(D){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(D*this.xScale)))},Li.prototype._convertToYCellCoord=function(D){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(D*this.yScale)))},Li.prototype._circlesCollide=function(D,J,q,K,de,ne){var we=K-D,Ue=de-J,ft=q+ne;return ft*ft>we*we+Ue*Ue},Li.prototype._circleAndRectCollide=function(D,J,q,K,de,ne,we){var Ue=(ne-K)/2,ft=Math.abs(D-(K+Ue));if(ft>Ue+q)return!1;var Zt=(we-de)/2,hr=Math.abs(J-(de+Zt));if(hr>Zt+q)return!1;if(ft<=Ue||hr<=Zt)return!0;var qt=ft-Ue,Ve=hr-Zt;return qt*qt+Ve*Ve<=q*q};function _n(Y,D,J,q,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,q.angle)):i.multiply(de,q.labelPlaneMatrix,Y),de}function ya(Y,D,J,q,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-q.angle),de}else return q.glCoordMatrix}function $n(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var q=J[3];return{point:new i.Point(J[0]/q,J[1]/q),signedDistanceFromCamera:q}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],q=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&q>=-D[1]&&q<=D[1];return K}function No(Y,D,J,q,K,de,ne,we){var Ue=q?Y.textSizeData:Y.iconSizeData,ft=i.evaluateSizeForZoom(Ue,J.transform.zoom),Zt=[256/J.width*2+1,256/J.height*2+1],hr=q?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;hr.clear();for(var qt=Y.lineVertexArray,Ve=q?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qe=J.transform.width/J.transform.height,at=!1,Ct=0;Ct<Ve.length;Ct++){var Ot=Ve.get(Ct);if(Ot.hidden||Ot.writingMode===i.WritingMode.vertical&&!at){ul(Ot.numGlyphs,hr);continue}at=!1;var Rt=[Ot.anchorX,Ot.anchorY,0,1];if(i.transformMat4(Rt,Rt,D),!_o(Rt,Zt)){ul(Ot.numGlyphs,hr);continue}var Bt=Rt[3],Dt=Ma(J.transform.cameraToCenterDistance,Bt),yt=i.evaluateSizeForFeature(Ue,ft,Ot),Pt=ne?yt/Dt:yt*Dt,ht=new i.Point(Ot.anchorX,Ot.anchorY),ur=$n(ht,K).point,br={},Ur=ko(Ot,Pt,!1,we,D,K,de,Y.glyphOffsetArray,qt,hr,ur,ht,br,Qe);at=Ur.useVertical,(Ur.notEnoughRoom||at||Ur.needsFlipping&&ko(Ot,Pt,!0,we,D,K,de,Y.glyphOffsetArray,qt,hr,ur,ht,br,Qe).notEnoughRoom)&&ul(Ot.numGlyphs,hr)}q?Y.text.dynamicLayoutVertexBuffer.updateData(hr):Y.icon.dynamicLayoutVertexBuffer.updateData(hr)}function po(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=we.glyphStartIndex+we.numGlyphs,qt=we.lineStartIndex,Ve=we.lineStartIndex+we.lineLength,Qe=D.getoffsetX(we.glyphStartIndex),at=D.getoffsetX(hr-1),Ct=Fs(Y*Qe,J,q,K,de,ne,we.segment,qt,Ve,Ue,ft,Zt);if(!Ct)return null;var Ot=Fs(Y*at,J,q,K,de,ne,we.segment,qt,Ve,Ue,ft,Zt);return Ot?{first:Ct,last:Ot}:null}function Lo(Y,D,J,q){if(Y===i.WritingMode.horizontal){var K=Math.abs(J.y-D.y),de=Math.abs(J.x-D.x)*q;if(K>de)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.y<J.y:D.x>J.x)?{needsFlipping:!0}:null}function ko(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve){var Qe=D/24,at=Y.lineOffsetX*Qe,Ct=Y.lineOffsetY*Qe,Ot;if(Y.numGlyphs>1){var Rt=Y.glyphStartIndex+Y.numGlyphs,Bt=Y.lineStartIndex,Dt=Y.lineStartIndex+Y.lineLength,yt=po(Qe,we,at,Ct,J,Zt,hr,Y,Ue,de,qt);if(!yt)return{notEnoughRoom:!0};var Pt=$n(yt.first.point,ne).point,ht=$n(yt.last.point,ne).point;if(q&&!J){var ur=Lo(Y.writingMode,Pt,ht,Ve);if(ur)return ur}Ot=[yt.first];for(var br=Y.glyphStartIndex+1;br<Rt-1;br++)Ot.push(Fs(Qe*we.getoffsetX(br),at,Ct,J,Zt,hr,Y.segment,Bt,Dt,Ue,de,qt));Ot.push(yt.last)}else{if(q&&!J){var Ur=$n(hr,K).point,Di=Y.lineStartIndex+Y.segment+1,fi=new i.Point(Ue.getx(Di),Ue.gety(Di)),Ti=$n(fi,K),gn=Ti.signedDistanceFromCamera>0?Ti.point:Ds(hr,fi,Ur,1,K),rn=Lo(Y.writingMode,Ur,gn,Ve);if(rn)return rn}var Ci=Fs(Qe*we.getoffsetX(Y.glyphStartIndex),at,Ct,J,Zt,hr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Ue,de,qt);if(!Ci)return{notEnoughRoom:!0};Ot=[Ci]}for(var Bi=0,Gi=Ot;Bi<Gi.length;Bi+=1){var sn=Gi[Bi];i.addDynamicAttributes(ft,sn.point,sn.angle)}return{}}function Ds(Y,D,J,q,K){var de=$n(Y.add(Y.sub(D)._unit()),K).point,ne=J.sub(de);return J.add(ne._mult(q/ne.mag()))}function Fs(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr){var qt=q?Y-D:Y+D,Ve=qt>0?1:-1,Qe=0;q&&(Ve*=-1,Qe=Math.PI),Ve<0&&(Qe+=Math.PI);for(var at=Ve>0?we+ne:we+ne+1,Ct=K,Ot=K,Rt=0,Bt=0,Dt=Math.abs(qt),yt=[];Rt+Bt<=Dt;){if(at+=Ve,at<we||at>=Ue)return null;if(Ot=Ct,yt.push(Ct),Ct=hr[at],Ct===void 0){var Pt=new i.Point(ft.getx(at),ft.gety(at)),ht=$n(Pt,Zt);if(ht.signedDistanceFromCamera>0)Ct=hr[at]=ht.point;else{var ur=at-Ve,br=Rt===0?de:new i.Point(ft.getx(ur),ft.gety(ur));Ct=Ds(br,Pt,Ot,Dt-Rt+1,Zt)}}Rt+=Bt,Bt=Ot.dist(Ct)}var Ur=(Dt-Rt)/Bt,Di=Ct.sub(Ot),fi=Di.mult(Ur)._add(Ot);fi._add(Di._unit()._perp()._mult(J*Ve));var Ti=Qe+Math.atan2(Ct.y-Ot.y,Ct.x-Ot.x);return yt.push(fi),{point:fi,angle:Ti,path:yt}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J<Y;J++){var q=D.length;D.resize(q+4),D.float32.set(ll,q*3)}}function zl(Y,D,J){var q=D[0],K=D[1];return Y[0]=J[0]*q+J[4]*K+J[12],Y[1]=J[1]*q+J[5]*K+J[13],Y[3]=J[3]*q+J[7]*K+J[15],Y}var us=100,il=function(D,J,q){J===void 0&&(J=new Li(D.width+2*us,D.height+2*us,25)),q===void 0&&(q=new Li(D.width+2*us,D.height+2*us,25)),this.transform=D,this.grid=J,this.ignoredGrid=q,this.pitchfactor=Math.cos(D._pitch)*D.cameraToCenterDistance,this.screenRightBoundary=D.width+us,this.screenBottomBoundary=D.height+us,this.gridRightBoundary=D.width+2*us,this.gridBottomBoundary=D.height+2*us};il.prototype.placeCollisionBox=function(D,J,q,K,de){var ne=this.projectAndGetPerspectiveRatio(K,D.anchorPointX,D.anchorPointY),we=q*ne.perspectiveRatio,Ue=D.x1*we+ne.point.x,ft=D.y1*we+ne.point.y,Zt=D.x2*we+ne.point.x,hr=D.y2*we+ne.point.y;return!this.isInsideGrid(Ue,ft,Zt,hr)||!J&&this.grid.hitTest(Ue,ft,Zt,hr,de)?{box:[],offscreen:!1}:{box:[Ue,ft,Zt,hr],offscreen:this.isOffscreen(Ue,ft,Zt,hr)}},il.prototype.placeCollisionCircles=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve){var Qe=[],at=new i.Point(J.anchorX,J.anchorY),Ct=$n(at,ne),Ot=Ma(this.transform.cameraToCenterDistance,Ct.signedDistanceFromCamera),Rt=Zt?de/Ot:de*Ot,Bt=Rt/i.ONE_EM,Dt=$n(at,we).point,yt={},Pt=J.lineOffsetX*Bt,ht=J.lineOffsetY*Bt,ur=po(Bt,K,Pt,ht,!1,Dt,at,J,q,we,yt),br=!1,Ur=!1,Di=!0;if(ur){for(var fi=qt*.5*Ot+Ve,Ti=new i.Point(-us,-us),gn=new i.Point(this.screenRightBoundary,this.screenBottomBoundary),rn=new Mn,Ci=ur.first,Bi=ur.last,Gi=[],sn=Ci.path.length-1;sn>=1;sn--)Gi.push(Ci.path[sn]);for(var zn=1;zn<Bi.path.length;zn++)Gi.push(Bi.path[zn]);var Ja=fi*2.5;if(Ue){var co=Gi.map(function(Iv){return $n(Iv,Ue)});co.some(function(Iv){return Iv.signedDistanceFromCamera<=0})?Gi=[]:Gi=co.map(function(Iv){return Iv.point})}var ts=[];if(Gi.length>0){for(var so=Gi[0].clone(),Yo=Gi[0].clone(),ms=1;ms<Gi.length;ms++)so.x=Math.min(so.x,Gi[ms].x),so.y=Math.min(so.y,Gi[ms].y),Yo.x=Math.max(Yo.x,Gi[ms].x),Yo.y=Math.max(Yo.y,Gi[ms].y);so.x>=Ti.x&&Yo.x<=gn.x&&so.y>=Ti.y&&Yo.y<=gn.y?ts=[Gi]:Yo.x<Ti.x||so.x>gn.x||Yo.y<Ti.y||so.y>gn.y?ts=[]:ts=i.clipLine([Gi],Ti.x,Ti.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou<Cv.length;ou+=1){var Lv=Cv[ou];rn.reset(Lv,fi*.25);var wd=0;rn.length<=.5*fi?wd=1:wd=Math.ceil(rn.paddedLength/Ja)+1;for(var Kv=0;Kv<wd;Kv++){var hg=Kv/Math.max(wd-1,1),gp=rn.lerp(hg),Td=gp.x+us,mp=gp.y+us;Qe.push(Td,mp,fi,0);var Ud=Td-fi,Ad=mp-fi,Pv=Td+fi,Jv=mp+fi;if(Di=Di&&this.isOffscreen(Ud,Ad,Pv,Jv),Ur=Ur||this.isInsideGrid(Ud,Ad,Pv,Jv),!D&&this.grid.hitTestCircle(Td,mp,fi,hr)&&(br=!0,!ft))return{circles:[],offscreen:!1,collisionDetected:br}}}}return{circles:!ft&&br||!Ur?[]:Qe,offscreen:Di,collisionDetected:br}},il.prototype.queryRenderedSymbols=function(D){if(D.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var J=[],q=1/0,K=1/0,de=-1/0,ne=-1/0,we=0,Ue=D;we<Ue.length;we+=1){var ft=Ue[we],Zt=new i.Point(ft.x+us,ft.y+us);q=Math.min(q,Zt.x),K=Math.min(K,Zt.y),de=Math.max(de,Zt.x),ne=Math.max(ne,Zt.y),J.push(Zt)}for(var hr=this.grid.query(q,K,de,ne).concat(this.ignoredGrid.query(q,K,de,ne)),qt={},Ve={},Qe=0,at=hr;Qe<at.length;Qe+=1){var Ct=at[Qe],Ot=Ct.key;if(qt[Ot.bucketInstanceId]===void 0&&(qt[Ot.bucketInstanceId]={}),!qt[Ot.bucketInstanceId][Ot.featureIndex]){var Rt=[new i.Point(Ct.x1,Ct.y1),new i.Point(Ct.x2,Ct.y1),new i.Point(Ct.x2,Ct.y2),new i.Point(Ct.x1,Ct.y2)];i.polygonIntersectsPolygon(J,Rt)&&(qt[Ot.bucketInstanceId][Ot.featureIndex]=!0,Ve[Ot.bucketInstanceId]===void 0&&(Ve[Ot.bucketInstanceId]=[]),Ve[Ot.bucketInstanceId].push(Ot.featureIndex))}}return Ve},il.prototype.insertCollisionBox=function(D,J,q,K,de){var ne=J?this.ignoredGrid:this.grid,we={bucketInstanceId:q,featureIndex:K,collisionGroupID:de};ne.insert(we,D[0],D[1],D[2],D[3])},il.prototype.insertCollisionCircles=function(D,J,q,K,de){for(var ne=J?this.ignoredGrid:this.grid,we={bucketInstanceId:q,featureIndex:K,collisionGroupID:de},Ue=0;Ue<D.length;Ue+=4)ne.insertCircle(we,D[Ue],D[Ue+1],D[Ue+2])},il.prototype.projectAndGetPerspectiveRatio=function(D,J,q){var K=[J,q,0,1];zl(K,K,D);var de=new i.Point((K[0]/K[3]+1)/2*this.transform.width+us,(-K[1]/K[3]+1)/2*this.transform.height+us);return{point:de,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/K[3])}},il.prototype.isOffscreen=function(D,J,q,K){return q<us||D>=this.screenRightBoundary||K<us||J>this.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,q,K){return q>=0&&D<this.gridRightBoundary&&K>=0&&J<this.gridBottomBoundary},il.prototype.getViewportMatrix=function(){var D=i.identity([]);return i.translate(D,D,[-us,-us,0]),D};function As(Y,D,J){return D*(i.EXTENT/(Y.tileSize*Math.pow(2,J-Y.tileID.overscaledZ)))}var cl=function(D,J,q,K){D?this.opacity=Math.max(0,Math.min(1,D.opacity+(D.placed?J:-J))):this.opacity=K&&q?1:0,this.placed=q};cl.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ks=function(D,J,q,K,de){this.text=new cl(D?D.text:null,J,q,de),this.icon=new cl(D?D.icon:null,J,K,de)};Ks.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var zs=function(D,J,q){this.text=D,this.icon=J,this.skipFade=q},Io=function(){this.invProjMatrix=i.create(),this.viewportMatrix=i.create(),this.circles=[]},ls=function(D,J,q,K,de){this.bucketInstanceId=D,this.featureIndex=J,this.sourceLayerIndex=q,this.bucketIndex=K,this.tileID=de},Yl=function(D){this.crossSourceCollisions=D,this.maxGroupID=0,this.collisionGroups={}};Yl.prototype.get=function(D){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[D]){var J=++this.maxGroupID;this.collisionGroups[D]={ID:J,predicate:function(q){return q.collisionGroupID===J}}}return this.collisionGroups[D]};function Su(Y,D,J,q,K){var de=i.getAnchorAlignment(Y),ne=de.horizontalAlign,we=de.verticalAlign,Ue=-(ne-.5)*D,ft=-(we-.5)*J,Zt=i.evaluateVariableOffset(Y,q);return new i.Point(Ue+Zt[0]*K,ft+Zt[1]*K)}function nc(Y,D,J,q,K,de){var ne=Y.x1,we=Y.x2,Ue=Y.y1,ft=Y.y2,Zt=Y.anchorPointX,hr=Y.anchorPointY,qt=new i.Point(D,J);return q&&qt._rotate(K?de:-de),{x1:ne+qt.x,y1:Ue+qt.y,x2:we+qt.x,y2:ft+qt.y,anchorPointX:Zt,anchorPointY:hr}}var bs=function(D,J,q,K){this.transform=D.clone(),this.collisionIndex=new il(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=J,this.retainedQueryData={},this.collisionGroups=new Yl(q),this.collisionCircleArrays={},this.prevPlacement=K,K&&(K.prevPlacement=void 0),this.placedOrientations={}};bs.prototype.getBucketParts=function(D,J,q,K){var de=q.getBucket(J),ne=q.latestFeatureIndex;if(!(!de||!ne||J.id!==de.layerIds[0])){var we=q.collisionBoxArray,Ue=de.layers[0].layout,ft=Math.pow(2,this.transform.zoom-q.tileID.overscaledZ),Zt=q.tileSize/i.EXTENT,hr=this.transform.calculatePosMatrix(q.tileID.toUnwrapped()),qt=Ue.get(\"text-pitch-alignment\")===\"map\",Ve=Ue.get(\"text-rotation-alignment\")===\"map\",Qe=As(q,1,this.transform.zoom),at=_n(hr,qt,Ve,this.transform,Qe),Ct=null;if(qt){var Ot=ya(hr,qt,Ve,this.transform,Qe);Ct=i.multiply([],this.transform.labelPlaneMatrix,Ot)}this.retainedQueryData[de.bucketInstanceId]=new ls(de.bucketInstanceId,ne,de.sourceLayerIndex,de.index,q.tileID);var Rt={bucket:de,layout:Ue,posMatrix:hr,textLabelPlaneMatrix:at,labelToScreenMatrix:Ct,scale:ft,textPixelRatio:Zt,holdingForFade:q.holdingForFade(),collisionBoxArray:we,partiallyEvaluatedTextSize:i.evaluateSizeForZoom(de.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(de.sourceID)};if(K)for(var Bt=0,Dt=de.sortKeyRanges;Bt<Dt.length;Bt+=1){var yt=Dt[Bt],Pt=yt.sortKey,ht=yt.symbolInstanceStart,ur=yt.symbolInstanceEnd;D.push({sortKey:Pt,symbolInstanceStart:ht,symbolInstanceEnd:ur,parameters:Rt})}else D.push({symbolInstanceStart:0,symbolInstanceEnd:de.symbolInstances.length,parameters:Rt})}},bs.prototype.attemptAnchorPlacement=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve,Qe,at){var Ct=[qt.textOffset0,qt.textOffset1],Ot=Su(D,q,K,Ct,de),Rt=this.collisionIndex.placeCollisionBox(nc(J,Ot.x,Ot.y,ne,we,this.transform.angle),hr,Ue,ft,Zt.predicate);if(at){var Bt=this.collisionIndex.placeCollisionBox(nc(at,Ot.x,Ot.y,ne,we,this.transform.angle),hr,Ue,ft,Zt.predicate);if(Bt.box.length===0)return}if(Rt.box.length>0){var Dt;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Dt=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:Ct,width:q,height:K,anchor:D,textBoxScale:de,prevAnchor:Dt},this.markUsedJustification(Ve,D,qt,Qe),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,Qe,qt),this.placedOrientations[qt.crossTileID]=Qe),{shift:Ot,placedGlyphBoxes:Rt}}},bs.prototype.placeLayerBucketPart=function(D,J,q){var K=this,de=D.parameters,ne=de.bucket,we=de.layout,Ue=de.posMatrix,ft=de.textLabelPlaneMatrix,Zt=de.labelToScreenMatrix,hr=de.textPixelRatio,qt=de.holdingForFade,Ve=de.collisionBoxArray,Qe=de.partiallyEvaluatedTextSize,at=de.collisionGroup,Ct=we.get(\"text-optional\"),Ot=we.get(\"icon-optional\"),Rt=we.get(\"text-allow-overlap\"),Bt=we.get(\"icon-allow-overlap\"),Dt=we.get(\"text-rotation-alignment\")===\"map\",yt=we.get(\"text-pitch-alignment\")===\"map\",Pt=we.get(\"icon-text-fit\")!==\"none\",ht=we.get(\"symbol-z-order\")===\"viewport-y\",ur=Rt&&(Bt||!ne.hasIconData()||Ot),br=Bt&&(Rt||!ne.hasTextData()||Ct);!ne.collisionArrays&&Ve&&ne.deserializeCollisionBoxes(Ve);var Ur=function(Ci,Bi){if(!J[Ci.crossTileID]){if(qt){K.placements[Ci.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,sn=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Yo=null,ms=null,ou=0,Cv=0,Lv=0;Bi.textFeatureIndex?ou=Bi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(ou=Ci.featureIndex),Bi.verticalTextFeatureIndex&&(Cv=Bi.verticalTextFeatureIndex);var wd=Bi.textBox;if(wd){var Kv=function(vc){var tu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ci.crossTileID];Sd&&(K.placedOrientations[Ci.crossTileID]=Sd,tu=Sd,K.markUsedOrientation(ne,tu,Ci))}return tu},hg=function(vc,tu){if(ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Bi.verticalTextBox)for(var Sd=0,vy=ne.writingModes;Sd<vy.length;Sd+=1){var L1=vy[Sd];if(L1===i.WritingMode.vertical?(co=tu(),ts=co):co=vc(),co&&co.box&&co.box.length)break}else co=vc()};if(we.get(\"text-variable-anchor\")){var Ud=we.get(\"text-variable-anchor\");if(K.prevPlacement&&K.prevPlacement.variableOffsets[Ci.crossTileID]){var Ad=K.prevPlacement.variableOffsets[Ci.crossTileID];Ud.indexOf(Ad.anchor)>0&&(Ud=Ud.filter(function(vc){return vc!==Ad.anchor}),Ud.unshift(Ad.anchor))}var Pv=function(vc,tu,Sd){for(var vy=vc.x2-vc.x1,L1=vc.y2-vc.y1,wu=Ci.textBoxScale,Yx=Pt&&!Bt?tu:null,lm={box:[],offscreen:!1},Ow=Rt?Ud.length*2:Ud.length,Rv=0;Rv<Ow;++Rv){var um=Ud[Rv%Ud.length],qw=Rv>=Ud.length,Kx=K.attemptAnchorPlacement(um,vc,vy,L1,wu,Dt,yt,hr,Ue,at,qw,Ci,ne,Sd,Yx);if(Kx&&(lm=Kx.placedGlyphBoxes,lm&&lm.box&&lm.box.length)){Gi=!0,Ja=Kx.shift;break}}return lm},Jv=function(){return Pv(wd,Bi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Bi.verticalTextBox,tu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!tu&&Ci.numVerticalGlyphVertices>0&&vc?Pv(vc,Bi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var fy=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var dg=K.prevPlacement.variableOffsets[Ci.crossTileID];dg&&(K.variableOffsets[Ci.crossTileID]=dg,K.markUsedJustification(ne,dg.anchor,Ci,fy))}}else{var gp=function(vc,tu){var Sd=K.collisionIndex.placeCollisionBox(vc,Rt,hr,Ue,at.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,tu,Ci),K.placedOrientations[Ci.crossTileID]=tu),Sd},Td=function(){return gp(wd,i.WritingMode.horizontal)},mp=function(){var vc=Bi.verticalTextBox;return ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&vc?gp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Td,mp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ci.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),vg=i.evaluateSizeForFeature(ne.textSizeData,Qe,oh),hy=we.get(\"text-padding\"),Zh=Ci.collisionCircleDiameter;Yo=K.collisionIndex.placeCollisionCircles(Rt,oh,ne.lineVertexArray,ne.glyphOffsetArray,vg,Ue,ft,Zt,q,yt,at.predicate,Zh,hy),Gi=Rt||Yo.circles.length>0&&!Yo.collisionDetected,zn=zn&&Yo.offscreen}if(Bi.iconFeatureIndex&&(Lv=Bi.iconFeatureIndex),Bi.iconBox){var am=function(vc){var tu=Pt&&Ja?nc(vc,Ja.x,Ja.y,Dt,yt,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(tu,Bt,hr,Ue,at.predicate)};ts&&ts.box&&ts.box.length&&Bi.verticalIconBox?(ms=am(Bi.verticalIconBox),sn=ms.box.length>0):(ms=am(Bi.iconBox),sn=ms.box.length>0),zn=zn&&ms.offscreen}var k1=Ct||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,C1=Ot||Ci.numIconVertices===0;if(!k1&&!C1?sn=Gi=sn&&Gi:C1?k1||(sn=sn&&Gi):Gi=sn&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,Cv,at.ID):K.collisionIndex.insertCollisionBox(so.box,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,ou,at.ID)),sn&&ms&&K.collisionIndex.insertCollisionBox(ms.box,we.get(\"icon-ignore-placement\"),ne.bucketInstanceId,Lv,at.ID),Yo&&(Gi&&K.collisionIndex.insertCollisionCircles(Yo.circles,we.get(\"text-ignore-placement\"),ne.bucketInstanceId,ou,at.ID),q)){var dy=ne.bucketInstanceId,om=K.collisionCircleArrays[dy];om===void 0&&(om=K.collisionCircleArrays[dy]=new Io);for(var sm=0;sm<Yo.circles.length;sm+=4)om.circles.push(Yo.circles[sm+0]),om.circles.push(Yo.circles[sm+1]),om.circles.push(Yo.circles[sm+2]),om.circles.push(Yo.collisionDetected?1:0)}K.placements[Ci.crossTileID]=new zs(Gi||ur,sn||br,zn||ne.justReloaded),J[Ci.crossTileID]=!0}};if(ht)for(var Di=ne.getSortedSymbolIndexes(this.transform.angle),fi=Di.length-1;fi>=0;--fi){var Ti=Di[fi];Ur(ne.symbolInstances.get(Ti),ne.collisionArrays[Ti])}else for(var gn=D.symbolInstanceStart;gn<D.symbolInstanceEnd;gn++)Ur(ne.symbolInstances.get(gn),ne.collisionArrays[gn]);if(q&&ne.bucketInstanceId in this.collisionCircleArrays){var rn=this.collisionCircleArrays[ne.bucketInstanceId];i.invert(rn.invProjMatrix,Ue),rn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ne.justReloaded=!1},bs.prototype.markUsedJustification=function(D,J,q,K){var de={left:q.leftJustifiedTextSymbolIndex,center:q.centerJustifiedTextSymbolIndex,right:q.rightJustifiedTextSymbolIndex},ne;K===i.WritingMode.vertical?ne=q.verticalPlacedTextSymbolIndex:ne=de[i.getAnchorJustification(J)];for(var we=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex,q.verticalPlacedTextSymbolIndex],Ue=0,ft=we;Ue<ft.length;Ue+=1){var Zt=ft[Ue];Zt>=0&&(ne>=0&&Zt!==ne?D.text.placedSymbolArray.get(Zt).crossTileID=0:D.text.placedSymbolArray.get(Zt).crossTileID=q.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,q){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex],we=0,Ue=ne;we<Ue.length;we+=1){var ft=Ue[we];D.text.placedSymbolArray.get(ft).placedOrientation=K}q.verticalPlacedTextSymbolIndex&&(D.text.placedSymbolArray.get(q.verticalPlacedTextSymbolIndex).placedOrientation=de)},bs.prototype.commit=function(D){this.commitTime=D,this.zoomAtLastRecencyCheck=this.transform.zoom;var J=this.prevPlacement,q=!1;this.prevZoomAdjustment=J?J.zoomAdjustment(this.transform.zoom):0;var K=J?J.symbolFadeChange(D):1,de=J?J.opacities:{},ne=J?J.variableOffsets:{},we=J?J.placedOrientations:{};for(var Ue in this.placements){var ft=this.placements[Ue],Zt=de[Ue];Zt?(this.opacities[Ue]=new Ks(Zt,K,ft.text,ft.icon),q=q||ft.text!==Zt.text.placed||ft.icon!==Zt.icon.placed):(this.opacities[Ue]=new Ks(null,K,ft.text,ft.icon,ft.skipFade),q=q||ft.text||ft.icon)}for(var hr in de){var qt=de[hr];if(!this.opacities[hr]){var Ve=new Ks(qt,K,!1,!1);Ve.isHidden()||(this.opacities[hr]=Ve,q=q||qt.text.placed||qt.icon.placed)}}for(var Qe in ne)!this.variableOffsets[Qe]&&this.opacities[Qe]&&!this.opacities[Qe].isHidden()&&(this.variableOffsets[Qe]=ne[Qe]);for(var at in we)!this.placedOrientations[at]&&this.opacities[at]&&!this.opacities[at].isHidden()&&(this.placedOrientations[at]=we[at]);q?this.lastPlacementChangeTime=D:typeof this.lastPlacementChangeTime!=\"number\"&&(this.lastPlacementChangeTime=J?J.lastPlacementChangeTime:D)},bs.prototype.updateLayerOpacities=function(D,J){for(var q={},K=0,de=J;K<de.length;K+=1){var ne=de[K],we=ne.getBucket(D);we&&ne.latestFeatureIndex&&D.id===we.layerIds[0]&&this.updateBucketOpacities(we,q,ne.collisionBoxArray)}},bs.prototype.updateBucketOpacities=function(D,J,q){var K=this;D.hasTextData()&&D.text.opacityVertexArray.clear(),D.hasIconData()&&D.icon.opacityVertexArray.clear(),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexArray.clear(),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexArray.clear();var de=D.layers[0].layout,ne=new Ks(null,0,!1,!1,!0),we=de.get(\"text-allow-overlap\"),Ue=de.get(\"icon-allow-overlap\"),ft=de.get(\"text-variable-anchor\"),Zt=de.get(\"text-rotation-alignment\")===\"map\",hr=de.get(\"text-pitch-alignment\")===\"map\",qt=de.get(\"icon-text-fit\")!==\"none\",Ve=new Ks(null,0,we&&(Ue||!D.hasIconData()||de.get(\"icon-optional\")),Ue&&(we||!D.hasTextData()||de.get(\"text-optional\")),!0);!D.collisionArrays&&q&&(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData())&&D.deserializeCollisionBoxes(q);for(var Qe=function(Rt,Bt,Dt){for(var yt=0;yt<Bt/4;yt++)Rt.opacityVertexArray.emplaceBack(Dt)},at=function(Rt){var Bt=D.symbolInstances.get(Rt),Dt=Bt.numHorizontalGlyphVertices,yt=Bt.numVerticalGlyphVertices,Pt=Bt.crossTileID,ht=J[Pt],ur=K.opacities[Pt];ht?ur=ne:ur||(ur=Ve,K.opacities[Pt]=ur),J[Pt]=!0;var br=Dt>0||yt>0,Ur=Bt.numIconVertices>0,Di=K.placedOrientations[Bt.crossTileID],fi=Di===i.WritingMode.vertical,Ti=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(br){var gn=ac(ur.text),rn=fi?aa:gn;Qe(D.text,Dt,rn);var Ci=Ti?aa:gn;Qe(D.text,yt,Ci);var Bi=ur.text.isHidden();[Bt.rightJustifiedTextSymbolIndex,Bt.centerJustifiedTextSymbolIndex,Bt.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Bi||fi?1:0)}),Bt.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Bt.verticalPlacedTextSymbolIndex).hidden=Bi||Ti?1:0);var Gi=K.variableOffsets[Bt.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Bt,Di);var sn=K.placedOrientations[Bt.crossTileID];sn&&(K.markUsedJustification(D,\"left\",Bt,sn),K.markUsedOrientation(D,sn,Bt))}if(Ur){var zn=ac(ur.icon),Ja=!(qt&&Bt.verticalPlacedIconSymbolIndex&&fi);if(Bt.placedIconSymbolIndex>=0){var co=Ja?zn:aa;Qe(D.icon,Bt.numIconVertices,co),D.icon.placedSymbolArray.get(Bt.placedIconSymbolIndex).hidden=ur.icon.isHidden()}if(Bt.verticalPlacedIconSymbolIndex>=0){var ts=Ja?aa:zn;Qe(D.icon,Bt.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Bt.verticalPlacedIconSymbolIndex).hidden=ur.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Rt];if(so){var Yo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ft){var ou=K.variableOffsets[Pt];ou?(Yo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Zt&&Yo._rotate(hr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||fi,Yo.x,Yo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||Ti,Yo.x,Yo.y)}var Cv=!!(!Ti&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,Cv,qt?Yo.x:0,qt?Yo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,!Cv,qt?Yo.x:0,qt?Yo.y:0)}}},Ct=0;Ct<D.symbolInstances.length;Ct++)at(Ct);if(D.sortFeatures(this.transform.angle),this.retainedQueryData[D.bucketInstanceId]&&(this.retainedQueryData[D.bucketInstanceId].featureSortOrder=D.featureSortOrder),D.hasTextData()&&D.text.opacityVertexBuffer&&D.text.opacityVertexBuffer.updateData(D.text.opacityVertexArray),D.hasIconData()&&D.icon.opacityVertexBuffer&&D.icon.opacityVertexBuffer.updateData(D.icon.opacityVertexArray),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexBuffer&&D.iconCollisionBox.collisionVertexBuffer.updateData(D.iconCollisionBox.collisionVertexArray),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexBuffer&&D.textCollisionBox.collisionVertexBuffer.updateData(D.textCollisionBox.collisionVertexArray),D.bucketInstanceId in this.collisionCircleArrays){var Ot=this.collisionCircleArrays[D.bucketInstanceId];D.placementInvProjMatrix=Ot.invProjMatrix,D.placementViewportMatrix=Ot.viewportMatrix,D.collisionCircleArray=Ot.circles,delete this.collisionCircleArrays[D.bucketInstanceId]}},bs.prototype.symbolFadeChange=function(D){return this.fadeDuration===0?1:(D-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},bs.prototype.zoomAdjustment=function(D){return Math.max(0,(this.transform.zoom-D)/1.5)},bs.prototype.hasTransitions=function(D){return this.stale||D-this.lastPlacementChangeTime<this.fadeDuration},bs.prototype.stillRecent=function(D,J){var q=this.zoomAtLastRecencyCheck===J?1-this.zoomAdjustment(J):1;return this.zoomAtLastRecencyCheck=J,this.commitTime+this.fadeDuration*q>D},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,q,K){Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),Ol=Math.pow(2,17),xo=Math.pow(2,16),Kl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*Ol+D*xo+J*Kl+D*Ns+J*Hl+D}var aa=0,Oo=function(D){this._sortAcrossTiles=D.layout.get(\"symbol-z-order\")!==\"viewport-y\"&&D.layout.get(\"symbol-sort-key\").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oo.prototype.continuePlacement=function(D,J,q,K,de){for(var ne=this._bucketParts;this._currentTileIndex<D.length;){var we=D[this._currentTileIndex];if(J.getBucketParts(ne,K,we,this._sortAcrossTiles),this._currentTileIndex++,de())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ne.sort(function(ft,Zt){return ft.sortKey-Zt.sortKey}));this._currentPartIndex<ne.length;){var Ue=ne[this._currentPartIndex];if(J.placeLayerBucketPart(Ue,this._seenCrossTileIDs,q),this._currentPartIndex++,de())return!0}return!1};var qo=function(D,J,q,K,de,ne,we){this.placement=new bs(D,de,ne,we),this._currentPlacementIndex=J.length-1,this._forceFullPlacement=q,this._showCollisionBoxes=K,this._done=!1};qo.prototype.isDone=function(){return this._done},qo.prototype.continuePlacement=function(D,J,q){for(var K=this,de=i.browser.now(),ne=function(){var hr=i.browser.now()-de;return K._forceFullPlacement?!1:hr>2};this._currentPlacementIndex>=0;){var we=D[this._currentPlacementIndex],Ue=J[we],ft=this.placement.collisionIndex.transform.zoom;if(Ue.type===\"symbol\"&&(!Ue.minzoom||Ue.minzoom<=ft)&&(!Ue.maxzoom||Ue.maxzoom>ft)){this._inProgressLayer||(this._inProgressLayer=new Oo(Ue));var Zt=this._inProgressLayer.continuePlacement(q[Ue.source],this.placement,this._showCollisionBoxes,Ue,ne);if(Zt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},qo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var ql=512/i.EXTENT/2,Pc=function(D,J,q){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=q;for(var K=0;K<J.length;K++){var de=J.get(K),ne=de.key;this.indexedSymbolInstances[ne]||(this.indexedSymbolInstances[ne]=[]),this.indexedSymbolInstances[ne].push({crossTileID:de.crossTileID,coord:this.getScaledCoordinates(de,D)})}};Pc.prototype.getScaledCoordinates=function(D,J){var q=J.canonical.z-this.tileID.canonical.z,K=ql/Math.pow(2,q);return{x:Math.floor((J.canonical.x*i.EXTENT+D.anchorX)*K),y:Math.floor((J.canonical.y*i.EXTENT+D.anchorY)*K)}},Pc.prototype.findMatches=function(D,J,q){for(var K=this.tileID.canonical.z<J.canonical.z?1:Math.pow(2,this.tileID.canonical.z-J.canonical.z),de=0;de<D.length;de++){var ne=D.get(de);if(!ne.crossTileID){var we=this.indexedSymbolInstances[ne.key];if(we)for(var Ue=this.getScaledCoordinates(ne,J),ft=0,Zt=we;ft<Zt.length;ft+=1){var hr=Zt[ft];if(Math.abs(hr.coord.x-Ue.x)<=K&&Math.abs(hr.coord.y-Ue.y)<=K&&!q[hr.crossTileID]){q[hr.crossTileID]=!0,ne.crossTileID=hr.crossTileID;break}}}}};var Do=function(){this.maxCrossTileID=0};Do.prototype.generate=function(){return++this.maxCrossTileID};var rf=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};rf.prototype.handleWrapJump=function(D){var J=Math.round((D-this.lng)/360);if(J!==0)for(var q in this.indexes){var K=this.indexes[q],de={};for(var ne in K){var we=K[ne];we.tileID=we.tileID.unwrapTo(we.tileID.wrap+J),de[we.tileID.key]=we}this.indexes[q]=de}this.lng=D},rf.prototype.addBucket=function(D,J,q){if(this.indexes[D.overscaledZ]&&this.indexes[D.overscaledZ][D.key]){if(this.indexes[D.overscaledZ][D.key].bucketInstanceId===J.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(D.overscaledZ,this.indexes[D.overscaledZ][D.key])}for(var K=0;K<J.symbolInstances.length;K++){var de=J.symbolInstances.get(K);de.crossTileID=0}this.usedCrossTileIDs[D.overscaledZ]||(this.usedCrossTileIDs[D.overscaledZ]={});var ne=this.usedCrossTileIDs[D.overscaledZ];for(var we in this.indexes){var Ue=this.indexes[we];if(Number(we)>D.overscaledZ)for(var ft in Ue){var Zt=Ue[ft];Zt.tileID.isChildOf(D)&&Zt.findMatches(J.symbolInstances,D,ne)}else{var hr=D.scaledTo(Number(we)),qt=Ue[hr.key];qt&&qt.findMatches(J.symbolInstances,D,ne)}}for(var Ve=0;Ve<J.symbolInstances.length;Ve++){var Qe=J.symbolInstances.get(Ve);Qe.crossTileID||(Qe.crossTileID=q.generate(),ne[Qe.crossTileID]=!0)}return this.indexes[D.overscaledZ]===void 0&&(this.indexes[D.overscaledZ]={}),this.indexes[D.overscaledZ][D.key]=new Pc(D,J.symbolInstances,J.bucketInstanceId),!0},rf.prototype.removeBucketCrossTileIDs=function(D,J){for(var q in J.indexedSymbolInstances)for(var K=0,de=J.indexedSymbolInstances[q];K<de.length;K+=1){var ne=de[K];delete this.usedCrossTileIDs[D][ne.crossTileID]}},rf.prototype.removeStaleBuckets=function(D){var J=!1;for(var q in this.indexes){var K=this.indexes[q];for(var de in K)D[K[de].bucketInstanceId]||(this.removeBucketCrossTileIDs(q,K[de]),delete K[de],J=!0)}return J};var Vf=function(){this.layerIndexes={},this.crossTileIDs=new Do,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Vf.prototype.addLayer=function(D,J,q){var K=this.layerIndexes[D.id];K===void 0&&(K=this.layerIndexes[D.id]=new rf);var de=!1,ne={};K.handleWrapJump(q);for(var we=0,Ue=J;we<Ue.length;we+=1){var ft=Ue[we],Zt=ft.getBucket(D);!Zt||D.id!==Zt.layerIds[0]||(Zt.bucketInstanceId||(Zt.bucketInstanceId=++this.maxBucketInstanceId),K.addBucket(ft.tileID,Zt,this.crossTileIDs)&&(de=!0),ne[Zt.bucketInstanceId]=!0)}return K.removeStaleBuckets(ne)&&(de=!0),de},Vf.prototype.pruneUnusedLayers=function(D){var J={};D.forEach(function(K){J[K]=!0});for(var q in this.layerIndexes)J[q]||delete this.layerIndexes[q]};var pl=function(Y,D){return i.emitValidationErrors(Y,D&&D.filter(function(J){return J.identifier!==\"source.canvas\"}))},Zc=i.pick(da,[\"addLayer\",\"removeLayer\",\"setPaintProperty\",\"setLayoutProperty\",\"setFilter\",\"addSource\",\"removeSource\",\"setLayerZoomRange\",\"setLight\",\"setTransition\",\"setGeoJSONSourceData\"]),Jl=i.pick(da,[\"setCenter\",\"setZoom\",\"setBearing\",\"setPitch\"]),Os=Xo(),yu=function(Y){function D(J,q){var K=this;q===void 0&&(q={}),Y.call(this),this.map=J,this.dispatcher=new Z(Ba(),this),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new P(J._requestManager,q.localIdeographFontFamily),this.lineAtlas=new G(256,512),this.crossTileSymbolIndex=new Vf,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new i.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast(\"setReferrer\",i.getReferrer());var de=this;this._rtlTextPluginCallback=D.registerForPluginStateChange(function(ne){var we={pluginStatus:ne.pluginStatus,pluginURL:ne.pluginURL};de.dispatcher.broadcast(\"syncRTLPluginState\",we,function(Ue,ft){if(i.triggerPluginCompletionEvent(Ue),ft){var Zt=ft.every(function(qt){return qt});if(Zt)for(var hr in de.sourceCaches)de.sourceCaches[hr].reload()}})}),this.on(\"data\",function(ne){if(!(ne.dataType!==\"source\"||ne.sourceDataType!==\"metadata\")){var we=K.sourceCaches[ne.sourceId];if(we){var Ue=we.getSource();if(!(!Ue||!Ue.vectorLayerIds))for(var ft in K._layers){var Zt=K._layers[ft];Zt.source===Ue.id&&K._validateLayer(Zt)}}}})}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.loadURL=function(q,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event(\"dataloading\",{dataType:\"style\"}));var ne=typeof K.validate==\"boolean\"?K.validate:!i.isMapboxURL(q);q=this.map._requestManager.normalizeStyleURL(q,K.accessToken);var we=this.map._requestManager.transformRequest(q,i.ResourceType.Style);this._request=i.getJSON(we,function(Ue,ft){de._request=null,Ue?de.fire(new i.ErrorEvent(Ue)):ft&&de._load(ft,ne)})},D.prototype.loadJSON=function(q,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event(\"dataloading\",{dataType:\"style\"})),this._request=i.browser.frame(function(){de._request=null,de._load(q,K.validate!==!1)})},D.prototype.loadEmpty=function(){this.fire(new i.Event(\"dataloading\",{dataType:\"style\"})),this._load(Os,!1)},D.prototype._load=function(q,K){if(!(K&&pl(this,i.validateStyle(q)))){this._loaded=!0,this.stylesheet=q;for(var de in q.sources)this.addSource(de,q.sources[de],{validate:!1});q.sprite?this._loadSprite(q.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(q.glyphs);var ne=Fa(this.stylesheet.layers);this._order=ne.map(function(Zt){return Zt.id}),this._layers={},this._serializedLayers={};for(var we=0,Ue=ne;we<Ue.length;we+=1){var ft=Ue[we];ft=i.createStyleLayer(ft),ft.setEventedParent(this,{layer:{id:ft.id}}),this._layers[ft.id]=ft,this._serializedLayers[ft.id]=ft.serialize()}this.dispatcher.broadcast(\"setLayers\",this._serializeLayers(this._order)),this.light=new U(this.stylesheet.light),this.fire(new i.Event(\"data\",{dataType:\"style\"})),this.fire(new i.Event(\"style.load\"))}},D.prototype._loadSprite=function(q){var K=this;this._spriteRequest=_(q,this.map._requestManager,function(de,ne){if(K._spriteRequest=null,de)K.fire(new i.ErrorEvent(de));else if(ne)for(var we in ne)K.imageManager.addImage(we,ne[we]);K.imageManager.setLoaded(!0),K._availableImages=K.imageManager.listImages(),K.dispatcher.broadcast(\"setImages\",K._availableImages),K.fire(new i.Event(\"data\",{dataType:\"style\"}))})},D.prototype._validateLayer=function(q){var K=this.sourceCaches[q.source];if(K){var de=q.sourceLayer;if(de){var ne=K.getSource();(ne.type===\"geojson\"||ne.vectorLayerIds&&ne.vectorLayerIds.indexOf(de)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer \"'+de+'\" does not exist on source \"'+ne.id+'\" as specified by style layer \"'+q.id+'\"')))}}},D.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var q in this.sourceCaches)if(!this.sourceCaches[q].loaded())return!1;return!!this.imageManager.isLoaded()},D.prototype._serializeLayers=function(q){for(var K=[],de=0,ne=q;de<ne.length;de+=1){var we=ne[de],Ue=this._layers[we];Ue.type!==\"custom\"&&K.push(Ue.serialize())}return K},D.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var q in this.sourceCaches)if(this.sourceCaches[q].hasTransition())return!0;for(var K in this._layers)if(this._layers[K].hasTransition())return!0;return!1},D.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},D.prototype.update=function(q){if(this._loaded){var K=this._changed;if(this._changed){var de=Object.keys(this._updatedLayers),ne=Object.keys(this._removedLayers);(de.length||ne.length)&&this._updateWorkerLayers(de,ne);for(var we in this._updatedSources){var Ue=this._updatedSources[we];Ue===\"reload\"?this._reloadSource(we):Ue===\"clear\"&&this._clearSource(we)}this._updateTilesForChangedImages();for(var ft in this._updatedPaintProps)this._layers[ft].updateTransitions(q);this.light.updateTransitions(q),this._resetUpdates()}var Zt={};for(var hr in this.sourceCaches){var qt=this.sourceCaches[hr];Zt[hr]=qt.used,qt.used=!1}for(var Ve=0,Qe=this._order;Ve<Qe.length;Ve+=1){var at=Qe[Ve],Ct=this._layers[at];Ct.recalculate(q,this._availableImages),!Ct.isHidden(q.zoom)&&Ct.source&&(this.sourceCaches[Ct.source].used=!0)}for(var Ot in Zt){var Rt=this.sourceCaches[Ot];Zt[Ot]!==Rt.used&&Rt.fire(new i.Event(\"data\",{sourceDataType:\"visibility\",dataType:\"source\",sourceId:Ot}))}this.light.recalculate(q),this.z=q.zoom,K&&this.fire(new i.Event(\"data\",{dataType:\"style\"}))}},D.prototype._updateTilesForChangedImages=function(){var q=Object.keys(this._changedImages);if(q.length){for(var K in this.sourceCaches)this.sourceCaches[K].reloadTilesForDependencies([\"icons\",\"patterns\"],q);this._changedImages={}}},D.prototype._updateWorkerLayers=function(q,K){this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(q),removedIds:K})},D.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},D.prototype.setState=function(q){var K=this;if(this._checkLoaded(),pl(this,i.validateStyle(q)))return!1;q=i.clone$1(q),q.layers=Fa(q.layers);var de=An(this.serialize(),q).filter(function(we){return!(we.command in Jl)});if(de.length===0)return!1;var ne=de.filter(function(we){return!(we.command in Zc)});if(ne.length>0)throw new Error(\"Unimplemented: \"+ne.map(function(we){return we.command}).join(\", \")+\".\");return de.forEach(function(we){we.command!==\"setTransition\"&&K[we.command].apply(K,we.args)}),this.stylesheet=q,!0},D.prototype.addImage=function(q,K){if(this.getImage(q))return this.fire(new i.ErrorEvent(new Error(\"An image with this name already exists.\")));this.imageManager.addImage(q,K),this._afterImageUpdated(q)},D.prototype.updateImage=function(q,K){this.imageManager.updateImage(q,K)},D.prototype.getImage=function(q){return this.imageManager.getImage(q)},D.prototype.removeImage=function(q){if(!this.getImage(q))return this.fire(new i.ErrorEvent(new Error(\"No image with this name exists.\")));this.imageManager.removeImage(q),this._afterImageUpdated(q)},D.prototype._afterImageUpdated=function(q){this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.dispatcher.broadcast(\"setImages\",this._availableImages),this.fire(new i.Event(\"data\",{dataType:\"style\"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(q,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error(\"There is already a source with this ID\");if(!K.type)throw new Error(\"The type property must be defined, but only the following properties were given: \"+Object.keys(K).join(\", \")+\".\");var we=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\"],Ue=we.indexOf(K.type)>=0;if(!(Ue&&this._validate(i.validateStyle.source,\"sources.\"+q,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ft=this.sourceCaches[q]=new ri(q,K,this.dispatcher);ft.style=this,ft.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ft.serialize(),sourceId:q}}),ft.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error(\"There is no source with this ID\");for(var K in this._layers)if(this._layers[K].source===q)return this.fire(new i.ErrorEvent(new Error('Source \"'+q+'\" cannot be removed while layer \"'+K+'\" is using it.')));var de=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],de.fire(new i.Event(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:q})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(q,K){this._checkLoaded();var de=this.sourceCaches[q].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()},D.prototype.addLayer=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=q.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+ne+'\" already exists on this map')));return}var we;if(q.type===\"custom\"){if(pl(this,i.validateCustomStyleLayer(q)))return;we=i.createStyleLayer(q)}else{if(typeof q.source==\"object\"&&(this.addSource(ne,q.source),q=i.clone$1(q),q=i.extend(q,{source:ne})),this._validate(i.validateStyle.layer,\"layers.\"+ne,q,{arrayIndex:-1},de))return;we=i.createStyleLayer(q),this._validateLayer(we),we.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[we.id]=we.serialize()}var Ue=K?this._order.indexOf(K):this._order.length;if(K&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+K+'\" does not exist on this map.')));return}if(this._order.splice(Ue,0,ne),this._layerOrderChanged=!0,this._layers[ne]=we,this._removedLayers[ne]&&we.source&&we.type!==\"custom\"){var ft=this._removedLayers[ne];delete this._removedLayers[ne],ft.type!==we.type?this._updatedSources[we.source]=\"clear\":(this._updatedSources[we.source]=\"reload\",this.sourceCaches[we.source].pause())}this._updateLayer(we),we.onAdd&&we.onAdd(this.map)},D.prototype.moveLayer=function(q,K){this._checkLoaded(),this._changed=!0;var de=this._layers[q];if(!de){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be moved.\")));return}if(q!==K){var ne=this._order.indexOf(q);this._order.splice(ne,1);var we=K?this._order.indexOf(K):this._order.length;if(K&&we===-1){this.fire(new i.ErrorEvent(new Error('Layer with id \"'+K+'\" does not exist on this map.')));return}this._order.splice(we,0,q),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(q){this._checkLoaded();var K=this._layers[q];if(!K){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be removed.\")));return}K.setEventedParent(null);var de=this._order.indexOf(q);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=K,delete this._layers[q],delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(q){return this._layers[q]},D.prototype.hasLayer=function(q){return q in this._layers},D.prototype.setLayerZoomRange=function(q,K,de){this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot have zoom extent.\")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be filtered.\")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,\"layers.\"+ne.id+\".filter\",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(q){return i.clone$1(this.getLayer(q).filter)},D.prototype.setLayoutProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be styled.\")));return}i.deepEqual(we.getLayoutProperty(K),de)||(we.setLayoutProperty(K,de,ne),this._updateLayer(we))},D.prototype.getLayoutProperty=function(q,K){var de=this.getLayer(q);if(!de){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style.\")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error(\"The layer '\"+q+\"' does not exist in the map's style and cannot be styled.\")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Ue=we.setPaintProperty(K,de,ne);Ue&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[q]=!0}},D.prototype.getPaintProperty=function(q,K){return this.getLayer(q).getPaintProperty(K)},D.prototype.setFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=q.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+de+\"' does not exist in the map's style.\")));return}var Ue=we.getSource().type;if(Ue===\"geojson\"&&ne){this.fire(new i.ErrorEvent(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\")));return}if(Ue===\"vector\"&&!ne){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}q.id===void 0&&this.fire(new i.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),we.setFeatureState(ne,q.id,K)},D.prototype.removeFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+de+\"' does not exist in the map's style.\")));return}var we=ne.getSource().type,Ue=we===\"vector\"?q.sourceLayer:void 0;if(we===\"vector\"&&!Ue){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}if(K&&typeof q.id!=\"string\"&&typeof q.id!=\"number\"){this.fire(new i.ErrorEvent(new Error(\"A feature id is required to remove its specific state property.\")));return}ne.removeFeatureState(Ue,q.id,K)},D.prototype.getFeatureState=function(q){this._checkLoaded();var K=q.source,de=q.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error(\"The source '\"+K+\"' does not exist in the map's style.\")));return}var we=ne.getSource().type;if(we===\"vector\"&&!de){this.fire(new i.ErrorEvent(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));return}return q.id===void 0&&this.fire(new i.ErrorEvent(new Error(\"The feature id parameter must be provided.\"))),ne.getFeatureState(de,q.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.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:i.mapObject(this.sourceCaches,function(q){return q.serialize()}),layers:this._serializeLayers(this._order)},function(q){return q!==void 0})},D.prototype._updateLayer=function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&this.sourceCaches[q.source].getSource().type!==\"raster\"&&(this._updatedSources[q.source]=\"reload\",this.sourceCaches[q.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(q){for(var K=this,de=function(Ti){return K._layers[Ti].type===\"fill-extrusion\"},ne={},we=[],Ue=this._order.length-1;Ue>=0;Ue--){var ft=this._order[Ue];if(de(ft)){ne[ft]=Ue;for(var Zt=0,hr=q;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=qt[ft];if(Ve)for(var Qe=0,at=Ve;Qe<at.length;Qe+=1){var Ct=at[Qe];we.push(Ct)}}}}we.sort(function(Ti,gn){return gn.intersectionZ-Ti.intersectionZ});for(var Ot=[],Rt=this._order.length-1;Rt>=0;Rt--){var Bt=this._order[Rt];if(de(Bt))for(var Dt=we.length-1;Dt>=0;Dt--){var yt=we[Dt].feature;if(ne[yt.layer.id]<Rt)break;Ot.push(yt),we.pop()}else for(var Pt=0,ht=q;Pt<ht.length;Pt+=1){var ur=ht[Pt],br=ur[Bt];if(br)for(var Ur=0,Di=br;Ur<Di.length;Ur+=1){var fi=Di[Ur];Ot.push(fi.feature)}}}return Ot},D.prototype.queryRenderedFeatures=function(q,K,de){K&&K.filter&&this._validate(i.validateStyle.filter,\"queryRenderedFeatures.filter\",K.filter,null,K);var ne={};if(K&&K.layers){if(!Array.isArray(K.layers))return this.fire(new i.ErrorEvent(new Error(\"parameters.layers must be an Array.\"))),[];for(var we=0,Ue=K.layers;we<Ue.length;we+=1){var ft=Ue[we],Zt=this._layers[ft];if(!Zt)return this.fire(new i.ErrorEvent(new Error(\"The layer '\"+ft+\"' does not exist in the map's style and cannot be queried for features.\"))),[];ne[Zt.source]=!0}}var hr=[];K.availableImages=this._availableImages;for(var qt in this.sourceCaches)K.layers&&!ne[qt]||hr.push(ce(this.sourceCaches[qt],this._layers,this._serializedLayers,q,K,de));return this.placement&&hr.push(je(this._layers,this._serializedLayers,this.sourceCaches,q,K,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(hr)},D.prototype.querySourceFeatures=function(q,K){K&&K.filter&&this._validate(i.validateStyle.filter,\"querySourceFeatures.filter\",K.filter,null,K);var de=this.sourceCaches[q];return de?lt(de,K):[]},D.prototype.addSourceType=function(q,K,de){if(D.getSourceType(q))return de(new Error('A source type called \"'+q+'\" already exists.'));if(D.setSourceType(q,K),!K.workerSourceURL)return de(null,null);this.dispatcher.broadcast(\"loadWorkerSource\",{name:q,url:K.workerSourceURL},de)},D.prototype.getLight=function(){return this.light.getLight()},D.prototype.setLight=function(q,K){K===void 0&&(K={}),this._checkLoaded();var de=this.light.getLight(),ne=!1;for(var we in q)if(!i.deepEqual(q[we],de[we])){ne=!0;break}if(ne){var Ue={now:i.browser.now(),transition:i.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(q,K),this.light.updateTransitions(Ue)}},D.prototype._validate=function(q,K,de,ne,we){return we===void 0&&(we={}),we&&we.validate===!1?!1:pl(this,q.call(i.validateStyle,i.extend({key:K,style:this.serialize(),value:de,styleSpec:i.styleSpec},ne)))},D.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),i.evented.off(\"pluginStateChange\",this._rtlTextPluginCallback);for(var q in this._layers){var K=this._layers[q];K.setEventedParent(null)}for(var de in this.sourceCaches)this.sourceCaches[de].clearTiles(),this.sourceCaches[de].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},D.prototype._clearSource=function(q){this.sourceCaches[q].clearTiles()},D.prototype._reloadSource=function(q){this.sourceCaches[q].resume(),this.sourceCaches[q].reload()},D.prototype._updateSources=function(q){for(var K in this.sourceCaches)this.sourceCaches[K].update(q)},D.prototype._generateCollisionBoxes=function(){for(var q in this.sourceCaches)this._reloadSource(q)},D.prototype._updatePlacement=function(q,K,de,ne,we){we===void 0&&(we=!1);for(var Ue=!1,ft=!1,Zt={},hr=0,qt=this._order;hr<qt.length;hr+=1){var Ve=qt[hr],Qe=this._layers[Ve];if(Qe.type===\"symbol\"){if(!Zt[Qe.source]){var at=this.sourceCaches[Qe.source];Zt[Qe.source]=at.getRenderableIds(!0).map(function(Pt){return at.getTileByID(Pt)}).sort(function(Pt,ht){return ht.tileID.overscaledZ-Pt.tileID.overscaledZ||(Pt.tileID.isLessThan(ht.tileID)?-1:1)})}var Ct=this.crossTileSymbolIndex.addLayer(Qe,Zt[Qe.source],q.center.lng);Ue=Ue||Ct}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),we=we||this._layerOrderChanged||de===0,(we||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.browser.now(),q.zoom))&&(this.pauseablePlacement=new qo(q,this._order,we,K,de,ne,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Zt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.browser.now()),ft=!0),Ue&&this.pauseablePlacement.placement.setStale()),ft||Ue)for(var Ot=0,Rt=this._order;Ot<Rt.length;Ot+=1){var Bt=Rt[Ot],Dt=this._layers[Bt];Dt.type===\"symbol\"&&this.placement.updateLayerOpacities(Dt,Zt[Dt.source])}var yt=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.browser.now());return yt},D.prototype._releaseSymbolFadeTiles=function(){for(var q in this.sourceCaches)this.sourceCaches[q].releaseSymbolFadeTiles()},D.prototype.getImages=function(q,K,de){this.imageManager.getImages(K.icons,de),this._updateTilesForChangedImages();var ne=this.sourceCaches[K.source];ne&&ne.setDependencies(K.tileID.key,K.type,K.icons)},D.prototype.getGlyphs=function(q,K,de){this.glyphManager.getGlyphs(K.stacks,de)},D.prototype.getResource=function(q,K,de){return i.makeRequest(K,de)},D}(i.Evented);yu.getSourceType=Be,yu.setSourceType=Pe,yu.registerForPluginStateChange=i.registerForPluginStateChange;var oc=i.createLayout([{name:\"a_pos\",type:\"Int16\",components:2}]),Cf=`#ifdef GL_ES\n",
       "precision mediump float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif`,sc=`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n",
       ");}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,jh=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Lf=\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\",cs=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,nf=\"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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);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);}\",Gf=`varying vec3 v_data;\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",
       "void 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",
       "vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,$l=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\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",
       "void 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",
       "vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,fl=\"void main() {gl_FragColor=vec4(1.0);}\",lc=\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\",Fu=`uniform highp float u_intensity;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Es=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#pragma mapbox: define mediump float radius\n",
       "const highp float ZERO=1.0/255.0/16.0;\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,Hs=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(0.0);\n",
       "#endif\n",
       "}`,Go=\"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\",ps=\"varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",uc=\"attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}\",xl=\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",Gu=\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\",qs=\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",od=\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}\",Po=`#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_FragColor=color*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,sd=`attribute vec2 a_pos;uniform mat4 u_matrix;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);}`,Ko=`varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Pa=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,af=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Hu=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Hf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,Ic=`varying vec4 v_color;void main() {gl_FragColor=v_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,yf=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n",
       "#pragma mapbox: define highp float base\n",
       "#pragma mapbox: define highp float height\n",
       "#pragma mapbox: define highp vec4 color\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float base\n",
       "#pragma mapbox: initialize highp float height\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Ah=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n",
       "? a_pos\n",
       ": vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Qf=`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,_f=\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\",Yc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n",
       "#define PI 3.141592653589793\n",
       "void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,eh=\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\",th=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,ju=`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,jf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,cc=`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,of=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Nl=`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\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",
       "#pragma mapbox: define lowp float floorwidth\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void 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",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Kc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\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",
       "void 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",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Rc=`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,gs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Wf=\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\",Wh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,rh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,sf=`#define SDF_PX 8.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\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",
       "void 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",
       "float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,Sh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\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",
       "void 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",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Mu=`#define SDF_PX 8.0\n",
       "#define SDF 1.0\n",
       "#define ICON 0.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\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",
       "void 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",
       "float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,ih=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\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",
       "void 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",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,js=Us(Cf,sc),Eu=Us(jh,Lf),Dc=Us(cs,nf),ks=Us(Gf,$l),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Mh=Us(qs,od),zu=Us(Po,sd),Fc=Us(Ko,Pa),wc=Us(af,Hu),bd=Us(bl,Hf),xf=Us(Ic,yf),Pf=Us(Bl,Ah),Ou=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),lf=Us(jf,cc),Xh=Us(of,Nl),If=Us(Kc,Rc),Cs=Us(gs,Wf),du=Us(Wh,rh),ku=Us(sf,Sh),Xf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,q=D.match(/attribute ([\\w]+) ([\\w]+)/g),K=Y.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),de=D.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),ne=de?de.concat(K):K,we={};return Y=Y.replace(J,function(Ue,ft,Zt,hr,qt){return we[qt]=!0,ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "varying `+Zt+\" \"+hr+\" \"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifdef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`}),D=D.replace(J,function(Ue,ft,Zt,hr,qt){var Ve=hr===\"float\"?\"vec2\":\"vec4\",Qe=qt.match(/color/)?\"color\":Ve;return we[qt]?ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "uniform lowp float u_`+qt+`_t;\n",
       "attribute `+Zt+\" \"+Ve+\" a_\"+qt+`;\n",
       "varying `+Zt+\" \"+hr+\" \"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:Qe===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+qt+\" = a_\"+qt+`;\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+qt+\" = unpack_mix_\"+Qe+\"(a_\"+qt+\", u_\"+qt+`_t);\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:ft===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "uniform lowp float u_`+qt+`_t;\n",
       "attribute `+Zt+\" \"+Ve+\" a_\"+qt+`;\n",
       "#else\n",
       "uniform `+Zt+\" \"+hr+\" u_\"+qt+`;\n",
       "#endif\n",
       "`:Qe===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = a_\"+qt+`;\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_`+qt+`\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = unpack_mix_\"+Qe+\"(a_\"+qt+\", u_\"+qt+`_t);\n",
       "#else\n",
       "    `+Zt+\" \"+hr+\" \"+qt+\" = u_\"+qt+`;\n",
       "#endif\n",
       "`}),{fragmentSource:Y,vertexSource:D,staticAttributes:q,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:Ou,hillshade:bf,line:jl,lineGradient:lf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,q,K,de,ne,we,Ue){this.context=D;for(var ft=this.boundPaintVertexBuffers.length!==K.length,Zt=0;!ft&&Zt<K.length;Zt++)this.boundPaintVertexBuffers[Zt]!==K[Zt]&&(ft=!0);var hr=!this.vao||this.boundProgram!==J||this.boundLayoutVertexBuffer!==q||ft||this.boundIndexBuffer!==de||this.boundVertexOffset!==ne||this.boundDynamicVertexBuffer!==we||this.boundDynamicVertexBuffer2!==Ue;!D.extVertexArrayObject||hr?this.freshBind(J,q,K,de,ne,we,Ue):(D.bindVertexArrayOES.set(this.vao),we&&we.bind(),de&&de.dynamicDraw&&de.bind(),Ue&&Ue.bind())},zc.prototype.freshBind=function(D,J,q,K,de,ne,we){var Ue,ft=D.numAttributes,Zt=this.context,hr=Zt.gl;if(Zt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Zt.extVertexArrayObject.createVertexArrayOES(),Zt.bindVertexArrayOES.set(this.vao),Ue=0,this.boundProgram=D,this.boundLayoutVertexBuffer=J,this.boundPaintVertexBuffers=q,this.boundIndexBuffer=K,this.boundVertexOffset=de,this.boundDynamicVertexBuffer=ne,this.boundDynamicVertexBuffer2=we;else{Ue=Zt.currentNumAttributes||0;for(var qt=ft;qt<Ue;qt++)hr.disableVertexAttribArray(qt)}J.enableAttributes(hr,D);for(var Ve=0,Qe=q;Ve<Qe.length;Ve+=1){var at=Qe[Ve];at.enableAttributes(hr,D)}ne&&ne.enableAttributes(hr,D),we&&we.enableAttributes(hr,D),J.bind(),J.setVertexAttribPointers(hr,D,de);for(var Ct=0,Ot=q;Ct<Ot.length;Ct+=1){var Rt=Ot[Ct];Rt.bind(),Rt.setVertexAttribPointers(hr,D,de)}ne&&(ne.bind(),ne.setVertexAttribPointers(hr,D,de)),K&&K.bind(),we&&(we.bind(),we.setVertexAttribPointers(hr,D,de)),Zt.currentNumAttributes=ft},zc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Wu(Y){for(var D=[],J=0;J<Y.length;J++)if(Y[J]!==null){var q=Y[J].split(\" \");D.push(q.pop())}return D}var Rf=function(D,J,q,K,de,ne){var we=D.gl;this.program=we.createProgram();for(var Ue=Wu(q.staticAttributes),ft=K?K.getBinderAttributes():[],Zt=Ue.concat(ft),hr=q.staticUniforms?Wu(q.staticUniforms):[],qt=K?K.getBinderUniforms():[],Ve=hr.concat(qt),Qe=[],at=0,Ct=Ve;at<Ct.length;at+=1){var Ot=Ct[at];Qe.indexOf(Ot)<0&&Qe.push(Ot)}var Rt=K?K.defines():[];ne&&Rt.push(\"#define OVERDRAW_INSPECTOR;\");var Bt=Rt.concat(js.fragmentSource,q.fragmentSource).join(`\n",
       "`),Dt=Rt.concat(js.vertexSource,q.vertexSource).join(`\n",
       "`),yt=we.createShader(we.FRAGMENT_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(yt,Bt),we.compileShader(yt),we.attachShader(this.program,yt);var Pt=we.createShader(we.VERTEX_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(Pt,Dt),we.compileShader(Pt),we.attachShader(this.program,Pt),this.attributes={};var ht={};this.numAttributes=Zt.length;for(var ur=0;ur<this.numAttributes;ur++)Zt[ur]&&(we.bindAttribLocation(this.program,ur,Zt[ur]),this.attributes[Zt[ur]]=ur);we.linkProgram(this.program),we.deleteShader(Pt),we.deleteShader(yt);for(var br=0;br<Qe.length;br++){var Ur=Qe[br];if(Ur&&!ht[Ur]){var Di=we.getUniformLocation(this.program,Ur);Di&&(ht[Ur]=Di)}}this.fixedUniforms=de(D,ht),this.binderUniforms=K?K.getUniforms(D,ht):[]};Rf.prototype.draw=function(D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve,Qe,at,Ct){var Ot,Rt=D.gl;if(!this.failedToCreate){D.program.set(this.program),D.setDepthMode(q),D.setStencilMode(K),D.setColorMode(de),D.setCullFace(ne);for(var Bt in this.fixedUniforms)this.fixedUniforms[Bt].set(we[Bt]);Qe&&Qe.setUniforms(D,this.binderUniforms,qt,{zoom:Ve});for(var Dt=(Ot={},Ot[Rt.LINES]=2,Ot[Rt.TRIANGLES]=3,Ot[Rt.LINE_STRIP]=1,Ot)[J],yt=0,Pt=hr.get();yt<Pt.length;yt+=1){var ht=Pt[yt],ur=ht.vaos||(ht.vaos={}),br=ur[Ue]||(ur[Ue]=new zc);br.bind(D,this,ft,Qe?Qe.getPaintVertexBuffers():[],Zt,ht.vertexOffset,at,Ct),Rt.drawElements(J,ht.primitiveLength*Dt,Rt.UNSIGNED_SHORT,ht.primitiveOffset*Dt*2)}}};function Xu(Y,D,J){var q=1/As(J,1,D.transform.tileZoom),K=Math.pow(2,J.tileID.overscaledZ),de=J.tileSize*Math.pow(2,D.transform.tileZoom)/K,ne=de*(J.tileID.canonical.x+J.tileID.wrap*K),we=de*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[q,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[ne>>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function uf(Y,D,J,q){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Ue=ne.height,ft=Math.pow(2,q.tileID.overscaledZ),Zt=q.tileSize*Math.pow(2,J.transform.tileZoom)/ft,hr=Zt*(q.tileID.canonical.x+q.tileID.wrap*ft),qt=Zt*q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Ue],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(q,1,J.transform.tileZoom),u_pixel_coord_upper:[hr>>16,qt>>16],u_pixel_coord_lower:[hr&65535,qt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,q){var K=D.style.light,de=K.properties.get(\"position\"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get(\"anchor\")===\"viewport\"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Ue=K.properties.get(\"color\");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get(\"intensity\"),u_lightcolor:[Ue.r,Ue.g,Ue.b],u_vertical_gradient:+J,u_opacity:q}},Zu=function(Y,D,J,q,K,de,ne){return i.extend(ah(Y,D,J,q),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},Oc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},qc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,q){return i.extend(qc(Y),Xu(J,D,q))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,q,K){return i.extend(cf(Y,D,J,q),{u_world:K})},At=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Xt=function(Y,D,J,q){var K=Y.transform,de,ne;if(q.paint.get(\"circle-pitch-alignment\")===\"map\"){var we=As(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(q.paint.get(\"circle-pitch-scale\")===\"map\"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,q.paint.get(\"circle-translate\"),q.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Cr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},Ar=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var q=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:q,u_extrude_scale:[D.pixelsToGLUnits[0]/(q*K),D.pixelsToGLUnits[1]/(q*K)],u_overscale_factor:de}},ki=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Xi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Nn=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Qi=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},on=function(Y,D,J,q){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:q}},Fi=function(Y,D,J,q){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:q,u_opacity:D.paint.get(\"heatmap-opacity\")}},Qn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var q=J.paint.get(\"hillshade-shadow-color\"),K=J.paint.get(\"hillshade-highlight-color\"),de=J.paint.get(\"hillshade-accent-color\"),ne=J.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);J.paint.get(\"hillshade-illumination-anchor\")===\"viewport\"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get(\"hillshade-exaggeration\"),ne],u_shadow:q,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,q=i.create();return i.ortho(q,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(q,q,[0,-i.EXTENT,0]),{u_matrix:q,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),q=D.canonical.y;return[new i.MercatorCoordinate(0,q/J).toLngLat().lat,new i.MercatorCoordinate(0,(q+1)/J).toLngLat().lat]}var Yn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var q=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,q.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,q){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:q})},as=function(Y,D,J,q){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,q.fromScale,q.toScale],u_fade:q.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,q,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Ue=J.layout.get(\"line-cap\")===\"round\",ft=ne.getDash(q.from,Ue),Zt=ne.getDash(q.to,Ue),hr=ft.width*K.fromScale,qt=Zt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[we/hr,-ft.height/2],u_patternscale_b:[we/qt,-Zt.height/2],u_sdfgamma:ne.width/(Math.min(hr,qt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ft.y,u_tex_y_b:Zt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get(\"line-translate\"),J.paint.get(\"line-translate-anchor\"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,q,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:q.mix,u_opacity:q.opacity*K.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get(\"raster-brightness-min\"),u_brightness_high:K.paint.get(\"raster-brightness-max\"),u_saturation_factor:ys(K.paint.get(\"raster-saturation\")),u_contrast_factor:no(K.paint.get(\"raster-contrast\")),u_spin_weights:va(K.paint.get(\"raster-hue-rotate\"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,q,K,de,ne,we,Ue,ft){var Zt=K.transform;return{u_is_size_zoom_constant:+(Y===\"constant\"||Y===\"source\"),u_is_size_feature_constant:+(Y===\"constant\"||Y===\"camera\"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Zt.cameraToCenterDistance,u_pitch:Zt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Zt.width/Zt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Ue,u_pitch_with_map:+q,u_texsize:ft,u_texture:0}},Nc=function(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=K.transform;return i.extend(Yu(Y,D,J,q,K,de,ne,we,Ue,ft),{u_gamma_scale:q?Math.cos(hr._pitch)*hr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Zt})},pu=function(Y,D,J,q,K,de,ne,we,Ue,ft){return i.extend(Nc(Y,D,J,q,K,de,ne,we,!0,Ue,!0),{u_texsize_icon:ft,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,q,K,de){return i.extend(uf(q,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:Oc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:At,collisionBox:Cr,collisionCircle:Ar,debug:Xi,clippingMask:wn,heatmap:Yi,heatmapTexture:Qi,hillshade:Qn,hillshadePrepare:Ca,line:Yn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=Y.useProgram(\"collisionBox\"),Zt=[],hr=0,qt=0,Ve=0;Ve<q.length;Ve++){var Qe=q[Ve],at=D.getTile(Qe),Ct=at.getBucket(J);if(Ct){var Ot=Qe.posMatrix;(K[0]!==0||K[1]!==0)&&(Ot=Y.translatePosMatrix(Qe.posMatrix,at,K,de));var Rt=ne?Ct.textCollisionBox:Ct.iconCollisionBox,Bt=Ct.collisionCircleArray;if(Bt.length>0){var Dt=i.create(),yt=Ot;i.mul(Dt,Ct.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Dt,Dt,Ct.placementViewportMatrix),Zt.push({circleArray:Bt,circleOffset:qt,transform:yt,invTransform:Dt}),hr+=Bt.length/4,qt=hr}Rt&&ft.draw(we,Ue.LINES,wi.disabled,Fn.disabled,Y.colorModeForRenderPass(),Er.disabled,Kr(Ot,Y.transform,at),J.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,Y.transform.zoom,null,null,Rt.collisionVertexBuffer)}}if(!(!ne||!Zt.length)){var Pt=Y.useProgram(\"collisionCircle\"),ht=new i.StructArrayLayout2f1f2i16;ht.resize(hr*4),ht._trim();for(var ur=0,br=0,Ur=Zt;br<Ur.length;br+=1)for(var Di=Ur[br],fi=0;fi<Di.circleArray.length/4;fi++){var Ti=fi*4,gn=Di.circleArray[Ti+0],rn=Di.circleArray[Ti+1],Ci=Di.circleArray[Ti+2],Bi=Di.circleArray[Ti+3];ht.emplace(ur++,gn,rn,Ci,Bi,0),ht.emplace(ur++,gn,rn,Ci,Bi,1),ht.emplace(ur++,gn,rn,Ci,Bi,2),ht.emplace(ur++,gn,rn,Ci,Bi,3)}(!Vc||Vc.length<hr*2)&&(Vc=Ku(hr));for(var Gi=we.createIndexBuffer(Vc,!0),sn=we.createVertexBuffer(ht,i.collisionCircleLayout.members,!0),zn=0,Ja=Zt;zn<Ja.length;zn+=1){var co=Ja[zn],ts=ki(co.transform,co.invTransform,Y.transform);Pt.draw(we,Ue.TRIANGLES,wi.disabled,Fn.disabled,Y.colorModeForRenderPass(),Er.disabled,ts,J.id,sn,Gi,i.SegmentVector.simpleSegment(0,co.circleOffset*2,co.circleArray.length,co.circleArray.length/2),null,Y.transform.zoom,null,null,null)}sn.destroy(),Gi.destroy()}}function Ku(Y){var D=Y*2,J=new i.StructArrayLayout3ui6;J.resize(D),J._trim();for(var q=0;q<D;q++){var K=q*6;J.uint16[K+0]=q*4+0,J.uint16[K+1]=q*4+1,J.uint16[K+2]=q*4+2,J.uint16[K+3]=q*4+2,J.uint16[K+4]=q*4+3,J.uint16[K+5]=q*4+0}return J}var ue=i.identity(new Float32Array(16));function w(Y,D,J,q,K){if(Y.renderPass===\"translucent\"){var de=Fn.disabled,ne=Y.colorModeForRenderPass(),we=J.layout.get(\"text-variable-anchor\");we&&Q(q,Y,J,D,J.layout.get(\"text-rotation-alignment\"),J.layout.get(\"text-pitch-alignment\"),K),J.paint.get(\"icon-opacity\").constantOr(1)!==0&&Oe(Y,D,J,q,!1,J.paint.get(\"icon-translate\"),J.paint.get(\"icon-translate-anchor\"),J.layout.get(\"icon-rotation-alignment\"),J.layout.get(\"icon-pitch-alignment\"),J.layout.get(\"icon-keep-upright\"),de,ne),J.paint.get(\"text-opacity\").constantOr(1)!==0&&Oe(Y,D,J,q,!0,J.paint.get(\"text-translate\"),J.paint.get(\"text-translate-anchor\"),J.layout.get(\"text-rotation-alignment\"),J.layout.get(\"text-pitch-alignment\"),J.layout.get(\"text-keep-upright\"),de,ne),D.map.showCollisionBoxes&&(hc(Y,D,J,q,J.paint.get(\"text-translate\"),J.paint.get(\"text-translate-anchor\"),!0),hc(Y,D,J,q,J.paint.get(\"icon-translate\"),J.paint.get(\"icon-translate-anchor\"),!1))}}function B(Y,D,J,q,K,de){var ne=i.getAnchorAlignment(Y),we=ne.horizontalAlign,Ue=ne.verticalAlign,ft=-(we-.5)*D,Zt=-(Ue-.5)*J,hr=i.evaluateVariableOffset(Y,q);return new i.Point((ft/K+hr[0])*de,(Zt/K+hr[1])*de)}function Q(Y,D,J,q,K,de,ne){for(var we=D.transform,Ue=K===\"map\",ft=de===\"map\",Zt=0,hr=Y;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=q.getTile(qt),Qe=Ve.getBucket(J);if(!(!Qe||!Qe.text||!Qe.text.segments.get().length)){var at=Qe.textSizeData,Ct=i.evaluateSizeForZoom(at,we.zoom),Ot=As(Ve,1,D.transform.zoom),Rt=_n(qt.posMatrix,ft,Ue,D.transform,Ot),Bt=J.layout.get(\"icon-text-fit\")!==\"none\"&&Qe.hasIconData();if(Ct){var Dt=Math.pow(2,we.zoom-Ve.tileID.overscaledZ);ee(Qe,Ue,ft,ne,i.symbolSize,we,Rt,qt.posMatrix,Dt,Ct,Bt)}}}}function ee(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=Y.text.placedSymbolArray,qt=Y.text.dynamicLayoutVertexArray,Ve=Y.icon.dynamicLayoutVertexArray,Qe={};qt.clear();for(var at=0;at<hr.length;at++){var Ct=hr.get(at),Ot=Y.allowVerticalPlacement&&!Ct.placedOrientation,Rt=!Ct.hidden&&Ct.crossTileID&&!Ot?q[Ct.crossTileID]:null;if(!Rt)ul(Ct.numGlyphs,qt);else{var Bt=new i.Point(Ct.anchorX,Ct.anchorY),Dt=$n(Bt,J?we:ne),yt=Ma(de.cameraToCenterDistance,Dt.signedDistanceFromCamera),Pt=K.evaluateSizeForFeature(Y.textSizeData,ft,Ct)*yt/i.ONE_EM;J&&(Pt*=Y.tilePixelRatio/Ue);for(var ht=Rt.width,ur=Rt.height,br=Rt.anchor,Ur=Rt.textOffset,Di=Rt.textBoxScale,fi=B(br,ht,ur,Ur,Di,Pt),Ti=J?$n(Bt.add(fi),ne).point:Dt.point.add(D?fi.rotate(-de.angle):fi),gn=Y.allowVerticalPlacement&&Ct.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,rn=0;rn<Ct.numGlyphs;rn++)i.addDynamicAttributes(qt,Ti,gn);Zt&&Ct.associatedIconIndex>=0&&(Qe[Ct.associatedIconIndex]={shiftedAnchor:Ti,angle:gn})}}if(Zt){Ve.clear();for(var Ci=Y.icon.placedSymbolArray,Bi=0;Bi<Ci.length;Bi++){var Gi=Ci.get(Bi);if(Gi.hidden)ul(Gi.numGlyphs,Ve);else{var sn=Qe[Bi];if(!sn)ul(Gi.numGlyphs,Ve);else for(var zn=0;zn<Gi.numGlyphs;zn++)i.addDynamicAttributes(Ve,sn.shiftedAnchor,sn.angle)}}Y.icon.dynamicLayoutVertexBuffer.updateData(Ve)}Y.text.dynamicLayoutVertexBuffer.updateData(qt)}function le(Y,D,J){return J.iconsInText&&D?\"symbolTextAndIcon\":Y?\"symbolSDF\":\"symbolIcon\"}function Oe(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr){for(var qt=Y.context,Ve=qt.gl,Qe=Y.transform,at=we===\"map\",Ct=Ue===\"map\",Ot=at&&J.layout.get(\"symbol-placement\")!==\"point\",Rt=at&&!Ct&&!Ot,Bt=J.layout.get(\"symbol-sort-key\").constantOr(1)!==void 0,Dt=!1,yt=Y.depthModeForSublayer(0,wi.ReadOnly),Pt=J.layout.get(\"text-variable-anchor\"),ht=[],ur=0,br=q;ur<br.length;ur+=1){var Ur=br[ur],Di=D.getTile(Ur),fi=Di.getBucket(J);if(fi){var Ti=K?fi.text:fi.icon;if(!(!Ti||!Ti.segments.get().length)){var gn=Ti.programConfigurations.get(J.id),rn=K||fi.sdfIcons,Ci=K?fi.textSizeData:fi.iconSizeData,Bi=Ct||Qe.pitch!==0,Gi=Y.useProgram(le(rn,K,fi),gn),sn=i.evaluateSizeForZoom(Ci,Qe.zoom),zn=void 0,Ja=[0,0],co=void 0,ts=void 0,so=null,Yo=void 0;if(K){if(co=Di.glyphAtlasTexture,ts=Ve.LINEAR,zn=Di.glyphAtlasTexture.size,fi.iconsInText){Ja=Di.imageAtlasTexture.size,so=Di.imageAtlasTexture;var ms=Ci.kind===\"composite\"||Ci.kind===\"camera\";Yo=Bi||Y.options.rotating||Y.options.zooming||ms?Ve.LINEAR:Ve.NEAREST}}else{var ou=J.layout.get(\"icon-size\").constantOr(0)!==1||fi.iconsNeedLinear;co=Di.imageAtlasTexture,ts=rn||Y.options.rotating||Y.options.zooming||ou||Bi?Ve.LINEAR:Ve.NEAREST,zn=Di.imageAtlasTexture.size}var Cv=As(Di,1,Y.transform.zoom),Lv=_n(Ur.posMatrix,Ct,at,Y.transform,Cv),wd=ya(Ur.posMatrix,Ct,at,Y.transform,Cv),Kv=Pt&&fi.hasTextData(),hg=J.layout.get(\"icon-text-fit\")!==\"none\"&&Kv&&fi.hasIconData();Ot&&No(fi,Ur.posMatrix,Y,K,Lv,wd,Ct,ft);var gp=Y.translatePosMatrix(Ur.posMatrix,Di,de,ne),Td=Ot||K&&Pt||hg?ue:Lv,mp=Y.translatePosMatrix(wd,Di,de,ne,!0),Ud=rn&&J.paint.get(K?\"text-halo-width\":\"icon-halo-width\").constantOr(1)!==0,Ad=void 0;rn?fi.iconsInText?Ad=pu(Ci.kind,sn,Rt,Ct,Y,gp,Td,mp,zn,Ja):Ad=Nc(Ci.kind,sn,Rt,Ct,Y,gp,Td,mp,K,zn,!0):Ad=Yu(Ci.kind,sn,Rt,Ct,Y,gp,Td,mp,K,zn);var Pv={program:Gi,buffers:Ti,uniformValues:Ad,atlasTexture:co,atlasTextureIcon:so,atlasInterpolation:ts,atlasInterpolationIcon:Yo,isSDF:rn,hasHalo:Ud};if(Bt&&fi.canOverlap){Dt=!0;for(var Jv=Ti.segments.get(),Iv=0,fy=Jv;Iv<fy.length;Iv+=1){var dg=fy[Iv];ht.push({segments:new i.SegmentVector([dg]),sortKey:dg.sortKey,state:Pv})}}else ht.push({segments:Ti.segments,sortKey:0,state:Pv})}}}Dt&&ht.sort(function(k1,C1){return k1.sortKey-C1.sortKey});for(var oh=0,vg=ht;oh<vg.length;oh+=1){var hy=vg[oh],Zh=hy.state;if(qt.activeTexture.set(Ve.TEXTURE0),Zh.atlasTexture.bind(Zh.atlasInterpolation,Ve.CLAMP_TO_EDGE),Zh.atlasTextureIcon&&(qt.activeTexture.set(Ve.TEXTURE1),Zh.atlasTextureIcon&&Zh.atlasTextureIcon.bind(Zh.atlasInterpolationIcon,Ve.CLAMP_TO_EDGE)),Zh.isSDF){var am=Zh.uniformValues;Zh.hasHalo&&(am.u_is_halo=1,Ze(Zh.buffers,hy.segments,J,Y,Zh.program,yt,Zt,hr,am)),am.u_is_halo=0}Ze(Zh.buffers,hy.segments,J,Y,Zh.program,yt,Zt,hr,Zh.uniformValues)}}function Ze(Y,D,J,q,K,de,ne,we,Ue){var ft=q.context,Zt=ft.gl;K.draw(ft,Zt.TRIANGLES,de,ne,we,Er.disabled,Ue,J.id,Y.layoutVertexBuffer,Y.indexBuffer,D,J.paint,q.transform.zoom,Y.programConfigurations.get(J.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function st(Y,D,J,q){if(Y.renderPass===\"translucent\"){var K=J.paint.get(\"circle-opacity\"),de=J.paint.get(\"circle-stroke-width\"),ne=J.paint.get(\"circle-stroke-opacity\"),we=J.layout.get(\"circle-sort-key\").constantOr(1)!==void 0;if(!(K.constantOr(1)===0&&(de.constantOr(1)===0||ne.constantOr(1)===0))){for(var Ue=Y.context,ft=Ue.gl,Zt=Y.depthModeForSublayer(0,wi.ReadOnly),hr=Fn.disabled,qt=Y.colorModeForRenderPass(),Ve=[],Qe=0;Qe<q.length;Qe++){var at=q[Qe],Ct=D.getTile(at),Ot=Ct.getBucket(J);if(Ot){var Rt=Ot.programConfigurations.get(J.id),Bt=Y.useProgram(\"circle\",Rt),Dt=Ot.layoutVertexBuffer,yt=Ot.indexBuffer,Pt=Xt(Y,at,Ct,J),ht={programConfiguration:Rt,program:Bt,layoutVertexBuffer:Dt,indexBuffer:yt,uniformValues:Pt};if(we)for(var ur=Ot.segments.get(),br=0,Ur=ur;br<Ur.length;br+=1){var Di=Ur[br];Ve.push({segments:new i.SegmentVector([Di]),sortKey:Di.sortKey,state:ht})}else Ve.push({segments:Ot.segments,sortKey:0,state:ht})}}we&&Ve.sort(function(co,ts){return co.sortKey-ts.sortKey});for(var fi=0,Ti=Ve;fi<Ti.length;fi+=1){var gn=Ti[fi],rn=gn.state,Ci=rn.programConfiguration,Bi=rn.program,Gi=rn.layoutVertexBuffer,sn=rn.indexBuffer,zn=rn.uniformValues,Ja=gn.segments;Bi.draw(Ue,ft.TRIANGLES,Zt,hr,qt,Er.disabled,zn,J.id,Gi,sn,Ja,J.paint,Y.transform.zoom,Ci)}}}}function Tt(Y,D,J,q){if(J.paint.get(\"heatmap-opacity\")!==0)if(Y.renderPass===\"offscreen\"){var K=Y.context,de=K.gl,ne=Fn.disabled,we=new wt([de.ONE,de.ONE],i.Color.transparent,[!0,!0,!0,!0]);Yt(K,Y,J),K.clear({color:i.Color.transparent});for(var Ue=0;Ue<q.length;Ue++){var ft=q[Ue];if(!D.hasRenderableParent(ft)){var Zt=D.getTile(ft),hr=Zt.getBucket(J);if(hr){var qt=hr.programConfigurations.get(J.id),Ve=Y.useProgram(\"heatmap\",qt),Qe=Y.transform,at=Qe.zoom;Ve.draw(K,de.TRIANGLES,wi.disabled,ne,we,Er.disabled,on(ft.posMatrix,Zt,at,J.paint.get(\"heatmap-intensity\")),J.id,hr.layoutVertexBuffer,hr.indexBuffer,hr.segments,J.paint,Y.transform.zoom,qt)}}}K.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass===\"translucent\"&&(Y.context.setColorMode(Y.colorModeForRenderPass()),xr(Y,J))}function Yt(Y,D,J){var q=Y.gl;Y.activeTexture.set(q.TEXTURE1),Y.viewport.set([0,0,D.width/4,D.height/4]);var K=J.heatmapFbo;if(K)q.bindTexture(q.TEXTURE_2D,K.colorAttachment.get()),Y.bindFramebuffer.set(K.framebuffer);else{var de=q.createTexture();q.bindTexture(q.TEXTURE_2D,de),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.LINEAR),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.LINEAR),K=J.heatmapFbo=Y.createFramebuffer(D.width/4,D.height/4,!1),Kt(Y,D,de,K)}}function Kt(Y,D,J,q){var K=Y.gl,de=Y.extRenderToTextureHalfFloat?Y.extTextureHalfFloat.HALF_FLOAT_OES:K.UNSIGNED_BYTE;K.texImage2D(K.TEXTURE_2D,0,K.RGBA,D.width/4,D.height/4,0,K.RGBA,de,null),q.colorAttachment.set(J)}function xr(Y,D){var J=Y.context,q=J.gl,K=D.heatmapFbo;if(K){J.activeTexture.set(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,K.colorAttachment.get()),J.activeTexture.set(q.TEXTURE1);var de=D.colorRampTexture;de||(de=D.colorRampTexture=new i.Texture(J,D.colorRamp,q.RGBA)),de.bind(q.LINEAR,q.CLAMP_TO_EDGE),Y.useProgram(\"heatmapTexture\").draw(J,q.TRIANGLES,wi.disabled,Fn.disabled,Y.colorModeForRenderPass(),Er.disabled,Fi(Y,D,0,1),D.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,D.paint,Y.transform.zoom)}}function Ir(Y,D,J,q){if(Y.renderPass===\"translucent\"){var K=J.paint.get(\"line-opacity\"),de=J.paint.get(\"line-width\");if(!(K.constantOr(1)===0||de.constantOr(1)===0))for(var ne=Y.depthModeForSublayer(0,wi.ReadOnly),we=Y.colorModeForRenderPass(),Ue=J.paint.get(\"line-dasharray\"),ft=J.paint.get(\"line-pattern\"),Zt=ft.constantOr(1),hr=J.paint.get(\"line-gradient\"),qt=J.getCrossfadeParameters(),Ve=Zt?\"linePattern\":Ue?\"lineSDF\":hr?\"lineGradient\":\"line\",Qe=Y.context,at=Qe.gl,Ct=!0,Ot=0,Rt=q;Ot<Rt.length;Ot+=1){var Bt=Rt[Ot],Dt=D.getTile(Bt);if(!(Zt&&!Dt.patternsLoaded())){var yt=Dt.getBucket(J);if(yt){var Pt=yt.programConfigurations.get(J.id),ht=Y.context.program.get(),ur=Y.useProgram(Ve,Pt),br=Ct||ur.program!==ht,Ur=ft.constantOr(null);if(Ur&&Dt.imageAtlas){var Di=Dt.imageAtlas,fi=Di.patternPositions[Ur.to.toString()],Ti=Di.patternPositions[Ur.from.toString()];fi&&Ti&&Pt.setConstantPatternPositions(fi,Ti)}var gn=Zt?as(Y,Dt,J,qt):Ue?ws(Y,Dt,J,Ue,qt):hr?Ss(Y,Dt,J,yt.lineClipsArray.length):Zo(Y,Dt,J);if(Zt)Qe.activeTexture.set(at.TEXTURE0),Dt.imageAtlasTexture.bind(at.LINEAR,at.CLAMP_TO_EDGE),Pt.updatePaintBuffers(qt);else if(Ue&&(br||Y.lineAtlas.dirty))Qe.activeTexture.set(at.TEXTURE0),Y.lineAtlas.bind(Qe);else if(hr){var rn=yt.gradients[J.id],Ci=rn.texture;if(J.gradientVersion!==rn.version){var Bi=256;if(J.stepInterpolant){var Gi=D.getSource().maxzoom,sn=Bt.canonical.z===Gi?Math.ceil(1<<Y.transform.maxZoom-Bt.canonical.z):1,zn=yt.maxLineLength/i.EXTENT,Ja=1024,co=zn*Ja*sn;Bi=i.clamp(i.nextPowerOfTwo(co),256,Qe.maxTextureSize)}rn.gradient=i.renderColorRamp({expression:J.gradientExpression(),evaluationKey:\"lineProgress\",resolution:Bi,image:rn.gradient||void 0,clips:yt.lineClipsArray}),rn.texture?rn.texture.update(rn.gradient):rn.texture=new i.Texture(Qe,rn.gradient,at.RGBA),rn.version=J.gradientVersion,Ci=rn.texture}Qe.activeTexture.set(at.TEXTURE0),Ci.bind(J.stepInterpolant?at.NEAREST:at.LINEAR,at.CLAMP_TO_EDGE)}ur.draw(Qe,at.TRIANGLES,ne,Y.stencilModeForClipping(Bt),we,Er.disabled,gn,J.id,yt.layoutVertexBuffer,yt.indexBuffer,yt.segments,J.paint,Y.transform.zoom,Pt,yt.layoutVertexBuffer2),Ct=!1}}}}}function ve(Y,D,J,q){var K=J.paint.get(\"fill-color\"),de=J.paint.get(\"fill-opacity\");if(de.constantOr(1)!==0){var ne=Y.colorModeForRenderPass(),we=J.paint.get(\"fill-pattern\"),Ue=Y.opaquePassEnabledForLayer()&&!we.constantOr(1)&&K.constantOr(i.Color.transparent).a===1&&de.constantOr(0)===1?\"opaque\":\"translucent\";if(Y.renderPass===Ue){var ft=Y.depthModeForSublayer(1,Y.renderPass===\"opaque\"?wi.ReadWrite:wi.ReadOnly);be(Y,D,J,q,ft,ne,!1)}if(Y.renderPass===\"translucent\"&&J.paint.get(\"fill-antialias\")){var Zt=Y.depthModeForSublayer(J.getPaintProperty(\"fill-outline-color\")?2:0,wi.ReadOnly);be(Y,D,J,q,Zt,ne,!0)}}}function be(Y,D,J,q,K,de,ne){var we=Y.context.gl,Ue=J.paint.get(\"fill-pattern\"),ft=Ue&&Ue.constantOr(1),Zt=J.getCrossfadeParameters(),hr,qt,Ve,Qe,at;ne?(qt=ft&&!J.getPaintProperty(\"fill-outline-color\")?\"fillOutlinePattern\":\"fillOutline\",hr=we.LINES):(qt=ft?\"fillPattern\":\"fill\",hr=we.TRIANGLES);for(var Ct=0,Ot=q;Ct<Ot.length;Ct+=1){var Rt=Ot[Ct],Bt=D.getTile(Rt);if(!(ft&&!Bt.patternsLoaded())){var Dt=Bt.getBucket(J);if(Dt){var yt=Dt.programConfigurations.get(J.id),Pt=Y.useProgram(qt,yt);ft&&(Y.context.activeTexture.set(we.TEXTURE0),Bt.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),yt.updatePaintBuffers(Zt));var ht=Ue.constantOr(null);if(ht&&Bt.imageAtlas){var ur=Bt.imageAtlas,br=ur.patternPositions[ht.to.toString()],Ur=ur.patternPositions[ht.from.toString()];br&&Ur&&yt.setConstantPatternPositions(br,Ur)}var Di=Y.translatePosMatrix(Rt.posMatrix,Bt,J.paint.get(\"fill-translate\"),J.paint.get(\"fill-translate-anchor\"));if(!ne)Qe=Dt.indexBuffer,at=Dt.segments,Ve=ft?cf(Di,Y,Zt,Bt):qc(Di);else{Qe=Dt.indexBuffer2,at=Dt.segments2;var fi=[we.drawingBufferWidth,we.drawingBufferHeight];Ve=qt===\"fillOutlinePattern\"&&ft?Bc(Di,Y,Zt,Bt,fi):fc(Di,fi)}Pt.draw(Y.context,hr,K,Y.stencilModeForClipping(Rt),de,Er.disabled,Ve,J.id,Dt.layoutVertexBuffer,Qe,at,J.paint,Y.transform.zoom,yt)}}}}function Re(Y,D,J,q){var K=J.paint.get(\"fill-extrusion-opacity\");if(K!==0&&Y.renderPass===\"translucent\"){var de=new wi(Y.context.gl.LEQUAL,wi.ReadWrite,Y.depthRangeFor3D);if(K===1&&!J.paint.get(\"fill-extrusion-pattern\").constantOr(1)){var ne=Y.colorModeForRenderPass();qe(Y,D,J,q,de,Fn.disabled,ne)}else qe(Y,D,J,q,de,Fn.disabled,wt.disabled),qe(Y,D,J,q,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass())}}function qe(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=J.paint.get(\"fill-extrusion-pattern\"),Zt=ft.constantOr(1),hr=J.getCrossfadeParameters(),qt=J.paint.get(\"fill-extrusion-opacity\"),Ve=0,Qe=q;Ve<Qe.length;Ve+=1){var at=Qe[Ve],Ct=D.getTile(at),Ot=Ct.getBucket(J);if(Ot){var Rt=Ot.programConfigurations.get(J.id),Bt=Y.useProgram(Zt?\"fillExtrusionPattern\":\"fillExtrusion\",Rt);Zt&&(Y.context.activeTexture.set(Ue.TEXTURE0),Ct.imageAtlasTexture.bind(Ue.LINEAR,Ue.CLAMP_TO_EDGE),Rt.updatePaintBuffers(hr));var Dt=ft.constantOr(null);if(Dt&&Ct.imageAtlas){var yt=Ct.imageAtlas,Pt=yt.patternPositions[Dt.to.toString()],ht=yt.patternPositions[Dt.from.toString()];Pt&&ht&&Rt.setConstantPatternPositions(Pt,ht)}var ur=Y.translatePosMatrix(at.posMatrix,Ct,J.paint.get(\"fill-extrusion-translate\"),J.paint.get(\"fill-extrusion-translate-anchor\")),br=J.paint.get(\"fill-extrusion-vertical-gradient\"),Ur=Zt?Zu(ur,Y,br,qt,at,hr,Ct):ah(ur,Y,br,qt);Bt.draw(we,we.gl.TRIANGLES,K,de,ne,Er.backCCW,Ur,J.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,J.paint,Y.transform.zoom,Rt)}}}function et(Y,D,J,q){if(!(Y.renderPass!==\"offscreen\"&&Y.renderPass!==\"translucent\")){for(var K=Y.context,de=Y.depthModeForSublayer(0,wi.ReadOnly),ne=Y.colorModeForRenderPass(),we=Y.renderPass===\"translucent\"?Y.stencilConfigForOverlap(q):[{},q],Ue=we[0],ft=we[1],Zt=0,hr=ft;Zt<hr.length;Zt+=1){var qt=hr[Zt],Ve=D.getTile(qt);Ve.needsHillshadePrepare&&Y.renderPass===\"offscreen\"?it(Y,Ve,J,de,Fn.disabled,ne):Y.renderPass===\"translucent\"&&Xe(Y,Ve,J,de,Ue[qt.overscaledZ],ne)}K.viewport.set([0,0,Y.width,Y.height])}}function Xe(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl,Ue=D.fbo;if(Ue){var ft=Y.useProgram(\"hillshade\");ne.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,Ue.colorAttachment.get());var Zt=Ra(Y,D,J);ft.draw(ne,we.TRIANGLES,q,K,de,Er.disabled,Zt,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function it(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl,Ue=D.dem;if(Ue&&Ue.data){var ft=Ue.dim,Zt=Ue.stride,hr=Ue.getPixels();if(ne.activeTexture.set(we.TEXTURE1),ne.pixelStoreUnpackPremultiplyAlpha.set(!1),D.demTexture=D.demTexture||Y.getTileTexture(Zt),D.demTexture){var qt=D.demTexture;qt.update(hr,{premultiply:!1}),qt.bind(we.NEAREST,we.CLAMP_TO_EDGE)}else D.demTexture=new i.Texture(ne,hr,we.RGBA,{premultiply:!1}),D.demTexture.bind(we.NEAREST,we.CLAMP_TO_EDGE);ne.activeTexture.set(we.TEXTURE0);var Ve=D.fbo;if(!Ve){var Qe=new i.Texture(ne,{width:ft,height:ft,data:null},we.RGBA);Qe.bind(we.LINEAR,we.CLAMP_TO_EDGE),Ve=D.fbo=ne.createFramebuffer(ft,ft,!0),Ve.colorAttachment.set(Qe.texture)}ne.bindFramebuffer.set(Ve.framebuffer),ne.viewport.set([0,0,ft,ft]),Y.useProgram(\"hillshadePrepare\").draw(ne,we.TRIANGLES,q,K,de,Er.disabled,La(D.tileID,Ue),J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),D.needsHillshadePrepare=!1}}function Ft(Y,D,J,q){if(Y.renderPass===\"translucent\"&&J.paint.get(\"raster-opacity\")!==0&&q.length)for(var K=Y.context,de=K.gl,ne=D.getSource(),we=Y.useProgram(\"raster\"),Ue=Y.colorModeForRenderPass(),ft=ne instanceof Le?[{},q]:Y.stencilConfigForOverlap(q),Zt=ft[0],hr=ft[1],qt=hr[hr.length-1].overscaledZ,Ve=!Y.options.moving,Qe=0,at=hr;Qe<at.length;Qe+=1){var Ct=at[Qe],Ot=Y.depthModeForSublayer(Ct.overscaledZ-qt,J.paint.get(\"raster-opacity\")===1?wi.ReadWrite:wi.ReadOnly,de.LESS),Rt=D.getTile(Ct),Bt=Y.transform.calculatePosMatrix(Ct.toUnwrapped(),Ve);Rt.registerFadeDuration(J.paint.get(\"raster-fade-duration\"));var Dt=D.findLoadedParent(Ct,0),yt=Ht(Rt,Dt,D,J,Y.transform),Pt=void 0,ht=void 0,ur=J.paint.get(\"raster-resampling\")===\"nearest\"?de.NEAREST:de.LINEAR;K.activeTexture.set(de.TEXTURE0),Rt.texture.bind(ur,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),K.activeTexture.set(de.TEXTURE1),Dt?(Dt.texture.bind(ur,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),Pt=Math.pow(2,Dt.tileID.overscaledZ-Rt.tileID.overscaledZ),ht=[Rt.tileID.canonical.x*Pt%1,Rt.tileID.canonical.y*Pt%1]):Rt.texture.bind(ur,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST);var br=Ls(Bt,ht||[0,0],Pt||1,yt,J);ne instanceof Le?we.draw(K,de.TRIANGLES,Ot,Fn.disabled,Ue,Er.disabled,br,J.id,ne.boundsBuffer,Y.quadTriangleIndexBuffer,ne.boundsSegments):we.draw(K,de.TRIANGLES,Ot,Zt[Ct.overscaledZ],Ue,Er.disabled,br,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function Ht(Y,D,J,q,K){var de=q.paint.get(\"raster-fade-duration\");if(de>0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Ue=D?(ne-D.timeAdded)/de:-1,ft=J.getSource(),Zt=K.coveringZoomLevel({tileSize:ft.tileSize,roundZoom:ft.roundZoom}),hr=!D||Math.abs(D.tileID.overscaledZ-Zt)>Math.abs(Y.tileID.overscaledZ-Zt),qt=hr&&Y.refreshedUponExpiration?1:i.clamp(hr?we:1-Ue,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function tr(Y,D,J){var q=J.paint.get(\"background-color\"),K=J.paint.get(\"background-opacity\");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Ue=we.tileSize,ft=J.paint.get(\"background-pattern\");if(!Y.isPatternMissing(ft)){var Zt=!ft&&q.a===1&&K===1&&Y.opaquePassEnabledForLayer()?\"opaque\":\"translucent\";if(Y.renderPass===Zt){var hr=Fn.disabled,qt=Y.depthModeForSublayer(0,Zt===\"opaque\"?wi.ReadWrite:wi.ReadOnly),Ve=Y.colorModeForRenderPass(),Qe=Y.useProgram(ft?\"backgroundPattern\":\"background\"),at=we.coveringTiles({tileSize:Ue});ft&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var Ct=J.getCrossfadeParameters(),Ot=0,Rt=at;Ot<Rt.length;Ot+=1){var Bt=Rt[Ot],Dt=Y.transform.calculatePosMatrix(Bt.toUnwrapped()),yt=ft?Ua(Dt,K,Y,ft,{tileID:Bt,tileSize:Ue},Ct):Ac(Dt,K,q);Qe.draw(de,ne.TRIANGLES,qt,hr,Ve,Er.disabled,yt,J.id,Y.tileExtentBuffer,Y.quadTriangleIndexBuffer,Y.tileExtentSegments)}}}}}var dr=new i.Color(1,0,0,1),Sr=new i.Color(0,1,0,1),Or=new i.Color(0,0,1,1),Wr=new i.Color(1,0,1,1),ni=new i.Color(0,1,1,1);function Pi(Y){var D=Y.transform.padding,J=3;ln(Y,Y.transform.height-(D.top||0),J,dr),ln(Y,D.bottom||0,J,Sr),Cn(Y,D.left||0,J,Or),Cn(Y,Y.transform.width-(D.right||0),J,Wr);var q=Y.transform.centerPoint;cn(Y,q.x,Y.transform.height-q.y,ni)}function cn(Y,D,J,q){var K=20,de=2;Kn(Y,D-de/2,J-K/2,de,K,q),Kn(Y,D-K/2,J-de/2,K,de,q)}function ln(Y,D,J,q){Kn(Y,0,D+J/2,Y.transform.width,J,q)}function Cn(Y,D,J,q){Kn(Y,D-J/2,0,J,Y.transform.height,q)}function Kn(Y,D,J,q,K,de){var ne=Y.context,we=ne.gl;we.enable(we.SCISSOR_TEST),we.scissor(D*i.browser.devicePixelRatio,J*i.browser.devicePixelRatio,q*i.browser.devicePixelRatio,K*i.browser.devicePixelRatio),ne.clear({color:de}),we.disable(we.SCISSOR_TEST)}function Aa(Y,D,J){for(var q=0;q<J.length;q++)fa(Y,D,J[q])}function fa(Y,D,J){var q=Y.context,K=q.gl,de=J.posMatrix,ne=Y.useProgram(\"debug\"),we=wi.disabled,Ue=Fn.disabled,ft=Y.colorModeForRenderPass(),Zt=\"$debug\";q.activeTexture.set(K.TEXTURE0),Y.emptyTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),ne.draw(q,K.LINE_STRIP,we,Ue,ft,Er.disabled,dn(de,i.Color.red),Zt,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments);var hr=D.getTileByID(J.key).latestRawTileData,qt=hr&&hr.byteLength||0,Ve=Math.floor(qt/1024),Qe=D.getTile(J).tileSize,at=512/Math.min(Qe,512)*(J.overscaledZ/Y.transform.zoom)*.5,Ct=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(Ct+=\" => \"+J.overscaledZ);var Ot=Ct+\" \"+Ve+\"kb\";$a(Y,Ot),ne.draw(q,K.TRIANGLES,we,Ue,wt.alphaBlended,Er.disabled,dn(de,i.Color.transparent,at),Zt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,q=Y.context.gl,K=Y.debugOverlayCanvas.getContext(\"2d\");K.clearRect(0,0,J.width,J.height),K.shadowColor=\"white\",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle=\"white\",K.textBaseline=\"top\",K.font=\"bold 36px Open Sans, sans-serif\",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE)}function Co(Y,D,J){var q=Y.context,K=J.implementation;if(Y.renderPass===\"offscreen\"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),de.call(K,q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState())}else if(Y.renderPass===\"translucent\"){Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),q.setStencilMode(Fn.disabled);var ne=K.renderingMode===\"3d\"?new wi(Y.context.gl.LEQUAL,wi.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,wi.ReadOnly);q.setDepthMode(ne),K.render(q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState(),q.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:st,heatmap:Tt,line:Ir,fill:ve,\"fill-extrusion\":Re,hillshade:et,raster:Ft,background:tr,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ri.maxUnderzooming+ri.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var q=0,K=this.style._order;q<K.length;q+=1){var de=K[q];this.style._layers[de].resize()}},mo.prototype.setup=function(){var D=this.context,J=new i.StructArrayLayout2i4;J.emplaceBack(0,0),J.emplaceBack(i.EXTENT,0),J.emplaceBack(0,i.EXTENT),J.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=D.createVertexBuffer(J,oc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var q=new i.StructArrayLayout2i4;q.emplaceBack(0,0),q.emplaceBack(i.EXTENT,0),q.emplaceBack(0,i.EXTENT),q.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=D.createVertexBuffer(q,oc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var K=new i.StructArrayLayout4i8;K.emplaceBack(0,0,0,0),K.emplaceBack(i.EXTENT,0,i.EXTENT,0),K.emplaceBack(0,i.EXTENT,0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=D.createVertexBuffer(K,Ce.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout2i4;de.emplaceBack(0,0),de.emplaceBack(1,0),de.emplaceBack(0,1),de.emplaceBack(1,1),this.viewportBuffer=D.createVertexBuffer(de,oc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ne=new i.StructArrayLayout1ui2;ne.emplaceBack(0),ne.emplaceBack(1),ne.emplaceBack(3),ne.emplaceBack(2),ne.emplaceBack(0),this.tileBorderIndexBuffer=D.createIndexBuffer(ne);var we=new i.StructArrayLayout3ui6;we.emplaceBack(0,1,2),we.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=D.createIndexBuffer(we),this.emptyTexture=new i.Texture(D,{width:1,height:1,data:new Uint8Array([0,0,0,0])},D.gl.RGBA);var Ue=this.context.gl;this.stencilClearMode=new Fn({func:Ue.ALWAYS,mask:0},0,255,Ue.ZERO,Ue.ZERO,Ue.ZERO)},mo.prototype.clearStencil=function(){var D=this.context,J=D.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var q=i.create();i.ortho(q,0,this.width,this.height,0,0,1),i.scale(q,q,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram(\"clippingMask\").draw(D,J.TRIANGLES,wi.disabled,this.stencilClearMode,wt.disabled,Er.disabled,Nn(q),\"$clipping\",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},mo.prototype._renderTileClippingMasks=function(D,J){if(!(this.currentStencilSource===D.source||!D.isTileClipped()||!J||!J.length)){this.currentStencilSource=D.source;var q=this.context,K=q.gl;this.nextStencilID+J.length>256&&this.clearStencil(),q.setColorMode(wt.disabled),q.setDepthMode(wi.disabled);var de=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne<we.length;ne+=1){var Ue=we[ne],ft=this._tileClippingMaskIDs[Ue.key]=this.nextStencilID++;de.draw(q,K.TRIANGLES,wi.disabled,new Fn({func:K.ALWAYS,mask:0},ft,255,K.KEEP,K.KEEP,K.REPLACE),wt.disabled,Er.disabled,Nn(Ue.posMatrix),\"$clipping\",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},mo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Fn({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Fn({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,q=this.context.gl,K=D.sort(function(ft,Zt){return Zt.overscaledZ-ft.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Ue=0;Ue<ne;Ue++)we[Ue+de]=new Fn({func:q.GEQUAL,mask:255},Ue+this.nextStencilID,255,q.KEEP,q.KEEP,q.REPLACE);return this.nextStencilID+=ne,[we,K]}return[(J={},J[de]=Fn.disabled,J),K]},mo.prototype.colorModeForRenderPass=function(){var D=this.context.gl;if(this._showOverdrawInspector){var J=8,q=1/J;return new wt([D.CONSTANT_COLOR,D.ONE],new i.Color(q,q,q,0),[!0,!0,!0,!0])}else return this.renderPass===\"opaque\"?wt.unblended:wt.alphaBlended},mo.prototype.depthModeForSublayer=function(D,J,q){if(!this.opaquePassEnabledForLayer())return wi.disabled;var K=1-((1+this.currentLayer)*this.numSublayers+D)*this.depthEpsilon;return new wi(q||this.context.gl.LEQUAL,J,[K,K])},mo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},mo.prototype.render=function(D,J){var q=this;this.style=D,this.options=J,this.lineAtlas=D.lineAtlas,this.imageManager=D.imageManager,this.glyphManager=D.glyphManager,this.symbolFadeChange=D.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var K=this.style._order,de=this.style.sourceCaches;for(var ne in de){var we=de[ne];we.used&&we.prepare(this.context)}var Ue={},ft={},Zt={};for(var hr in de){var qt=de[hr];Ue[hr]=qt.getVisibleCoordinates(),ft[hr]=Ue[hr].slice().reverse(),Zt[hr]=qt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Ve=0;Ve<K.length;Ve++){var Qe=K[Ve];if(this.style._layers[Qe].is3D()){this.opaquePassCutoff=Ve;break}}this.renderPass=\"offscreen\";for(var at=0,Ct=K;at<Ct.length;at+=1){var Ot=Ct[at],Rt=this.style._layers[Ot];if(!(!Rt.hasOffscreenPass()||Rt.isHidden(this.transform.zoom))){var Bt=ft[Rt.source];Rt.type!==\"custom\"&&!Bt.length||this.renderLayer(this,de[Rt.source],Rt,Bt)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:J.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(D._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass=\"opaque\",this.currentLayer=K.length-1;this.currentLayer>=0;this.currentLayer--){var Dt=this.style._layers[K[this.currentLayer]],yt=de[Dt.source],Pt=Ue[Dt.source];this._renderTileClippingMasks(Dt,Pt),this.renderLayer(this,yt,Dt,Pt)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer<K.length;this.currentLayer++){var ht=this.style._layers[K[this.currentLayer]],ur=de[ht.source],br=(ht.type===\"symbol\"?Zt:ft)[ht.source];this._renderTileClippingMasks(ht,Ue[ht.source]),this.renderLayer(this,ur,ht,br)}if(this.options.showTileBoundaries){var Ur,Di,fi=i.values(this.style._layers);fi.forEach(function(Ti){Ti.source&&!Ti.isHidden(q.transform.zoom)&&(Ti.source!==(Di&&Di.id)&&(Di=q.style.sourceCaches[Ti.source]),(!Ur||Ur.getSource().maxzoom<Di.getSource().maxzoom)&&(Ur=Di))}),Ur&&Qa.debug(this,Ur,Ur.getVisibleCoordinates())}this.options.showPadding&&Pi(this),this.context.setDefault()},mo.prototype.renderLayer=function(D,J,q,K){q.isHidden(this.transform.zoom)||q.type!==\"background\"&&q.type!==\"custom\"&&!K.length||(this.id=q.id,this.gpuTimingStart(q),Qa[q.type](D,J,q,K,this.style.placement.variableOffsets),this.gpuTimingEnd())},mo.prototype.gpuTimingStart=function(D){if(this.options.gpuTiming){var J=this.context.extTimerQuery,q=this.gpuTimers[D.id];q||(q=this.gpuTimers[D.id]={calls:0,cpuTime:0,query:J.createQueryEXT()}),q.calls++,J.beginQueryEXT(J.TIME_ELAPSED_EXT,q.query)}},mo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var D=this.context.extTimerQuery;D.endQueryEXT(D.TIME_ELAPSED_EXT)}},mo.prototype.collectGpuTimers=function(){var D=this.gpuTimers;return this.gpuTimers={},D},mo.prototype.queryGpuTimers=function(D){var J={};for(var q in D){var K=D[q],de=this.context.extTimerQuery,ne=de.getQueryObjectEXT(K.query,de.QUERY_RESULT_EXT)/(1e3*1e3);de.deleteQueryEXT(K.query),J[q]=ne}return J},mo.prototype.translatePosMatrix=function(D,J,q,K,de){if(!q[0]&&!q[1])return D;var ne=de?K===\"map\"?this.transform.angle:0:K===\"viewport\"?-this.transform.angle:0;if(ne){var we=Math.sin(ne),Ue=Math.cos(ne);q=[q[0]*Ue-q[1]*we,q[0]*we+q[1]*Ue]}var ft=[de?q[0]:As(J,q[0],this.transform.zoom),de?q[1]:As(J,q[1],this.transform.zoom),0],Zt=new Float32Array(16);return i.translate(Zt,D,ft),Zt},mo.prototype.saveTileTexture=function(D){var J=this._tileTextures[D.size[0]];J?J.push(D):this._tileTextures[D.size[0]]=[D]},mo.prototype.getTileTexture=function(D){var J=this._tileTextures[D];return J&&J.length>0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),q=this.imageManager.getPattern(D.to.toString());return!J||!q},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var q=\"\"+D+(J?J.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\");return this.cache[q]||(this.cache[q]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[q]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,q){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,q),ne=K.map(function(ft){return i.transformMat4([],ft,D)}).map(function(ft){return i.scale$1([],ft,1/ft[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ue=we.map(function(ft){var Zt=i.sub([],ne[ft[0]],ne[ft[1]]),hr=i.sub([],ne[ft[2]],ne[ft[1]]),qt=i.normalize([],i.cross([],Zt,hr)),Ve=-i.dot(qt,ne[ft[1]]);return qt.concat(Ve)});return new Bo(ne,Ue)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],q=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de<J.length;de++)q[de]=J[de]?this.min[de]:this.center[de],K[de]=J[de]?this.center[de]:this.max[de];return K[2]=this.max[2],new Ps(q,K)},Ps.prototype.distanceX=function(D){var J=Math.max(Math.min(this.max[0],D[0]),this.min[0]);return J-D[0]},Ps.prototype.distanceY=function(D){var J=Math.max(Math.min(this.max[1],D[1]),this.min[1]);return J-D[1]},Ps.prototype.intersects=function(D){for(var J=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],q=!0,K=0;K<D.planes.length;K++){for(var de=D.planes[K],ne=0,we=0;we<J.length;we++)ne+=i.dot$1(de,J[we])>=0;if(ne===0)return 0;ne!==J.length&&(q=!1)}if(q)return 2;for(var Ue=0;Ue<3;Ue++){for(var ft=Number.MAX_VALUE,Zt=-Number.MAX_VALUE,hr=0;hr<D.points.length;hr++){var qt=D.points[hr][Ue]-this.min[Ue];ft=Math.min(ft,qt),Zt=Math.max(Zt,qt)}if(Zt<0||ft>this.max[Ue]-this.min[Ue])return 0}return 1};var Ts=function(D,J,q,K){if(D===void 0&&(D=0),J===void 0&&(J=0),q===void 0&&(q=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(q)||q<0||isNaN(K)||K<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=D,this.bottom=J,this.left=q,this.right=K};Ts.prototype.interpolate=function(D,J,q){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,q)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,q)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,q)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,q)),this},Ts.prototype.getCenter=function(D,J){var q=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(q,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,q,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=q==null?0:q,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,q){this._unmodified=!1,this._edgeInsets.interpolate(D,J,q),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var q=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(q.x,K.x,de.x,ne.x)),Ue=Math.floor(Math.max(q.x,K.x,de.x,ne.x)),ft=1,Zt=we-ft;Zt<=Ue+ft;Zt++)Zt!==0&&J.push(new i.UnwrappedTileID(Zt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),q=J;if(D.minzoom!==void 0&&J<D.minzoom)return[];D.maxzoom!==void 0&&J>D.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Ue=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Ue=J);var ft=3,Zt=function(fi){return{aabb:new Ps([fi*de,0,0],[(fi+1)*de,de,0]),zoom:0,x:0,y:0,wrap:fi,fullyVisible:!1}},hr=[],qt=[],Ve=J,Qe=D.reparseOverscaled?q:J;if(this._renderWorldCopies)for(var at=1;at<=3;at++)hr.push(Zt(-at)),hr.push(Zt(at));for(hr.push(Zt(0));hr.length>0;){var Ct=hr.pop(),Ot=Ct.x,Rt=Ct.y,Bt=Ct.fullyVisible;if(!Bt){var Dt=Ct.aabb.intersects(we);if(Dt===0)continue;Bt=Dt===2}var yt=Ct.aabb.distanceX(ne),Pt=Ct.aabb.distanceY(ne),ht=Math.max(Math.abs(yt),Math.abs(Pt)),ur=ft+(1<<Ve-Ct.zoom)-2;if(Ct.zoom===Ve||ht>ur&&Ct.zoom>=Ue){qt.push({tileID:new i.OverscaledTileID(Ct.zoom===Ve?Qe:Ct.zoom,Ct.wrap,Ct.zoom,Ot,Rt),distanceSq:i.sqrLen([ne[0]-.5-Ot,ne[1]-.5-Rt])});continue}for(var br=0;br<4;br++){var Ur=(Ot<<1)+br%2,Di=(Rt<<1)+(br>>1);hr.push({aabb:Ct.aabb.quadrant(br),zoom:Ct.zoom+1,x:Ur,y:Di,wrap:Ct.wrap,fullyVisible:Bt})}}return qt.sort(function(fi,Ti){return fi.distanceSq-Ti.distanceSq}).map(function(fi){return fi.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var q=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(q.x-K.x),de.y-(q.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,q=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(q,q,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=q[3],ne=K[3],we=q[0]/de,Ue=K[0]/ne,ft=q[1]/de,Zt=K[1]/ne,hr=q[2]/de,qt=K[2]/ne,Ve=hr===qt?0:(J-hr)/(qt-hr);return new i.MercatorCoordinate(i.number(we,Ue,Ve)/this.worldSize,i.number(ft,Zt,Ve)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var q=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[q])return K[q];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Ue=i.identity(new Float64Array(16));return i.translate(Ue,Ue,[we*ne,de.y*ne,0]),i.scale(Ue,Ue,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Ue,J?this.alignedProjMatrix:this.projMatrix,Ue),K[q]=new Float32Array(Ue),K[q]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,q=-180,K=180,de,ne,we,Ue,ft=this.size,Zt=this._unmodified;if(this.latRange){var hr=this.latRange;D=i.mercatorYfromLat(hr[1])*this.worldSize,J=i.mercatorYfromLat(hr[0])*this.worldSize,de=J-D<ft.y?ft.y/(J-D):0}if(this.lngRange){var qt=this.lngRange;q=i.mercatorXfromLng(qt[0])*this.worldSize,K=i.mercatorXfromLng(qt[1])*this.worldSize,ne=K-q<ft.x?ft.x/(K-q):0}var Ve=this.point,Qe=Math.max(ne||0,de||0);if(Qe){this.center=this.unproject(new i.Point(ne?(K+q)/2:Ve.x,de?(J+D)/2:Ve.y)),this.zoom+=this.scaleZoom(Qe),this._unmodified=Zt,this._constraining=!1;return}if(this.latRange){var at=Ve.y,Ct=ft.y/2;at-Ct<D&&(Ue=D+Ct),at+Ct>J&&(Ue=J-Ct)}if(this.lngRange){var Ot=Ve.x,Rt=ft.x/2;Ot-Rt<q&&(we=q+Rt),Ot+Rt>K&&(we=K-Rt)}(we!==void 0||Ue!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ve.x,Ue!==void 0?Ue:Ve.y))),this._unmodified=Zt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var q=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-q-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Ue=ne.y,ft=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Zt=ft*1.01,hr=this.height/50,qt=new Float64Array(16);i.perspective(qt,this._fov,this.width/this.height,hr,Zt),qt[8]=-J.x*2/this.width,qt[9]=J.y*2/this.height,i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),i.rotateX(qt,qt,this._pitch),i.rotateZ(qt,qt,this.angle),i.translate(qt,qt,[-we,-Ue,0]),this.mercatorMatrix=i.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(qt,qt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=i.invert([],this.projMatrix);var Ve=this.width%2/2,Qe=this.height%2/2,at=Math.cos(this.angle),Ct=Math.sin(this.angle),Ot=we-Math.round(we)+at*Ve+Ct*Qe,Rt=Ue-Math.round(Ue)+at*Qe+Ct*Ve,Bt=new Float64Array(qt);if(i.translate(Bt,Bt,[Ot>.5?Ot-1:Ot,Rt>.5?Rt-1:Rt,0]),this.alignedProjMatrix=Bt,qt=i.create(),i.scale(qt,qt,[this.width/2,-this.height/2,1]),i.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=i.create(),i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[-1,-1,0]),i.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=i.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],q=i.transformMat4(J,J,this.pixelMatrix);return q[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var q=J.x,K=J.y,de=J.x,ne=J.y,we=0,Ue=D;we<Ue.length;we+=1){var ft=Ue[we];q=Math.min(q,ft.x),K=Math.min(K,ft.y),de=Math.max(de,ft.x),ne=Math.max(ne,ft.y)}return[new i.Point(q,K),new i.Point(de,K),new i.Point(de,ne),new i.Point(q,ne),new i.Point(q,K)]},Object.defineProperties(wo.prototype,To);function hl(Y,D){var J=!1,q=null,K=function(){q=null,J&&(Y(),q=setTimeout(K,D),J=!1)};return function(){return J=!0,q||K(),q}}var Ul=function(D){this._hashName=D&&encodeURIComponent(D),i.bindAll([\"_getCurrentHash\",\"_onHashChange\",\"_updateHash\"],this),this._updateHash=hl(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ul.prototype.addTo=function(D){return this._map=D,i.window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Ul.prototype.remove=function(){return i.window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ul.prototype.getHashString=function(D){var J=this._map.getCenter(),q=Math.round(this._map.getZoom()*100)/100,K=Math.ceil((q*Math.LN2+Math.log(512/360/.5))/Math.LN10),de=Math.pow(10,K),ne=Math.round(J.lng*de)/de,we=Math.round(J.lat*de)/de,Ue=this._map.getBearing(),ft=this._map.getPitch(),Zt=\"\";if(D?Zt+=\"/\"+ne+\"/\"+we+\"/\"+q:Zt+=q+\"/\"+we+\"/\"+ne,(Ue||ft)&&(Zt+=\"/\"+Math.round(Ue*10)/10),ft&&(Zt+=\"/\"+Math.round(ft)),this._hashName){var hr=this._hashName,qt=!1,Ve=i.window.location.hash.slice(1).split(\"&\").map(function(Qe){var at=Qe.split(\"=\")[0];return at===hr?(qt=!0,at+\"=\"+Zt):Qe}).filter(function(Qe){return Qe});return qt||Ve.push(hr+\"=\"+Zt),\"#\"+Ve.join(\"&\")}return\"#\"+Zt},Ul.prototype._getCurrentHash=function(){var D=this,J=i.window.location.hash.replace(\"#\",\"\");if(this._hashName){var q;return J.split(\"&\").map(function(K){return K.split(\"=\")}).forEach(function(K){K[0]===D._hashName&&(q=K)}),(q&&q[1]||\"\").split(\"/\")}return J.split(\"/\")},Ul.prototype._onHashChange=function(){var D=this._getCurrentHash();if(D.length>=3&&!D.some(function(q){return isNaN(q)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),q=160;D.length>0&&J-D[0].time>q;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},q=0,K=this._inertiaBuffer;q<K.length;q+=1){var de=K[q],ne=de.settings;J.zoom+=ne.zoomDelta||0,J.bearing+=ne.bearingDelta||0,J.pitch+=ne.pitchDelta||0,ne.panDelta&&J.pan._add(ne.panDelta),ne.around&&(J.around=ne.around),ne.pinchAround&&(J.pinchAround=ne.pinchAround)}var we=this._inertiaBuffer[this._inertiaBuffer.length-1],Ue=we.time-this._inertiaBuffer[0].time,ft={};if(J.pan.mag()){var Zt=X(J.pan.mag(),Ue,i.extend({},au,D||{}));ft.offset=J.pan.mult(Zt.amount/J.pan.mag()),ft.center=this._map.transform.center,Al(ft,Zt)}if(J.zoom){var hr=X(J.zoom,Ue,Js);ft.zoom=this._map.transform.zoom+hr.amount,Al(ft,hr)}if(J.bearing){var qt=X(J.bearing,Ue,eu);ft.bearing=this._map.transform.bearing+i.clamp(qt.amount,-179,179),Al(ft,qt)}if(J.pitch){var Ve=X(J.pitch,Ue,dc);ft.pitch=this._map.transform.pitch+Ve.amount,Al(ft,Ve)}if(ft.zoom||ft.bearing){var Qe=J.pinchAround===void 0?J.around:J.pinchAround;ft.around=Qe?this._map.unproject(Qe):this._map.getCenter()}return this.clear(),i.extend(ft,{noMoveStart:!0})}};function Al(Y,D){(!Y.duration||Y.duration<D.duration)&&(Y.duration=D.duration,Y.easing=D.easing)}function X(Y,D,J){var q=J.maxSpeed,K=J.linearity,de=J.deceleration,ne=i.clamp(Y*K/(D/1e3),-q,q),we=Math.abs(ne)/(de*K);return{easing:J.easing,duration:we*1e3,amount:ne*(we/2)}}var se=function(Y){function D(q,K,de,ne){ne===void 0&&(ne={});var we=o.mousePos(K.getCanvasContainer(),de),Ue=K.unproject(we);Y.call(this,q,i.extend({point:we,lngLat:Ue,originalEvent:de},ne)),this._defaultPrevented=!1,this.target=K}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Te=function(Y){function D(q,K,de){var ne=q===\"touchend\"?de.changedTouches:de.touches,we=o.touchPos(K.getCanvasContainer(),ne),Ue=we.map(function(hr){return K.unproject(hr)}),ft=we.reduce(function(hr,qt,Ve,Qe){return hr.add(qt.div(Qe.length))},new i.Point(0,0)),Zt=K.unproject(ft);Y.call(this,q,{points:we,point:ft,lngLats:Ue,lngLat:Zt,originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Ne=function(Y){function D(q,K,de){Y.call(this,q,{originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),He=function(D,J){this._map=D,this._clickTolerance=J.clickTolerance};He.prototype.reset=function(){delete this._mousedownPos},He.prototype.wheel=function(D){return this._firePreventable(new Ne(D.type,this._map,D))},He.prototype.mousedown=function(D,J){return this._mousedownPos=J,this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseup=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.click=function(D,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},He.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},He.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},He.prototype.isEnabled=function(){return!0},He.prototype.isActive=function(){return!1},He.prototype.enable=function(){},He.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens(\"contextmenu\")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var kt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};kt.prototype.isEnabled=function(){return!!this._enabled},kt.prototype.isActive=function(){return!!this._active},kt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},kt.prototype.mousemoveWindow=function(D,J){if(this._active){var q=J;if(!(this._lastPos.equals(q)||!this._box&&q.dist(this._startPos)<this._clickTolerance)){var K=this._startPos;this._lastPos=q,this._box||(this._box=o.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",D));var de=Math.min(K.x,q.x),ne=Math.max(K.x,q.x),we=Math.min(K.y,q.y),Ue=Math.max(K.y,q.y);o.setTransform(this._box,\"translate(\"+de+\"px,\"+we+\"px)\"),this._box.style.width=ne-de+\"px\",this._box.style.height=Ue-we+\"px\"}}},kt.prototype.mouseupWindow=function(D,J){var q=this;if(this._active&&D.button===0){var K=this._startPos,de=J;if(this.reset(),o.suppressClick(),K.x===de.x&&K.y===de.y)this._fireEvent(\"boxzoomcancel\",D);else return this._map.fire(new i.Event(\"boxzoomend\",{originalEvent:D})),{cameraAnimation:function(ne){return ne.fitScreenCoordinates(K,de,q._map.getBearing(),{linear:!0})}}}},kt.prototype.keydown=function(D){this._active&&D.keyCode===27&&(this.reset(),this._fireEvent(\"boxzoomcancel\",D))},kt.prototype.reset=function(){this._active=!1,this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos},kt.prototype._fireEvent=function(D,J){return this._map.fire(new i.Event(D,{originalEvent:J}))};function nt(Y,D){for(var J={},q=0;q<Y.length;q++)J[Y[q].identifier]=D[q];return J}function jt(Y){for(var D=new i.Point(0,0),J=0,q=Y;J<q.length;J+=1){var K=q[J];D._add(K)}return D.div(Y.length)}var gr=500,yr=500,Hr=30,qr=function(D){this.reset(),this.numTouches=D.numTouches};qr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},qr.prototype.touchstart=function(D,J,q){(this.centroid||q.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),q.length===this.numTouches&&(this.centroid=jt(J),this.touches=nt(q,J)))},qr.prototype.touchmove=function(D,J,q){if(!(this.aborted||!this.centroid)){var K=nt(q,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Hr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(D,J,q){if((!this.centroid||D.timeStamp-this.startTime>yr)&&(this.aborted=!0),q.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var _i=function(D){this.singleTap=new qr(D),this.numTaps=D.numTaps,this.reset()};_i.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},_i.prototype.touchstart=function(D,J,q){this.singleTap.touchstart(D,J,q)},_i.prototype.touchmove=function(D,J,q){this.singleTap.touchmove(D,J,q)},_i.prototype.touchend=function(D,J,q){var K=this.singleTap.touchend(D,J,q);if(K){var de=D.timeStamp-this.lastTime<gr,ne=!this.lastTap||this.lastTap.dist(K)<Hr;if((!de||!ne)&&this.reset(),this.count++,this.lastTime=D.timeStamp,this.lastTap=K,this.count===this.numTaps)return this.reset(),K}};var bi=function(){this._zoomIn=new _i({numTouches:1,numTaps:2}),this._zoomOut=new _i({numTouches:2,numTaps:1}),this.reset()};bi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},bi.prototype.touchstart=function(D,J,q){this._zoomIn.touchstart(D,J,q),this._zoomOut.touchstart(D,J,q)},bi.prototype.touchmove=function(D,J,q){this._zoomIn.touchmove(D,J,q),this._zoomOut.touchmove(D,J,q)},bi.prototype.touchend=function(D,J,q){var K=this,de=this._zoomIn.touchend(D,J,q),ne=this._zoomOut.touchend(D,J,q);if(de)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()+1,around:we.unproject(de)},{originalEvent:D})}};if(ne)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()-1,around:we.unproject(ne)},{originalEvent:D})}}},bi.prototype.touchcancel=function(){this.reset()},bi.prototype.enable=function(){this._enabled=!0},bi.prototype.disable=function(){this._enabled=!1,this.reset()},bi.prototype.isEnabled=function(){return this._enabled},bi.prototype.isActive=function(){return this._active};var Zr=0,ai=2,gi={};gi[Zr]=1,gi[ai]=2;function Ii(Y,D){var J=gi[D];return Y.buttons===void 0||(Y.buttons&J)!==J}var Si=function(D){this.reset(),this._clickTolerance=D.clickTolerance||1};Si.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Si.prototype._correctButton=function(D,J){return!1},Si.prototype._move=function(D,J){return{}},Si.prototype.mousedown=function(D,J){if(!this._lastPoint){var q=o.mouseButton(D);this._correctButton(D,q)&&(this._lastPoint=J,this._eventButton=q)}},Si.prototype.mousemoveWindow=function(D,J){var q=this._lastPoint;if(q){if(D.preventDefault(),Ii(D,this._eventButton)){this.reset();return}if(!(!this._moved&&J.dist(q)<this._clickTolerance))return this._moved=!0,this._lastPoint=J,this._move(q,J)}},Si.prototype.mouseupWindow=function(D){if(this._lastPoint){var J=o.mouseButton(D);J===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}},Si.prototype.enable=function(){this._enabled=!0},Si.prototype.disable=function(){this._enabled=!1,this.reset()},Si.prototype.isEnabled=function(){return this._enabled},Si.prototype.isActive=function(){return this._active};var ei=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.mousedown=function(q,K){Y.prototype.mousedown.call(this,q,K),this._lastPoint&&(this._active=!0)},D.prototype._correctButton=function(q,K){return K===Zr&&!q.ctrlKey},D.prototype._move=function(q,K){return{around:K,panDelta:K.sub(q)}},D}(Si),Ln=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(q,K){return K===Zr&&q.ctrlKey||K===ai},D.prototype._move=function(q,K){var de=.8,ne=(K.x-q.x)*de;if(ne)return this._active=!0,{bearingDelta:ne}},D.prototype.contextmenu=function(q){q.preventDefault()},D}(Si),En=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(q,K){return K===Zr&&q.ctrlKey||K===ai},D.prototype._move=function(q,K){var de=-.5,ne=(K.y-q.y)*de;if(ne)return this._active=!0,{pitchDelta:ne}},D.prototype.contextmenu=function(q){q.preventDefault()},D}(Si),Un=function(D){this._minTouches=1,this._clickTolerance=D.clickTolerance||1,this.reset()};Un.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Un.prototype.touchstart=function(D,J,q){return this._calculateTransform(D,J,q)},Un.prototype.touchmove=function(D,J,q){if(!(!this._active||q.length<this._minTouches))return D.preventDefault(),this._calculateTransform(D,J,q)},Un.prototype.touchend=function(D,J,q){this._calculateTransform(D,J,q),this._active&&q.length<this._minTouches&&this.reset()},Un.prototype.touchcancel=function(){this.reset()},Un.prototype._calculateTransform=function(D,J,q){q.length>0&&(this._active=!0);var K=nt(q,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Ue in K){var ft=K[Ue],Zt=this._touches[Ue];Zt&&(de._add(ft),ne._add(ft.sub(Zt)),we++,K[Ue]=ft)}if(this._touches=K,!(we<this._minTouches||!ne.mag())){var hr=ne.div(we);if(this._sum._add(hr),!(this._sum.mag()<this._clickTolerance)){var qt=de.div(we);return{around:qt,panDelta:hr}}}},Un.prototype.enable=function(){this._enabled=!0},Un.prototype.disable=function(){this._enabled=!1,this.reset()},Un.prototype.isEnabled=function(){return this._enabled},Un.prototype.isActive=function(){return this._active};var ia=function(){this.reset()};ia.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},ia.prototype._start=function(D){},ia.prototype._move=function(D,J,q){return{}},ia.prototype.touchstart=function(D,J,q){this._firstTwoTouches||q.length<2||(this._firstTwoTouches=[q[0].identifier,q[1].identifier],this._start([J[0],J[1]]))},ia.prototype.touchmove=function(D,J,q){if(this._firstTwoTouches){D.preventDefault();var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(q,J,de),Ue=Ea(q,J,ne);if(!(!we||!Ue)){var ft=this._aroundCenter?null:we.add(Ue).div(2);return this._move([we,Ue],ft,D)}}},ia.prototype.touchend=function(D,J,q){if(this._firstTwoTouches){var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(q,J,de),Ue=Ea(q,J,ne);we&&Ue||(this._active&&o.suppressClick(),this.reset())}},ia.prototype.touchcancel=function(){this.reset()},ia.prototype.enable=function(D){this._enabled=!0,this._aroundCenter=!!D&&D.around===\"center\"},ia.prototype.disable=function(){this._enabled=!1,this.reset()},ia.prototype.isEnabled=function(){return this._enabled},ia.prototype.isActive=function(){return this._active};function Ea(Y,D,J){for(var q=0;q<Y.length;q++)if(Y[q].identifier===J)return D[q]}var Ia=.1;function yo(Y,D){return Math.log(Y/D)/Math.LN2}var Da=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._distance,delete this._startDistance},D.prototype._start=function(q){this._startDistance=this._distance=q[0].dist(q[1])},D.prototype._move=function(q,K){var de=this._distance;if(this._distance=q[0].dist(q[1]),!(!this._active&&Math.abs(yo(this._distance,this._startDistance))<Ia))return this._active=!0,{zoomDelta:yo(this._distance,de),pinchAround:K}},D}(ia),go=25;function Is(Y,D){return Y.angleWith(D)*180/Math.PI}var Ms=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},D.prototype._start=function(q){this._startVector=this._vector=q[0].sub(q[1]),this._minDiameter=q[0].dist(q[1])},D.prototype._move=function(q,K){var de=this._vector;if(this._vector=q[0].sub(q[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Is(this._vector,de),pinchAround:K}},D.prototype._isBelowThreshold=function(q){this._minDiameter=Math.min(this._minDiameter,q.mag());var K=Math.PI*this._minDiameter,de=go/K*360,ne=Is(q,this._startVector);return Math.abs(ne)<de},D}(ia);function Xs(Y){return Math.abs(Y.y)>Math.abs(Y.x)}var Gn=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(q){this._lastPoints=q,Xs(q[0].sub(q[1]))&&(this._valid=!1)},D.prototype._move=function(q,K,de){var ne=q[0].sub(this._lastPoints[0]),we=q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=q,this._active=!0;var Ue=(ne.y+we.y)/2,ft=-.5;return{pitchDelta:Ue*ft}}},D.prototype.gestureBeginsVertically=function(q,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=q.mag()>=ne,Ue=K.mag()>=ne;if(!(!we&&!Ue)){if(!we||!Ue)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove<Gn?void 0:!1;var ft=q.y>0==K.y>0;return Xs(q)&&Xs(K)&&ft}},D}(ia),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var q=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:q=1;break;case 189:case 109:case 173:q=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Ue){var ft=Ue.getZoom();Ue.easeTo({duration:300,easeId:\"keyboardHandler\",easing:$s,zoom:q?Math.round(ft)+q*(D.shiftKey?2:1):ft,bearing:Ue.getBearing()+K*J._bearingStep,pitch:Ue.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Ue.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll([\"_onTimeout\"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around===\"center\")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,q=i.browser.now(),K=q-(this._lastWheelEventTime||0);this._lastWheelEventTime=q,J!==0&&J%Sl===0?this._type=\"wheel\":J!==0&&Math.abs(J)<4?this._type=\"trackpad\":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var q=this._type===\"wheel\"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom==\"number\"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type===\"wheel\"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom==\"number\"?this._targetZoom:J.zoom,we=this._startZoom,Ue=this._easing,ft=!1,Zt;if(this._type===\"wheel\"&&we&&Ue){var hr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),qt=Ue(hr);Zt=i.number(we,ne,qt),hr<1?this._frameId||(this._frameId=!0):ft=!0}else Zt=ne,ft=!0;return this._active=!0,ft&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ft,zoomDelta:Zt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var q=this._prevEase,K=(i.browser.now()-q.start)/q.duration,de=q.easing(K+.01)-q.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var zt=function(){this.reset()};zt.prototype.reset=function(){this._active=!1},zt.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(q){q.easeTo({duration:300,zoom:q.getZoom()+(D.shiftKey?-1:1),around:q.unproject(J)},{originalEvent:D})}}},zt.prototype.enable=function(){this._enabled=!0},zt.prototype.disable=function(){this._enabled=!1,this.reset()},zt.prototype.isEnabled=function(){return this._enabled},zt.prototype.isActive=function(){return this._active};var Rr=function(){this._tap=new _i({numTouches:1,numTaps:1}),this.reset()};Rr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Rr.prototype.touchstart=function(D,J,q){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>gr&&this.reset(),this._tapTime?q.length>0&&(this._swipePoint=J[0],this._swipeTouch=q[0].identifier):this._tap.touchstart(D,J,q))},Rr.prototype.touchmove=function(D,J,q){if(!this._tapTime)this._tap.touchmove(D,J,q);else if(this._swipePoint){if(q[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Rr.prototype.touchend=function(D,J,q){if(this._tapTime)this._swipePoint&&q.length===0&&this.reset();else{var K=this._tap.touchend(D,J,q);K&&(this._tapTime=D.timeStamp)}},Rr.prototype.touchcancel=function(){this.reset()},Rr.prototype.enable=function(){this._enabled=!0},Rr.prototype.disable=function(){this._enabled=!1,this.reset()},Rr.prototype.isEnabled=function(){return this._enabled},Rr.prototype.isActive=function(){return this._active};var jr=function(D,J,q){this._el=D,this._mousePan=J,this._touchPan=q};jr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"mapboxgl-touch-drag-pan\")},jr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"mapboxgl-touch-drag-pan\")},jr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},jr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Nr=function(D,J,q){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=q};Nr.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Nr.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Nr.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Nr.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Gr=function(D,J,q,K){this._el=D,this._touchZoom=J,this._touchRotate=q,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Gr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add(\"mapboxgl-touch-zoom-rotate\")},Gr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"mapboxgl-touch-zoom-rotate\")},Gr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Gr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Gr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Gr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ui=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Ei=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll([\"handleEvent\",\"handleWindowEvent\"],this);var q=this._el;this._listeners=[[q,\"touchstart\",{passive:!0}],[q,\"touchmove\",{passive:!1}],[q,\"touchend\",void 0],[q,\"touchcancel\",void 0],[q,\"mousedown\",void 0],[q,\"mousemove\",void 0],[q,\"mouseup\",void 0],[i.window.document,\"mousemove\",{capture:!0}],[i.window.document,\"mouseup\",void 0],[q,\"mouseover\",void 0],[q,\"mouseout\",void 0],[q,\"dblclick\",void 0],[q,\"click\",void 0],[q,\"keydown\",{capture:!1}],[q,\"keyup\",void 0],[q,\"wheel\",{passive:!1}],[q,\"contextmenu\",void 0],[i.window,\"blur\",void 0]];for(var K=0,de=this._listeners;K<de.length;K+=1){var ne=de[K],we=ne[0],Ue=ne[1],ft=ne[2];o.addEventListener(we,Ue,we===i.window.document?this.handleWindowEvent:this.handleEvent,ft)}};Ei.prototype.destroy=function(){for(var D=0,J=this._listeners;D<J.length;D+=1){var q=J[D],K=q[0],de=q[1],ne=q[2];o.removeEventListener(K,de,K===i.window.document?this.handleWindowEvent:this.handleEvent,ne)}},Ei.prototype._addDefaultHandlers=function(D){var J=this._map,q=J.getCanvasContainer();this._add(\"mapEvent\",new He(J,D));var K=J.boxZoom=new kt(J,D);this._add(\"boxZoom\",K);var de=new bi,ne=new zt;J.doubleClickZoom=new bt(ne,de),this._add(\"tapZoom\",de),this._add(\"clickZoom\",ne);var we=new Rr;this._add(\"tapDragZoom\",we);var Ue=J.touchPitch=new ja;this._add(\"touchPitch\",Ue);var ft=new Ln(D),Zt=new En(D);J.dragRotate=new Nr(D,ft,Zt),this._add(\"mouseRotate\",ft,[\"mousePitch\"]),this._add(\"mousePitch\",Zt,[\"mouseRotate\"]);var hr=new ei(D),qt=new Un(D);J.dragPan=new jr(q,hr,qt),this._add(\"mousePan\",hr),this._add(\"touchPan\",qt,[\"touchZoom\",\"touchRotate\"]);var Ve=new Ms,Qe=new Da;J.touchZoomRotate=new Gr(q,Qe,Ve,we),this._add(\"touchRotate\",Ve,[\"touchPan\",\"touchZoom\"]),this._add(\"touchZoom\",Qe,[\"touchPan\",\"touchRotate\"]);var at=J.scrollZoom=new Me(J,this);this._add(\"scrollZoom\",at,[\"mousePan\"]);var Ct=J.keyboard=new Uo;this._add(\"keyboard\",Ct),this._add(\"blockableMapEvent\",new Ye(J));for(var Ot=0,Rt=[\"boxZoom\",\"doubleClickZoom\",\"tapDragZoom\",\"touchPitch\",\"dragRotate\",\"dragPan\",\"touchZoomRotate\",\"scrollZoom\",\"keyboard\"];Ot<Rt.length;Ot+=1){var Bt=Rt[Ot];D.interactive&&D[Bt]&&J[Bt].enable(D[Bt])}},Ei.prototype._add=function(D,J,q){this._handlers.push({handlerName:D,handler:J,allowed:q}),this._handlersById[D]=J},Ei.prototype.stop=function(D){if(!this._updatingCamera){for(var J=0,q=this._handlers;J<q.length;J+=1){var K=q[J],de=K.handler;de.reset()}this._inertia.clear(),this._fireEvents({},{},D),this._changes=[]}},Ei.prototype.isActive=function(){for(var D=0,J=this._handlers;D<J.length;D+=1){var q=J[D],K=q.handler;if(K.isActive())return!0}return!1},Ei.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ei.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ei.prototype.isMoving=function(){return!!mi(this._eventsInProgress)||this.isZooming()},Ei.prototype._blockedByActive=function(D,J,q){for(var K in D)if(K!==q&&(!J||J.indexOf(K)<0))return!0;return!1},Ei.prototype.handleWindowEvent=function(D){this.handleEvent(D,D.type+\"Window\")},Ei.prototype._getMapTouches=function(D){for(var J=[],q=0,K=D;q<K.length;q+=1){var de=K[q],ne=de.target;this._el.contains(ne)&&J.push(de)}return J},Ei.prototype.handleEvent=function(D,J){if(D.type===\"blur\"){this.stop(!0);return}this._updatingCamera=!0;for(var q=D.type===\"renderFrame\"?void 0:D,K={needsRenderFrame:!1},de={},ne={},we=D.touches?this._getMapTouches(D.touches):void 0,Ue=we?o.touchPos(this._el,we):o.mousePos(this._el,D),ft=0,Zt=this._handlers;ft<Zt.length;ft+=1){var hr=Zt[ft],qt=hr.handlerName,Ve=hr.handler,Qe=hr.allowed;if(Ve.isEnabled()){var at=void 0;this._blockedByActive(ne,Qe,qt)?Ve.reset():Ve[J||D.type]&&(at=Ve[J||D.type](D,Ue,we),this.mergeHandlerResult(K,de,at,qt,q),at&&at.needsRenderFrame&&this._triggerRenderFrame()),(at||Ve.isActive())&&(ne[qt]=Ve)}}var Ct={};for(var Ot in this._previousActiveHandlers)ne[Ot]||(Ct[Ot]=q);this._previousActiveHandlers=ne,(Object.keys(Ct).length||qi(K))&&(this._changes.push([K,de,Ct]),this._triggerRenderFrame()),(Object.keys(ne).length||qi(K))&&this._map._stop(!0),this._updatingCamera=!1;var Rt=K.cameraAnimation;Rt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Rt(this._map))},Ei.prototype.mergeHandlerResult=function(D,J,q,K,de){if(q){i.extend(D,q);var ne={handlerName:K,originalEvent:q.originalEvent||de};q.zoomDelta!==void 0&&(J.zoom=ne),q.panDelta!==void 0&&(J.drag=ne),q.pitchDelta!==void 0&&(J.pitch=ne),q.bearingDelta!==void 0&&(J.rotate=ne)}},Ei.prototype._applyChanges=function(){for(var D={},J={},q={},K=0,de=this._changes;K<de.length;K+=1){var ne=de[K],we=ne[0],Ue=ne[1],ft=ne[2];we.panDelta&&(D.panDelta=(D.panDelta||new i.Point(0,0))._add(we.panDelta)),we.zoomDelta&&(D.zoomDelta=(D.zoomDelta||0)+we.zoomDelta),we.bearingDelta&&(D.bearingDelta=(D.bearingDelta||0)+we.bearingDelta),we.pitchDelta&&(D.pitchDelta=(D.pitchDelta||0)+we.pitchDelta),we.around!==void 0&&(D.around=we.around),we.pinchAround!==void 0&&(D.pinchAround=we.pinchAround),we.noInertia&&(D.noInertia=we.noInertia),i.extend(J,Ue),i.extend(q,ft)}this._updateMapTransform(D,J,q),this._changes=[]},Ei.prototype._updateMapTransform=function(D,J,q){var K=this._map,de=K.transform;if(!qi(D))return this._fireEvents(J,q,!0);var ne=D.panDelta,we=D.zoomDelta,Ue=D.bearingDelta,ft=D.pitchDelta,Zt=D.around,hr=D.pinchAround;hr!==void 0&&(Zt=hr),K._stop(!0),Zt=Zt||K.transform.centerPoint;var qt=de.pointLocation(ne?Zt.sub(ne):Zt);Ue&&(de.bearing+=Ue),ft&&(de.pitch+=ft),we&&(de.zoom+=we),de.setLocationAtPoint(qt,Zt),this._map._update(),D.noInertia||this._inertia.record(D),this._fireEvents(J,q,!0)},Ei.prototype._fireEvents=function(D,J,q){var K=this,de=mi(this._eventsInProgress),ne=mi(D),we={};for(var Ue in D){var ft=D[Ue],Zt=ft.originalEvent;this._eventsInProgress[Ue]||(we[Ue+\"start\"]=Zt),this._eventsInProgress[Ue]=D[Ue]}!de&&ne&&this._fireEvent(\"movestart\",ne.originalEvent);for(var hr in we)this._fireEvent(hr,we[hr]);ne&&this._fireEvent(\"move\",ne.originalEvent);for(var qt in D){var Ve=D[qt],Qe=Ve.originalEvent;this._fireEvent(qt,Qe)}var at={},Ct;for(var Ot in this._eventsInProgress){var Rt=this._eventsInProgress[Ot],Bt=Rt.handlerName,Dt=Rt.originalEvent;this._handlersById[Bt].isActive()||(delete this._eventsInProgress[Ot],Ct=J[Bt]||Dt,at[Ot+\"end\"]=Ct)}for(var yt in at)this._fireEvent(yt,at[yt]);var Pt=mi(this._eventsInProgress);if(q&&(de||ne)&&!Pt){this._updatingCamera=!0;var ht=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ur=function(br){return br!==0&&-K._bearingSnap<br&&br<K._bearingSnap};ht?(ur(ht.bearing||this._map.getBearing())&&(ht.bearing=0),this._map.easeTo(ht,{originalEvent:Ct})):(this._map.fire(new i.Event(\"moveend\",{originalEvent:Ct})),ur(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Ei.prototype._fireEvent=function(D,J){this._map.fire(new i.Event(D,J?{originalEvent:J}:{}))},Ei.prototype._requestFrame=function(){var D=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(J){delete D._frameId,D.handleEvent(new Ui(\"renderFrame\",{timeStamp:J})),D._applyChanges()})},Ei.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Hn=function(Y){function D(J,q){Y.call(this),this._moving=!1,this._zooming=!1,this.transform=J,this._bearingSnap=q.bearingSnap,i.bindAll([\"_renderFrameCallback\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},D.prototype.setCenter=function(q,K){return this.jumpTo({center:q},K)},D.prototype.panBy=function(q,K,de){return q=i.Point.convert(q).mult(-1),this.panTo(this.transform.center,i.extend({offset:q},K),de)},D.prototype.panTo=function(q,K,de){return this.easeTo(i.extend({center:q},K),de)},D.prototype.getZoom=function(){return this.transform.zoom},D.prototype.setZoom=function(q,K){return this.jumpTo({zoom:q},K),this},D.prototype.zoomTo=function(q,K,de){return this.easeTo(i.extend({zoom:q},K),de)},D.prototype.zoomIn=function(q,K){return this.zoomTo(this.getZoom()+1,q,K),this},D.prototype.zoomOut=function(q,K){return this.zoomTo(this.getZoom()-1,q,K),this},D.prototype.getBearing=function(){return this.transform.bearing},D.prototype.setBearing=function(q,K){return this.jumpTo({bearing:q},K),this},D.prototype.getPadding=function(){return this.transform.padding},D.prototype.setPadding=function(q,K){return this.jumpTo({padding:q},K),this},D.prototype.rotateTo=function(q,K,de){return this.easeTo(i.extend({bearing:q},K),de)},D.prototype.resetNorth=function(q,K){return this.rotateTo(0,i.extend({duration:1e3},q),K),this},D.prototype.resetNorthPitch=function(q,K){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},q),K),this},D.prototype.snapToNorth=function(q,K){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(q,K):this},D.prototype.getPitch=function(){return this.transform.pitch},D.prototype.setPitch=function(q,K){return this.jumpTo({pitch:q},K),this},D.prototype.cameraForBounds=function(q,K){q=i.LngLatBounds.convert(q);var de=K&&K.bearing||0;return this._cameraForBoxAndBearing(q.getNorthWest(),q.getSouthEast(),de,K)},D.prototype._cameraForBoxAndBearing=function(q,K,de,ne){var we={top:0,bottom:0,right:0,left:0};if(ne=i.extend({padding:we,offset:[0,0],maxZoom:this.transform.maxZoom},ne),typeof ne.padding==\"number\"){var Ue=ne.padding;ne.padding={top:Ue,bottom:Ue,right:Ue,left:Ue}}ne.padding=i.extend(we,ne.padding);var ft=this.transform,Zt=ft.padding,hr=ft.project(i.LngLat.convert(q)),qt=ft.project(i.LngLat.convert(K)),Ve=hr.rotate(-de*Math.PI/180),Qe=qt.rotate(-de*Math.PI/180),at=new i.Point(Math.max(Ve.x,Qe.x),Math.max(Ve.y,Qe.y)),Ct=new i.Point(Math.min(Ve.x,Qe.x),Math.min(Ve.y,Qe.y)),Ot=at.sub(Ct),Rt=(ft.width-(Zt.left+Zt.right+ne.padding.left+ne.padding.right))/Ot.x,Bt=(ft.height-(Zt.top+Zt.bottom+ne.padding.top+ne.padding.bottom))/Ot.y;if(Bt<0||Rt<0){i.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\");return}var Dt=Math.min(ft.scaleZoom(ft.scale*Math.min(Rt,Bt)),ne.maxZoom),yt=typeof ne.offset.x==\"number\"?new i.Point(ne.offset.x,ne.offset.y):i.Point.convert(ne.offset),Pt=(ne.padding.left-ne.padding.right)/2,ht=(ne.padding.top-ne.padding.bottom)/2,ur=new i.Point(Pt,ht),br=ur.rotate(de*Math.PI/180),Ur=yt.add(br),Di=Ur.mult(ft.scale/ft.zoomScale(Dt)),fi=ft.unproject(hr.add(qt).div(2).sub(Di));return{center:fi,zoom:Dt,bearing:de}},D.prototype.fitBounds=function(q,K,de){return this._fitInternal(this.cameraForBounds(q,K),K,de)},D.prototype.fitScreenCoordinates=function(q,K,de,ne,we){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(q)),this.transform.pointLocation(i.Point.convert(K)),de,ne),ne,we)},D.prototype._fitInternal=function(q,K,de){return q?(K=i.extend(q,K),delete K.padding,K.linear?this.easeTo(K,de):this.flyTo(K,de)):this},D.prototype.jumpTo=function(q,K){this.stop();var de=this.transform,ne=!1,we=!1,Ue=!1;return\"zoom\"in q&&de.zoom!==+q.zoom&&(ne=!0,de.zoom=+q.zoom),q.center!==void 0&&(de.center=i.LngLat.convert(q.center)),\"bearing\"in q&&de.bearing!==+q.bearing&&(we=!0,de.bearing=+q.bearing),\"pitch\"in q&&de.pitch!==+q.pitch&&(Ue=!0,de.pitch=+q.pitch),q.padding!=null&&!de.isPaddingEqual(q.padding)&&(de.padding=q.padding),this.fire(new i.Event(\"movestart\",K)).fire(new i.Event(\"move\",K)),ne&&this.fire(new i.Event(\"zoomstart\",K)).fire(new i.Event(\"zoom\",K)).fire(new i.Event(\"zoomend\",K)),we&&this.fire(new i.Event(\"rotatestart\",K)).fire(new i.Event(\"rotate\",K)).fire(new i.Event(\"rotateend\",K)),Ue&&this.fire(new i.Event(\"pitchstart\",K)).fire(new i.Event(\"pitch\",K)).fire(new i.Event(\"pitchend\",K)),this.fire(new i.Event(\"moveend\",K))},D.prototype.easeTo=function(q,K){var de=this;this._stop(!1,q.easeId),q=i.extend({offset:[0,0],duration:500,easing:i.ease},q),(q.animate===!1||!q.essential&&i.browser.prefersReducedMotion)&&(q.duration=0);var ne=this.transform,we=this.getZoom(),Ue=this.getBearing(),ft=this.getPitch(),Zt=this.getPadding(),hr=\"zoom\"in q?+q.zoom:we,qt=\"bearing\"in q?this._normalizeBearing(q.bearing,Ue):Ue,Ve=\"pitch\"in q?+q.pitch:ft,Qe=\"padding\"in q?q.padding:ne.padding,at=i.Point.convert(q.offset),Ct=ne.centerPoint.add(at),Ot=ne.pointLocation(Ct),Rt=i.LngLat.convert(q.center||Ot);this._normalizeCenter(Rt);var Bt=ne.project(Ot),Dt=ne.project(Rt).sub(Bt),yt=ne.zoomScale(hr-we),Pt,ht;q.around&&(Pt=i.LngLat.convert(q.around),ht=ne.locationPoint(Pt));var ur={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||hr!==we,this._rotating=this._rotating||Ue!==qt,this._pitching=this._pitching||Ve!==ft,this._padding=!ne.isPaddingEqual(Qe),this._easeId=q.easeId,this._prepareEase(K,q.noMoveStart,ur),this._ease(function(br){if(de._zooming&&(ne.zoom=i.number(we,hr,br)),de._rotating&&(ne.bearing=i.number(Ue,qt,br)),de._pitching&&(ne.pitch=i.number(ft,Ve,br)),de._padding&&(ne.interpolatePadding(Zt,Qe,br),Ct=ne.centerPoint.add(at)),Pt)ne.setLocationAtPoint(Pt,ht);else{var Ur=ne.zoomScale(ne.zoom-we),Di=hr>we?Math.min(2,yt):Math.max(.5,yt),fi=Math.pow(Di,1-br),Ti=ne.unproject(Bt.add(Dt.mult(br*fi)).mult(Ur));ne.setLocationAtPoint(ne.renderWorldCopies?Ti.wrap():Ti,Ct)}de._fireMoveEvents(K)},function(br){de._afterEase(K,br)},q),this},D.prototype._prepareEase=function(q,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event(\"movestart\",q)),this._zooming&&!de.zooming&&this.fire(new i.Event(\"zoomstart\",q)),this._rotating&&!de.rotating&&this.fire(new i.Event(\"rotatestart\",q)),this._pitching&&!de.pitching&&this.fire(new i.Event(\"pitchstart\",q))},D.prototype._fireMoveEvents=function(q){this.fire(new i.Event(\"move\",q)),this._zooming&&this.fire(new i.Event(\"zoom\",q)),this._rotating&&this.fire(new i.Event(\"rotate\",q)),this._pitching&&this.fire(new i.Event(\"pitch\",q))},D.prototype._afterEase=function(q,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event(\"zoomend\",q)),ne&&this.fire(new i.Event(\"rotateend\",q)),we&&this.fire(new i.Event(\"pitchend\",q)),this.fire(new i.Event(\"moveend\",q))}},D.prototype.flyTo=function(q,K){var de=this;if(!q.essential&&i.browser.prefersReducedMotion){var ne=i.pick(q,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(ne,K)}this.stop(),q=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},q);var we=this.transform,Ue=this.getZoom(),ft=this.getBearing(),Zt=this.getPitch(),hr=this.getPadding(),qt=\"zoom\"in q?i.clamp(+q.zoom,we.minZoom,we.maxZoom):Ue,Ve=\"bearing\"in q?this._normalizeBearing(q.bearing,ft):ft,Qe=\"pitch\"in q?+q.pitch:Zt,at=\"padding\"in q?q.padding:we.padding,Ct=we.zoomScale(qt-Ue),Ot=i.Point.convert(q.offset),Rt=we.centerPoint.add(Ot),Bt=we.pointLocation(Rt),Dt=i.LngLat.convert(q.center||Bt);this._normalizeCenter(Dt);var yt=we.project(Bt),Pt=we.project(Dt).sub(yt),ht=q.curve,ur=Math.max(we.width,we.height),br=ur/Ct,Ur=Pt.mag();if(\"minZoom\"in q){var Di=i.clamp(Math.min(q.minZoom,Ue,qt),we.minZoom,we.maxZoom),fi=ur/we.zoomScale(Di-Ue);ht=Math.sqrt(fi/Ur*2)}var Ti=ht*ht;function gn(so){var Yo=(br*br-ur*ur+(so?-1:1)*Ti*Ti*Ur*Ur)/(2*(so?br:ur)*Ti*Ur);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function rn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ci(so){return(Math.exp(so)+Math.exp(-so))/2}function Bi(so){return rn(so)/Ci(so)}var Gi=gn(0),sn=function(so){return Ci(Gi)/Ci(Gi+ht*so)},zn=function(so){return ur*((Ci(Gi)*Bi(Gi+ht*so)-rn(Gi))/Ti)/Ur},Ja=(gn(1)-Gi)/ht;if(Math.abs(Ur)<1e-6||!isFinite(Ja)){if(Math.abs(ur-br)<1e-6)return this.easeTo(q,K);var co=br<ur?-1:1;Ja=Math.abs(Math.log(br/ur))/ht,zn=function(){return 0},sn=function(so){return Math.exp(co*ht*so)}}if(\"duration\"in q)q.duration=+q.duration;else{var ts=\"screenSpeed\"in q?+q.screenSpeed/ht:+q.speed;q.duration=1e3*Ja/ts}return q.maxDuration&&q.duration>q.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=ft!==Ve,this._pitching=Qe!==Zt,this._padding=!we.isPaddingEqual(at),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/sn(Yo);we.zoom=so===1?qt:Ue+we.scaleZoom(ms),de._rotating&&(we.bearing=i.number(ft,Ve,so)),de._pitching&&(we.pitch=i.number(Zt,Qe,so)),de._padding&&(we.interpolatePadding(hr,at,so),Rt=we.centerPoint.add(Ot));var ou=so===1?Dt:we.unproject(yt.add(Pt.mult(zn(Yo))).mult(ms));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,Rt),de._fireMoveEvents(K)},function(){return de._afterEase(K)},q),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(q,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!q){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(q,K,de){de.animate===!1||de.duration===0?(q(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=q,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var q=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(q)),q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(q,K){q=i.wrap(q,-180,180);var de=Math.abs(q-K);return Math.abs(q-360-K)<de&&(q-=360),Math.abs(q+360-K)<de&&(q+=360),q},D.prototype._normalizeCenter=function(q){var K=this.transform;if(!(!K.renderWorldCopies||K.lngRange)){var de=q.lng-K.center.lng;q.lng+=de>180?-360:de<-180?360:0}},D}(i.Evented),en=function(D){D===void 0&&(D={}),this.options=D,i.bindAll([\"_toggleAttribution\",\"_updateEditLink\",\"_updateData\",\"_updateCompact\"],this)};en.prototype.getDefaultPosition=function(){return\"bottom-right\"},en.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-attrib\"),this._compactButton=o.create(\"button\",\"mapboxgl-ctrl-attrib-button\",this._container),this._compactButton.addEventListener(\"click\",this._toggleAttribution),this._setElementTitle(this._compactButton,\"ToggleAttribution\"),this._innerContainer=o.create(\"div\",\"mapboxgl-ctrl-attrib-inner\",this._container),this._innerContainer.setAttribute(\"role\",\"list\"),J&&this._container.classList.add(\"mapboxgl-compact\"),this._updateAttributions(),this._updateEditLink(),this._map.on(\"styledata\",this._updateData),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"moveend\",this._updateEditLink),J===void 0&&(this._map.on(\"resize\",this._updateCompact),this._updateCompact()),this._container},en.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"moveend\",this._updateEditLink),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._attribHTML=void 0},en.prototype._setElementTitle=function(D,J){var q=this._map._getUIString(\"AttributionControl.\"+J);D.title=q,D.setAttribute(\"aria-label\",q)},en.prototype._toggleAttribution=function(){this._container.classList.contains(\"mapboxgl-compact-show\")?(this._container.classList.remove(\"mapboxgl-compact-show\"),this._compactButton.setAttribute(\"aria-pressed\",\"false\")):(this._container.classList.add(\"mapboxgl-compact-show\"),this._compactButton.setAttribute(\"aria-pressed\",\"true\"))},en.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(\".mapbox-improve-map\"));var J=[{key:\"owner\",value:this.styleOwner},{key:\"id\",value:this.styleId},{key:\"access_token\",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var q=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+\"=\"+de.value+(ne<J.length-1?\"&\":\"\")),K},\"?\");D.href=i.config.FEEDBACK_URL+\"/\"+q+(this._map._hash?this._map._hash.getHashString(!0):\"\"),D.rel=\"noopener nofollow\",this._setElementTitle(D,\"MapFeedback\")}},en.prototype._updateData=function(D){D&&(D.sourceDataType===\"metadata\"||D.sourceDataType===\"visibility\"||D.dataType===\"style\")&&(this._updateAttributions(),this._updateEditLink())},en.prototype._updateAttributions=function(){if(this._map.style){var D=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?D=D.concat(this.options.customAttribution.map(function(Ue){return typeof Ue!=\"string\"?\"\":Ue})):typeof this.options.customAttribution==\"string\"&&D.push(this.options.customAttribution)),this._map.style.stylesheet){var J=this._map.style.stylesheet;this.styleOwner=J.owner,this.styleId=J.id}var q=this._map.style.sourceCaches;for(var K in q){var de=q[K];if(de.used){var ne=de.getSource();ne.attribution&&D.indexOf(ne.attribution)<0&&D.push(ne.attribution)}}D.sort(function(Ue,ft){return Ue.length-ft.length}),D=D.filter(function(Ue,ft){for(var Zt=ft+1;Zt<D.length;Zt++)if(D[Zt].indexOf(Ue)>=0)return!1;return!0});var we=D.join(\" | \");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove(\"mapboxgl-attrib-empty\")):this._container.classList.add(\"mapboxgl-attrib-empty\"),this._editLink=null)}},en.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add(\"mapboxgl-compact\"):this._container.classList.remove(\"mapboxgl-compact\",\"mapboxgl-compact-show\")};var Wi=function(){i.bindAll([\"_updateLogo\"],this),i.bindAll([\"_updateCompact\"],this)};Wi.prototype.onAdd=function(D){this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl\");var J=o.create(\"a\",\"mapboxgl-ctrl-logo\");return J.target=\"_blank\",J.rel=\"noopener nofollow\",J.href=\"https://www.mapbox.com/\",J.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),J.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(J),this._container.style.display=\"none\",this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container},Wi.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"sourcedata\",this._updateLogo),this._map.off(\"resize\",this._updateCompact)},Wi.prototype.getDefaultPosition=function(){return\"bottom-left\"},Wi.prototype._updateLogo=function(D){(!D||D.sourceDataType===\"metadata\")&&(this._container.style.display=this._logoRequired()?\"block\":\"none\")},Wi.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var q=D[J].getSource();if(q.mapbox_logo)return!0}return!1}},Wi.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add(\"mapboxgl-compact\"):J.classList.remove(\"mapboxgl-compact\")}};var si=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};si.prototype.add=function(D){var J=++this._id,q=this._queue;return q.push({callback:D,id:J,cancelled:!1}),J},si.prototype.remove=function(D){for(var J=this._currentlyRunning,q=J?this._queue.concat(J):this._queue,K=0,de=q;K<de.length;K+=1){var ne=de[K];if(ne.id===D){ne.cancelled=!0;return}}},si.prototype.run=function(D){D===void 0&&(D=0);var J=this._currentlyRunning=this._queue;this._queue=[];for(var q=0,K=J;q<K.length;q+=1){var de=K[q];if(!de.cancelled&&(de.callback(D),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},si.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Mr={\"AttributionControl.ToggleAttribution\":\"Toggle attribution\",\"AttributionControl.MapFeedback\":\"Map feedback\",\"FullscreenControl.Enter\":\"Enter fullscreen\",\"FullscreenControl.Exit\":\"Exit fullscreen\",\"GeolocateControl.FindMyLocation\":\"Find my location\",\"GeolocateControl.LocationNotAvailable\":\"Location not available\",\"LogoControl.Title\":\"Mapbox logo\",\"NavigationControl.ResetBearing\":\"Reset bearing to north\",\"NavigationControl.ZoomIn\":\"Zoom in\",\"NavigationControl.ZoomOut\":\"Zoom out\",\"ScaleControl.Feet\":\"ft\",\"ScaleControl.Meters\":\"m\",\"ScaleControl.Kilometers\":\"km\",\"ScaleControl.Miles\":\"mi\",\"ScaleControl.NauticalMiles\":\"nm\"},Yr=i.window.HTMLImageElement,xi=i.window.HTMLElement,Ri=i.window.ImageBitmap,ci=-2,an=22,Zi=0,Bn=60,hi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ci,maxZoom:an,minPitch:Zi,maxPitch:Bn,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:\"sans-serif\",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},li=function(Y){function D(q){var K=this;if(q=i.extend({},hi,q),q.minZoom!=null&&q.maxZoom!=null&&q.minZoom>q.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(q.minPitch!=null&&q.minPitch<Zi)throw new Error(\"minPitch must be greater than or equal to \"+Zi);if(q.maxPitch!=null&&q.maxPitch>Bn)throw new Error(\"maxPitch must be less than or equal to \"+Bn);var de=new wo(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies);if(Y.call(this,de,q),this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=q.preserveDrawingBuffer,this._antialias=q.antialias,this._trackResize=q.trackResize,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=q.collectResourceTiming,this._renderTaskQueue=new si,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Mr,q.locale),this._clickTolerance=q.clickTolerance,this._requestManager=new i.RequestManager(q.transformRequest,q.accessToken),typeof q.container==\"string\"){if(this._container=i.window.document.getElementById(q.container),!this._container)throw new Error(\"Container '\"+q.container+\"' not found.\")}else if(q.container instanceof xi)this._container=q.container;else throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");if(q.maxBounds&&this.setMaxBounds(q.maxBounds),i.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_onMapScroll\",\"_contextLost\",\"_contextRestored\"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error(\"Failed to initialize WebGL.\");this.on(\"move\",function(){return K._update(!1)}),this.on(\"moveend\",function(){return K._update(!1)}),this.on(\"zoom\",function(){return K._update(!0)}),typeof i.window!=\"undefined\"&&(i.window.addEventListener(\"online\",this._onWindowOnline,!1),i.window.addEventListener(\"resize\",this._onWindowResize,!1),i.window.addEventListener(\"orientationchange\",this._onWindowResize,!1)),this.handlers=new Ei(this,q);var ne=typeof q.hash==\"string\"&&q.hash||void 0;this._hash=q.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}),q.bounds&&(this.resize(),this.fitBounds(q.bounds,i.extend({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new en({customAttribution:q.customAttribution})),this.addControl(new Wi,q.logoPosition),this.on(\"style.load\",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on(\"data\",function(we){K._update(we.dataType===\"style\"),K.fire(new i.Event(we.dataType+\"data\",we))}),this.on(\"dataloading\",function(we){K.fire(new i.Event(we.dataType+\"dataloading\",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de=\"top-right\"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));var ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf(\"bottom\")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Ue=!this._moving;return Ue&&(this.stop(),this.fire(new i.Event(\"movestart\",K)).fire(new i.Event(\"move\",K))),this.fire(new i.Event(\"resize\",K)),Ue&&this.fire(new i.Event(\"moveend\",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ci:K,K>=ci&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()<K&&this.setZoom(K),this;throw new Error(\"minZoom must be between \"+ci+\" and the current maxZoom, inclusive\")},D.prototype.getMinZoom=function(){return this.transform.minZoom},D.prototype.setMaxZoom=function(K){if(K=K==null?an:K,K>=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Zi:K,K<Zi)throw new Error(\"minPitch must be greater than or equal to \"+Zi);if(K>=Zi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()<K&&this.setPitch(K),this;throw new Error(\"minPitch must be between \"+Zi+\" and the current maxPitch, inclusive\")},D.prototype.getMinPitch=function(){return this.transform.minPitch},D.prototype.setMaxPitch=function(K){if(K=K==null?Bn:K,K>Bn)throw new Error(\"maxPitch must be less than or equal to \"+Bn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error(\"maxPitch must be greater than the current minPitch\")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Ue;if(K===\"mouseenter\"||K===\"mouseover\"){var ft=!1,Zt=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?ft||(ft=!0,ne.call(we,new se(K,we,Ct.originalEvent,{features:Ot}))):ft=!1},hr=function(){ft=!1};return{layer:de,listener:ne,delegates:{mousemove:Zt,mouseout:hr}}}else if(K===\"mouseleave\"||K===\"mouseout\"){var qt=!1,Ve=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?qt=!0:qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))},Qe=function(Ct){qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ve,mouseout:Qe}}}else{var at=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length&&(Ct.features=Ot,ne.call(we,Ct),delete Ct.features)};return{layer:de,listener:ne,delegates:(Ue={},Ue[K]=at,Ue)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Ue in we.delegates)this.on(Ue,we.delegates[Ue]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Ue in we.delegates)this.once(Ue,we.delegates[Ue]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Ue=function(ft){for(var Zt=ft[K],hr=0;hr<Zt.length;hr++){var qt=Zt[hr];if(qt.layer===de&&qt.listener===ne){for(var Ve in qt.delegates)we.off(Ve,qt.delegates[Ve]);return Zt.splice(hr,1),we}}};return this._delegatedListeners&&this._delegatedListeners[K]&&Ue(this._delegatedListeners),this},D.prototype.queryRenderedFeatures=function(K,de){if(!this.style)return[];de===void 0&&K!==void 0&&!(K instanceof i.Point)&&!Array.isArray(K)&&(de=K,K=void 0),de=de||{},K=K||[[0,0],[this.transform.width,this.transform.height]];var ne;if(K instanceof i.Point||typeof K[0]==\"number\")ne=[i.Point.convert(K)];else{var we=i.Point.convert(K[0]),Ue=i.Point.convert(K[1]);ne=[we,new i.Point(Ue.x,we.y),Ue,new i.Point(we.x,Ue.y),we]}return this.style.queryRenderedFeatures(ne,de,this.transform)},D.prototype.querySourceFeatures=function(K,de){return this.style.querySourceFeatures(K,de)},D.prototype.setStyle=function(K,de){return de=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},de),de.diff!==!1&&de.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&K?(this._diffStyle(K,de),this):(this._localIdeographFontFamily=de.localIdeographFontFamily,this._updateStyle(K,de))},D.prototype._getUIString=function(K){var de=this._locale[K];if(de==null)throw new Error(\"Missing UI string '\"+K+\"'\");return de},D.prototype._updateStyle=function(K,de){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),K)this.style=new yu(this,de||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof K==\"string\"?this.style.loadURL(K):this.style.loadJSON(K),this},D.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new yu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},D.prototype._diffStyle=function(K,de){var ne=this;if(typeof K==\"string\"){var we=this._requestManager.normalizeStyleURL(K),Ue=this._requestManager.transformRequest(we,i.ResourceType.Style);i.getJSON(Ue,function(ft,Zt){ft?ne.fire(new i.ErrorEvent(ft)):Zt&&ne._updateDiff(Zt,de)})}else typeof K==\"object\"&&this._updateDiff(K,de)},D.prototype._updateDiff=function(K,de){try{this.style.setState(K)&&this._update(!0)}catch(ne){i.warnOnce(\"Unable to perform style diff: \"+(ne.message||ne.error||ne)+\".  Rebuilding the style from scratch.\"),this._updateStyle(K,de)}},D.prototype.getStyle=function(){if(this.style)return this.style.serialize()},D.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce(\"There is no style added to the map.\")},D.prototype.addSource=function(K,de){return this._lazyInitEmptyStyle(),this.style.addSource(K,de),this._update(!0)},D.prototype.isSourceLoaded=function(K){var de=this.style&&this.style.sourceCaches[K];if(de===void 0){this.fire(new i.ErrorEvent(new Error(\"There is no source with ID '\"+K+\"'\")));return}return de.loaded()},D.prototype.areTilesLoaded=function(){var K=this.style&&this.style.sourceCaches;for(var de in K){var ne=K[de],we=ne._tiles;for(var Ue in we){var ft=we[Ue];if(!(ft.state===\"loaded\"||ft.state===\"errored\"))return!1}}return!0},D.prototype.addSourceType=function(K,de,ne){return this._lazyInitEmptyStyle(),this.style.addSourceType(K,de,ne)},D.prototype.removeSource=function(K){return this.style.removeSource(K),this._update(!0)},D.prototype.getSource=function(K){return this.style.getSource(K)},D.prototype.addImage=function(K,de,ne){ne===void 0&&(ne={});var we=ne.pixelRatio;we===void 0&&(we=1);var Ue=ne.sdf;Ue===void 0&&(Ue=!1);var ft=ne.stretchX,Zt=ne.stretchY,hr=ne.content;this._lazyInitEmptyStyle();var qt=0;if(de instanceof Yr||Ri&&de instanceof Ri){var Ve=i.browser.getImageData(de),Qe=Ve.width,at=Ve.height,Ct=Ve.data;this.style.addImage(K,{data:new i.RGBAImage({width:Qe,height:at},Ct),pixelRatio:we,stretchX:ft,stretchY:Zt,content:hr,sdf:Ue,version:qt})}else{if(de.width===void 0||de.height===void 0)return this.fire(new i.ErrorEvent(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));var Ot=de.width,Rt=de.height,Bt=de.data,Dt=de;this.style.addImage(K,{data:new i.RGBAImage({width:Ot,height:Rt},new Uint8Array(Bt)),pixelRatio:we,stretchX:ft,stretchY:Zt,content:hr,sdf:Ue,version:qt,userImage:Dt}),Dt.onAdd&&Dt.onAdd(this,K)}},D.prototype.updateImage=function(K,de){var ne=this.style.getImage(K);if(!ne)return this.fire(new i.ErrorEvent(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));var we=de instanceof Yr||Ri&&de instanceof Ri?i.browser.getImageData(de):de,Ue=we.width,ft=we.height,Zt=we.data;if(Ue===void 0||ft===void 0)return this.fire(new i.ErrorEvent(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));if(Ue!==ne.data.width||ft!==ne.data.height)return this.fire(new i.ErrorEvent(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));var hr=!(de instanceof Yr||Ri&&de instanceof Ri);ne.data.replace(Zt,hr),this.style.updateImage(K,ne)},D.prototype.hasImage=function(K){return K?!!this.style.getImage(K):(this.fire(new i.ErrorEvent(new Error(\"Missing required image id\"))),!1)},D.prototype.removeImage=function(K){this.style.removeImage(K)},D.prototype.loadImage=function(K,de){i.getImage(this._requestManager.transformRequest(K,i.ResourceType.Image),de)},D.prototype.listImages=function(){return this.style.listImages()},D.prototype.addLayer=function(K,de){return this._lazyInitEmptyStyle(),this.style.addLayer(K,de),this._update(!0)},D.prototype.moveLayer=function(K,de){return this.style.moveLayer(K,de),this._update(!0)},D.prototype.removeLayer=function(K){return this.style.removeLayer(K),this._update(!0)},D.prototype.getLayer=function(K){return this.style.getLayer(K)},D.prototype.setLayerZoomRange=function(K,de,ne){return this.style.setLayerZoomRange(K,de,ne),this._update(!0)},D.prototype.setFilter=function(K,de,ne){return ne===void 0&&(ne={}),this.style.setFilter(K,de,ne),this._update(!0)},D.prototype.getFilter=function(K){return this.style.getFilter(K)},D.prototype.setPaintProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setPaintProperty(K,de,ne,we),this._update(!0)},D.prototype.getPaintProperty=function(K,de){return this.style.getPaintProperty(K,de)},D.prototype.setLayoutProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setLayoutProperty(K,de,ne,we),this._update(!0)},D.prototype.getLayoutProperty=function(K,de){return this.style.getLayoutProperty(K,de)},D.prototype.setLight=function(K,de){return de===void 0&&(de={}),this._lazyInitEmptyStyle(),this.style.setLight(K,de),this._update(!0)},D.prototype.getLight=function(){return this.style.getLight()},D.prototype.setFeatureState=function(K,de){return this.style.setFeatureState(K,de),this._update()},D.prototype.removeFeatureState=function(K,de){return this.style.removeFeatureState(K,de),this._update()},D.prototype.getFeatureState=function(K){return this.style.getFeatureState(K)},D.prototype.getContainer=function(){return this._container},D.prototype.getCanvasContainer=function(){return this._canvasContainer},D.prototype.getCanvas=function(){return this._canvas},D.prototype._containerDimensions=function(){var K=0,de=0;return this._container&&(K=this._container.clientWidth||400,de=this._container.clientHeight||300),[K,de]},D.prototype._detectMissingCSS=function(){var K=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue(\"background-color\");K!==\"rgb(250, 128, 114)\"&&i.warnOnce(\"This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.\")},D.prototype._setupContainer=function(){var K=this._container;K.classList.add(\"mapboxgl-map\");var de=this._missingCSSCanary=o.create(\"div\",\"mapboxgl-canary\",K);de.style.visibility=\"hidden\",this._detectMissingCSS();var ne=this._canvasContainer=o.create(\"div\",\"mapboxgl-canvas-container\",K);this._interactive&&ne.classList.add(\"mapboxgl-interactive\"),this._canvas=o.create(\"canvas\",\"mapboxgl-canvas\",ne),this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",\"0\"),this._canvas.setAttribute(\"aria-label\",\"Map\"),this._canvas.setAttribute(\"role\",\"region\");var we=this._containerDimensions();this._resizeCanvas(we[0],we[1]);var Ue=this._controlContainer=o.create(\"div\",\"mapboxgl-control-container\",K),ft=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(Zt){ft[Zt]=o.create(\"div\",\"mapboxgl-ctrl-\"+Zt,Ue)}),this._container.addEventListener(\"scroll\",this._onMapScroll,!1)},D.prototype._resizeCanvas=function(K,de){var ne=i.browser.devicePixelRatio||1;this._canvas.width=ne*K,this._canvas.height=ne*de,this._canvas.style.width=K+\"px\",this._canvas.style.height=de+\"px\"},D.prototype._setupPainter=function(){var K=i.extend({},a.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),de=this._canvas.getContext(\"webgl\",K)||this._canvas.getContext(\"experimental-webgl\",K);if(!de){this.fire(new i.ErrorEvent(new Error(\"Failed to initialize WebGL\")));return}this.painter=new mo(de,this.transform),i.webpSupported.testSupport(de)},D.prototype._contextLost=function(K){K.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event(\"webglcontextlost\",{originalEvent:K}))},D.prototype._contextRestored=function(K){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event(\"webglcontextrestored\",{originalEvent:K}))},D.prototype._onMapScroll=function(K){if(K.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},D.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},D.prototype._update=function(K){return this.style?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this.triggerRepaint(),this):this},D.prototype._requestRenderFrame=function(K){return this._update(),this._renderTaskQueue.add(K)},D.prototype._cancelRenderFrame=function(K){this._renderTaskQueue.remove(K)},D.prototype._render=function(K){var de=this,ne,we=0,Ue=this.painter.context.extTimerQuery;if(this.listens(\"gpu-timing-frame\")&&(ne=Ue.createQueryEXT(),Ue.beginQueryEXT(Ue.TIME_ELAPSED_EXT,ne),we=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(K),!this._removed){var ft=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Zt=this.transform.zoom,hr=i.browser.now();this.style.zoomHistory.update(Zt,hr);var qt=new i.EvaluationParameters(Zt,{now:hr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ve=qt.crossFadingFactor();(Ve!==1||Ve!==this._crossFadingFactor)&&(ft=!0,this._crossFadingFactor=Ve),this.style.update(qt)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens(\"gpu-timing-layer\")}),this.fire(new i.Event(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.Event(\"load\"))),this.style&&(this.style.hasTransitions()||ft)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens(\"gpu-timing-frame\")){var Qe=i.browser.now()-we;Ue.endQueryEXT(Ue.TIME_ELAPSED_EXT,ne),setTimeout(function(){var Ot=Ue.getQueryObjectEXT(ne,Ue.QUERY_RESULT_EXT)/1e6;Ue.deleteQueryEXT(ne),de.fire(new i.Event(\"gpu-timing-frame\",{cpuTime:Qe,gpuTime:Ot}))},50)}if(this.listens(\"gpu-timing-layer\")){var at=this.painter.collectGpuTimers();setTimeout(function(){var Ot=de.painter.queryGpuTimers(at);de.fire(new i.Event(\"gpu-timing-layer\",{layerTimes:Ot}))},50)}var Ct=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ct||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.Event(\"idle\")),this._loaded&&!this._fullyLoaded&&!Ct&&(this._fullyLoaded=!0),this}},D.prototype.remove=function(){this._hash&&this._hash.remove();for(var K=0,de=this._controls;K<de.length;K+=1){var ne=de[K];ne.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof i.window!=\"undefined\"&&(i.window.removeEventListener(\"resize\",this._onWindowResize,!1),i.window.removeEventListener(\"orientationchange\",this._onWindowResize,!1),i.window.removeEventListener(\"online\",this._onWindowOnline,!1));var we=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");we&&we.loseContext&&we.loseContext(),mn(this._canvasContainer),mn(this._controlContainer),mn(this._missingCSSCanary),this._container.classList.remove(\"mapboxgl-map\"),this._removed=!0,this.fire(new i.Event(\"remove\"))},D.prototype.triggerRepaint=function(){var K=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(de){K._frame=null,K._render(de)}))},D.prototype._onWindowOnline=function(){this._update()},D.prototype._onWindowResize=function(K){this._trackResize&&this.resize({originalEvent:K})._update()},J.showTileBoundaries.get=function(){return!!this._showTileBoundaries},J.showTileBoundaries.set=function(q){this._showTileBoundaries!==q&&(this._showTileBoundaries=q,this._update())},J.showPadding.get=function(){return!!this._showPadding},J.showPadding.set=function(q){this._showPadding!==q&&(this._showPadding=q,this._update())},J.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},J.showCollisionBoxes.set=function(q){this._showCollisionBoxes!==q&&(this._showCollisionBoxes=q,q?this.style._generateCollisionBoxes():this._update())},J.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},J.showOverdrawInspector.set=function(q){this._showOverdrawInspector!==q&&(this._showOverdrawInspector=q,this._update())},J.repaint.get=function(){return!!this._repaint},J.repaint.set=function(q){this._repaint!==q&&(this._repaint=q,this.triggerRepaint())},J.vertices.get=function(){return!!this._vertices},J.vertices.set=function(q){this._vertices=q,this._update()},D.prototype._setCacheLimits=function(K,de){i.setCacheLimits(K,de)},J.version.get=function(){return i.version},Object.defineProperties(D.prototype,J),D}(Hn);function mn(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}var Ji={showCompass:!0,showZoom:!0,visualizePitch:!1},Vi=function(D){var J=this;this.options=i.extend({},Ji,D),this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",function(q){return q.preventDefault()}),this.options.showZoom&&(i.bindAll([\"_setButtonTitle\",\"_updateZoomButtons\"],this),this._zoomInButton=this._createButton(\"mapboxgl-ctrl-zoom-in\",function(q){return J._map.zoomIn({},{originalEvent:q})}),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomInButton).setAttribute(\"aria-hidden\",!0),this._zoomOutButton=this._createButton(\"mapboxgl-ctrl-zoom-out\",function(q){return J._map.zoomOut({},{originalEvent:q})}),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._zoomOutButton).setAttribute(\"aria-hidden\",!0)),this.options.showCompass&&(i.bindAll([\"_rotateCompassArrow\"],this),this._compass=this._createButton(\"mapboxgl-ctrl-compass\",function(q){J.options.visualizePitch?J._map.resetNorthPitch({},{originalEvent:q}):J._map.resetNorth({},{originalEvent:q})}),this._compassIcon=o.create(\"span\",\"mapboxgl-ctrl-icon\",this._compass),this._compassIcon.setAttribute(\"aria-hidden\",!0))};Vi.prototype._updateZoomButtons=function(){var D=this._map.getZoom(),J=D===this._map.getMaxZoom(),q=D===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=q,this._zoomInButton.setAttribute(\"aria-disabled\",J.toString()),this._zoomOutButton.setAttribute(\"aria-disabled\",q.toString())},Vi.prototype._rotateCompassArrow=function(){var D=this.options.visualizePitch?\"scale(\"+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+\") rotateX(\"+this._map.transform.pitch+\"deg) rotateZ(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\":\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassIcon.style.transform=D},Vi.prototype.onAdd=function(D){return this._map=D,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,\"ZoomIn\"),this._setButtonTitle(this._zoomOutButton,\"ZoomOut\"),this._map.on(\"zoom\",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,\"ResetBearing\"),this.options.visualizePitch&&this._map.on(\"pitch\",this._rotateCompassArrow),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ni(this._map,this._compass,this.options.visualizePitch)),this._container},Vi.prototype.onRemove=function(){o.remove(this._container),this.options.showZoom&&this._map.off(\"zoom\",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(\"pitch\",this._rotateCompassArrow),this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Vi.prototype._createButton=function(D,J){var q=o.create(\"button\",D,this._container);return q.type=\"button\",q.addEventListener(\"click\",J),q},Vi.prototype._setButtonTitle=function(D,J){var q=this._map._getUIString(\"NavigationControl.\"+J);D.title=q,D.setAttribute(\"aria-label\",q)};var Ni=function(D,J,q){q===void 0&&(q=!1),this._clickTolerance=10,this.element=J,this.mouseRotate=new Ln({clickTolerance:D.dragRotate._mouseRotate._clickTolerance}),this.map=D,q&&(this.mousePitch=new En({clickTolerance:D.dragRotate._mousePitch._clickTolerance})),i.bindAll([\"mousedown\",\"mousemove\",\"mouseup\",\"touchstart\",\"touchmove\",\"touchend\",\"reset\"],this),o.addEventListener(J,\"mousedown\",this.mousedown),o.addEventListener(J,\"touchstart\",this.touchstart,{passive:!1}),o.addEventListener(J,\"touchmove\",this.touchmove),o.addEventListener(J,\"touchend\",this.touchend),o.addEventListener(J,\"touchcancel\",this.reset)};Ni.prototype.down=function(D,J){this.mouseRotate.mousedown(D,J),this.mousePitch&&this.mousePitch.mousedown(D,J),o.disableDrag()},Ni.prototype.move=function(D,J){var q=this.map,K=this.mouseRotate.mousemoveWindow(D,J);if(K&&K.bearingDelta&&q.setBearing(q.getBearing()+K.bearingDelta),this.mousePitch){var de=this.mousePitch.mousemoveWindow(D,J);de&&de.pitchDelta&&q.setPitch(q.getPitch()+de.pitchDelta)}},Ni.prototype.off=function(){var D=this.element;o.removeEventListener(D,\"mousedown\",this.mousedown),o.removeEventListener(D,\"touchstart\",this.touchstart,{passive:!1}),o.removeEventListener(D,\"touchmove\",this.touchmove),o.removeEventListener(D,\"touchend\",this.touchend),o.removeEventListener(D,\"touchcancel\",this.reset),this.offTemp()},Ni.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(i.window,\"mousemove\",this.mousemove),o.removeEventListener(i.window,\"mouseup\",this.mouseup)},Ni.prototype.mousedown=function(D){this.down(i.extend({},D,{ctrlKey:!0,preventDefault:function(){return D.preventDefault()}}),o.mousePos(this.element,D)),o.addEventListener(i.window,\"mousemove\",this.mousemove),o.addEventListener(i.window,\"mouseup\",this.mouseup)},Ni.prototype.mousemove=function(D){this.move(D,o.mousePos(this.element,D))},Ni.prototype.mouseup=function(D){this.mouseRotate.mouseupWindow(D),this.mousePitch&&this.mousePitch.mouseupWindow(D),this.offTemp()},Ni.prototype.touchstart=function(D){D.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.down({type:\"mousedown\",button:0,ctrlKey:!0,preventDefault:function(){return D.preventDefault()}},this._startPos))},Ni.prototype.touchmove=function(D){D.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.move({preventDefault:function(){return D.preventDefault()}},this._lastPos))},Ni.prototype.touchend=function(D){D.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ni.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function pn(Y,D,J){if(Y=new i.LngLat(Y.lng,Y.lat),D){var q=new i.LngLat(Y.lng-360,Y.lat),K=new i.LngLat(Y.lng+360,Y.lat),de=J.locationPoint(Y).distSqr(D);J.locationPoint(q).distSqr(D)<de?Y=q:J.locationPoint(K).distSqr(D)<de&&(Y=K)}for(;Math.abs(Y.lng-J.center.lng)>180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Vn={center:\"translate(-50%,-50%)\",top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"};function na(Y,D,J){var q=Y.classList;for(var K in Vn)q.remove(\"mapboxgl-\"+J+\"-anchor-\"+K);q.add(\"mapboxgl-\"+J+\"-anchor-\"+D)}var Ki=function(Y){function D(J,q){if(Y.call(this),(J instanceof i.window.HTMLElement||q)&&(J=i.extend({element:J},q)),i.bindAll([\"_update\",\"_onMove\",\"_onUp\",\"_addDragHandler\",\"_onMapClick\",\"_onKeyPress\"],this),this._anchor=J&&J.anchor||\"center\",this._color=J&&J.color||\"#3FB1CE\",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state=\"inactive\",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||\"auto\",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!==\"auto\"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create(\"div\"),this._element.setAttribute(\"aria-label\",\"Map marker\");var K=o.createNS(\"http://www.w3.org/2000/svg\",\"svg\"),de=41,ne=27;K.setAttributeNS(null,\"display\",\"block\"),K.setAttributeNS(null,\"height\",de+\"px\"),K.setAttributeNS(null,\"width\",ne+\"px\"),K.setAttributeNS(null,\"viewBox\",\"0 0 \"+ne+\" \"+de);var we=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");we.setAttributeNS(null,\"stroke\",\"none\"),we.setAttributeNS(null,\"stroke-width\",\"1\"),we.setAttributeNS(null,\"fill\",\"none\"),we.setAttributeNS(null,\"fill-rule\",\"evenodd\");var Ue=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ue.setAttributeNS(null,\"fill-rule\",\"nonzero\");var ft=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");ft.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),ft.setAttributeNS(null,\"fill\",\"#000000\");for(var Zt=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}],hr=0,qt=Zt;hr<qt.length;hr+=1){var Ve=qt[hr],Qe=o.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");Qe.setAttributeNS(null,\"opacity\",\"0.04\"),Qe.setAttributeNS(null,\"cx\",\"10.5\"),Qe.setAttributeNS(null,\"cy\",\"5.80029008\"),Qe.setAttributeNS(null,\"rx\",Ve.rx),Qe.setAttributeNS(null,\"ry\",Ve.ry),ft.appendChild(Qe)}var at=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");at.setAttributeNS(null,\"fill\",this._color);var Ct=o.createNS(\"http://www.w3.org/2000/svg\",\"path\");Ct.setAttributeNS(null,\"d\",\"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\"),at.appendChild(Ct);var Ot=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ot.setAttributeNS(null,\"opacity\",\"0.25\"),Ot.setAttributeNS(null,\"fill\",\"#000000\");var Rt=o.createNS(\"http://www.w3.org/2000/svg\",\"path\");Rt.setAttributeNS(null,\"d\",\"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\"),Ot.appendChild(Rt);var Bt=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Bt.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),Bt.setAttributeNS(null,\"fill\",\"#FFFFFF\");var Dt=o.createNS(\"http://www.w3.org/2000/svg\",\"g\");Dt.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");var yt=o.createNS(\"http://www.w3.org/2000/svg\",\"circle\");yt.setAttributeNS(null,\"fill\",\"#000000\"),yt.setAttributeNS(null,\"opacity\",\"0.25\"),yt.setAttributeNS(null,\"cx\",\"5.5\"),yt.setAttributeNS(null,\"cy\",\"5.5\"),yt.setAttributeNS(null,\"r\",\"5.4999962\");var Pt=o.createNS(\"http://www.w3.org/2000/svg\",\"circle\");Pt.setAttributeNS(null,\"fill\",\"#FFFFFF\"),Pt.setAttributeNS(null,\"cx\",\"5.5\"),Pt.setAttributeNS(null,\"cy\",\"5.5\"),Pt.setAttributeNS(null,\"r\",\"5.4999962\"),Dt.appendChild(yt),Dt.appendChild(Pt),Ue.appendChild(ft),Ue.appendChild(at),Ue.appendChild(Ot),Ue.appendChild(Bt),Ue.appendChild(Dt),K.appendChild(Ue),K.setAttributeNS(null,\"height\",de*this._scale+\"px\"),K.setAttributeNS(null,\"width\",ne*this._scale+\"px\"),this._element.appendChild(K),this._offset=i.Point.convert(J&&J.offset||[0,-14])}else this._element=J.element,this._offset=i.Point.convert(J&&J.offset||[0,0]);this._element.classList.add(\"mapboxgl-marker\"),this._element.addEventListener(\"dragstart\",function(ht){ht.preventDefault()}),this._element.addEventListener(\"mousedown\",function(ht){ht.preventDefault()}),na(this._element,this._anchor,\"marker\"),this._popup=null}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this.remove(),this._map=q,q.getCanvasContainer().appendChild(this._element),q.on(\"move\",this._update),q.on(\"moveend\",this._update),this.setDraggable(this._draggable),this._update(),this._map.on(\"click\",this._onMapClick),this},D.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler),this._map.off(\"mouseup\",this._onUp),this._map.off(\"touchend\",this._onUp),this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},D.prototype.getElement=function(){return this._element},D.prototype.setPopup=function(q){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(\"keypress\",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(\"tabindex\")),q){if(!(\"offset\"in q.options)){var K=38.1,de=13.5,ne=Math.sqrt(Math.pow(de,2)/2);q.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-K],\"bottom-left\":[ne,(K-de+ne)*-1],\"bottom-right\":[-ne,(K-de+ne)*-1],left:[de,(K-de)*-1],right:[-de,(K-de)*-1]}:this._offset}this._popup=q,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute(\"tabindex\"),this._originalTabIndex||this._element.setAttribute(\"tabindex\",\"0\"),this._element.addEventListener(\"keypress\",this._onKeyPress)}return this},D.prototype._onKeyPress=function(q){var K=q.code,de=q.charCode||q.keyCode;(K===\"Space\"||K===\"Enter\"||de===32||de===13)&&this.togglePopup()},D.prototype._onMapClick=function(q){var K=q.originalEvent.target,de=this._element;this._popup&&(K===de||de.contains(K))&&this.togglePopup()},D.prototype.getPopup=function(){return this._popup},D.prototype.togglePopup=function(){var q=this._popup;if(q)q.isOpen()?q.remove():q.addTo(this._map);else return this;return this},D.prototype._update=function(q){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var K=\"\";this._rotationAlignment===\"viewport\"||this._rotationAlignment===\"auto\"?K=\"rotateZ(\"+this._rotation+\"deg)\":this._rotationAlignment===\"map\"&&(K=\"rotateZ(\"+(this._rotation-this._map.getBearing())+\"deg)\");var de=\"\";this._pitchAlignment===\"viewport\"||this._pitchAlignment===\"auto\"?de=\"rotateX(0deg)\":this._pitchAlignment===\"map\"&&(de=\"rotateX(\"+this._map.getPitch()+\"deg)\"),(!q||q.type===\"moveend\")&&(this._pos=this._pos.round()),o.setTransform(this._element,Vn[this._anchor]+\" translate(\"+this._pos.x+\"px, \"+this._pos.y+\"px) \"+de+\" \"+K)}},D.prototype.getOffset=function(){return this._offset},D.prototype.setOffset=function(q){return this._offset=i.Point.convert(q),this._update(),this},D.prototype._onMove=function(q){if(!this._isDragging){var K=this._clickTolerance||this._map._clickTolerance;this._isDragging=q.point.dist(this._pointerdownPos)>=K}this._isDragging&&(this._pos=q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=\"none\",this._state===\"pending\"&&(this._state=\"active\",this.fire(new i.Event(\"dragstart\"))),this.fire(new i.Event(\"drag\")))},D.prototype._onUp=function(){this._element.style.pointerEvents=\"auto\",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),this._state===\"active\"&&this.fire(new i.Event(\"dragend\")),this._state=\"inactive\"},D.prototype._addDragHandler=function(q){this._element.contains(q.originalEvent.target)&&(q.preventDefault(),this._positionDelta=q.point.sub(this._pos).add(this._offset),this._pointerdownPos=q.point,this._state=\"pending\",this._map.on(\"mousemove\",this._onMove),this._map.on(\"touchmove\",this._onMove),this._map.once(\"mouseup\",this._onUp),this._map.once(\"touchend\",this._onUp))},D.prototype.setDraggable=function(q){return this._draggable=!!q,this._map&&(q?(this._map.on(\"mousedown\",this._addDragHandler),this._map.on(\"touchstart\",this._addDragHandler)):(this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(q){return this._rotation=q||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(q){return this._rotationAlignment=q||\"auto\",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(q){return this._pitchAlignment=q&&q!==\"auto\"?q:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),kn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ta;function oa(Y){ta!==void 0?Y(ta):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:\"geolocation\"}).then(function(D){ta=D.state!==\"denied\",Y(ta)}):(ta=!!i.window.navigator.geolocation,Y(ta))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},kn,J),i.bindAll([\"_onSuccess\",\"_onError\",\"_onZoom\",\"_finish\",\"_setupUI\",\"_updateCamera\",\"_updateMarker\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){return this._map=q,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),oa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off(\"zoom\",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(q){var K=this._map.getMaxBounds(),de=q.coords;return K&&(de.longitude<K.getWest()||de.longitude>K.getEast()||de.latitude<K.getSouth()||de.latitude>K.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\");break}},D.prototype._onSuccess=function(q){if(this._map){if(this._isOutOfMapMaxBounds(q)){this._setErrorState(),this.fire(new i.Event(\"outofmaxbounds\",q)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break}this.options.showUserLocation&&this._watchState!==\"OFF\"&&this._updateMarker(q),(!this.options.trackUserLocation||this._watchState===\"ACTIVE_LOCK\")&&this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove(\"mapboxgl-user-location-dot-stale\"),this.fire(new i.Event(\"geolocate\",q)),this._finish()}},D.prototype._updateCamera=function(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude),de=q.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(q){if(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var q=this._map._container.clientHeight/2,K=this._map.unproject([0,q]),de=this._map.unproject([1,q]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+\"px\",this._circleElement.style.height=we+\"px\"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(q){if(this._map){if(this.options.trackUserLocation)if(q.code===1){this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this._geolocateButton.disabled=!0;var K=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=K,this._geolocateButton.setAttribute(\"aria-label\",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(q.code===3&&is)return;this._setErrorState()}this._watchState!==\"OFF\"&&this.options.showUserLocation&&this._dotElement.classList.add(\"mapboxgl-user-location-dot-stale\"),this.fire(new i.Event(\"error\",q)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(q){var K=this;if(this._container.addEventListener(\"contextmenu\",function(we){return we.preventDefault()}),this._geolocateButton=o.create(\"button\",\"mapboxgl-ctrl-geolocate\",this._container),o.create(\"span\",\"mapboxgl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",!0),this._geolocateButton.type=\"button\",q===!1){i.warnOnce(\"Geolocation support is not available so the GeolocateControl will be disabled.\");var de=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute(\"aria-label\",de)}else{var ne=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.title=ne,this._geolocateButton.setAttribute(\"aria-label\",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=o.create(\"div\",\"mapboxgl-user-location-dot\"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create(\"div\",\"mapboxgl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Ki({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",function(we){var Ue=we.originalEvent&&we.originalEvent.type===\"resize\";!we.geolocateSource&&K._watchState===\"ACTIVE_LOCK\"&&!Ue&&(K._watchState=\"BACKGROUND\",K._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\"),K._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),K.fire(new i.Event(\"trackuserlocationend\")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new i.Event(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":ba--,is=!1,this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background-error\"),this.fire(new i.Event(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event(\"trackuserlocationstart\"));break}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active\");break;case\"ACTIVE_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-active-error\");break;case\"BACKGROUND\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background\");break;case\"BACKGROUND_ERROR\":this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-background-error\");break}if(this._watchState===\"OFF\"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),ba++;var q;ba>1?(q={maximumAge:6e5,timeout:0},is=!0):(q=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,q)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"mapboxgl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:\"metric\"},Ml=function(D){this.options=i.extend({},Va,D),i.bindAll([\"_onMove\",\"setUnit\"],this)};Ml.prototype.getDefaultPosition=function(){return\"bottom-left\"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",D.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var q=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([q,K]),we=de.distanceTo(ne);if(J&&J.unit===\"imperial\"){var Ue=3.2808*we;if(Ue>5280){var ft=Ue/5280;Qs(D,q,ft,Y._getUIString(\"ScaleControl.Miles\"))}else Qs(D,q,Ue,Y._getUIString(\"ScaleControl.Feet\"))}else if(J&&J.unit===\"nautical\"){var Zt=we/1852;Qs(D,q,Zt,Y._getUIString(\"ScaleControl.NauticalMiles\"))}else we>=1e3?Qs(D,q,we/1e3,Y._getUIString(\"ScaleControl.Kilometers\")):Qs(D,q,we,Y._getUIString(\"ScaleControl.Meters\"))}function Qs(Y,D,J,q){var K=Vl(J),de=K/J;Y.style.width=D*de+\"px\",Y.innerHTML=K+\"&nbsp;\"+q}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(\"\"+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce(\"Full screen control 'container' must be a DOM element.\")),i.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in i.window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in i.window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in i.window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in i.window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-group\"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display=\"none\",i.warnOnce(\"This device does not support fullscreen mode.\")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create(\"button\",\"mapboxgl-ctrl-fullscreen\",this._controlContainer);o.create(\"span\",\"mapboxgl-ctrl-icon\",D).setAttribute(\"aria-hidden\",!0),D.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"mapboxgl-ctrl-fullscreen\"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:\"\",maxWidth:\"240px\"},Ys=[\"a[href]\",\"[tabindex]:not([tabindex='-1'])\",\"[contenteditable]:not([contenteditable='false'])\",\"button:not([disabled])\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].join(\", \"),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll([\"_update\",\"_onClose\",\"remove\",\"_onMouseMove\",\"_onMouseUp\",\"_onDrag\"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this._map&&this.remove(),this._map=q,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new i.Event(\"open\")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),delete this._map),this.fire(new i.Event(\"close\")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"mapboxgl-track-pointer\")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"mapboxgl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"mapboxgl-track-pointer\")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(q){return this.setDOMContent(i.window.document.createTextNode(q))},D.prototype.setHTML=function(q){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement(\"body\"),ne;for(de.innerHTML=q;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(q){return this.options.maxWidth=q,this._update(),this},D.prototype.setDOMContent=function(q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create(\"div\",\"mapboxgl-popup-content\",this._container);return this._content.appendChild(q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(q){this._container&&this._container.classList.add(q)},D.prototype.removeClassName=function(q){this._container&&this._container.classList.remove(q)},D.prototype.setOffset=function(q){return this.options.offset=q,this._update(),this},D.prototype.toggleClassName=function(q){if(this._container)return this._container.classList.toggle(q)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.setAttribute(\"aria-label\",\"Close popup\"),this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClose))},D.prototype._onMouseUp=function(q){this._update(q.point)},D.prototype._onMouseMove=function(q){this._update(q.point)},D.prototype._onDrag=function(q){this._update(q.point)},D.prototype._update=function(q){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=o.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(\" \").forEach(function(Ve){return K._container.classList.add(Ve)}),this._trackPointer&&this._container.classList.add(\"mapboxgl-popup-track-pointer\")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!q))){var ne=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat),we=this.options.anchor,Ue=ol(this.options.offset);if(!we){var ft=this._container.offsetWidth,Zt=this._container.offsetHeight,hr;ne.y+Ue.bottom.y<Zt?hr=[\"top\"]:ne.y>this._map.transform.height-Zt?hr=[\"bottom\"]:hr=[],ne.x<ft/2?hr.push(\"left\"):ne.x>this._map.transform.width-ft/2&&hr.push(\"right\"),hr.length===0?we=\"bottom\":we=hr.join(\"-\")}var qt=ne.add(Ue[we]).round();o.setTransform(this._container,Vn[we]+\" translate(\"+qt.x+\"px,\"+qt.y+\"px)\"),na(this._container,we,\"popup\")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var q=this._container.querySelector(Ys);q&&q.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y==\"number\"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),\"top-left\":new i.Point(D,D),\"top-right\":new i.Point(-D,D),bottom:new i.Point(0,-Y),\"bottom-left\":new i.Point(D,-D),\"bottom-right\":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,\"top-left\":J,\"top-right\":J,bottom:J,\"bottom-left\":J,\"bottom-right\":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),\"top-left\":i.Point.convert(Y[\"top-left\"]||[0,0]),\"top-right\":i.Point.convert(Y[\"top-right\"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),\"bottom-left\":i.Point.convert(Y[\"bottom-left\"]||[0,0]),\"bottom-right\":i.Point.convert(Y[\"bottom-right\"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:li,NavigationControl:Vi,GeolocateControl:Zs,AttributionControl:en,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:\"\"};return io}),r})});var yGe=ye((Pxr,mGe)=>{\"use strict\";var hw=Dr(),Wjt=Zl().sanitizeHTML,Xjt=cJ(),vGe=m1();function pGe(e,t){this.subplot=e,this.uid=e.uid+\"-\"+t,this.index=t,this.idSource=\"source-\"+this.uid,this.idLayer=vGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=pGe.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=r7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType===\"image\"&&e.sourcetype===\"image\"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!r7(e)){var r=Zjt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e===\"traces\")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n==\"string\"&&n.indexOf(vGe.traceLayerPrefix)===0){e=n;break}}return e};ag.updateLayer=function(e){var t=this.subplot,r=gGe(e),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),r7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,\"source-layer\":e.sourcelayer||\"\",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};ag.updateStyle=function(e){if(r7(e)){var t=gGe(e);this.subplot.setOptions(this.idLayer,\"setLayoutProperty\",t.layout),this.subplot.setOptions(this.idLayer,\"setPaintProperty\",t.paint)}};ag.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ag.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function r7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!=\"string\"||t[r].length===0)return!1;return!0}return hw.isPlainObject(t)||typeof t==\"string\"&&t.length>0}function gGe(e){var t={},r={};switch(e.type){case\"circle\":hw.extendFlat(r,{\"circle-radius\":e.circle.radius,\"circle-color\":e.color,\"circle-opacity\":e.opacity});break;case\"line\":hw.extendFlat(r,{\"line-width\":e.line.width,\"line-color\":e.color,\"line-opacity\":e.opacity,\"line-dasharray\":e.line.dash});break;case\"fill\":hw.extendFlat(r,{\"fill-color\":e.color,\"fill-outline-color\":e.fill.outlinecolor,\"fill-opacity\":e.opacity});break;case\"symbol\":var n=e.symbol,i=Xjt(n.textposition,n.iconsize);hw.extendFlat(t,{\"icon-image\":n.icon+\"-15\",\"icon-size\":n.iconsize/10,\"text-field\":n.text,\"text-size\":n.textfont.size,\"text-anchor\":i.anchor,\"text-offset\":i.offset,\"symbol-placement\":n.placement}),hw.extendFlat(r,{\"icon-color\":e.color,\"text-color\":n.textfont.color,\"text-opacity\":e.opacity});break;case\"raster\":hw.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":e.opacity});break}return{layout:t,paint:r}}function Zjt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t===\"geojson\"?i=\"data\":t===\"vector\"?i=typeof r==\"string\"?\"url\":\"tiles\":t===\"raster\"?(i=\"tiles\",n.tileSize=256):t===\"image\"&&(i=\"url\",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=Wjt(e.sourceattribution)),n}mGe.exports=function(t,r,n){var i=new pGe(t,r);return i.update(n),i}});var EGe=ye((Ixr,MGe)=>{\"use strict\";var mJ=gJ(),yJ=Dr(),wGe=hx(),_Ge=qa(),Yjt=ho(),Kjt=yv(),i7=vf(),TGe=Cg(),Jjt=TGe.drawMode,$jt=TGe.selectMode,Qjt=Of().prepSelect,eWt=Of().clearOutline,tWt=Of().clearSelectionsCache,rWt=Of().selectOnClick,kx=m1(),iWt=yGe();function AGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+\"-\"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=AGe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=SGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new mJ.Map({container:i.div,style:o.style,center:_J(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new mJ.AttributionControl({compact:!0}));u._canvas.style.left=\"0px\",u._canvas.style.top=\"0px\",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once(\"load\",f)})),c=c.concat(wGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=SGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once(\"styledata\",u)}))),s=s.concat(wGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below==\"string\"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===\"\"&&(s=!0),o[\"trace-\"+l.uid]=a||\"\"}for(i=0;i<n.length;i++){var c=n[i];typeof c.below==\"string\"?a=c.below:s?a=\"traces\":a=\"\",o[\"layout-\"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf(\"trace-\")===0?(d=h.split(\"trace-\")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf(\"layout-\")===0&&(d=h.split(\"layout-\")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var xGe={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};Gh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return xGe[f[0].trace.type]-xGe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Gh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(_J(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()};Gh.resolveOnRender=function(e){var t=this.map;t.on(\"render\",function r(){t.loaded()&&(t.off(\"render\",r),setTimeout(e,10))})};Gh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(kx.mapOnErrorMsg))}t.once(\"error\",r),t.once(\"style.error\",r),t.once(\"source.error\",r),t.once(\"tile.error\",r),t.once(\"layer.error\",r)};Gh.createFramework=function(e){var t=this,r=t.div=document.createElement(\"div\");r.id=t.uid,r.style.position=\"absolute\",t.container.appendChild(r),t.xaxis={_id:\"x\",c2p:function(n){return t.project(n).x}},t.yaxis={_id:\"y\",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},Yjt.setConvert(t.mockAxis,e)};Gh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on(\"moveend\",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];_Ge.call(\"_storeDirectGUIEdit\",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type===\"mouseup\"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l._rehover&&l._rehover()}}),i.on(\"wheel\",function(){r.wheeling=!0}),i.on(\"mousemove\",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&i7.hover(n,s,r.id)},i7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){i7.loneUnhover(t._hoverlayer)}i.on(\"dragstart\",function(){r.dragging=!0,a()}),i.on(\"zoomstart\",a),i.on(\"mouseout\",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit(\"plotly_relayouting\",r.getViewEditsWithDerived(s))}i.on(\"drag\",o),i.on(\"zoom\",o),i.on(\"dblclick\",function(){var s=n._fullLayout[r.id];_Ge.call(\"_storeDirectGUIEdit\",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(_J(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit(\"plotly_doubleclick\",null),n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){tWt(r.dragOptions),eWt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf(\"select\")>-1&&rWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf(\"event\")>-1&&i7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=yJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off(\"click\",t.onClickInPanHandler),$jt(a)||Jjt(a)?(r.dragPan.disable(),r.on(\"zoomstart\",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){Qjt(l,u,c,t.dragOptions,a)},Kjt.init(t.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener(\"touchstart\",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on(\"click\",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+\"px\",n.height=r.h*(t.y[1]-t.y[0])+\"px\",n.left=r.l+t.x[0]*r.w+\"px\",n.top=r.t+(1-t.y[1])*r.h+\"px\",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push(iWt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Gh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Gh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Gh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Gh.getMapLayers=function(){return this.map.getStyle().layers};Gh.addLayer=function(e,t){var r=this.map;if(typeof t==\"string\"){if(t===\"\"){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}yJ.warn([\"Trying to add layer with *below* value\",t,\"referencing a layer that does not exist\",\"or that does not yet exist.\"].join(\" \"))}r.addLayer(e)};Gh.project=function(e){return this.map.project(new mJ.LngLat(e[0],e[1]))};Gh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Gh.getViewEdits=function(e){for(var t=this.id,r=[\"center\",\"zoom\",\"bearing\",\"pitch\"],n={},i=0;i<r.length;i++){var a=r[i];n[t+\".\"+a]=e[a]}return n};Gh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+\"._derived\"]=e._derived,r};function SGe(e,t){var r={};if(yJ.isPlainObject(e))r.id=e.id,r.style=e;else if(typeof e==\"string\")if(r.id=e,kx.styleValuesMapbox.indexOf(e)!==-1)r.style=bGe(e);else if(kx.stylesNonMapbox[e]){r.style=kx.stylesNonMapbox[e];var n=r.style.sources[\"plotly-\"+e],i=n?n.tiles:void 0;i&&i[0]&&i[0].slice(-9)===\"?api_key=\"&&(i[0]+=t._mapboxAccessToken)}else r.style=e;else r.id=kx.styleValueDflt,r.style=bGe(kx.styleValueDflt);return r.transition={duration:0,delay:0},r}function bGe(e){return kx.styleUrlPrefix+e+\"-\"+kx.styleUrlSuffix}function _J(e){return[e.lon,e.lat]}MGe.exports=AGe});var LGe=ye((Rxr,CGe)=>{\"use strict\";var xJ=Dr(),nWt=O_(),aWt=Zd(),kGe=Zk();CGe.exports=function(t,r,n){nWt(t,r,n,{type:\"mapbox\",attributes:kGe,handleDefaults:oWt,partition:\"y\",accessToken:r._mapboxAccessToken})};function oWt(e,t,r,n){r(\"accesstoken\",n.accessToken),r(\"style\"),r(\"center.lon\"),r(\"center.lat\"),r(\"zoom\"),r(\"bearing\"),r(\"pitch\");var i=r(\"bounds.west\"),a=r(\"bounds.east\"),o=r(\"bounds.south\"),s=r(\"bounds.north\");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,aWt(e,t,{name:\"layers\",handleItemDefaults:sWt}),t._input=e}function sWt(e,t){function r(l,u){return xJ.coerce(e,t,kGe.layers,l,u)}var n=r(\"visible\");if(n){var i=r(\"sourcetype\"),a=i===\"raster\"||i===\"image\";r(\"source\"),r(\"sourceattribution\"),i===\"vector\"&&r(\"sourcelayer\"),i===\"image\"&&r(\"coordinates\");var o;a&&(o=\"raster\");var s=r(\"type\",o);a&&s!==\"raster\"&&(s=t.type=\"raster\",xJ.log(\"Source types *raster* and *image* must drawn *raster* layer type.\")),r(\"below\"),r(\"color\"),r(\"opacity\"),r(\"minzoom\"),r(\"maxzoom\"),s===\"circle\"&&r(\"circle.radius\"),s===\"line\"&&(r(\"line.width\"),r(\"line.dash\")),s===\"fill\"&&r(\"fill.outlinecolor\"),s===\"symbol\"&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),xJ.coerceFont(r,\"symbol.textfont\",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r(\"symbol.textposition\"),r(\"symbol.placement\"))}}});var n7=ye(Np=>{\"use strict\";var PGe=gJ(),nm=Dr(),bJ=nm.strTranslate,lWt=nm.strScale,uWt=Id().getSubplotCalcData,cWt=Wp(),fWt=Oa(),IGe=So(),hWt=Zl(),dWt=EGe(),Cx=\"mapbox\",oy=Np.constants=m1();Np.name=Cx;Np.attr=\"subplot\";Np.idRoot=Cx;Np.idRegex=Np.attrRegex=nm.counterRegex(Cx);var vWt=[\"mapbox subplots and traces are deprecated!\",\"Please consider switching to `map` subplots and traces.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");Np.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}};Np.layoutAttributes=Zk();Np.supplyLayoutDefaults=LGe();var RGe=!0;Np.plot=function(t){RGe&&(RGe=!1,nm.warn(vWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Cx];if(PGe.version!==oy.requiredVersion)throw new Error(oy.wrongVersionErrorMsg);var a=pWt(t,i);PGe.accessToken=a;for(var o=0;o<i.length;o++){var s=i[o],l=uWt(n,Cx,s),u=r[s],c=u._subplot;c||(c=new dWt(t,s),r[s]._subplot=c),c.viewInitial||(c.viewInitial={center:nm.extendFlat({},u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),c.plot(l,r,t._promises)}};Np.clean=function(e,t,r,n){for(var i=n._subplots[Cx]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};Np.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:cWt.svg,\"xlink:href\":l,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:\"none\"});var c=fWt.select(a._subplot.div),f=c.select(\".mapboxgl-ctrl-logo\").node().offsetParent===null;if(!f){var h=t._glimages.append(\"g\");h.attr(\"transform\",bJ(n.l+n.w*o.x[0]+10,n.t+n.h*(1-o.y[0])-31)),h.append(\"path\").attr(\"d\",oy.mapboxLogo.path0).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"}),h.append(\"path\").attr(\"d\",oy.mapboxLogo.path1).style(\"opacity\",.35).style(\"enable-background\",\"new\"),h.append(\"path\").attr(\"d\",oy.mapboxLogo.path2).style(\"opacity\",.35).style(\"enable-background\",\"new\"),h.append(\"polygon\").attr(\"points\",oy.mapboxLogo.polygon).style({opacity:.9,fill:\"#ffffff\",\"enable-background\":\"new\"})}var d=c.select(\".mapboxgl-ctrl-attrib\").text().replace(\"Improve this map\",\"\"),v=t._glimages.append(\"g\"),_=v.append(\"text\");_.text(d).classed(\"static-attribution\",!0).attr({\"font-size\":12,\"font-family\":\"Arial\",color:\"rgba(0, 0, 0, 0.75)\",\"text-anchor\":\"end\",\"data-unformatted\":d});var b=IGe.bBox(_.node()),p=n.w*(o.x[1]-o.x[0]);if(b.width>p/2){var k=d.split(\"|\").join(\"<br>\");_.text(k).attr(\"data-unformatted\",k).call(hWt.convertToTspans,e),b=IGe.bBox(_.node())}_.attr(\"transform\",bJ(-3,-b.height+8)),v.insert(\"rect\",\".static-attribution\").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var E=1;b.width+6>p&&(E=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr(\"transform\",bJ(T[0],T[1])+lWt(E))}};function pWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken===\"\")return\"\";for(var i=[],a=[],o=!1,s=!1,l=0;l<t.length;l++){var u=r[t[l]],c=u.accesstoken;DGe(u.style)&&(c?nm.pushUnique(i,c):(DGe(u._input.style)&&(nm.error(\"Uses Mapbox map style, but did not set an access token.\"),o=!0),s=!0)),c&&nm.pushUnique(a,c)}if(s){var f=o?oy.noAccessTokenErrorMsg:oy.missingStyleErrorMsg;throw nm.error(f),new Error(f)}return i.length?(i.length>1&&nm.warn(oy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log([\"Listed mapbox access token(s)\",a.join(\",\"),\"but did not use a Mapbox map style, ignoring token(s).\"].join(\" \")),\"\")}function DGe(e){return typeof e==\"string\"&&(oy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf(\"mapbox://\")===0||e.indexOf(\"stamen\")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var zGe=ye((zxr,FGe)=>{\"use strict\";var Fxr=[\"*scattermapbox* trace is deprecated!\",\"Please consider switching to the *scattermap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");FGe.exports={attributes:Kz(),supplyDefaults:XVe(),colorbar:$d(),formatLabels:uJ(),calc:_F(),plot:sGe(),hoverPoints:t7().hoverPoints,eventData:fGe(),selectPoints:dGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:\"trace\",name:\"scattermapbox\",basePlotModule:n7(),categories:[\"mapbox\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var qGe=ye((Oxr,OGe)=>{\"use strict\";OGe.exports=zGe()});var wJ=ye((qxr,BGe)=>{\"use strict\";var y1=a5(),gWt=Tu(),{hovertemplateAttrs:mWt,templatefallbackAttrs:yWt}=Ll(),_Wt=Gl(),Lx=Ao().extendFlat;BGe.exports=Lx({locations:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:Lx({},y1.featureidkey,{}),below:{valType:\"string\",editType:\"plot\"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Lx({},y1.marker.line.color,{editType:\"plot\"}),width:Lx({},y1.marker.line.width,{editType:\"plot\"}),editType:\"calc\"},opacity:Lx({},y1.marker.opacity,{editType:\"plot\"}),editType:\"calc\"},selected:{marker:{opacity:Lx({},y1.selected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:Lx({},y1.unselected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},hoverinfo:y1.hoverinfo,hovertemplate:mWt({},{keys:[\"properties\"]}),hovertemplatefallback:yWt(),showlegend:Lx({},_Wt.showlegend,{dflt:!1})},gWt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var UGe=ye((Bxr,NGe)=>{\"use strict\";var $k=Dr(),xWt=td(),bWt=wJ();NGe.exports=function(t,r,n,i){function a(c,f){return $k.coerce(t,r,bWt,c,f)}var o=a(\"locations\"),s=a(\"z\"),l=a(\"geojson\");if(!$k.isArrayOrTypedArray(o)||!o.length||!$k.isArrayOrTypedArray(s)||!s.length||!(typeof l==\"string\"&&l!==\"\"||$k.isPlainObject(l))){r.visible=!1;return}a(\"featureidkey\"),r._length=Math.min(o.length,s.length),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var u=a(\"marker.line.width\");u&&a(\"marker.line.color\"),a(\"marker.opacity\"),xWt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),$k.coerceSelectionMarkerOpacity(r,a)}});var TJ=ye((Nxr,HGe)=>{\"use strict\";var wWt=Eo(),_1=Dr(),TWt=tc(),AWt=So(),SWt=cx().makeBlank,VGe=hx();function MWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:\"none\"},paint:{}},i={layout:{visibility:\"none\"},paint:{}},a=t._opts={fill:n,line:i,geojson:SWt()};if(!r)return a;var o=VGe.extractTraceFeature(e);if(!o)return a;var s=TWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return wWt(E)?+_1.constrain(E,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var v=e[d],_=v.fOut;if(_){var b=_.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=VGe.feature2polygons(_)}}var p=c?{type:\"identity\",property:\"mo\"}:l.opacity;return _1.extendFlat(n.paint,{\"fill-color\":{type:\"identity\",property:\"fc\"},\"fill-opacity\":p}),_1.extendFlat(i.paint,{\"line-color\":f?{type:\"identity\",property:\"mlc\"}:u.color,\"line-width\":h?{type:\"identity\",property:\"mlw\"}:u.width,\"line-opacity\":p}),n.layout.visibility=\"visible\",i.layout.visibility=\"visible\",a.geojson={type:\"FeatureCollection\",features:o},GGe(e),a}function GGe(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=AWt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:\"identity\",property:\"mo2\"}}else n=_1.isArrayOrTypedArray(t.marker.opacity)?{type:\"identity\",property:\"mo\"}:t.marker.opacity;return _1.extendFlat(r.fill.paint,{\"fill-opacity\":n}),_1.extendFlat(r.line.paint,{\"line-opacity\":n}),r}HGe.exports={convert:MWt,convertOnSelect:GGe}});var YGe=ye((Uxr,ZGe)=>{\"use strict\";var WGe=TJ().convert,EWt=TJ().convertOnSelect,jGe=m1().traceLayerPrefix;function XGe(e,t){this.type=\"choroplethmapbox\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"fill\",jGe+t+\"-fill\"],[\"line\",jGe+t+\"-line\"]],this.below=null}var L5=XGe.prototype;L5.update=function(e){this._update(WGe(e)),e[0].trace._glTrace=this};L5.updateOnSelect=function(e){this._update(EWt(e))};L5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,\"setLayoutProperty\",l.layout),l.layout.visibility===\"visible\"&&t.setOptions(s,\"setPaintProperty\",l.paint)}};L5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};L5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};L5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};ZGe.exports=function(t,r){var n=r[0].trace,i=new XGe(t,n.uid),a=i.sourceId,o=WGe(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var JGe=ye((Gxr,KGe)=>{\"use strict\";var Vxr=[\"*choroplethmapbox* trace is deprecated!\",\"Please consider switching to the *choroplethmap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");KGe.exports={attributes:wJ(),supplyDefaults:UGe(),colorbar:D_(),calc:NF(),plot:YGe(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i==\"string\"&&i.indexOf(\"water\")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i==\"string\"&&i.indexOf(\"plotly-\")===-1)return i}}},moduleType:\"trace\",name:\"choroplethmapbox\",basePlotModule:n7(),categories:[\"mapbox\",\"gl\",\"noOpacity\",\"showLegend\"],meta:{hr_name:\"choropleth_mapbox\"}}});var QGe=ye((Hxr,$Ge)=>{\"use strict\";$Ge.exports=JGe()});var SJ=ye((jxr,tHe)=>{\"use strict\";var kWt=Tu(),{hovertemplateAttrs:CWt,templatefallbackAttrs:LWt}=Ll(),eHe=Gl(),a7=Kz(),AJ=Ao().extendFlat;tHe.exports=AJ({lon:a7.lon,lat:a7.lat,z:{valType:\"data_array\",editType:\"calc\"},radius:{valType:\"number\",editType:\"plot\",arrayOk:!0,min:1,dflt:30},below:{valType:\"string\",editType:\"plot\"},text:a7.text,hovertext:a7.hovertext,hoverinfo:AJ({},eHe.hoverinfo,{flags:[\"lon\",\"lat\",\"z\",\"text\",\"name\"]}),hovertemplate:CWt(),hovertemplatefallback:LWt(),showlegend:AJ({},eHe.showlegend,{dflt:!1})},kWt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var iHe=ye((Wxr,rHe)=>{\"use strict\";var PWt=Dr(),IWt=td(),RWt=SJ();rHe.exports=function(t,r,n,i){function a(u,c){return PWt.coerce(t,r,RWt,u,c)}var o=a(\"lon\")||[],s=a(\"lat\")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"z\"),a(\"radius\"),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),IWt(t,r,i,a,{prefix:\"\",cLetter:\"z\"})}});var oHe=ye((Xxr,aHe)=>{\"use strict\";var MJ=Eo(),DWt=Dr().isArrayOrTypedArray,EJ=fs().BADNUM,FWt=gv(),nHe=Dr()._;aHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=DWt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=MJ(u)&&MJ(c)?[+u,+c]:[EJ,EJ],o){var f=a[s];l.z=MJ(f)?f:EJ}}return FWt(t,r,{vals:o?a:[0,1],containerStr:\"\",cLetter:\"z\"}),n&&(i[0].t={labels:{lat:nHe(t,\"lat:\")+\" \",lon:nHe(t,\"lon:\")+\" \"}}),i}});var fHe=ye((Zxr,cHe)=>{\"use strict\";var zWt=Eo(),kJ=Dr(),sHe=ka(),lHe=tc(),uHe=fs().BADNUM,OWt=cx().makeBlank;cHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:\"none\"},paint:{}},a=r._opts={heatmap:i,geojson:OWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=kJ.isArrayOrTypedArray(l)&&l.length,f=kJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==uHe){var v={};if(c){var _=h.z;v.z=_!==uHe?_:0}f&&(v.r=zWt(u[s])&&u[s]>0?+u[s]:0),o.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:d},properties:v})}}var b=lHe.extractOpts(r),p=b.reversescale?lHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=sHe.opacity(k)<1?k:sHe.addOpacity(k,0),T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,E];for(s=1;s<p.length;s++)T.push(p[s][0],p[s][1]);var L=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return kJ.extendFlat(a.heatmap.paint,{\"heatmap-weight\":c?L:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":f?{type:\"identity\",property:\"r\"}:r.radius,\"heatmap-opacity\":r.opacity}),a.geojson={type:\"FeatureCollection\",features:o},a.heatmap.layout.visibility=\"visible\",a}});var pHe=ye((Yxr,vHe)=>{\"use strict\";var hHe=fHe(),qWt=m1().traceLayerPrefix;function dHe(e,t){this.type=\"densitymapbox\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"heatmap\",qWt+t+\"-heatmap\"]],this.below=null}var o7=dHe.prototype;o7.update=function(e){var t=this.subplot,r=this.layerList,n=hHe(e),i=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,\"setLayoutProperty\",u.layout),u.layout.visibility===\"visible\"&&t.setOptions(l,\"setPaintProperty\",u.paint)}};o7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};o7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};o7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};vHe.exports=function(t,r){var n=r[0].trace,i=new dHe(t,n.uid),a=i.sourceId,o=hHe(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),i}});var mHe=ye((Kxr,gHe)=>{\"use strict\";var BWt=ho(),NWt=t7().hoverPoints,UWt=t7().getExtraText;gHe.exports=function(t,r,n){var i=NWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,\"z\"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=BWt.tickText(u,u.c2l(l.z),\"hover\").text}return a.extraText=UWt(s,l,o[0].t.labels),[a]}}});var _He=ye((Jxr,yHe)=>{\"use strict\";yHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var bHe=ye((Qxr,xHe)=>{\"use strict\";var $xr=[\"*densitymapbox* trace is deprecated!\",\"Please consider switching to the *densitymap* trace type and `map` subplots.\",\"Learn more at: https://plotly.com/python/maplibre-migration/\",\"as well as https://plotly.com/javascript/maplibre-migration/\"].join(\" \");xHe.exports={attributes:SJ(),supplyDefaults:iHe(),colorbar:D_(),formatLabels:uJ(),calc:oHe(),plot:pHe(),hoverPoints:mHe(),eventData:_He(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type===\"symbol\"&&typeof a==\"string\"&&a.indexOf(\"plotly-\")===-1)return a}},moduleType:\"trace\",name:\"densitymapbox\",basePlotModule:n7(),categories:[\"mapbox\",\"gl\",\"showLegend\"],meta:{hr_name:\"density_mapbox\"}}});var THe=ye((ebr,wHe)=>{\"use strict\";wHe.exports=bHe()});var SHe=ye((tbr,AHe)=>{AHe.exports={version:8,name:\"orto\",metadata:{\"maputnik:renderer\":\"mlgljs\"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:\"viewport\",color:\"white\",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:\"raster\",tiles:[\"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\"],tileSize:256,maxzoom:18,attribution:\"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>\"},ortoInstaMaps:{type:\"raster\",tiles:[\"https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png\"],tileSize:256,maxzoom:13},ortoICGC:{type:\"raster\",tiles:[\"https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg\"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:\"vector\",url:\"https://geoserveis.icgc.cat/contextmaps/basemap.json\"}},sprite:\"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1\",glyphs:\"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf\",layers:[{id:\"background\",type:\"background\",paint:{\"background-color\":\"#F4F9F4\"}},{id:\"ortoEsri\",type:\"raster\",source:\"ortoEsri\",maxzoom:16,layout:{visibility:\"visible\"}},{id:\"ortoICGC\",type:\"raster\",source:\"ortoICGC\",minzoom:13.1,maxzoom:19,layout:{visibility:\"visible\"}},{id:\"ortoInstaMaps\",type:\"raster\",source:\"ortoInstaMaps\",maxzoom:13,layout:{visibility:\"visible\"}},{id:\"waterway_tunnel\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"waterway\",minzoom:14,filter:[\"all\",[\"in\",\"class\",\"river\",\"stream\",\"canal\"],[\"==\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,6]]},\"line-dasharray\":[2,4]}},{id:\"waterway-other\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"!in\",\"class\",\"canal\",\"river\",\"stream\"],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:\"waterway-stream-canal\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"all\",[\"in\",\"class\",\"canal\",\"stream\"],[\"!=\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:\"waterway-river\",type:\"line\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"waterway\",filter:[\"all\",[\"==\",\"class\",\"river\"],[\"!=\",\"brunnel\",\"tunnel\"]],layout:{\"line-cap\":\"round\"},paint:{\"line-color\":\"#a0c8f0\",\"line-width\":{base:1.2,stops:[[10,.8],[20,4]]},\"line-opacity\":.5}},{id:\"water-offset\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",maxzoom:8,filter:[\"==\",\"$type\",\"Polygon\"],layout:{visibility:\"visible\"},paint:{\"fill-opacity\":0,\"fill-color\":\"#a0c8f0\",\"fill-translate\":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:\"water\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",layout:{visibility:\"visible\"},paint:{\"fill-color\":\"hsl(210, 67%, 85%)\",\"fill-opacity\":0}},{id:\"water-pattern\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"water\",layout:{visibility:\"visible\"},paint:{\"fill-translate\":[0,2.5],\"fill-pattern\":\"wave\",\"fill-opacity\":1}},{id:\"landcover-ice-shelf\",type:\"fill\",metadata:{\"mapbox:group\":\"1444849382550.77\"},source:\"openmaptiles\",\"source-layer\":\"landcover\",filter:[\"==\",\"subclass\",\"ice_shelf\"],layout:{visibility:\"visible\"},paint:{\"fill-color\":\"#fff\",\"fill-opacity\":{base:1,stops:[[0,.9],[10,.3]]}}},{id:\"tunnel-service-track-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"service\",\"track\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-dasharray\":[.5,.25],\"line-width\":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:\"tunnel-minor-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"minor\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-opacity\":{stops:[[12,0],[12.5,1]]},\"line-width\":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:\"tunnel-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:\"tunnel-trunk-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.7}},{id:\"tunnel-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-dasharray\":[.5,.25],\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.5}},{id:\"tunnel-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-dasharray\":[1.5,.75],\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:\"tunnel-service-track\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"service\",\"track\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-width\":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:\"tunnel-minor\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"minor_road\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:\"tunnel-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff4c6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:\"tunnel-trunk-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fff4c6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"tunnel-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#ffdaa6\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"tunnel-railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849354174.1904\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"tunnel\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},\"line-dasharray\":[2,2]}},{id:\"ferry\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"in\",\"class\",\"ferry\"]],layout:{\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(108, 159, 182, 1)\",\"line-width\":1.1,\"line-dasharray\":[2,2]}},{id:\"aeroway-taxiway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:12,filter:[\"all\",[\"in\",\"class\",\"taxiway\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(153, 153, 153, 1)\",\"line-width\":{base:1.5,stops:[[11,2],[17,12]]},\"line-opacity\":1}},{id:\"aeroway-runway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:12,filter:[\"all\",[\"in\",\"class\",\"runway\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(153, 153, 153, 1)\",\"line-width\":{base:1.5,stops:[[11,5],[17,55]]},\"line-opacity\":1}},{id:\"aeroway-taxiway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:4,filter:[\"all\",[\"in\",\"class\",\"taxiway\"],[\"==\",\"$type\",\"LineString\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(255, 255, 255, 1)\",\"line-width\":{base:1.5,stops:[[11,1],[17,10]]},\"line-opacity\":{base:1,stops:[[11,0],[12,1]]}}},{id:\"aeroway-runway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"aeroway\",minzoom:4,filter:[\"all\",[\"in\",\"class\",\"runway\"],[\"==\",\"$type\",\"LineString\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"rgba(255, 255, 255, 1)\",\"line-width\":{base:1.5,stops:[[11,4],[17,50]]},\"line-opacity\":{base:1,stops:[[11,0],[12,1]]}}},{id:\"highway-motorway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:12,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"highway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"highway-minor-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!=\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#cfcdca\",\"line-opacity\":{stops:[[12,0],[12.5,0]]},\"line-width\":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:\"highway-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":.5,\"line-width\":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:\"highway-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":{stops:[[7,0],[8,.6]]},\"line-width\":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:\"highway-trunk-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"trunk\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":{stops:[[5,0],[6,.5]]},\"line-width\":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:\"highway-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:4,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-cap\":\"butt\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":{stops:[[4,0],[5,.5]]}}},{id:\"highway-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-dasharray\":[1.5,.75],\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:\"highway-motorway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:12,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"highway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"highway-minor\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!=\",\"brunnel\",\"tunnel\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"#fff\",\"line-opacity\":.5,\"line-width\":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:\"highway-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},\"line-opacity\":.5}},{id:\"highway-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"primary\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},\"line-opacity\":0}},{id:\"highway-trunk\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"in\",\"class\",\"trunk\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"highway-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:5,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"motorway\"]]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\",visibility:\"visible\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"railway-transit\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"transit\"],[\"!in\",\"brunnel\",\"tunnel\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.77)\",\"line-width\":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:\"railway-transit-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"transit\"],[\"!in\",\"brunnel\",\"tunnel\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.68)\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:\"railway-service\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"rail\"],[\"has\",\"service\"]]],paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.77)\",\"line-width\":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:\"railway-service-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"class\",\"rail\"],[\"has\",\"service\"]]],layout:{visibility:\"visible\"},paint:{\"line-color\":\"hsla(0, 0%, 73%, 0.68)\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:\"railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!has\",\"service\"],[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"rail\"]]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:\"railway-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849345966.4436\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"!has\",\"service\"],[\"!in\",\"brunnel\",\"bridge\",\"tunnel\"],[\"==\",\"class\",\"rail\"]]],paint:{\"line-color\":\"#bbb\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:\"bridge-motorway-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"bridge-link-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:\"bridge-secondary-tertiary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-opacity\":1,\"line-width\":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:\"bridge-trunk-primary-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(28, 76%, 67%)\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:\"bridge-motorway-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#e9ac77\",\"line-width\":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},\"line-opacity\":.5}},{id:\"bridge-path-casing\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#f8f4f0\",\"line-width\":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:\"bridge-path\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"path\"]]],paint:{\"line-color\":\"#cba\",\"line-width\":{base:1.2,stops:[[15,1.2],[20,4]]},\"line-dasharray\":[1.5,.75]}},{id:\"bridge-motorway-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"bridge-link\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary_link\",\"secondary_link\",\"tertiary_link\",\"trunk_link\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:\"bridge-secondary-tertiary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"secondary\",\"tertiary\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:\"bridge-trunk-primary\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"in\",\"class\",\"primary\",\"trunk\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fea\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:\"bridge-motorway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"motorway\"]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#fc8\",\"line-width\":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},\"line-opacity\":.5}},{id:\"bridge-railway\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-width\":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:\"bridge-railway-hatching\",type:\"line\",metadata:{\"mapbox:group\":\"1444849334699.1902\"},source:\"openmaptiles\",\"source-layer\":\"transportation\",filter:[\"all\",[\"==\",\"brunnel\",\"bridge\"],[\"==\",\"class\",\"rail\"]],paint:{\"line-color\":\"#bbb\",\"line-dasharray\":[.2,8],\"line-width\":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:\"cablecar\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"==\",\"class\",\"cable_car\"],layout:{visibility:\"visible\",\"line-cap\":\"round\"},paint:{\"line-color\":\"hsl(0, 0%, 70%)\",\"line-width\":{base:1,stops:[[11,1],[19,2.5]]}}},{id:\"cablecar-dash\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:13,filter:[\"==\",\"class\",\"cable_car\"],layout:{visibility:\"visible\",\"line-cap\":\"round\"},paint:{\"line-color\":\"hsl(0, 0%, 70%)\",\"line-width\":{base:1,stops:[[11,3],[19,5.5]]},\"line-dasharray\":[2,3]}},{id:\"boundary-land-level-4\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\">=\",\"admin_level\",4],[\"<=\",\"admin_level\",8],[\"!=\",\"maritime\",1]],layout:{\"line-join\":\"round\"},paint:{\"line-color\":\"#9e9cab\",\"line-dasharray\":[3,1,1,1],\"line-width\":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},\"line-opacity\":.6}},{id:\"boundary-land-level-2\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"==\",\"admin_level\",2],[\"!=\",\"maritime\",1],[\"!=\",\"disputed\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(248, 7%, 66%)\",\"line-width\":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:\"boundary-land-disputed\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"!=\",\"maritime\",1],[\"==\",\"disputed\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"hsl(248, 7%, 70%)\",\"line-dasharray\":[1,3],\"line-width\":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:\"boundary-water\",type:\"line\",source:\"openmaptiles\",\"source-layer\":\"boundary\",filter:[\"all\",[\"in\",\"admin_level\",2,4],[\"==\",\"maritime\",1]],layout:{\"line-cap\":\"round\",\"line-join\":\"round\"},paint:{\"line-color\":\"rgba(154, 189, 214, 1)\",\"line-width\":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},\"line-opacity\":{stops:[[6,0],[10,0]]}}},{id:\"waterway-name\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"waterway\",minzoom:13,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"has\",\"name\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":\"{name:latin} {name:nonlatin}\",\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"line\",\"text-letter-spacing\":.2,\"symbol-spacing\":350},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-lakeline\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"==\",\"$type\",\"LineString\"],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"line\",\"symbol-spacing\":350,\"text-letter-spacing\":.2},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-ocean\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"==\",\"class\",\"ocean\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":14,\"text-field\":\"{name:latin}\",\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"point\",\"symbol-spacing\":350,\"text-letter-spacing\":.2},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"water-name-other\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"water_name\",filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"!in\",\"class\",\"ocean\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-size\":{stops:[[0,10],[6,14]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":5,\"text-rotation-alignment\":\"map\",\"symbol-placement\":\"point\",\"symbol-spacing\":350,\"text-letter-spacing\":.2,visibility:\"visible\"},paint:{\"text-color\":\"#74aee9\",\"text-halo-width\":1.5,\"text-halo-color\":\"rgba(255,255,255,0.7)\"}},{id:\"poi-level-3\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:16,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\">=\",\"rank\",25]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"poi-level-2\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:15,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"<=\",\"rank\",24],[\">=\",\"rank\",15]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"poi-level-1\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:14,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"<=\",\"rank\",14],[\"has\",\"name\"]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":11,\"text-max-width\":9},paint:{\"text-halo-blur\":.5,\"text-color\":\"rgba(191, 228, 172, 1)\",\"text-halo-width\":1,\"text-halo-color\":\"rgba(30, 29, 29, 1)\"}},{id:\"poi-railway\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"poi\",minzoom:13,filter:[\"all\",[\"==\",\"$type\",\"Point\"],[\"has\",\"name\"],[\"==\",\"class\",\"railway\"],[\"==\",\"subclass\",\"station\"]],layout:{\"text-padding\":2,\"text-font\":[\"Noto Sans Regular\"],\"text-anchor\":\"top\",\"icon-image\":\"{class}_11\",\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-offset\":[0,.6],\"text-size\":12,\"text-max-width\":9,\"icon-optional\":!1,\"icon-ignore-placement\":!1,\"icon-allow-overlap\":!1,\"text-ignore-placement\":!1,\"text-allow-overlap\":!1,\"text-optional\":!0},paint:{\"text-halo-blur\":.5,\"text-color\":\"#666\",\"text-halo-width\":1,\"text-halo-color\":\"#ffffff\"}},{id:\"road_oneway\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:15,filter:[\"all\",[\"==\",\"oneway\",1],[\"in\",\"class\",\"motorway\",\"trunk\",\"primary\",\"secondary\",\"tertiary\",\"minor\",\"service\"]],layout:{\"symbol-placement\":\"line\",\"icon-image\":\"oneway\",\"symbol-spacing\":75,\"icon-padding\":2,\"icon-rotation-alignment\":\"map\",\"icon-rotate\":90,\"icon-size\":{stops:[[15,.5],[19,1]]}},paint:{\"icon-opacity\":.5}},{id:\"road_oneway_opposite\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation\",minzoom:15,filter:[\"all\",[\"==\",\"oneway\",-1],[\"in\",\"class\",\"motorway\",\"trunk\",\"primary\",\"secondary\",\"tertiary\",\"minor\",\"service\"]],layout:{\"symbol-placement\":\"line\",\"icon-image\":\"oneway\",\"symbol-spacing\":75,\"icon-padding\":2,\"icon-rotation-alignment\":\"map\",\"icon-rotate\":-90,\"icon-size\":{stops:[[15,.5],[19,1]]}},paint:{\"icon-opacity\":.5}},{id:\"highway-name-path\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:15.5,filter:[\"==\",\"class\",\"path\"],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-color\":\"#f8f4f0\",\"text-color\":\"hsl(30, 23%, 62%)\",\"text-halo-width\":.5}},{id:\"highway-name-minor\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:15,filter:[\"all\",[\"==\",\"$type\",\"LineString\"],[\"in\",\"class\",\"minor\",\"service\",\"track\"]],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-blur\":.5,\"text-color\":\"#765\",\"text-halo-width\":1}},{id:\"highway-name-major\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:12.2,filter:[\"in\",\"class\",\"primary\",\"secondary\",\"tertiary\",\"trunk\"],layout:{\"text-size\":{base:1,stops:[[13,12],[14,13]]},\"text-font\":[\"Noto Sans Regular\"],\"text-field\":\"{name:latin} {name:nonlatin}\",\"symbol-placement\":\"line\",\"text-rotation-alignment\":\"map\"},paint:{\"text-halo-blur\":.5,\"text-color\":\"#765\",\"text-halo-width\":1}},{id:\"highway-shield\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:8,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"!in\",\"network\",\"us-interstate\",\"us-highway\",\"us-state\"]],layout:{\"text-size\":10,\"icon-image\":\"road_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[10,\"point\"],[11,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-opacity\":1,\"text-color\":\"rgba(20, 19, 19, 1)\",\"text-halo-color\":\"rgba(230, 221, 221, 0)\",\"text-halo-width\":2,\"icon-color\":\"rgba(183, 18, 18, 1)\",\"icon-opacity\":.3,\"icon-halo-color\":\"rgba(183, 55, 55, 0)\"}},{id:\"highway-shield-us-interstate\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:7,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"in\",\"network\",\"us-interstate\"]],layout:{\"text-size\":10,\"icon-image\":\"{network}_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[7,\"point\"],[7,\"line\"],[8,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\"}},{id:\"highway-shield-us-other\",type:\"symbol\",source:\"openmaptiles\",\"source-layer\":\"transportation_name\",minzoom:9,filter:[\"all\",[\"<=\",\"ref_length\",6],[\"==\",\"$type\",\"LineString\"],[\"in\",\"network\",\"us-highway\",\"us-state\"]],layout:{\"text-size\":10,\"icon-image\":\"{network}_{ref_length}\",\"icon-rotation-alignment\":\"viewport\",\"symbol-spacing\":200,\"text-font\":[\"Noto Sans Regular\"],\"symbol-placement\":{base:1,stops:[[10,\"point\"],[11,\"line\"]]},\"text-rotation-alignment\":\"viewport\",\"icon-size\":1,\"text-field\":\"{ref}\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\"}},{id:\"place-other\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",minzoom:12,filter:[\"!in\",\"class\",\"city\",\"town\",\"village\",\"country\",\"continent\"],layout:{\"text-letter-spacing\":.1,\"text-size\":{base:1.2,stops:[[12,10],[15,14]]},\"text-font\":[\"Noto Sans Bold\"],\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-transform\":\"uppercase\",\"text-max-width\":9,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255,255,255,1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(57, 28, 28, 1)\"}},{id:\"place-village\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",minzoom:10,filter:[\"==\",\"class\",\"village\"],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[10,12],[15,16]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255, 255, 255, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(10, 9, 9, 0.8)\"}},{id:\"place-town\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"==\",\"class\",\"town\"],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[10,14],[15,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(255, 255, 255, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(22, 22, 22, 0.8)\"}},{id:\"place-city\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"!=\",\"capital\",2],[\"==\",\"class\",\"city\"]],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[7,14],[11,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,visibility:\"visible\"},paint:{\"text-color\":\"rgba(0, 0, 0, 1)\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-city-capital\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"capital\",2],[\"==\",\"class\",\"city\"]],layout:{\"text-font\":[\"Noto Sans Regular\"],\"text-size\":{base:1.2,stops:[[7,14],[11,24]]},\"text-field\":`{name:latin}\n",
       "{name:nonlatin}`,\"text-max-width\":8,\"icon-image\":\"star_11\",\"text-offset\":[.4,0],\"icon-size\":.8,\"text-anchor\":\"left\",visibility:\"visible\"},paint:{\"text-color\":\"#333\",\"text-halo-width\":1.2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-other\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\">=\",\"rank\",3],[\"!has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Italic\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[3,11],[7,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-3\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\">=\",\"rank\",3],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[3,11],[7,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-2\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\"==\",\"rank\",2],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[2,11],[5,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-country-1\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",filter:[\"all\",[\"==\",\"class\",\"country\"],[\"==\",\"rank\",1],[\"has\",\"iso_a2\"]],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":{stops:[[1,11],[4,17]]},\"text-transform\":\"uppercase\",\"text-max-width\":6.25,visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}},{id:\"place-continent\",type:\"symbol\",metadata:{\"mapbox:group\":\"1444849242106.713\"},source:\"openmaptiles\",\"source-layer\":\"place\",maxzoom:1,filter:[\"==\",\"class\",\"continent\"],layout:{\"text-font\":[\"Noto Sans Bold\"],\"text-field\":\"{name:latin}\",\"text-size\":14,\"text-max-width\":6.25,\"text-transform\":\"uppercase\",visibility:\"visible\"},paint:{\"text-halo-blur\":1,\"text-color\":\"#334\",\"text-halo-width\":2,\"text-halo-color\":\"rgba(255,255,255,0.8)\"}}],id:\"qebnlkra6\"}});var EHe=ye((rbr,MHe)=>{MHe.exports={version:8,name:\"orto\",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:\"viewport\",color:\"white\",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:\"raster\",tiles:[\"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\"],tileSize:256,maxzoom:18,attribution:\"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>\"},ortoInstaMaps:{type:\"raster\",tiles:[\"https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png\"],tileSize:256,maxzoom:13},ortoICGC:{type:\"raster\",tiles:[\"https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg\"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:\"vector\",url:\"https://geoserveis.icgc.cat/contextmaps/basemap.json\"}},sprite:\"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1\",glyphs:\"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf\",layers:[{id:\"background\",type:\"background\",paint:{\"background-color\":\"#F4F9F4\"}},{id:\"ortoEsri\",type:\"raster\",source:\"ortoEsri\",maxzoom:16,layout:{visibility:\"visible\"}},{id:\"ortoICGC\",type:\"raster\",source:\"ortoICGC\",minzoom:13.1,maxzoom:19,layout:{visibility:\"visible\"}},{id:\"ortoInstaMaps\",type:\"raster\",source:\"ortoInstaMaps\",maxzoom:13,layout:{visibility:\"visible\"}}]}});var Px=ye((ibr,IHe)=>{\"use strict\";var VWt=t_(),GWt=SHe(),HWt=EHe(),jWt='\\xA9 <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors',kHe=\"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json\",CHe=\"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json\",s7=\"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json\",WWt=\"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json\",XWt=\"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json\",ZWt=\"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json\",PHe={basic:s7,streets:s7,outdoors:s7,light:kHe,dark:CHe,satellite:HWt,\"satellite-streets\":GWt,\"open-street-map\":{id:\"osm\",version:8,sources:{\"plotly-osm-tiles\":{type:\"raster\",attribution:jWt,tiles:[\"https://tile.openstreetmap.org/{z}/{x}/{y}.png\"],tileSize:256}},layers:[{id:\"plotly-osm-tiles\",type:\"raster\",source:\"plotly-osm-tiles\",minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"white-bg\":{id:\"white-bg\",version:8,sources:{},layers:[{id:\"white-bg\",type:\"background\",paint:{\"background-color\":\"#FFFFFF\"},minzoom:0,maxzoom:22}],glyphs:\"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf\"},\"carto-positron\":kHe,\"carto-darkmatter\":CHe,\"carto-voyager\":s7,\"carto-positron-nolabels\":WWt,\"carto-darkmatter-nolabels\":XWt,\"carto-voyager-nolabels\":ZWt},LHe=VWt(PHe);IHe.exports={styleValueDflt:\"basic\",stylesMap:PHe,styleValuesMap:LHe,traceLayerPrefix:\"plotly-trace-layer-\",layoutLayerPrefix:\"plotly-layout-layer-\",missingStyleErrorMsg:[\"No valid maplibre style found, please set `map.style` to one of:\",LHe.join(\", \"),\"or use a tile service.\"].join(`\n",
       "`),mapOnErrorMsg:\"Map error.\"}});var Qk=ye((nbr,OHe)=>{\"use strict\";var RHe=Dr(),DHe=ka().defaultLine,YWt=Cc().attributes,KWt=ec(),JWt=pf().textposition,$Wt=mc().overrideAll,QWt=vl().templatedArray,FHe=Px(),zHe=KWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});zHe.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\";var eXt=OHe.exports=$Wt({_arrayAttrRegexps:[RHe.counterRegex(\"map\",\".layers\",!0)],domain:YWt({name:\"map\"}),style:{valType:\"any\",values:FHe.styleValuesMap,dflt:FHe.styleValueDflt},center:{lon:{valType:\"number\",dflt:0},lat:{valType:\"number\",dflt:0}},zoom:{valType:\"number\",dflt:1},bearing:{valType:\"number\",dflt:0},pitch:{valType:\"number\",dflt:0},bounds:{west:{valType:\"number\"},east:{valType:\"number\"},south:{valType:\"number\"},north:{valType:\"number\"}},layers:QWt(\"layer\",{visible:{valType:\"boolean\",dflt:!0},sourcetype:{valType:\"enumerated\",values:[\"geojson\",\"vector\",\"raster\",\"image\"],dflt:\"geojson\"},source:{valType:\"any\"},sourcelayer:{valType:\"string\",dflt:\"\"},sourceattribution:{valType:\"string\"},type:{valType:\"enumerated\",values:[\"circle\",\"line\",\"fill\",\"symbol\",\"raster\"],dflt:\"circle\"},coordinates:{valType:\"any\"},below:{valType:\"string\"},color:{valType:\"color\",dflt:DHe},opacity:{valType:\"number\",min:0,max:1,dflt:1},minzoom:{valType:\"number\",min:0,max:24,dflt:0},maxzoom:{valType:\"number\",min:0,max:24,dflt:24},circle:{radius:{valType:\"number\",dflt:15}},line:{width:{valType:\"number\",dflt:2},dash:{valType:\"data_array\"}},fill:{outlinecolor:{valType:\"color\",dflt:DHe}},symbol:{icon:{valType:\"string\",dflt:\"marker\"},iconsize:{valType:\"number\",dflt:10},text:{valType:\"string\",dflt:\"\"},placement:{valType:\"enumerated\",values:[\"point\",\"line\",\"line-center\"],dflt:\"point\"},textfont:zHe,textposition:RHe.extendFlat({},JWt,{arrayOk:!1})}})},\"plot\",\"from-root\");eXt.uirevision={valType:\"any\",editType:\"none\"}});var l7=ye((abr,UHe)=>{\"use strict\";var{hovertemplateAttrs:tXt,texttemplateAttrs:rXt,templatefallbackAttrs:qHe}=Ll(),iXt=Pg(),eC=ew(),P5=pf(),BHe=Qk(),nXt=Gl(),aXt=Tu(),dw=Ao().extendFlat,oXt=mc().overrideAll,sXt=Qk(),NHe=eC.line,I5=eC.marker;UHe.exports=oXt({lon:eC.lon,lat:eC.lat,cluster:{enabled:{valType:\"boolean\"},maxzoom:dw({},sXt.layers.maxzoom,{}),step:{valType:\"number\",arrayOk:!0,dflt:-1,min:-1},size:{valType:\"number\",arrayOk:!0,dflt:20,min:0},color:{valType:\"color\",arrayOk:!0},opacity:dw({},I5.opacity,{dflt:1})},mode:dw({},P5.mode,{dflt:\"markers\"}),text:dw({},P5.text,{}),texttemplate:rXt({editType:\"plot\"},{keys:[\"lat\",\"lon\",\"text\"]}),texttemplatefallback:qHe({editType:\"plot\"}),hovertext:dw({},P5.hovertext,{}),line:{color:NHe.color,width:NHe.width},connectgaps:P5.connectgaps,marker:dw({symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},angle:{valType:\"number\",dflt:\"auto\",arrayOk:!0},allowoverlap:{valType:\"boolean\",dflt:!1},opacity:I5.opacity,size:I5.size,sizeref:I5.sizeref,sizemin:I5.sizemin,sizemode:I5.sizemode},aXt(\"marker\")),fill:eC.fill,fillcolor:iXt(),textfont:BHe.layers.symbol.textfont,textposition:BHe.layers.symbol.textposition,below:{valType:\"string\"},selected:{marker:P5.selected.marker},unselected:{marker:P5.unselected.marker},hoverinfo:dw({},nXt.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]}),hovertemplate:tXt(),hovertemplatefallback:qHe()},\"calc\",\"nested\")});var CJ=ye((obr,VHe)=>{\"use strict\";var lXt=[\"Metropolis Black Italic\",\"Metropolis Black\",\"Metropolis Bold Italic\",\"Metropolis Bold\",\"Metropolis Extra Bold Italic\",\"Metropolis Extra Bold\",\"Metropolis Extra Light Italic\",\"Metropolis Extra Light\",\"Metropolis Light Italic\",\"Metropolis Light\",\"Metropolis Medium Italic\",\"Metropolis Medium\",\"Metropolis Regular Italic\",\"Metropolis Regular\",\"Metropolis Semi Bold Italic\",\"Metropolis Semi Bold\",\"Metropolis Thin Italic\",\"Metropolis Thin\",\"Open Sans Bold Italic\",\"Open Sans Bold\",\"Open Sans Extrabold Italic\",\"Open Sans Extrabold\",\"Open Sans Italic\",\"Open Sans Light Italic\",\"Open Sans Light\",\"Open Sans Regular\",\"Open Sans Semibold Italic\",\"Open Sans Semibold\",\"Klokantech Noto Sans Bold\",\"Klokantech Noto Sans CJK Bold\",\"Klokantech Noto Sans CJK Regular\",\"Klokantech Noto Sans Italic\",\"Klokantech Noto Sans Regular\"];VHe.exports={isSupportedFont:function(e){return lXt.indexOf(e)!==-1}}});var jHe=ye((sbr,HHe)=>{\"use strict\";var tC=Dr(),LJ=Ru(),uXt=$p(),cXt=D0(),fXt=F0(),hXt=Fg(),GHe=l7(),dXt=CJ().isSupportedFont;HHe.exports=function(t,r,n,i){function a(p,k){return tC.coerce(t,r,GHe,p,k)}function o(p,k){return tC.coerce2(t,r,GHe,p,k)}var s=vXt(t,r,a);if(!s){r.visible=!1;return}if(a(\"text\"),a(\"texttemplate\"),a(\"texttemplatefallback\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"mode\"),a(\"below\"),LJ.hasMarkers(r)){uXt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a(\"marker.allowoverlap\"),a(\"marker.angle\");var l=r.marker;l.symbol!==\"circle\"&&(tC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),tC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}LJ.hasLines(r)&&(cXt(t,r,n,i,a,{noDash:!0}),a(\"connectgaps\"));var u=o(\"cluster.maxzoom\"),c=o(\"cluster.step\"),f=o(\"cluster.color\",r.marker&&r.marker.color||n),h=o(\"cluster.size\"),d=o(\"cluster.opacity\"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a(\"cluster.enabled\",v);if(_||LJ.hasText(r)){var b=i.font.family;fXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:dXt(b)?b:\"Open Sans Regular\",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a(\"fill\"),r.fill!==\"none\"&&hXt(t,r,n,a),tC.coerceSelectionMarkerOpacity(r,a)};function vXt(e,t,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var PJ=ye((lbr,XHe)=>{\"use strict\";var WHe=ho();XHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=WHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=WHe.tickText(o,o.c2l(s[1]),!0).text,i}});var IJ=ye((ubr,YHe)=>{\"use strict\";var ZHe=Dr();YHe.exports=function(t,r){var n=t.split(\" \"),i=n[0],a=n[1],o=ZHe.isArrayOrTypedArray(r)?ZHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=[\"\",\"\"],c=[0,0];switch(i){case\"top\":u[0]=\"top\",c[1]=-l;break;case\"bottom\":u[0]=\"bottom\",c[1]=l;break}switch(a){case\"left\":u[1]=\"right\",c[0]=-s;break;case\"right\":u[1]=\"left\",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join(\"-\"):u[0]?f=u[0]:u[1]?f=u[1]:f=\"center\",{anchor:f,offset:c}}});var tje=ye((cbr,eje)=>{\"use strict\";var $He=Eo(),ov=Dr(),pXt=fs().BADNUM,c7=cx(),KHe=tc(),gXt=So(),mXt=O3(),f7=Ru(),yXt=CJ().isSupportedFont,_Xt=IJ(),xXt=ip().appendArrayPointValue,bXt=Zl().NEWLINES,wXt=Zl().BR_TAG_ALL;eje.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!==\"none\",o=f7.hasLines(n),s=f7.hasMarkers(n),l=f7.hasText(n),u=s&&n.marker.symbol===\"circle\",c=s&&n.marker.symbol!==\"circle\",f=n.cluster&&n.cluster.enabled,h=u7(\"fill\"),d=u7(\"line\"),v=u7(\"circle\"),_=u7(\"symbol\"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=c7.calcTraceToLineCoords(r)),a&&(h.geojson=c7.makePolygon(p),h.layout.visibility=\"visible\",ov.extendFlat(h.paint,{\"fill-color\":n.fillcolor})),o&&(d.geojson=c7.makeLine(p),d.layout.visibility=\"visible\",ov.extendFlat(d.paint,{\"line-width\":n.line.width,\"line-color\":n.line.color,\"line-opacity\":n.opacity})),u){var k=TXt(r);v.geojson=k.geojson,v.layout.visibility=\"visible\",f&&(v.filter=[\"!\",[\"has\",\"point_count\"]],b.cluster={type:\"circle\",filter:[\"has\",\"point_count\"],layout:{visibility:\"visible\"},paint:{\"circle-color\":DJ(n.cluster.color,n.cluster.step),\"circle-radius\":DJ(n.cluster.size,n.cluster.step),\"circle-opacity\":DJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:\"symbol\",filter:[\"has\",\"point_count\"],paint:{},layout:{\"text-field\":\"{point_count_abbreviated}\",\"text-font\":JHe(n),\"text-size\":12}}),ov.extendFlat(v.paint,{\"circle-color\":k.mcc,\"circle-radius\":k.mrc,\"circle-opacity\":k.mo})}if(u&&f&&(v.filter=[\"!\",[\"has\",\"point_count\"]]),(c||l)&&(_.geojson=AXt(r,t),ov.extendFlat(_.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),c&&(ov.extendFlat(_.layout,{\"icon-size\":n.marker.size/10}),\"angle\"in n.marker&&n.marker.angle!==\"auto\"&&ov.extendFlat(_.layout,{\"icon-rotate\":{type:\"identity\",property:\"angle\"},\"icon-rotation-alignment\":\"map\"}),_.layout[\"icon-allow-overlap\"]=n.marker.allowoverlap,ov.extendFlat(_.paint,{\"icon-opacity\":n.opacity*n.marker.opacity,\"icon-color\":n.marker.color})),l)){var E=(n.marker||{}).size,T=_Xt(n.textposition,E);ov.extendFlat(_.layout,{\"text-size\":n.textfont.size,\"text-anchor\":T.anchor,\"text-offset\":T.offset,\"text-font\":JHe(n)}),ov.extendFlat(_.paint,{\"text-color\":n.textfont.color,\"text-opacity\":n.opacity})}return b};function u7(e){return{type:e,geojson:c7.makeBlank(),layout:{visibility:\"none\"},filter:null,paint:{}}}function TXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(KHe.hasColorscale(t,\"marker\")?c=KHe.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=mXt(t));var h;o&&(h=function(E){var T=$He(E)?+ov.constrain(E,0,1):0;return l(T)});var d=[];for(s=0;s<e.length;s++){var v=e[s],_=v.lonlat;if(!QHe(_)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:\"Feature\",id:s+1,geometry:{type:\"Point\",coordinates:_},properties:b})}}var p;if(n)for(p=gXt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;p.selectedOpacityFn&&(k.mo=l(p.selectedOpacityFn(k))),p.selectedColorFn&&(k.mcc=p.selectedColorFn(k)),p.selectedSizeFn&&(k.mrc=p.selectedSizeFn(k))}return{geojson:{type:\"FeatureCollection\",features:d},mcc:i||p&&p.selectedColorFn?{type:\"identity\",property:\"mcc\"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:\"identity\",property:\"mrc\"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:\"identity\",property:\"mo\"}:l(r.opacity)}}function AXt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!==\"circle\"?RJ(a):h7,l=o!==\"auto\"?RJ(o,!0):h7,u=f7.hasText(n)?RJ(n.text):h7,c=[],f=0;f<e.length;f++){var h=e[f];if(!QHe(h.lonlat)){var d=n.texttemplate,v;if(d){var _=Array.isArray(d)?d[f]||\"\":d,b=n._module.formatLabels(h,n,r),p={};xXt(p,n,h.i),v=ov.texttemplateString({data:[p,h,n._meta],fallback:n.texttemplatefallback,labels:b,locale:r._d3locale,template:_})}else v=u(f);v&&(v=v.replace(bXt,\"\").replace(wXt,`\n",
       "`)),c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:\"FeatureCollection\",features:c}}function RJ(e,t){return ov.isArrayOrTypedArray(e)?t?function(r){return $He(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:h7}function h7(){return\"\"}function QHe(e){return e[0]===pXt}function DJ(e,t){var r;if(ov.isArrayOrTypedArray(e)&&ov.isArrayOrTypedArray(t)){r=[\"step\",[\"get\",\"point_count\"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function JHe(e){var t=e.textfont,r=t.family,n=t.style,i=t.weight,a=r.split(\" \"),o=a[a.length-1]===\"Italic\";o&&a.pop(),o=o||n===\"italic\";var s=a.join(\" \");i===\"bold\"&&a.indexOf(\"Bold\")===-1?s+=\" Bold\":i<=1e3&&(a[0]===\"Metropolis\"?(s=\"Metropolis\",i>850?s+=\" Black\":i>750?s+=\" Extra Bold\":i>650?s+=\" Bold\":i>550?s+=\" Semi Bold\":i>450?s+=\" Medium\":i>350?s+=\" Regular\":i>250?s+=\" Light\":i>150?s+=\" Extra Light\":s+=\" Thin\"):a.slice(0,2).join(\" \")===\"Open Sans\"?(s=\"Open Sans\",i>750?s+=\" Extrabold\":i>650?s+=\" Bold\":i>550?s+=\" Semibold\":i>350?s+=\" Regular\":s+=\" Light\"):a.slice(0,3).join(\" \")===\"Klokantech Noto Sans\"&&(s=\"Klokantech Noto Sans\",a[3]===\"CJK\"&&(s+=\" CJK\"),s+=i>500?\" Bold\":\" Regular\")),o&&(s+=\" Italic\"),s===\"Open Sans Regular Italic\"?s=\"Open Sans Italic\":s===\"Open Sans Regular Bold\"?s=\"Open Sans Bold\":s===\"Open Sans Regular Bold Italic\"?s=\"Open Sans Bold Italic\":s===\"Klokantech Noto Sans Regular Italic\"&&(s=\"Klokantech Noto Sans Italic\"),yXt(s)||(s=r);var l=s.split(\", \");return l}});var aje=ye((fbr,nje)=>{\"use strict\";var SXt=Dr(),rje=tje(),R5=Px().traceLayerPrefix,og={cluster:[\"cluster\",\"clusterCount\",\"circle\"],nonCluster:[\"fill\",\"line\",\"circle\",\"symbol\"]};function ije(e,t,r,n){this.type=\"scattermap\",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:\"source-\"+t+\"-fill\",line:\"source-\"+t+\"-line\",circle:\"source-\"+t+\"-circle\",symbol:\"source-\"+t+\"-symbol\",cluster:\"source-\"+t+\"-circle\",clusterCount:\"source-\"+t+\"-circle\"},this.layerIds={fill:R5+t+\"-fill\",line:R5+t+\"-line\",circle:R5+t+\"-circle\",symbol:R5+t+\"-symbol\",cluster:R5+t+\"-cluster\",clusterCount:R5+t+\"-cluster-count\"},this.below=null}var rC=ije.prototype;rC.addSource=function(e,t,r){var n={type:\"geojson\",data:t.geojson};r&&r.enabled&&SXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};rC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};rC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,\"setLayoutProperty\",n.layout),n.layout.visibility===\"visible\"&&this.subplot.setOptions(i,\"setPaintProperty\",n.paint)):this.subplot.addLayer(n,r)};rC.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=rje(n.gd,t),o=n.belowLookup[\"trace-\"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(E){E||u.addSource(\"circle\",a.circle,r.cluster);for(var T=og.cluster,L=0;L<T.length;L++){var x=T[L],C=a[x];u.addLayer(x,C,o)}}function f(E){for(var T=og.cluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var T=og.nonCluster,L=0;L<T.length;L++){var x=T[L],C=a[x];E||u.addSource(x,C),u.addLayer(x,C,o)}}function d(E){for(var T=og.nonCluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?og.cluster:og.nonCluster,T=0;T<E.length;T++){var L=E[T],x=a[L];x&&(n.setOptions(u.layerIds[L],\"setLayoutProperty\",x.layout),x.layout.visibility===\"visible\"&&(L!==\"cluster\"&&u.setSourceData(L,x),n.setOptions(u.layerIds[L],\"setPaintProperty\",x.paint)))}}var p=this.isHidden,k=r.visible!==!0;k?p||v():p?k||_():l!==s?(v(),_()):(this.below!==o&&(v(!0),_(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};rC.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?og.cluster:og.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};nje.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new ije(t,n.uid,i,a),s=rje(t.gd,r),l=o.below=t.belowLookup[\"trace-\"+n.uid],u,c,f;if(i)for(o.addSource(\"circle\",s.circle,n.cluster),u=0;u<og.cluster.length;u++)c=og.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<og.nonCluster.length;u++)c=og.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var d7=ye((hbr,sje)=>{\"use strict\";var MXt=vf(),FJ=Dr(),EXt=gT(),kXt=FJ.fillText,CXt=fs().BADNUM,LXt=Px().traceLayerPrefix;function PXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=LXt+i.uid+\"-circle\",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===CXt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=FJ.modHalf(g[0],360),A=g[1],z=s.project([P,A]),O=z.x-a.c2p([v,A]),U=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+U*U)-G,1-3/G)}if(MXt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[FJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=EXt(i,b),e.extraText=oje(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function oje(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split(\"+\"),a=i.indexOf(\"all\")!==-1,o=i.indexOf(\"lon\")!==-1,s=i.indexOf(\"lat\")!==-1,l=t.lonlat,u=[];function c(f){return f+\"\\xB0\"}return a||o&&s?u.push(\"(\"+c(l[1])+\", \"+c(l[0])+\")\"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf(\"text\")!==-1)&&kXt(t,e,u),u.join(\"<br>\")}sje.exports={hoverPoints:PXt,getExtraText:oje}});var uje=ye((dbr,lje)=>{\"use strict\";lje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var fje=ye((vbr,cje)=>{\"use strict\";var IXt=Dr(),RXt=Ru(),DXt=fs().BADNUM;cje.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!RXt.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==DXt){var f=[IXt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var dje=ye((zJ,OJ)=>{(function(e,t){typeof zJ==\"object\"&&typeof OJ!=\"undefined\"?OJ.exports=t():(e=typeof globalThis!=\"undefined\"?globalThis:e||self,e.maplibregl=t())})(zJ,function(){\"use strict\";var e={},t={};function r(i,a,o){if(t[i]=o,i===\"index\"){var s=\"var sharedModule = {}; (\"+t.shared+\")(sharedModule); (\"+t.worker+\")(sharedModule);\",l={};return t.shared(l),t.index(e,l),typeof window!=\"undefined\"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:\"text/javascript\"}))),e}}r(\"shared\",[\"exports\"],function(i){\"use strict\";function a(R,S,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ct){try{Ke(W.next(ct))}catch(Lt){fe(Lt)}}function Fe(ct){try{Ke(W.throw(ct))}catch(Lt){fe(Lt)}}function Ke(ct){var Lt;ct.done?te(ct.value):(Lt=ct.value,Lt instanceof F?Lt:new F(function(Jt){Jt(Lt)})).then(pe,Fe)}Ke((W=W.apply(R,S||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,\"default\")?R.default:R}typeof SuppressedError==\"function\"&&SuppressedError;var s=l;function l(R,S){this.x=R,this.y=S}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,S){return this.clone()._rotateAround(R,S)},matMult:function(R){return this.clone()._matMult(R)},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(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var S=R.x-this.x,F=R.y-this.y;return S*S+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,S){return Math.atan2(this.x*S-this.y*R,this.x*R+this.y*S)},_matMult:function(R){var S=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=S,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var S=Math.cos(R),F=Math.sin(R),W=F*this.x+S*this.y;return this.x=S*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,S){var F=Math.cos(R),W=Math.sin(R),te=S.y+W*(this.x-S.x)+F*(this.y-S.y);return this.x=S.x+F*(this.x-S.x)-W*(this.y-S.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<S)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,Fe=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<S));W++)R>te?pe=F:Fe=F,F=.5*(Fe-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var h=o(c);let d,v;function _(){return d==null&&(d=typeof OffscreenCanvas!=\"undefined\"&&new OffscreenCanvas(1,1).getContext(\"2d\")&&typeof createImageBitmap==\"function\"),d}function b(){if(v==null&&(v=!1,_())){let S=new OffscreenCanvas(5,5).getContext(\"2d\",{willReadFrequently:!0});if(S){for(let W=0;W<5*5;W++){let te=4*W;S.fillStyle=`rgb(${te},${te+1},${te+2})`,S.fillRect(W%5,Math.floor(W/5),1,1)}let F=S.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,S,F,W){let te=new h(R,S,F,W);return fe=>te.solve(fe)}let k=p(.25,.1,.25,1);function E(R,S,F){return Math.min(F,Math.max(S,R))}function T(R,S,F){let W=F-S,te=((R-S)%W+W)%W+S;return te===S?F:te}function L(R,...S){for(let F of S)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,S,F){let W={};for(let te in R)W[te]=S.call(this,R[te],te,R);return W}function M(R,S,F){let W={};for(let te in R)S.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R==\"object\"&&R?C(R,g):R}let P={};function A(R){P[R]||(typeof console!=\"undefined\"&&console.warn(R),P[R]=!0)}function z(R,S,F){return(F.y-R.y)*(S.x-R.x)>(S.y-R.y)*(F.x-R.x)}function O(R){return typeof WorkerGlobalScope!=\"undefined\"&&R!==void 0&&R instanceof WorkerGlobalScope}let U=null;function G(R){return typeof ImageBitmap!=\"undefined\"&&R instanceof ImageBitmap}let Z=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";function j(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame==\"undefined\")throw new Error(\"VideoFrame not supported\");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith(\"BGR\")&&!pe.startsWith(\"RGB\"))throw new Error(`Unrecognized format ${pe}`);let Fe=pe.startsWith(\"BGR\"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ct,Lt,Jt,cr,mr){let Pr=4*Math.max(-Lt,0),zr=(Math.max(0,Jt)-Jt)*cr*4+Pr,ui=4*cr,yi=Math.max(0,Lt),vn=Math.max(0,Jt);return{rect:{x:yi,y:vn,width:Math.min(ct.width,Lt+cr)-yi,height:Math.min(ct.height,Jt+mr)-vn},layout:[{offset:zr,stride:ui}]}}(R,S,F,W,te)),Fe)for(let ct=0;ct<Ke.length;ct+=4){let Lt=Ke[ct];Ke[ct]=Ke[ct+2],Ke[ct+2]=Lt}return Ke}finally{fe.close()}})}let N,H,re=\"AbortError\";function oe(){return new Error(re)}let _e={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:\"\"};function Ce(R){return _e.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf(\"://\"))]}let Le=\"global-dispatcher\";class ge extends Error{constructor(S,F,W,te){super(`AJAXError: ${F} (${S}): ${W}`),this.status=S,this.statusText=F,this.url=W,this.body=te}}let ie=()=>O(self)?self.worker&&self.worker.referrer:(window.location.protocol===\"blob:\"?window.parent:window).location.href,Se=function(R,S){if(/:\\/\\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=Ce(R.url);if(W)return W(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:\"GR\",data:R,targetMapId:Le},S)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,\"signal\"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||\"GET\",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:te.signal});W.type!==\"json\"||fe.headers.has(\"Accept\")||fe.headers.set(\"Accept\",\"application/json\");let pe=yield fetch(fe);if(!pe.ok){let ct=yield pe.blob();throw new ge(pe.status,pe.statusText,W.url,ct)}let Fe;Fe=W.type===\"arrayBuffer\"||W.type===\"image\"?pe.arrayBuffer():W.type===\"json\"?pe.json():pe.text();let Ke=yield Fe;if(te.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get(\"Cache-Control\"),expires:pe.headers.get(\"Expires\")}})}(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:\"GR\",data:R,mustQueue:!0,targetMapId:Le},S)}var F;return function(W,te){return new Promise((fe,pe)=>{var Fe;let Ke=new XMLHttpRequest;Ke.open(W.method||\"GET\",W.url,!0),W.type!==\"arrayBuffer\"&&W.type!==\"image\"||(Ke.responseType=\"arraybuffer\");for(let ct in W.headers)Ke.setRequestHeader(ct,W.headers[ct]);W.type===\"json\"&&(Ke.responseType=\"text\",!((Fe=W.headers)===null||Fe===void 0)&&Fe.Accept||Ke.setRequestHeader(\"Accept\",\"application/json\")),Ke.withCredentials=W.credentials===\"include\",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ct=Ke.response;if(W.type===\"json\")try{ct=JSON.parse(Ke.response)}catch(Lt){return void pe(Lt)}fe({data:ct,cacheControl:Ke.getResponseHeader(\"Cache-Control\"),expires:Ke.getResponseHeader(\"Expires\")})}else{let ct=new Blob([Ke.response],{type:Ke.getResponseHeader(\"Content-Type\")});pe(new ge(Ke.status,Ke.statusText,W.url,ct))}},te.signal.addEventListener(\"abort\",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,S)};function Ee(R){if(!R||R.indexOf(\"://\")<=0||R.indexOf(\"data:image/\")===0||R.indexOf(\"blob:\")===0)return!0;let S=new URL(R),F=window.location;return S.protocol===F.protocol&&S.host===F.host}function Ae(R,S,F){F[R]&&F[R].indexOf(S)!==-1||(F[R]=F[R]||[],F[R].push(S))}function Be(R,S,F){if(F&&F[R]){let W=F[R].indexOf(S);W!==-1&&F[R].splice(W,1)}}class Pe{constructor(S,F={}){L(this,F),this.type=S}}class me extends Pe{constructor(S,F={}){super(\"error\",L({error:S},F))}}class De{on(S,F){return this._listeners=this._listeners||{},Ae(S,F,this._listeners),this}off(S,F){return Be(S,F,this._listeners),Be(S,F,this._oneTimeListeners),this}once(S,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(S,F,this._oneTimeListeners),this):new Promise(W=>this.once(S,W))}fire(S,F){typeof S==\"string\"&&(S=new Pe(S,F||{}));let W=S.type;if(this.listens(W)){S.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let Fe of te)Fe.call(this,S);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let Fe of fe)Be(W,Fe,this._oneTimeListeners),Fe.call(this,S);let pe=this._eventedParent;pe&&(L(S,typeof this._eventedParentData==\"function\"?this._eventedParentData():this._eventedParentData),pe.fire(S))}else S instanceof me&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,F){return this._eventedParent=S,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:\"enum\",values:[8]},name:{type:\"string\"},metadata:{type:\"*\"},center:{type:\"array\",value:\"number\"},zoom:{type:\"number\"},bearing:{type:\"number\",default:0,period:360,units:\"degrees\"},pitch:{type:\"number\",default:0,units:\"degrees\"},light:{type:\"light\"},sky:{type:\"sky\"},projection:{type:\"projection\"},terrain:{type:\"terrain\"},sources:{required:!0,type:\"sources\"},sprite:{type:\"sprite\"},glyphs:{type:\"string\"},transition:{type:\"transition\"},layers:{required:!0,type:\"array\",value:\"layer\"}},sources:{\"*\":{type:\"source\"}},source:[\"source_vector\",\"source_raster\",\"source_raster_dem\",\"source_geojson\",\"source_video\",\"source_image\"],source_vector:{type:{required:!0,type:\"enum\",values:{vector:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},attribution:{type:\"string\"},promoteId:{type:\"promoteId\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_raster:{type:{required:!0,type:\"enum\",values:{raster:{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},scheme:{type:\"enum\",values:{xyz:{},tms:{}},default:\"xyz\"},attribution:{type:\"string\"},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_raster_dem:{type:{required:!0,type:\"enum\",values:{\"raster-dem\":{}}},url:{type:\"string\"},tiles:{type:\"array\",value:\"string\"},bounds:{type:\"array\",value:\"number\",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:\"number\",default:0},maxzoom:{type:\"number\",default:22},tileSize:{type:\"number\",default:512,units:\"pixels\"},attribution:{type:\"string\"},encoding:{type:\"enum\",values:{terrarium:{},mapbox:{},custom:{}},default:\"mapbox\"},redFactor:{type:\"number\",default:1},blueFactor:{type:\"number\",default:1},greenFactor:{type:\"number\",default:1},baseShift:{type:\"number\",default:0},volatile:{type:\"boolean\",default:!1},\"*\":{type:\"*\"}},source_geojson:{type:{required:!0,type:\"enum\",values:{geojson:{}}},data:{required:!0,type:\"*\"},maxzoom:{type:\"number\",default:18},attribution:{type:\"string\"},buffer:{type:\"number\",default:128,maximum:512,minimum:0},filter:{type:\"*\"},tolerance:{type:\"number\",default:.375},cluster:{type:\"boolean\",default:!1},clusterRadius:{type:\"number\",default:50,minimum:0},clusterMaxZoom:{type:\"number\"},clusterMinPoints:{type:\"number\"},clusterProperties:{type:\"*\"},lineMetrics:{type:\"boolean\",default:!1},generateId:{type:\"boolean\",default:!1},promoteId:{type:\"promoteId\"}},source_video:{type:{required:!0,type:\"enum\",values:{video:{}}},urls:{required:!0,type:\"array\",value:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},source_image:{type:{required:!0,type:\"enum\",values:{image:{}}},url:{required:!0,type:\"string\"},coordinates:{required:!0,type:\"array\",length:4,value:{type:\"array\",length:2,value:\"number\"}}},layer:{id:{type:\"string\",required:!0},type:{type:\"enum\",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},\"fill-extrusion\":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:\"*\"},source:{type:\"string\"},\"source-layer\":{type:\"string\"},minzoom:{type:\"number\",minimum:0,maximum:24},maxzoom:{type:\"number\",minimum:0,maximum:24},filter:{type:\"filter\"},layout:{type:\"layout\"},paint:{type:\"paint\"}},layout:[\"layout_fill\",\"layout_line\",\"layout_circle\",\"layout_heatmap\",\"layout_fill-extrusion\",\"layout_symbol\",\"layout_raster\",\"layout_hillshade\",\"layout_background\"],layout_background:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_fill:{\"fill-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_circle:{\"circle-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_heatmap:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},\"layout_fill-extrusion\":{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_line:{\"line-cap\":{type:\"enum\",values:{butt:{},round:{},square:{}},default:\"butt\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-join\":{type:\"enum\",values:{bevel:{},round:{},miter:{}},default:\"miter\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"line-miter-limit\":{type:\"number\",default:2,requires:[{\"line-join\":\"miter\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-round-limit\":{type:\"number\",default:1.05,requires:[{\"line-join\":\"round\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_symbol:{\"symbol-placement\":{type:\"enum\",values:{point:{},line:{},\"line-center\":{}},default:\"point\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-spacing\":{type:\"number\",default:250,minimum:1,units:\"pixels\",requires:[{\"symbol-placement\":\"line\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-avoid-edges\":{type:\"boolean\",default:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"symbol-sort-key\":{type:\"number\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"symbol-z-order\":{type:\"enum\",values:{auto:{},\"viewport-y\":{},source:{}},default:\"auto\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"!\":\"icon-overlap\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-overlap\":{type:\"enum\",values:{never:{},always:{},cooperative:{}},requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-optional\":{type:\"boolean\",default:!1,requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-size\":{type:\"number\",default:1,minimum:0,units:\"factor of the original icon size\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-text-fit\":{type:\"enum\",values:{none:{},width:{},height:{},both:{}},default:\"none\",requires:[\"icon-image\",\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-text-fit-padding\":{type:\"array\",value:\"number\",length:4,default:[0,0,0,0],units:\"pixels\",requires:[\"icon-image\",\"text-field\",{\"icon-text-fit\":[\"both\",\"width\",\"height\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-image\":{type:\"resolvedImage\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-padding\":{type:\"padding\",default:[2],units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-keep-upright\":{type:\"boolean\",default:!1,requires:[\"icon-image\",{\"icon-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-offset\":{type:\"array\",value:\"number\",length:2,default:[0,0],requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"icon-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotation-alignment\":{type:\"enum\",values:{map:{},viewport:{},\"viewport-glyph\":{},auto:{}},default:\"auto\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-field\":{type:\"formatted\",default:\"\",tokens:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-font\":{type:\"array\",value:\"string\",default:[\"Open Sans Regular\",\"Arial Unicode MS Regular\"],requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-size\":{type:\"number\",default:16,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-width\":{type:\"number\",default:10,minimum:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-line-height\":{type:\"number\",default:1.2,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-letter-spacing\":{type:\"number\",default:0,units:\"ems\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-justify\":{type:\"enum\",values:{auto:{},left:{},center:{},right:{}},default:\"center\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-radial-offset\":{type:\"number\",units:\"ems\",default:0,requires:[\"text-field\"],\"property-type\":\"data-driven\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]}},\"text-variable-anchor\":{type:\"array\",value:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-variable-anchor-offset\":{type:\"variableAnchorOffsetCollection\",requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-anchor\":{type:\"enum\",values:{center:{},left:{},right:{},top:{},bottom:{},\"top-left\":{},\"top-right\":{},\"bottom-left\":{},\"bottom-right\":{}},default:\"center\",requires:[\"text-field\",{\"!\":\"text-variable-anchor\"}],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-max-angle\":{type:\"number\",default:45,units:\"degrees\",requires:[\"text-field\",{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-writing-mode\":{type:\"array\",value:\"enum\",values:{horizontal:{},vertical:{}},requires:[\"text-field\",{\"symbol-placement\":[\"point\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-rotate\":{type:\"number\",default:0,period:360,units:\"degrees\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-padding\":{type:\"number\",default:2,minimum:0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-keep-upright\":{type:\"boolean\",default:!0,requires:[\"text-field\",{\"text-rotation-alignment\":\"map\"},{\"symbol-placement\":[\"line\",\"line-center\"]}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-transform\":{type:\"enum\",values:{none:{},uppercase:{},lowercase:{}},default:\"none\",requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-offset\":{type:\"array\",value:\"number\",units:\"ems\",length:2,default:[0,0],requires:[\"text-field\",{\"!\":\"text-radial-offset\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"data-driven\"},\"text-allow-overlap\":{type:\"boolean\",default:!1,requires:[\"text-field\",{\"!\":\"text-overlap\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-overlap\":{type:\"enum\",values:{never:{},always:{},cooperative:{}},requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-ignore-placement\":{type:\"boolean\",default:!1,requires:[\"text-field\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-optional\":{type:\"boolean\",default:!1,requires:[\"text-field\",\"icon-image\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_raster:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},layout_hillshade:{visibility:{type:\"enum\",values:{visible:{},none:{}},default:\"visible\",\"property-type\":\"constant\"}},filter:{type:\"array\",value:\"*\"},filter_operator:{type:\"enum\",values:{\"==\":{},\"!=\":{},\">\":{},\">=\":{},\"<\":{},\"<=\":{},in:{},\"!in\":{},all:{},any:{},none:{},has:{},\"!has\":{}}},geometry_type:{type:\"enum\",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:\"expression\"},stops:{type:\"array\",value:\"function_stop\"},base:{type:\"number\",default:1,minimum:0},property:{type:\"string\",default:\"$zoom\"},type:{type:\"enum\",values:{identity:{},exponential:{},interval:{},categorical:{}},default:\"exponential\"},colorSpace:{type:\"enum\",values:{rgb:{},lab:{},hcl:{}},default:\"rgb\"},default:{type:\"*\",required:!1}},function_stop:{type:\"array\",minimum:0,maximum:24,value:[\"number\",\"color\"],length:2},expression:{type:\"array\",value:\"*\",minimum:1},light:{anchor:{type:\"enum\",default:\"viewport\",values:{map:{},viewport:{}},\"property-type\":\"data-constant\",transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]}},position:{type:\"array\",default:[1.15,210,30],length:3,value:\"number\",\"property-type\":\"data-constant\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]}},color:{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},intensity:{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},sky:{\"sky-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#88C6FC\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"horizon-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"fog-color\":{type:\"color\",\"property-type\":\"data-constant\",default:\"#ffffff\",expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"fog-ground-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"horizon-fog-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"sky-horizon-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0},\"atmosphere-blend\":{type:\"number\",\"property-type\":\"data-constant\",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:[\"zoom\"]},transition:!0}},terrain:{source:{type:\"string\",required:!0},exaggeration:{type:\"number\",minimum:0,default:1}},projection:{type:{type:\"enum\",default:\"mercator\",values:{mercator:{},globe:{}}}},paint:[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_heatmap\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_hillshade\",\"paint_background\"],paint_fill:{\"fill-antialias\":{type:\"boolean\",default:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-outline-color\":{type:\"color\",transition:!0,requires:[{\"!\":\"fill-pattern\"},{\"fill-antialias\":!0}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"fill-extrusion-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"fill-extrusion-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"fill-extrusion-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"fill-extrusion-height\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-base\":{type:\"number\",default:0,minimum:0,units:\"meters\",transition:!0,requires:[\"fill-extrusion-height\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"fill-extrusion-vertical-gradient\":{type:\"boolean\",default:!0,transition:!1,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_line:{\"line-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"line-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"line-width\":{type:\"number\",default:1,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-gap-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-offset\":{type:\"number\",default:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"line-dasharray\":{type:\"array\",value:\"number\",minimum:0,transition:!0,units:\"line widths\",requires:[{\"!\":\"line-pattern\"}],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"line-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]},\"property-type\":\"cross-faded-data-driven\"},\"line-gradient\":{type:\"color\",transition:!1,requires:[{\"!\":\"line-dasharray\"},{\"!\":\"line-pattern\"},{source:\"geojson\",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:[\"line-progress\"]},\"property-type\":\"color-ramp\"}},paint_circle:{\"circle-radius\":{type:\"number\",default:5,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-blur\":{type:\"number\",default:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"circle-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-scale\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-pitch-alignment\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"circle-stroke-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"circle-stroke-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"}},paint_heatmap:{\"heatmap-radius\":{type:\"number\",default:30,minimum:1,transition:!0,units:\"pixels\",expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-weight\":{type:\"number\",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"heatmap-intensity\":{type:\"number\",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"heatmap-color\":{type:\"color\",default:[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,\"rgba(0, 0, 255, 0)\",.1,\"royalblue\",.3,\"cyan\",.5,\"lime\",.7,\"yellow\",1,\"red\"],transition:!1,expression:{interpolated:!0,parameters:[\"heatmap-density\"]},\"property-type\":\"color-ramp\"},\"heatmap-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_symbol:{\"icon-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"icon-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"icon-image\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"icon-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"icon-image\",\"icon-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-color\":{type:\"color\",default:\"#000000\",transition:!0,overridable:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-color\":{type:\"color\",default:\"rgba(0, 0, 0, 0)\",transition:!0,requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-width\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-halo-blur\":{type:\"number\",default:0,minimum:0,transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\",\"feature\",\"feature-state\"]},\"property-type\":\"data-driven\"},\"text-translate\":{type:\"array\",value:\"number\",length:2,default:[0,0],transition:!0,units:\"pixels\",requires:[\"text-field\"],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"text-translate-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"map\",requires:[\"text-field\",\"text-translate\"],expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_raster:{\"raster-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-hue-rotate\":{type:\"number\",default:0,period:360,transition:!0,units:\"degrees\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-min\":{type:\"number\",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-brightness-max\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-saturation\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-contrast\":{type:\"number\",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-resampling\":{type:\"enum\",values:{linear:{},nearest:{}},default:\"linear\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"raster-fade-duration\":{type:\"number\",default:300,minimum:0,transition:!1,units:\"milliseconds\",expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_hillshade:{\"hillshade-illumination-direction\":{type:\"number\",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-illumination-anchor\":{type:\"enum\",values:{map:{},viewport:{}},default:\"viewport\",expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-exaggeration\":{type:\"number\",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-shadow-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-highlight-color\":{type:\"color\",default:\"#FFFFFF\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"hillshade-accent-color\":{type:\"color\",default:\"#000000\",transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},paint_background:{\"background-color\":{type:\"color\",default:\"#000000\",transition:!0,requires:[{\"!\":\"background-pattern\"}],expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"},\"background-pattern\":{type:\"resolvedImage\",transition:!0,expression:{interpolated:!1,parameters:[\"zoom\"]},\"property-type\":\"cross-faded\"},\"background-opacity\":{type:\"number\",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:[\"zoom\"]},\"property-type\":\"data-constant\"}},transition:{duration:{type:\"number\",default:300,minimum:0,units:\"milliseconds\"},delay:{type:\"number\",default:0,minimum:0,units:\"milliseconds\"}},\"property-type\":{\"data-driven\":{type:\"property-type\"},\"cross-faded\":{type:\"property-type\"},\"cross-faded-data-driven\":{type:\"property-type\"},\"color-ramp\":{type:\"property-type\"},\"data-constant\":{type:\"property-type\"},constant:{type:\"property-type\"}},promoteId:{\"*\":{type:\"string\"}}};let je=[\"type\",\"source\",\"source-layer\",\"minzoom\",\"maxzoom\",\"filter\",\"layout\"];function lt(R,S){let F={};for(let W in R)W!==\"ref\"&&(F[W]=R[W]);return je.forEach(W=>{W in S&&(F[W]=S[W])}),F}function pt(R,S){if(Array.isArray(R)){if(!Array.isArray(S)||R.length!==S.length)return!1;for(let F=0;F<R.length;F++)if(!pt(R[F],S[F]))return!1;return!0}if(typeof R==\"object\"&&R!==null&&S!==null){if(typeof S!=\"object\"||Object.keys(R).length!==Object.keys(S).length)return!1;for(let F in R)if(!pt(R[F],S[F]))return!1;return!0}return R===S}function Vt(R,S){R.push(S)}function ot(R,S,F){Vt(F,{command:\"addSource\",args:[R,S[R]]})}function ut(R,S,F){Vt(S,{command:\"removeSource\",args:[R]}),F[R]=!0}function Wt(R,S,F,W){ut(R,F,W),ot(R,S,F)}function Nt(R,S,F){let W;for(W in R[F])if(Object.prototype.hasOwnProperty.call(R[F],W)&&W!==\"data\"&&!pt(R[F][W],S[F][W]))return!1;for(W in S[F])if(Object.prototype.hasOwnProperty.call(S[F],W)&&W!==\"data\"&&!pt(R[F][W],S[F][W]))return!1;return!0}function $t(R,S,F,W,te,fe){R=R||{},S=S||{};for(let pe in R)Object.prototype.hasOwnProperty.call(R,pe)&&(pt(R[pe],S[pe])||F.push({command:fe,args:[W,pe,S[pe],te]}));for(let pe in S)Object.prototype.hasOwnProperty.call(S,pe)&&!Object.prototype.hasOwnProperty.call(R,pe)&&(pt(R[pe],S[pe])||F.push({command:fe,args:[W,pe,S[pe],te]}))}function sr(R){return R.id}function Tr(R,S){return R[S.id]=S,R}class fr{constructor(S,F,W,te){this.message=(S?`${S}: `:\"\")+W,te&&(this.identifier=te),F!=null&&F.__line__&&(this.line=F.__line__)}}function $e(R,...S){for(let F of S)for(let W in F)R[W]=F[W];return R}class St extends Error{constructor(S,F){super(F),this.message=F,this.key=S}}class Qt{constructor(S,F=[]){this.parent=S,this.bindings={};for(let[W,te]of F)this.bindings[W]=te}concat(S){return new Qt(this,S)}get(S){if(this.bindings[S])return this.bindings[S];if(this.parent)return this.parent.get(S);throw new Error(`${S} not found in scope.`)}has(S){return!!this.bindings[S]||!!this.parent&&this.parent.has(S)}}let Gt={kind:\"null\"},_t={kind:\"number\"},It={kind:\"string\"},mt={kind:\"boolean\"},er={kind:\"color\"},lr={kind:\"object\"},wr={kind:\"value\"},Lr={kind:\"collator\"},ti={kind:\"formatted\"},Br={kind:\"padding\"},Vr={kind:\"resolvedImage\"},dt={kind:\"variableAnchorOffsetCollection\"};function Ge(R,S){return{kind:\"array\",itemType:R,N:S}}function Je(R){if(R.kind===\"array\"){let S=Je(R.itemType);return typeof R.N==\"number\"?`array<${S}, ${R.N}>`:R.itemType.kind===\"value\"?\"array\":`array<${S}>`}return R.kind}let We=[Gt,_t,It,mt,er,ti,lr,Ge(wr),Br,Vr,dt];function tt(R,S){if(S.kind===\"error\")return null;if(R.kind===\"array\"){if(S.kind===\"array\"&&(S.N===0&&S.itemType.kind===\"value\"||!tt(R.itemType,S.itemType))&&(typeof R.N!=\"number\"||R.N===S.N))return null}else{if(R.kind===S.kind)return null;if(R.kind===\"value\"){for(let F of We)if(!tt(F,S))return null}}return`Expected ${Je(R)} but found ${Je(S)} instead.`}function xt(R,S){return S.some(F=>F.kind===R.kind)}function Ie(R,S){return S.some(F=>F===\"null\"?R===null:F===\"array\"?Array.isArray(R):F===\"object\"?R&&!Array.isArray(R)&&typeof R==\"object\":F===typeof R)}function xe(R,S){return R.kind===\"array\"&&S.kind===\"array\"?R.itemType.kind===S.itemType.kind&&typeof R.N==\"number\":R.kind===S.kind}let ke=.96422,vt=.82521,ir=4/29,ar=6/29,vr=3*ar*ar,ii=ar*ar*ar,pi=Math.PI/180,$r=180/Math.PI;function di(R){return(R%=360)<0&&(R+=360),R}function ji([R,S,F,W]){let te,fe,pe=wi((.2225045*(R=In(R))+.7168786*(S=In(S))+.0606169*(F=In(F)))/1);R===S&&S===F?te=fe=pe:(te=wi((.4360747*R+.3850649*S+.1430804*F)/ke),fe=wi((.0139322*R+.0971045*S+.7141733*F)/vt));let Fe=116*pe-16;return[Fe<0?0:Fe,500*(te-pe),200*(pe-fe),W]}function In(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function wi(R){return R>ii?Math.pow(R,1/3):R/vr+ir}function On([R,S,F,W]){let te=(R+16)/116,fe=isNaN(S)?te:te+S/500,pe=isNaN(F)?te:te-F/200;return te=1*Fn(te),fe=ke*Fn(fe),pe=vt*Fn(pe),[qn(3.1338561*fe-1.6168667*te-.4906146*pe),qn(-.9787684*fe+1.9161415*te+.033454*pe),qn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Fn(R){return R>ar?R*R*R:vr*(R-ir)}function ra(R){return parseInt(R.padEnd(2,R),16)/255}function la(R,S){return Ut(S?R/100:R,0,1)}function Ut(R,S,F){return Math.min(Math.max(S,R),F)}function wt(R){return!R.some(Number.isNaN)}let rr={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]};class nr{constructor(S,F,W,te=1,fe=!0){this.r=S,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter(\"rgb\",[S,F,W,te]))}static parse(S){if(S instanceof nr)return S;if(typeof S!=\"string\")return;let F=function(W){if((W=W.toLowerCase().trim())===\"transparent\")return[0,0,0,0];let te=rr[W];if(te){let[pe,Fe,Ke]=te;return[pe/255,Fe/255,Ke/255,1]}if(W.startsWith(\"#\")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,Fe=1;return[ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+pe)||\"ff\")]}if(W.startsWith(\"rgb\")){let pe=W.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(pe){let[Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn]=pe,zi=[Lt||\" \",mr||\" \",ui].join(\"\");if(zi===\"  \"||zi===\"  /\"||zi===\",,\"||zi===\",,,\"){let un=[ct,cr,zr].join(\"\"),Tn=un===\"%%%\"?100:un===\"\"?255:0;if(Tn){let pa=[Ut(+Ke/Tn,0,1),Ut(+Jt/Tn,0,1),Ut(+Pr/Tn,0,1),yi?la(+yi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(fe){let[pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr]=fe,zr=[Ke||\" \",Lt||\" \",cr].join(\"\");if(zr===\"  \"||zr===\"  /\"||zr===\",,\"||zr===\",,,\"){let ui=[+Fe,Ut(+ct,0,100),Ut(+Jt,0,100),mr?la(+mr,Pr):1];if(wt(ui))return function([yi,vn,zi,un]){function Tn(pa){let ro=(pa+yi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return yi=di(yi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),un]}(ui)}}}(S);return F?new nr(...F,!1):void 0}get rgb(){let{r:S,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter(\"rgb\",[S/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter(\"hcl\",function(S){let[F,W,te,fe]=ji(S),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?di(Math.atan2(te,W)*$r):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter(\"lab\",ji(this.rgb))}overwriteGetter(S,F){return Object.defineProperty(this,S,{value:F}),F}toString(){let[S,F,W,te]=this.rgb;return`rgba(${[S,F,W].map(fe=>Math.round(255*fe)).join(\",\")},${te})`}}nr.black=new nr(0,0,0,1),nr.white=new nr(1,1,1,1),nr.transparent=new nr(0,0,0,0),nr.red=new nr(1,0,0,1);class Er{constructor(S,F,W){this.sensitivity=S?F?\"variant\":\"case\":F?\"accent\":\"base\",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:\"search\"})}compare(S,F){return this.collator.compare(S,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(S,F,W,te,fe){this.text=S,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ri{constructor(S){this.sections=S}static fromString(S){return new ri([new Xr(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof ri?S:ri.fromString(S)}toString(){return this.sections.length===0?\"\":this.sections.map(S=>S.text).join(\"\")}}class Qr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Qr)return S;if(typeof S==\"number\")return new Qr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let F of S)if(typeof F!=\"number\")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new Qr(S)}}toString(){return JSON.stringify(this.values)}}let Oi=new Set([\"center\",\"left\",\"right\",\"top\",\"bottom\",\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"]);class $i{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof $i)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let F=0;F<S.length;F+=2){let W=S[F],te=S[F+1];if(typeof W!=\"string\"||!Oi.has(W)||!Array.isArray(te)||te.length!==2||typeof te[0]!=\"number\"||typeof te[1]!=\"number\")return}return new $i(S)}}toString(){return JSON.stringify(this.values)}}class tn{constructor(S){this.name=S.name,this.available=S.available}toString(){return this.name}static fromString(S){return S?new tn({name:S,available:!1}):null}}function fn(R,S,F,W){return typeof R==\"number\"&&R>=0&&R<=255&&typeof S==\"number\"&&S>=0&&S<=255&&typeof F==\"number\"&&F>=0&&F<=255?W===void 0||typeof W==\"number\"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,S,F,W].join(\", \")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W==\"number\"?[R,S,F,W]:[R,S,F]).join(\", \")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R==\"string\"||typeof R==\"boolean\"||typeof R==\"number\"||R instanceof nr||R instanceof Er||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn)return!0;if(Array.isArray(R)){for(let S of R)if(!yn(S))return!1;return!0}if(typeof R==\"object\"){for(let S in R)if(!yn(R[S]))return!1;return!0}return!1}function Sn(R){if(R===null)return Gt;if(typeof R==\"string\")return It;if(typeof R==\"boolean\")return mt;if(typeof R==\"number\")return _t;if(R instanceof nr)return er;if(R instanceof Er)return Lr;if(R instanceof ri)return ti;if(R instanceof Qr)return Br;if(R instanceof $i)return dt;if(R instanceof tn)return Vr;if(Array.isArray(R)){let S=R.length,F;for(let W of R){let te=Sn(W);if(F){if(F===te)continue;F=wr;break}F=te}return Ge(F||wr,S)}return lr}function Ba(R){let S=typeof R;return R===null?\"\":S===\"string\"||S===\"number\"||S===\"boolean\"?String(R):R instanceof nr||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn?R.toString():JSON.stringify(R)}class ua{constructor(S,F){this.type=S,this.value=F}static parse(S,F){if(S.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!yn(S[1]))return F.error(\"invalid value\");let W=S[1],te=Sn(W),fe=F.expectedType;return te.kind!==\"array\"||te.N!==0||!fe||fe.kind!==\"array\"||typeof fe.N==\"number\"&&fe.N!==0||(te=fe),new ua(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(S){this.name=\"ExpressionEvaluationError\",this.message=S}toJSON(){return this.message}}let Wa={string:It,number:_t,boolean:mt,object:lr};class Fa{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W,te=1,fe=S[0];if(fe===\"array\"){let Fe,Ke;if(S.length>2){let ct=S[1];if(typeof ct!=\"string\"||!(ct in Wa)||ct===\"object\")return F.error('The item type argument of \"array\" must be one of string, number, boolean',1);Fe=Wa[ct],te++}else Fe=wr;if(S.length>3){if(S[2]!==null&&(typeof S[2]!=\"number\"||S[2]<0||S[2]!==Math.floor(S[2])))return F.error('The length argument to \"array\" must be a positive integer literal',2);Ke=S[2],te++}W=Ge(Fe,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;te<S.length;te++){let Fe=F.parse(S[te],te,wr);if(!Fe)return null;pe.push(Fe)}return new Fa(W,pe)}evaluate(S){for(let F=0;F<this.args.length;F++){let W=this.args[F].evaluate(S);if(!tt(this.type,Sn(W)))return W;if(F===this.args.length-1)throw new ma(`Expected value to be of type ${Je(this.type)}, but found ${Je(Sn(W))} instead.`)}throw new Error}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Xo={\"to-boolean\":mt,\"to-color\":er,\"to-number\":_t,\"to-string\":It};class da{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W=S[0];if(!Xo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W===\"to-boolean\"||W===\"to-string\")&&S.length!==2)return F.error(\"Expected one argument.\");let te=Xo[W],fe=[];for(let pe=1;pe<S.length;pe++){let Fe=F.parse(S[pe],pe,wr);if(!Fe)return null;fe.push(Fe)}return new da(te,fe)}evaluate(S){switch(this.type.kind){case\"boolean\":return!!this.args[0].evaluate(S);case\"color\":{let F,W;for(let te of this.args){if(F=te.evaluate(S),W=null,F instanceof nr)return F;if(typeof F==\"string\"){let fe=S.parseColor(F);if(fe)return fe}else if(Array.isArray(F)&&(W=F.length<3||F.length>4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new nr(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"padding\":{let F;for(let W of this.args){F=W.evaluate(S);let te=Qr.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"variableAnchorOffsetCollection\":{let F;for(let W of this.args){F=W.evaluate(S);let te=$i.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F==\"string\"?F:JSON.stringify(F)}'`)}case\"number\":{let F=null;for(let W of this.args){if(F=W.evaluate(S),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case\"formatted\":return ri.fromString(Ba(this.args[0].evaluate(S)));case\"resolvedImage\":return tn.fromString(Ba(this.args[0].evaluate(S)));default:return Ba(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Wn=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&\"id\"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type==\"number\"?Wn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&\"geometry\"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(S){let F=this._parseColorCache[S];return F||(F=this._parseColorCache[S]=nr.parse(S)),F}}class vo{constructor(S,F,W=[],te,fe=new Qt,pe=[]){this.registry=S,this.path=W,this.key=W.map(Fe=>`[${Fe}]`).join(\"\"),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(S,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(S,fe):this._parse(S,fe)}_parse(S,F){function W(te,fe,pe){return pe===\"assert\"?new Fa(fe,[te]):pe===\"coerce\"?new da(fe,[te]):te}if(S!==null&&typeof S!=\"string\"&&typeof S!=\"boolean\"&&typeof S!=\"number\"||(S=[\"literal\",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');let te=S[0];if(typeof te!=\"string\")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use [\"literal\", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(S,this);if(!pe)return null;if(this.expectedType){let Fe=this.expectedType,Ke=pe.type;if(Fe.kind!==\"string\"&&Fe.kind!==\"number\"&&Fe.kind!==\"boolean\"&&Fe.kind!==\"object\"&&Fe.kind!==\"array\"||Ke.kind!==\"value\")if(Fe.kind!==\"color\"&&Fe.kind!==\"formatted\"&&Fe.kind!==\"resolvedImage\"||Ke.kind!==\"value\"&&Ke.kind!==\"string\")if(Fe.kind!==\"padding\"||Ke.kind!==\"value\"&&Ke.kind!==\"number\"&&Ke.kind!==\"array\")if(Fe.kind!==\"variableAnchorOffsetCollection\"||Ke.kind!==\"value\"&&Ke.kind!==\"array\"){if(this.checkSubtype(Fe,Ke))return null}else pe=W(pe,Fe,F.typeAnnotation||\"coerce\");else pe=W(pe,Fe,F.typeAnnotation||\"coerce\");else pe=W(pe,Fe,F.typeAnnotation||\"coerce\");else pe=W(pe,Fe,F.typeAnnotation||\"assert\")}if(!(pe instanceof ua)&&pe.type.kind!==\"resolvedImage\"&&this._isConstant(pe)){let Fe=new Ha;try{pe=new ua(pe.type,pe.evaluate(Fe))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression \"${te}\". If you wanted a literal array, use [\"literal\", [...]].`,0)}return this.error(S===void 0?\"'undefined' value invalid. Use null instead.\":typeof S==\"object\"?'Bare objects invalid. Use [\"literal\", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,F,W){let te=typeof S==\"number\"?this.path.concat(S):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(S,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join(\"\")}`;this.errors.push(new St(W,S))}checkSubtype(S,F){let W=tt(S,F);return W&&this.error(W),W}}class jn{constructor(S,F){this.type=F.type,this.bindings=[].concat(S),this.result=F}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let F of this.bindings)S(F[1]);S(this.result)}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let W=[];for(let fe=1;fe<S.length-1;fe+=2){let pe=S[fe];if(typeof pe!=\"string\")return F.error(`Expected string, but found ${typeof pe} instead.`,fe);if(/[^a-zA-Z0-9_]/.test(pe))return F.error(\"Variable names must contain only alphanumeric characters or '_'.\",fe);let Fe=F.parse(S[fe+1],fe+1);if(!Fe)return null;W.push([pe,Fe])}let te=F.parse(S[S.length-1],S.length-1,F.expectedType,W);return te?new jn(W,te):null}outputDefined(){return this.result.outputDefined()}}class Mt{constructor(S,F){this.type=F.type,this.name=S,this.boundExpression=F}static parse(S,F){if(S.length!==2||typeof S[1]!=\"string\")return F.error(\"'var' expression requires exactly one string literal argument.\");let W=S[1];return F.scope.has(W)?new Mt(W,F.scope.get(W)):F.error(`Unknown variable \"${W}\". Make sure \"${W}\" has been bound in an enclosing \"let\" expression before using it.`,1)}evaluate(S){return this.boundExpression.evaluate(S)}eachChild(){}outputDefined(){return!1}}class kr{constructor(S,F,W){this.type=S,this.index=F,this.input=W}static parse(S,F){if(S.length!==3)return F.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,_t),te=F.parse(S[2],2,Ge(F.expectedType||wr));return W&&te?new kr(te.type.itemType,W,te):null}evaluate(S){let F=this.index.evaluate(S),W=this.input.evaluate(S);if(F<0)throw new ma(`Array index out of bounds: ${F} < 0.`);if(F>=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class Jr{constructor(S,F){this.type=mt,this.needle=S,this.haystack=F}static parse(S,F){if(S.length!==3)return F.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,wr);return W&&te?xt(W.type,[mt,It,_t,Gt,wr])?new Jr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!W)return!1;if(!Ie(F,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);if(!Ie(W,[\"string\",\"array\"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`);return W.indexOf(F)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class vi{constructor(S,F,W){this.type=_t,this.needle=S,this.haystack=F,this.fromIndex=W}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,wr);if(!W||!te)return null;if(!xt(W.type,[mt,It,_t,Gt,wr]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,_t);return fe?new vi(W,te,fe):null}return new vi(W,te)}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!Ie(F,[\"boolean\",\"string\",\"number\",\"null\"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(S)),Ie(W,[\"string\"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(Ie(W,[\"array\"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(S,F,W,te,fe,pe){this.inputType=S,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(S,F){if(S.length<5)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return F.error(\"Expected an even number of arguments.\");let W,te;F.expectedType&&F.expectedType.kind!==\"value\"&&(te=F.expectedType);let fe={},pe=[];for(let ct=2;ct<S.length-1;ct+=2){let Lt=S[ct],Jt=S[ct+1];Array.isArray(Lt)||(Lt=[Lt]);let cr=F.concat(ct);if(Lt.length===0)return cr.error(\"Expected at least one branch label.\");for(let Pr of Lt){if(typeof Pr!=\"number\"&&typeof Pr!=\"string\")return cr.error(\"Branch labels must be numbers or strings.\");if(typeof Pr==\"number\"&&Math.abs(Pr)>Number.MAX_SAFE_INTEGER)return cr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Pr==\"number\"&&Math.floor(Pr)!==Pr)return cr.error(\"Numeric branch labels must be integer values.\");if(W){if(cr.checkSubtype(W,Sn(Pr)))return null}else W=Sn(Pr);if(fe[String(Pr)]!==void 0)return cr.error(\"Branch labels must be unique.\");fe[String(Pr)]=pe.length}let mr=F.parse(Jt,ct,te);if(!mr)return null;te=te||mr.type,pe.push(mr)}let Fe=F.parse(S[1],1,wr);if(!Fe)return null;let Ke=F.parse(S[S.length-1],S.length-1,te);return Ke?Fe.type.kind!==\"value\"&&F.concat(1).checkSubtype(W,Fe.type)?null:new hn(W,te,Fe,fe,pe,Ke):null}evaluate(S){let F=this.input.evaluate(S);return(Sn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class An{constructor(S,F,W){this.type=S,this.branches=F,this.otherwise=W}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return F.error(\"Expected an odd number of arguments.\");let W;F.expectedType&&F.expectedType.kind!==\"value\"&&(W=F.expectedType);let te=[];for(let pe=1;pe<S.length-1;pe+=2){let Fe=F.parse(S[pe],pe,mt);if(!Fe)return null;let Ke=F.parse(S[pe+1],pe+1,W);if(!Ke)return null;te.push([Fe,Ke]),W=W||Ke.type}let fe=F.parse(S[S.length-1],S.length-1,W);if(!fe)return null;if(!W)throw new Error(\"Can't infer output type\");return new An(W,te,fe)}evaluate(S){for(let[F,W]of this.branches)if(F.evaluate(S))return W.evaluate(S);return this.otherwise.evaluate(S)}eachChild(S){for(let[F,W]of this.branches)S(F),S(W);S(this.otherwise)}outputDefined(){return this.branches.every(([S,F])=>F.outputDefined())&&this.otherwise.outputDefined()}}class Mn{constructor(S,F,W,te){this.type=S,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,_t);if(!W||!te)return null;if(!xt(W.type,[Ge(wr),It,wr]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,_t);return fe?new Mn(W.type,W,te,fe):null}return new Mn(W.type,W,te)}evaluate(S){let F=this.input.evaluate(S),W=this.beginIndex.evaluate(S),te;if(this.endIndex&&(te=this.endIndex.evaluate(S)),Ie(F,[\"string\"]))return[...F].slice(W,te).join(\"\");if(Ie(F,[\"array\"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Sn(F))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function Li(R,S){let F=R.length-1,W,te,fe=0,pe=F,Fe=0;for(;fe<=pe;)if(Fe=Math.floor((fe+pe)/2),W=R[Fe],te=R[Fe+1],W<=S){if(Fe===F||S<te)return Fe;fe=Fe+1}else{if(!(W>S))throw new ma(\"Input is not a number.\");pe=Fe-1}return 0}class _n{constructor(S,F,W){this.type=S,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(S,F){if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error(\"Expected an even number of arguments.\");let W=F.parse(S[1],1,_t);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!==\"value\"&&(fe=F.expectedType);for(let pe=1;pe<S.length;pe+=2){let Fe=pe===1?-1/0:S[pe],Ke=S[pe+1],ct=pe,Lt=pe+1;if(typeof Fe!=\"number\")return F.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ct);if(te.length&&te[te.length-1][0]>=Fe)return F.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.',ct);let Jt=F.parse(Ke,Lt,fe);if(!Jt)return null;fe=fe||Jt.type,te.push([Fe,Jt])}return new _n(fe,W,te)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(S):W[Li(F,te)].evaluate(S)}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,\"default\")?R.default:R}var $n=Ma;function Ma(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<S)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,Fe=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<S));W++)R>te?pe=F:Fe=F,F=.5*(Fe-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var _o=ya($n);function No(R,S,F){return R+F*(S-R)}function po(R,S,F){return R.map((W,te)=>No(W,S[te],F))}let Lo={number:No,color:function(R,S,F,W=\"rgb\"){switch(W){case\"rgb\":{let[te,fe,pe,Fe]=po(R.rgb,S.rgb,F);return new nr(te,fe,pe,Fe,!1)}case\"hcl\":{let[te,fe,pe,Fe]=R.hcl,[Ke,ct,Lt,Jt]=S.hcl,cr,mr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?cr=NaN:(cr=Ke,pe!==1&&pe!==0||(mr=ct)):(cr=te,Lt!==1&&Lt!==0||(mr=fe));else{let vn=Ke-te;Ke>te&&vn>180?vn-=360:Ke<te&&te-Ke>180&&(vn+=360),cr=te+F*vn}let[Pr,zr,ui,yi]=function([vn,zi,un,Tn]){return vn=isNaN(vn)?0:vn*pi,On([un,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([cr,mr!=null?mr:No(fe,ct,F),No(pe,Lt,F),No(Fe,Jt,F)]);return new nr(Pr,zr,ui,yi,!1)}case\"lab\":{let[te,fe,pe,Fe]=On(po(R.lab,S.lab,F));return new nr(te,fe,pe,Fe,!1)}}},array:po,padding:function(R,S,F){return new Qr(po(R.values,S.values,F))},variableAnchorOffsetCollection:function(R,S,F){let W=R.values,te=S.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${S.toString()}`);let fe=[];for(let pe=0;pe<W.length;pe+=2){if(W[pe]!==te[pe])throw new ma(`Cannot interpolate values containing mismatched anchors. from[${pe}]: ${W[pe]}, to[${pe}]: ${te[pe]}`);fe.push(W[pe]);let[Fe,Ke]=W[pe+1],[ct,Lt]=te[pe+1];fe.push([No(Fe,ct,F),No(Ke,Lt,F)])}return new $i(fe)}};class ko{constructor(S,F,W,te,fe){this.type=S,this.operator=F,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[pe,Fe]of fe)this.labels.push(pe),this.outputs.push(Fe)}static interpolationFactor(S,F,W,te){let fe=0;if(S.name===\"exponential\")fe=Ds(F,S.base,W,te);else if(S.name===\"linear\")fe=Ds(F,1,W,te);else if(S.name===\"cubic-bezier\"){let pe=S.controlPoints;fe=new _o(pe[0],pe[1],pe[2],pe[3]).solve(Ds(F,1,W,te))}return fe}static parse(S,F){let[W,te,fe,...pe]=S;if(!Array.isArray(te)||te.length===0)return F.error(\"Expected an interpolation type expression.\",1);if(te[0]===\"linear\")te={name:\"linear\"};else if(te[0]===\"exponential\"){let ct=te[1];if(typeof ct!=\"number\")return F.error(\"Exponential interpolation requires a numeric base.\",1,1);te={name:\"exponential\",base:ct}}else{if(te[0]!==\"cubic-bezier\")return F.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let ct=te.slice(1);if(ct.length!==4||ct.some(Lt=>typeof Lt!=\"number\"||Lt<0||Lt>1))return F.error(\"Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.\",1);te={name:\"cubic-bezier\",controlPoints:ct}}}if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error(\"Expected an even number of arguments.\");if(fe=F.parse(fe,2,_t),!fe)return null;let Fe=[],Ke=null;W===\"interpolate-hcl\"||W===\"interpolate-lab\"?Ke=er:F.expectedType&&F.expectedType.kind!==\"value\"&&(Ke=F.expectedType);for(let ct=0;ct<pe.length;ct+=2){let Lt=pe[ct],Jt=pe[ct+1],cr=ct+3,mr=ct+4;if(typeof Lt!=\"number\")return F.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.',cr);if(Fe.length&&Fe[Fe.length-1][0]>=Lt)return F.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.',cr);let Pr=F.parse(Jt,mr,Ke);if(!Pr)return null;Ke=Ke||Pr.type,Fe.push([Lt,Pr])}return xe(Ke,_t)||xe(Ke,er)||xe(Ke,Br)||xe(Ke,dt)||xe(Ke,Ge(_t))?new ko(Ke,W,te,fe,Fe):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(S);let pe=Li(F,te),Fe=ko.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(S),ct=W[pe+1].evaluate(S);switch(this.operator){case\"interpolate\":return Lo[this.type.kind](Ke,ct,Fe);case\"interpolate-hcl\":return Lo.color(Ke,ct,Fe,\"hcl\");case\"interpolate-lab\":return Lo.color(Ke,ct,Fe,\"lab\")}}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Ds(R,S,F,W){let te=W-F,fe=R-F;return te===0?0:S===1?fe/te:(Math.pow(S,fe)-1)/(Math.pow(S,te)-1)}class Fs{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error(\"Expectected at least one argument.\");let W=null,te=F.expectedType;te&&te.kind!==\"value\"&&(W=te);let fe=[];for(let Fe of S.slice(1)){let Ke=F.parse(Fe,1+fe.length,W,void 0,{typeAnnotation:\"omit\"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error(\"No output type\");let pe=te&&fe.some(Fe=>tt(te,Fe.type));return new Fs(pe?wr:W,fe)}evaluate(S){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(S),W&&W instanceof tn&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function ll(R,S){return R===\"==\"||R===\"!=\"?S.kind===\"boolean\"||S.kind===\"string\"||S.kind===\"number\"||S.kind===\"null\"||S.kind===\"value\":S.kind===\"string\"||S.kind===\"number\"||S.kind===\"value\"}function ul(R,S,F,W){return W.compare(S,F)===0}function zl(R,S,F){let W=R!==\"==\"&&R!==\"!=\";return class hje{constructor(fe,pe,Fe){this.type=mt,this.lhs=fe,this.rhs=pe,this.collator=Fe,this.hasUntypedArgument=fe.type.kind===\"value\"||pe.type.kind===\"value\"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error(\"Expected two or three arguments.\");let Fe=fe[0],Ke=pe.parse(fe[1],1,wr);if(!Ke)return null;if(!ll(Fe,Ke.type))return pe.concat(1).error(`\"${Fe}\" comparisons are not supported for type '${Je(Ke.type)}'.`);let ct=pe.parse(fe[2],2,wr);if(!ct)return null;if(!ll(Fe,ct.type))return pe.concat(2).error(`\"${Fe}\" comparisons are not supported for type '${Je(ct.type)}'.`);if(Ke.type.kind!==ct.type.kind&&Ke.type.kind!==\"value\"&&ct.type.kind!==\"value\")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ct.type)}'.`);W&&(Ke.type.kind===\"value\"&&ct.type.kind!==\"value\"?Ke=new Fa(ct.type,[Ke]):Ke.type.kind!==\"value\"&&ct.type.kind===\"value\"&&(ct=new Fa(Ke.type,[ct])));let Lt=null;if(fe.length===4){if(Ke.type.kind!==\"string\"&&ct.type.kind!==\"string\"&&Ke.type.kind!==\"value\"&&ct.type.kind!==\"value\")return pe.error(\"Cannot use collator to compare non-string types.\");if(Lt=pe.parse(fe[3],3,Lr),!Lt)return null}return new hje(Ke,ct,Lt)}evaluate(fe){let pe=this.lhs.evaluate(fe),Fe=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(Fe);if(Ke.kind!==ct.kind||Ke.kind!==\"string\"&&Ke.kind!==\"number\")throw new ma(`Expected arguments for \"${R}\" to be (string, string) or (number, number), but found (${Ke.kind}, ${ct.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(Fe);if(Ke.kind!==\"string\"||ct.kind!==\"string\")return S(fe,pe,Fe)}return this.collator?F(fe,pe,Fe,this.collator.evaluate(fe)):S(fe,pe,Fe)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl(\"==\",function(R,S,F){return S===F},ul),il=zl(\"!=\",function(R,S,F){return S!==F},function(R,S,F,W){return!ul(0,S,F,W)}),As=zl(\"<\",function(R,S,F){return S<F},function(R,S,F,W){return W.compare(S,F)<0}),cl=zl(\">\",function(R,S,F){return S>F},function(R,S,F,W){return W.compare(S,F)>0}),Ks=zl(\"<=\",function(R,S,F){return S<=F},function(R,S,F,W){return W.compare(S,F)<=0}),zs=zl(\">=\",function(R,S,F){return S>=F},function(R,S,F,W){return W.compare(S,F)>=0});class Io{constructor(S,F,W){this.type=Lr,this.locale=W,this.caseSensitive=S,this.diacriticSensitive=F}static parse(S,F){if(S.length!==2)return F.error(\"Expected one argument.\");let W=S[1];if(typeof W!=\"object\"||Array.isArray(W))return F.error(\"Collator options argument must be an object.\");let te=F.parse(W[\"case-sensitive\"]!==void 0&&W[\"case-sensitive\"],1,mt);if(!te)return null;let fe=F.parse(W[\"diacritic-sensitive\"]!==void 0&&W[\"diacritic-sensitive\"],1,mt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,It),!pe)?null:new Io(te,fe,pe)}evaluate(S){return new Er(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class ls{constructor(S,F,W,te,fe){this.type=It,this.number=S,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(S,F){if(S.length!==3)return F.error(\"Expected two arguments.\");let W=F.parse(S[1],1,_t);if(!W)return null;let te=S[2];if(typeof te!=\"object\"||Array.isArray(te))return F.error(\"NumberFormat options argument must be an object.\");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,It),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,It),!pe))return null;let Fe=null;if(te[\"min-fraction-digits\"]&&(Fe=F.parse(te[\"min-fraction-digits\"],1,_t),!Fe))return null;let Ke=null;return te[\"max-fraction-digits\"]&&(Ke=F.parse(te[\"max-fraction-digits\"],1,_t),!Ke)?null:new ls(W,fe,pe,Fe,Ke)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?\"currency\":\"decimal\",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class Yl{constructor(S){this.type=ti,this.sections=S}static parse(S,F){if(S.length<2)return F.error(\"Expected at least one argument.\");let W=S[1];if(!Array.isArray(W)&&typeof W==\"object\")return F.error(\"First argument must be an image or text section.\");let te=[],fe=!1;for(let pe=1;pe<=S.length-1;++pe){let Fe=S[pe];if(fe&&typeof Fe==\"object\"&&!Array.isArray(Fe)){fe=!1;let Ke=null;if(Fe[\"font-scale\"]&&(Ke=F.parse(Fe[\"font-scale\"],1,_t),!Ke))return null;let ct=null;if(Fe[\"text-font\"]&&(ct=F.parse(Fe[\"text-font\"],1,Ge(It)),!ct))return null;let Lt=null;if(Fe[\"text-color\"]&&(Lt=F.parse(Fe[\"text-color\"],1,er),!Lt))return null;let Jt=te[te.length-1];Jt.scale=Ke,Jt.font=ct,Jt.textColor=Lt}else{let Ke=F.parse(S[pe],1,wr);if(!Ke)return null;let ct=Ke.type.kind;if(ct!==\"string\"&&ct!==\"value\"&&ct!==\"null\"&&ct!==\"resolvedImage\")return F.error(\"Formatted text type must be 'string', 'value', 'image' or 'null'.\");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Yl(te)}evaluate(S){return new ri(this.sections.map(F=>{let W=F.content.evaluate(S);return Sn(W)===Vr?new Xr(\"\",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(S):null,F.font?F.font.evaluate(S).join(\",\"):null,F.textColor?F.textColor.evaluate(S):null)}))}eachChild(S){for(let F of this.sections)S(F.content),F.scale&&S(F.scale),F.font&&S(F.font),F.textColor&&S(F.textColor)}outputDefined(){return!1}}class Su{constructor(S){this.type=Vr,this.input=S}static parse(S,F){if(S.length!==2)return F.error(\"Expected two arguments.\");let W=F.parse(S[1],1,It);return W?new Su(W):F.error(\"No image name provided.\")}evaluate(S){let F=this.input.evaluate(S),W=tn.fromString(F);return W&&S.availableImages&&(W.available=S.availableImages.indexOf(F)>-1),W}eachChild(S){S(this.input)}outputDefined(){return!1}}class nc{constructor(S){this.type=_t,this.input=S}static parse(S,F){if(S.length!==2)return F.error(`Expected 1 argument, but found ${S.length-1} instead.`);let W=F.parse(S[1],1);return W?W.type.kind!==\"array\"&&W.type.kind!==\"string\"&&W.type.kind!==\"value\"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(S){let F=this.input.evaluate(S);if(typeof F==\"string\")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Sn(F))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,S){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,S.z);return[Math.round(F*te*bs),Math.round(W*te*bs)]}function _a(R,S){let F=Math.pow(2,S.z);return[(te=(R[0]/bs+S.x)/F,360*te-180),(W=(R[1]/bs+S.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,S){R[0]=Math.min(R[0],S[0]),R[1]=Math.min(R[1],S[1]),R[2]=Math.max(R[2],S[0]),R[3]=Math.max(R[3],S[1])}function Ol(R,S){return!(R[0]<=S[0]||R[2]>=S[2]||R[1]<=S[1]||R[3]>=S[3])}function xo(R,S,F){let W=R[0]-S[0],te=R[1]-S[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Kl(R,S,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[S[0]-R[0],S[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!qo(R,S,F,W)||!qo(F,W,R,S));var te,fe}function Ns(R,S,F){for(let W of F)for(let te=0;te<W.length-1;++te)if(Kl(R,S,W[te],W[te+1]))return!0;return!1}function Hl(R,S,F=!1){let W=!1;for(let Fe of S)for(let Ke=0;Ke<Fe.length-1;Ke++){if(xo(R,Fe[Ke],Fe[Ke+1]))return F;(fe=Fe[Ke])[1]>(te=R)[1]!=(pe=Fe[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,S){for(let F of S)if(Hl(R,F))return!0;return!1}function aa(R,S){for(let F of R)if(!Hl(F,S))return!1;for(let F=0;F<R.length-1;++F)if(Ns(R[F],R[F+1],S))return!1;return!0}function Oo(R,S){for(let F of S)if(aa(R,F))return!0;return!1}function qo(R,S,F,W){let te=W[0]-F[0],fe=W[1]-F[1],pe=(R[0]-F[0])*fe-te*(R[1]-F[1]),Fe=(S[0]-F[0])*fe-te*(S[1]-F[1]);return pe>0&&Fe<0||pe<0&&Fe>0}function ql(R,S,F){let W=[];for(let te=0;te<R.length;te++){let fe=[];for(let pe=0;pe<R[te].length;pe++){let Fe=Rn(R[te][pe],F);Vu(S,Fe),fe.push(Fe)}W.push(fe)}return W}function Pc(R,S,F){let W=[];for(let te=0;te<R.length;te++){let fe=ql(R[te],S,F);W.push(fe)}return W}function Do(R,S,F,W){if(R[0]<F[0]||R[0]>F[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(S,R)}function rf(R,S,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Fe of R)for(let Ke of Fe){let ct=[Ke.x+fe[0],Ke.y+fe[1]];Do(ct,S,F,te),pe.push(ct)}return pe}function Vf(R,S,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ct=[];for(let Lt of Ke){let Jt=[Lt.x+fe[0],Lt.y+fe[1]];Vu(S,Jt),ct.push(Jt)}pe.push(ct)}if(S[2]-S[0]<=te/2){(Fe=S)[0]=Fe[1]=1/0,Fe[2]=Fe[3]=-1/0;for(let Ke of pe)for(let ct of Ke)Do(ct,S,F,te)}var Fe;return pe}class pl{constructor(S,F){this.type=mt,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type===\"FeatureCollection\"){let te=[];for(let fe of W.features){let{type:pe,coordinates:Fe}=fe.geometry;pe===\"Polygon\"&&te.push(Fe),pe===\"MultiPolygon\"&&te.push(...Fe)}if(te.length)return new pl(W,{type:\"MultiPolygon\",coordinates:te})}else if(W.type===\"Feature\"){let te=W.geometry.type;if(te===\"Polygon\"||te===\"MultiPolygon\")return new pl(W,W.geometry)}else if(W.type===\"Polygon\"||W.type===\"MultiPolygon\")return new pl(W,W)}return F.error(\"'within' expression requires valid geojson object that contains polygon geometry type.\")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()===\"Point\")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type===\"Polygon\"){let Fe=ql(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!Hl(ct,Fe))return!1}if(W.type===\"MultiPolygon\"){let Fe=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!ac(ct,Fe))return!1}return!0}(S,this.geometries);if(S.geometryType()===\"LineString\")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type===\"Polygon\"){let Fe=ql(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!aa(ct,Fe))return!1}if(W.type===\"MultiPolygon\"){let Fe=Pc(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!Oo(ct,Fe))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],S=(F,W)=>F<W?-1:F>W?1:0){if(this.data=R,this.length=this.data.length,this.compare=S,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:S,compare:F}=this,W=S[R];for(;R>0;){let te=R-1>>1,fe=S[te];if(F(W,fe)>=0)break;S[R]=fe,R=te}S[R]=W}_down(R){let{data:S,compare:F}=this,W=this.length>>1,te=S[R];for(;R<W;){let fe=1+(R<<1),pe=fe+1;if(pe<this.length&&F(S[pe],S[fe])<0&&(fe=pe),F(S[fe],te)>=0)break;S[R]=S[fe],R=fe}S[R]=te}};function Jl(R,S,F,W,te){Os(R,S,F,W||R.length-1,te||oc)}function Os(R,S,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=S-F+1,Fe=Math.log(fe),Ke=.5*Math.exp(2*Fe/3),ct=.5*Math.sqrt(Fe*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);Os(R,S,Math.max(F,Math.floor(S-pe*Ke/fe+ct)),Math.min(W,Math.floor(S+(fe-pe)*Ke/fe+ct)),te)}var Lt=R[S],Jt=F,cr=W;for(yu(R,F,S),te(R[W],Lt)>0&&yu(R,F,W);Jt<cr;){for(yu(R,Jt,cr),Jt++,cr--;te(R[Jt],Lt)<0;)Jt++;for(;te(R[cr],Lt)>0;)cr--}te(R[F],Lt)===0?yu(R,F,cr):yu(R,++cr,W),cr<=S&&(F=cr+1),S<=cr&&(W=cr-1)}}function yu(R,S,F){var W=R[S];R[S]=R[F],R[F]=W}function oc(R,S){return R<S?-1:R>S?1:0}function Cf(R,S){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=jh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),S>1)for(let fe=0;fe<F.length;fe++)F[fe].length<=S||(Jl(F[fe],S,1,F[fe].length-1,sc),F[fe]=F[fe].slice(0,S));return F}function sc(R,S){return S.area-R.area}function jh(R){let S=0;for(let F,W,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)F=R[te],W=R[pe],S+=(W.x-F.x)*(F.y+W.y);return S}let Lf=1/298.257223563,cs=Lf*(2-Lf),nf=Math.PI/180;class Gf{constructor(S){let F=6378.137*nf*1e3,W=Math.cos(S*nf),te=1/(1-cs*(1-W*W)),fe=Math.sqrt(te);this.kx=F*fe*W,this.ky=F*fe*te*(1-cs)}distance(S,F){let W=this.wrap(S[0]-F[0])*this.kx,te=(S[1]-F[1])*this.ky;return Math.sqrt(W*W+te*te)}pointOnLine(S,F){let W,te,fe,pe,Fe=1/0;for(let Ke=0;Ke<S.length-1;Ke++){let ct=S[Ke][0],Lt=S[Ke][1],Jt=this.wrap(S[Ke+1][0]-ct)*this.kx,cr=(S[Ke+1][1]-Lt)*this.ky,mr=0;Jt===0&&cr===0||(mr=(this.wrap(F[0]-ct)*this.kx*Jt+(F[1]-Lt)*this.ky*cr)/(Jt*Jt+cr*cr),mr>1?(ct=S[Ke+1][0],Lt=S[Ke+1][1]):mr>0&&(ct+=Jt/this.kx*mr,Lt+=cr/this.ky*mr)),Jt=this.wrap(F[0]-ct)*this.kx,cr=(F[1]-Lt)*this.ky;let Pr=Jt*Jt+cr*cr;Pr<Fe&&(Fe=Pr,W=ct,te=Lt,fe=Ke,pe=mr)}return{point:[W,te],index:fe,t:Math.max(0,Math.min(1,pe))}}wrap(S){for(;S<-180;)S+=360;for(;S>180;)S-=360;return S}}function $l(R,S){return S[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,S){return R[1]>=R[0]&&R[1]<S}function Fu(R,S){if(R[0]>R[1])return[null,null];let F=fl(R);if(S){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,S){if(!lc(S,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=S[0];W<=S[1];++W)Vu(F,R[W]);return F}function Hs(R){let S=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(S,W);return S}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,S,F){if(!Go(R)||!Go(S))return NaN;let W=0,te=0;return R[2]<S[0]&&(W=S[0]-R[2]),R[0]>S[2]&&(W=R[0]-S[2]),R[1]>S[3]&&(te=R[1]-S[3]),R[3]<S[1]&&(te=S[1]-R[3]),F.distance([0,0],[W,te])}function uc(R,S,F){let W=F.pointOnLine(S,R);return F.distance(R,W.point)}function xl(R,S,F,W,te){let fe=Math.min(uc(R,[F,W],te),uc(S,[F,W],te)),pe=Math.min(uc(F,[R,S],te),uc(W,[R,S],te));return Math.min(fe,pe)}function Gu(R,S,F,W,te){if(!lc(S,R.length)||!lc(W,F.length))return 1/0;let fe=1/0;for(let pe=S[0];pe<S[1];++pe){let Fe=R[pe],Ke=R[pe+1];for(let ct=W[0];ct<W[1];++ct){let Lt=F[ct],Jt=F[ct+1];if(Kl(Fe,Ke,Lt,Jt))return 0;fe=Math.min(fe,xl(Fe,Ke,Lt,Jt,te))}}return fe}function qs(R,S,F,W,te){if(!lc(S,R.length)||!lc(W,F.length))return NaN;let fe=1/0;for(let pe=S[0];pe<=S[1];++pe)for(let Fe=W[0];Fe<=W[1];++Fe)if(fe=Math.min(fe,te.distance(R[pe],F[Fe])),fe===0)return fe;return fe}function od(R,S,F){if(Hl(R,S,!0))return 0;let W=1/0;for(let te of S){let fe=te[0],pe=te[te.length-1];if(fe!==pe&&(W=Math.min(W,uc(R,[pe,fe],F)),W===0))return W;let Fe=F.pointOnLine(te,R);if(W=Math.min(W,F.distance(R,Fe.point)),W===0)return W}return W}function Po(R,S,F,W){if(!lc(S,R.length))return NaN;for(let fe=S[0];fe<=S[1];++fe)if(Hl(R[fe],F,!0))return 0;let te=1/0;for(let fe=S[0];fe<S[1];++fe){let pe=R[fe],Fe=R[fe+1];for(let Ke of F)for(let ct=0,Lt=Ke.length,Jt=Lt-1;ct<Lt;Jt=ct++){let cr=Ke[Jt],mr=Ke[ct];if(Kl(pe,Fe,cr,mr))return 0;te=Math.min(te,xl(pe,Fe,cr,mr,W))}}return te}function sd(R,S){for(let F of R)for(let W of F)if(Hl(W,S,!0))return!0;return!1}function Ko(R,S,F,W=1/0){let te=Hs(R),fe=Hs(S);if(W!==1/0&&ps(te,fe,F)>=W)return W;if(Ol(te,fe)){if(sd(R,S))return 0}else if(sd(S,R))return 0;let pe=1/0;for(let Fe of R)for(let Ke=0,ct=Fe.length,Lt=ct-1;Ke<ct;Lt=Ke++){let Jt=Fe[Lt],cr=Fe[Ke];for(let mr of S)for(let Pr=0,zr=mr.length,ui=zr-1;Pr<zr;ui=Pr++){let yi=mr[ui],vn=mr[Pr];if(Kl(Jt,cr,yi,vn))return 0;pe=Math.min(pe,xl(Jt,cr,yi,vn,F))}}return pe}function Pa(R,S,F,W,te,fe){if(!fe)return;let pe=ps(Es(W,fe),te,F);pe<S&&R.push([pe,fe,[0,0]])}function af(R,S,F,W,te,fe,pe){if(!fe||!pe)return;let Fe=ps(Es(W,fe),Es(te,pe),F);Fe<S&&R.push([Fe,fe,pe])}function Hu(R,S,F,W,te=1/0){let fe=Math.min(W.distance(R[0],F[0][0]),te);if(fe===0)return fe;let pe=new Zc([[0,[0,R.length-1],[0,0]]],$l),Fe=Hs(F);for(;pe.length>0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ct=Ke[1],Lt=S?50:100;if(fl(ct)<=Lt){if(!lc(ct,R.length))return NaN;if(S){let Jt=Po(R,ct,F,W);if(isNaN(Jt)||Jt===0)return Jt;fe=Math.min(fe,Jt)}else for(let Jt=ct[0];Jt<=ct[1];++Jt){let cr=od(R[Jt],F,W);if(fe=Math.min(fe,cr),fe===0)return 0}}else{let Jt=Fu(ct,S);Pa(pe,fe,W,R,Fe,Jt[0]),Pa(pe,fe,W,R,Fe,Jt[1])}}return fe}function bl(R,S,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let Fe=new Zc([[0,[0,R.length-1],[0,F.length-1]]],$l);for(;Fe.length>0;){let Ke=Fe.pop();if(Ke[0]>=pe)continue;let ct=Ke[1],Lt=Ke[2],Jt=S?50:100,cr=W?50:100;if(fl(ct)<=Jt&&fl(Lt)<=cr){if(!lc(ct,R.length)&&lc(Lt,F.length))return NaN;let mr;if(S&&W)mr=Gu(R,ct,F,Lt,te),pe=Math.min(pe,mr);else if(S&&!W){let Pr=R.slice(ct[0],ct[1]+1);for(let zr=Lt[0];zr<=Lt[1];++zr)if(mr=uc(F[zr],Pr,te),pe=Math.min(pe,mr),pe===0)return pe}else if(!S&&W){let Pr=F.slice(Lt[0],Lt[1]+1);for(let zr=ct[0];zr<=ct[1];++zr)if(mr=uc(R[zr],Pr,te),pe=Math.min(pe,mr),pe===0)return pe}else mr=qs(R,ct,F,Lt,te),pe=Math.min(pe,mr)}else{let mr=Fu(ct,S),Pr=Fu(Lt,W);af(Fe,pe,te,R,F,mr[0],Pr[0]),af(Fe,pe,te,R,F,mr[0],Pr[1]),af(Fe,pe,te,R,F,mr[1],Pr[0]),af(Fe,pe,te,R,F,mr[1],Pr[1])}}return pe}function Hf(R){return R.type===\"MultiPolygon\"?R.coordinates.map(S=>({type:\"Polygon\",coordinates:S})):R.type===\"MultiLineString\"?R.coordinates.map(S=>({type:\"LineString\",coordinates:S})):R.type===\"MultiPoint\"?R.coordinates.map(S=>({type:\"Point\",coordinates:S})):[R]}class Ic{constructor(S,F){this.type=_t,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type===\"FeatureCollection\")return new Ic(W,W.features.map(te=>Hf(te.geometry)).flat());if(W.type===\"Feature\")return new Ic(W,Hf(W.geometry));if(\"type\"in W&&\"coordinates\"in W)return new Ic(W,Hf(W))}return F.error(\"'distance' expression requires valid geojson object that contains polygon geometry type.\")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()===\"Point\")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Fe=1/0;for(let Ke of W){switch(Ke.type){case\"Point\":Fe=Math.min(Fe,bl(fe,!1,[Ke.coordinates],!1,pe,Fe));break;case\"LineString\":Fe=Math.min(Fe,bl(fe,!1,Ke.coordinates,!0,pe,Fe));break;case\"Polygon\":Fe=Math.min(Fe,Hu(fe,!1,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries);if(S.geometryType()===\"LineString\")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Fe=1/0;for(let Ke of W){switch(Ke.type){case\"Point\":Fe=Math.min(Fe,bl(fe,!0,[Ke.coordinates],!1,pe,Fe));break;case\"LineString\":Fe=Math.min(Fe,bl(fe,!0,Ke.coordinates,!0,pe,Fe));break;case\"Polygon\":Fe=Math.min(Fe,Hu(fe,!0,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries);if(S.geometryType()===\"Polygon\")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ct=>ct.map(Lt=>_a([Lt.x,Lt.y],F.canonical)))),pe=new Gf(fe[0][0][0][1]),Fe=1/0;for(let Ke of W)for(let ct of fe){switch(Ke.type){case\"Point\":Fe=Math.min(Fe,Hu([Ke.coordinates],!1,ct,pe,Fe));break;case\"LineString\":Fe=Math.min(Fe,Hu(Ke.coordinates,!0,ct,pe,Fe));break;case\"Polygon\":Fe=Math.min(Fe,Ko(ct,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={\"==\":us,\"!=\":il,\">\":cl,\"<\":As,\">=\":zs,\"<=\":Ks,array:Fa,at:kr,boolean:Fa,case:An,coalesce:Fs,collator:Io,format:Yl,image:Su,in:Jr,\"index-of\":vi,interpolate:ko,\"interpolate-hcl\":ko,\"interpolate-lab\":ko,length:nc,let:jn,literal:ua,match:hn,number:Fa,\"number-format\":ls,object:Fa,slice:Mn,step:_n,string:Fa,\"to-boolean\":da,\"to-color\":da,\"to-number\":da,\"to-string\":da,var:Mt,within:pl,distance:Ic};class Bl{constructor(S,F,W,te){this.name=S,this.type=F,this._evaluate=W,this.args=te}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,F){let W=S[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression \"${W}\". If you wanted a literal array, use [\"literal\", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Fe=pe.filter(([ct])=>!Array.isArray(ct)||ct.length===S.length-1),Ke=null;for(let[ct,Lt]of Fe){Ke=new vo(F.registry,eh,F.path,null,F.scope);let Jt=[],cr=!1;for(let mr=1;mr<S.length;mr++){let Pr=S[mr],zr=Array.isArray(ct)?ct[mr-1]:ct.type,ui=Ke.parse(Pr,1+Jt.length,zr);if(!ui){cr=!0;break}Jt.push(ui)}if(!cr)if(Array.isArray(ct)&&ct.length!==Jt.length)Ke.error(`Expected ${ct.length} arguments, but found ${Jt.length} instead.`);else{for(let mr=0;mr<Jt.length;mr++){let Pr=Array.isArray(ct)?ct[mr]:ct.type,zr=Jt[mr];Ke.concat(mr+1).checkSubtype(Pr,zr.type)}if(Ke.errors.length===0)return new Bl(W,fe,Lt,Jt)}}if(Fe.length===1)F.errors.push(...Ke.errors);else{let ct=(Fe.length?Fe:pe).map(([Jt])=>{return cr=Jt,Array.isArray(cr)?`(${cr.map(Je).join(\", \")})`:`(${Je(cr.type)}...)`;var cr}).join(\" | \"),Lt=[];for(let Jt=1;Jt<S.length;Jt++){let cr=F.parse(S[Jt],1+Lt.length);if(!cr)return null;Lt.push(Je(cr.type))}F.error(`Expected arguments of type ${ct}, but found (${Lt.join(\", \")}) instead.`)}return null}static register(S,F){Bl.definitions=F;for(let W in F)S[W]=Bl}}function Ah(R,[S,F,W,te]){S=S.evaluate(R),F=F.evaluate(R),W=W.evaluate(R);let fe=te?te.evaluate(R):1,pe=fn(S,F,W,fe);if(pe)throw new ma(pe);return new nr(S/255,F/255,W/255,fe,!1)}function Qf(R,S){return R in S}function _f(R,S){let F=S[R];return F===void 0?null:F}function Yc(R){return{type:R}}function eh(R){if(R instanceof Mt)return eh(R.boundExpression);if(R instanceof Bl&&R.name===\"error\"||R instanceof Io||R instanceof pl||R instanceof Ic)return!1;let S=R instanceof da||R instanceof Fa,F=!0;return R.eachChild(W=>{F=S?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&jf(R,[\"zoom\",\"heatmap-density\",\"line-progress\",\"accumulated\",\"is-supported-script\"])}function th(R){if(R instanceof Bl&&(R.name===\"get\"&&R.args.length===1||R.name===\"feature-state\"||R.name===\"has\"&&R.args.length===1||R.name===\"properties\"||R.name===\"geometry-type\"||R.name===\"id\"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let S=!0;return R.eachChild(F=>{S&&!th(F)&&(S=!1)}),S}function ju(R){if(R instanceof Bl&&R.name===\"feature-state\")return!1;let S=!0;return R.eachChild(F=>{S&&!ju(F)&&(S=!1)}),S}function jf(R,S){if(R instanceof Bl&&S.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!jf(W,S)&&(F=!1)}),F}function cc(R){return{result:\"success\",value:R}}function of(R){return{result:\"error\",value:R}}function Nl(R){return R[\"property-type\"]===\"data-driven\"||R[\"property-type\"]===\"cross-faded-data-driven\"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf(\"zoom\")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?\"number\":R instanceof String?\"string\":R instanceof Boolean?\"boolean\":Array.isArray(R)?\"array\":R===null?\"null\":typeof R}function Wf(R){return typeof R==\"object\"&&R!==null&&!Array.isArray(R)}function Wh(R){return R}function rh(R,S){let F=S.type===\"color\",W=R.stops&&typeof R.stops[0][0]==\"object\",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(S)?\"exponential\":\"interval\");if(F||S.type===\"padding\"){let Lt=F?nr.parse:Qr.parse;(R=$e({},R)).stops&&(R.stops=R.stops.map(Jt=>[Jt[0],Lt(Jt[1])])),R.default=Lt(R.default?R.default:S.default)}if(R.colorSpace&&(pe=R.colorSpace)!==\"rgb\"&&pe!==\"hcl\"&&pe!==\"lab\")throw new Error(`Unknown color space: \"${R.colorSpace}\"`);var pe;let Fe,Ke,ct;if(fe===\"exponential\")Fe=ih;else if(fe===\"interval\")Fe=Mu;else if(fe===\"categorical\"){Fe=Sh,Ke=Object.create(null);for(let Lt of R.stops)Ke[Lt[0]]=Lt[1];ct=typeof R.stops[0][0]}else{if(fe!==\"identity\")throw new Error(`Unknown function type \"${fe}\"`);Fe=js}if(W){let Lt={},Jt=[];for(let Pr=0;Pr<R.stops.length;Pr++){let zr=R.stops[Pr],ui=zr[0].zoom;Lt[ui]===void 0&&(Lt[ui]={zoom:ui,type:R.type,property:R.property,default:R.default,stops:[]},Jt.push(ui)),Lt[ui].stops.push([zr[0].value,zr[1]])}let cr=[];for(let Pr of Jt)cr.push([Lt[Pr].zoom,rh(Lt[Pr],S)]);let mr={name:\"linear\"};return{kind:\"composite\",interpolationType:mr,interpolationFactor:ko.interpolationFactor.bind(void 0,mr),zoomStops:cr.map(Pr=>Pr[0]),evaluate:({zoom:Pr},zr)=>ih({stops:cr,base:R.base},S,Pr).evaluate(Pr,zr)}}if(te){let Lt=fe===\"exponential\"?{name:\"exponential\",base:R.base!==void 0?R.base:1}:null;return{kind:\"camera\",interpolationType:Lt,interpolationFactor:ko.interpolationFactor.bind(void 0,Lt),zoomStops:R.stops.map(Jt=>Jt[0]),evaluate:({zoom:Jt})=>Fe(R,S,Jt,Ke,ct)}}return{kind:\"source\",evaluate(Lt,Jt){let cr=Jt&&Jt.properties?Jt.properties[R.property]:void 0;return cr===void 0?sf(R.default,S.default):Fe(R,S,cr,Ke,ct)}}}function sf(R,S,F){return R!==void 0?R:S!==void 0?S:F!==void 0?F:void 0}function Sh(R,S,F,W,te){return sf(typeof F===te?W[F]:void 0,R.default,S.default)}function Mu(R,S,F){if(gs(F)!==\"number\")return sf(R.default,S.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=Li(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,S,F){let W=R.base!==void 0?R.base:1;if(gs(F)!==\"number\")return sf(R.default,S.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=Li(R.stops.map(Lt=>Lt[0]),F),pe=function(Lt,Jt,cr,mr){let Pr=mr-cr,zr=Lt-cr;return Pr===0?0:Jt===1?zr/Pr:(Math.pow(Jt,zr)-1)/(Math.pow(Jt,Pr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),Fe=R.stops[fe][1],Ke=R.stops[fe+1][1],ct=Lo[S.type]||Wh;return typeof Fe.evaluate==\"function\"?{evaluate(...Lt){let Jt=Fe.evaluate.apply(void 0,Lt),cr=Ke.evaluate.apply(void 0,Lt);if(Jt!==void 0&&cr!==void 0)return ct(Jt,cr,pe,R.colorSpace)}}:ct(Fe,Ke,pe,R.colorSpace)}function js(R,S,F){switch(S.type){case\"color\":F=nr.parse(F);break;case\"formatted\":F=ri.fromString(F.toString());break;case\"resolvedImage\":F=tn.fromString(F.toString());break;case\"padding\":F=Qr.parse(F);break;default:gs(F)===S.type||S.type===\"enum\"&&S.values[F]||(F=void 0)}return sf(F,R.default,S.default)}Bl.register(yf,{error:[{kind:\"error\"},[It],(R,[S])=>{throw new ma(S.evaluate(R))}],typeof:[It,[wr],(R,[S])=>Je(Sn(S.evaluate(R)))],\"to-rgba\":[Ge(_t,4),[er],(R,[S])=>{let[F,W,te,fe]=S.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[er,[_t,_t,_t],Ah],rgba:[er,[_t,_t,_t,_t],Ah],has:{type:mt,overloads:[[[It],(R,[S])=>Qf(S.evaluate(R),R.properties())],[[It,lr],(R,[S,F])=>Qf(S.evaluate(R),F.evaluate(R))]]},get:{type:wr,overloads:[[[It],(R,[S])=>_f(S.evaluate(R),R.properties())],[[It,lr],(R,[S,F])=>_f(S.evaluate(R),F.evaluate(R))]]},\"feature-state\":[wr,[It],(R,[S])=>_f(S.evaluate(R),R.featureState||{})],properties:[lr,[],R=>R.properties()],\"geometry-type\":[It,[],R=>R.geometryType()],id:[wr,[],R=>R.id()],zoom:[_t,[],R=>R.globals.zoom],\"heatmap-density\":[_t,[],R=>R.globals.heatmapDensity||0],\"line-progress\":[_t,[],R=>R.globals.lineProgress||0],accumulated:[wr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],\"+\":[_t,Yc(_t),(R,S)=>{let F=0;for(let W of S)F+=W.evaluate(R);return F}],\"*\":[_t,Yc(_t),(R,S)=>{let F=1;for(let W of S)F*=W.evaluate(R);return F}],\"-\":{type:_t,overloads:[[[_t,_t],(R,[S,F])=>S.evaluate(R)-F.evaluate(R)],[[_t],(R,[S])=>-S.evaluate(R)]]},\"/\":[_t,[_t,_t],(R,[S,F])=>S.evaluate(R)/F.evaluate(R)],\"%\":[_t,[_t,_t],(R,[S,F])=>S.evaluate(R)%F.evaluate(R)],ln2:[_t,[],()=>Math.LN2],pi:[_t,[],()=>Math.PI],e:[_t,[],()=>Math.E],\"^\":[_t,[_t,_t],(R,[S,F])=>Math.pow(S.evaluate(R),F.evaluate(R))],sqrt:[_t,[_t],(R,[S])=>Math.sqrt(S.evaluate(R))],log10:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))/Math.LN10],ln:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))],log2:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))/Math.LN2],sin:[_t,[_t],(R,[S])=>Math.sin(S.evaluate(R))],cos:[_t,[_t],(R,[S])=>Math.cos(S.evaluate(R))],tan:[_t,[_t],(R,[S])=>Math.tan(S.evaluate(R))],asin:[_t,[_t],(R,[S])=>Math.asin(S.evaluate(R))],acos:[_t,[_t],(R,[S])=>Math.acos(S.evaluate(R))],atan:[_t,[_t],(R,[S])=>Math.atan(S.evaluate(R))],min:[_t,Yc(_t),(R,S)=>Math.min(...S.map(F=>F.evaluate(R)))],max:[_t,Yc(_t),(R,S)=>Math.max(...S.map(F=>F.evaluate(R)))],abs:[_t,[_t],(R,[S])=>Math.abs(S.evaluate(R))],round:[_t,[_t],(R,[S])=>{let F=S.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[_t,[_t],(R,[S])=>Math.floor(S.evaluate(R))],ceil:[_t,[_t],(R,[S])=>Math.ceil(S.evaluate(R))],\"filter-==\":[mt,[It,wr],(R,[S,F])=>R.properties()[S.value]===F.value],\"filter-id-==\":[mt,[wr],(R,[S])=>R.id()===S.value],\"filter-type-==\":[mt,[It],(R,[S])=>R.geometryType()===S.value],\"filter-<\":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W<te}],\"filter-id-<\":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F<W}],\"filter->\":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>te}],\"filter-id->\":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>W}],\"filter-<=\":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W<=te}],\"filter-id-<=\":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F<=W}],\"filter->=\":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>=te}],\"filter-id->=\":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>=W}],\"filter-has\":[mt,[wr],(R,[S])=>S.value in R.properties()],\"filter-has-id\":[mt,[],R=>R.id()!==null&&R.id()!==void 0],\"filter-type-in\":[mt,[Ge(It)],(R,[S])=>S.value.indexOf(R.geometryType())>=0],\"filter-id-in\":[mt,[Ge(wr)],(R,[S])=>S.value.indexOf(R.id())>=0],\"filter-in-small\":[mt,[It,Ge(wr)],(R,[S,F])=>F.value.indexOf(R.properties()[S.value])>=0],\"filter-in-large\":[mt,[It,Ge(wr)],(R,[S,F])=>function(W,te,fe,pe){for(;fe<=pe;){let Fe=fe+pe>>1;if(te[Fe]===W)return!0;te[Fe]>W?pe=Fe-1:fe=Fe+1}return!1}(R.properties()[S.value],F.value,0,F.value.length-1)],all:{type:mt,overloads:[[[mt,mt],(R,[S,F])=>S.evaluate(R)&&F.evaluate(R)],[Yc(mt),(R,S)=>{for(let F of S)if(!F.evaluate(R))return!1;return!0}]]},any:{type:mt,overloads:[[[mt,mt],(R,[S,F])=>S.evaluate(R)||F.evaluate(R)],[Yc(mt),(R,S)=>{for(let F of S)if(F.evaluate(R))return!0;return!1}]]},\"!\":[mt,[mt],(R,[S])=>!S.evaluate(R)],\"is-supported-script\":[mt,[It],(R,[S])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(S.evaluate(R))}],upcase:[It,[It],(R,[S])=>S.evaluate(R).toUpperCase()],downcase:[It,[It],(R,[S])=>S.evaluate(R).toLowerCase()],concat:[It,Yc(wr),(R,S)=>S.map(F=>Ba(F.evaluate(R))).join(\"\")],\"resolved-locale\":[It,[Lr],(R,[S])=>S.evaluate(R).resolvedLocale()]});class Eu{constructor(S,F){var W;this.expression=S,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type===\"color\"&&Wf(W.default)?new nr(0,0,0,0):W.type===\"color\"?nr.parse(W.default)||null:W.type===\"padding\"?Qr.parse(W.default)||null:W.type===\"variableAnchorOffsetCollection\"?$i.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type===\"enum\"?F.values:null}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._evaluator.globals=S,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(S,F,W,te,fe,pe){this._evaluator.globals=S,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe==\"number\"&&Fe!=Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(\", \")}, but found ${JSON.stringify(Fe)} instead.`);return Fe}catch(Fe){return this._warningHistory[Fe.message]||(this._warningHistory[Fe.message]=!0,typeof console!=\"undefined\"&&console.warn(Fe.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]==\"string\"&&R[0]in yf}function ks(R,S){let F=new vo(yf,eh,[],S?function(te){let fe={color:er,string:It,number:_t,enum:It,boolean:mt,formatted:ti,padding:Br,resolvedImage:Vr,variableAnchorOffsetCollection:dt};return te.type===\"array\"?Ge(fe[te.value]||wr,te.length):fe[te.type]}(S):void 0),W=F.parse(R,void 0,void 0,void 0,S&&S.type===\"string\"?{typeAnnotation:\"coerce\"}:void 0);return W?cc(new Eu(W,S)):of(F.errors)}class bc{constructor(S,F){this.kind=S,this._styleExpression=F,this.isStateDependent=S!==\"constant\"&&!ju(F.expression)}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}}class hu{constructor(S,F,W,te){this.kind=S,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=S!==\"camera\"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}interpolationFactor(S,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,S,F,W):0}}function _u(R,S){let F=ks(R,S);if(F.result===\"error\")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(S))return of([new St(\"\",\"data expressions not supported\")]);let fe=jf(W,[\"zoom\"]);if(!fe&&!Kc(S))return of([new St(\"\",\"zoom expressions not supported\")]);let pe=nh(W);return pe||fe?pe instanceof St?of([pe]):pe instanceof ko&&!Rc(S)?of([new St(\"\",'\"interpolate\" expressions cannot be used with this property')]):cc(pe?new hu(te?\"camera\":\"composite\",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(te?\"constant\":\"source\",F.value)):of([new St(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')])}class nl{constructor(S,F){this._parameters=S,this._specification=F,$e(this,rh(this._parameters,this._specification))}static deserialize(S){return new nl(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function nh(R){let S=null;if(R instanceof jn)S=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(S=nh(F),S)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name===\"zoom\"&&(S=R);return S instanceof St||R.eachChild(F=>{let W=nh(F);W instanceof St?S=W:!S&&W?S=new St(\"\",'\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'):S&&W&&S!==W&&(S=new St(\"\",'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.'))}),S}function Mh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case\"has\":return R.length>=2&&R[1]!==\"$id\"&&R[1]!==\"$type\";case\"in\":return R.length>=3&&(typeof R[1]!=\"string\"||Array.isArray(R[2]));case\"!in\":case\"!has\":case\"none\":return!1;case\"==\":case\"!=\":case\">\":case\">=\":case\"<\":case\"<=\":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case\"any\":case\"all\":for(let S of R.slice(1))if(!Mh(S)&&typeof S!=\"boolean\")return!1;return!0;default:return!0}}let zu={type:\"boolean\",default:!1,transition:!1,\"property-type\":\"data-driven\",expression:{interpolated:!1,parameters:[\"zoom\",\"feature\"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Mh(R)||(R=xf(R));let S=ks(R,zu);if(S.result===\"error\")throw new Error(S.value.map(F=>`${F.key}: ${F.message}`).join(\", \"));return{filter:(F,W,te)=>S.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,S){return R<S?-1:R>S?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]===\"within\"||R[0]===\"distance\")return!0;for(let S=1;S<R.length;S++)if(bd(R[S]))return!0;return!1}function xf(R){if(!R)return!0;let S=R[0];return R.length<=1?S!==\"any\":S===\"==\"?Pf(R[1],R[2],\"==\"):S===\"!=\"?jl(Pf(R[1],R[2],\"==\")):S===\"<\"||S===\">\"||S===\"<=\"||S===\">=\"?Pf(R[1],R[2],S):S===\"any\"?(F=R.slice(1),[\"any\"].concat(F.map(xf))):S===\"all\"?[\"all\"].concat(R.slice(1).map(xf)):S===\"none\"?[\"all\"].concat(R.slice(1).map(xf).map(jl)):S===\"in\"?Ou(R[1],R.slice(2)):S===\"!in\"?jl(Ou(R[1],R.slice(2))):S===\"has\"?bf(R[1]):S!==\"!has\"||jl(bf(R[1]));var F}function Pf(R,S,F){switch(R){case\"$type\":return[`filter-type-${F}`,S];case\"$id\":return[`filter-id-${F}`,S];default:return[`filter-${F}`,R,S]}}function Ou(R,S){if(S.length===0)return!1;switch(R){case\"$type\":return[\"filter-type-in\",[\"literal\",S]];case\"$id\":return[\"filter-id-in\",[\"literal\",S]];default:return S.length>200&&!S.some(F=>typeof F!=typeof S[0])?[\"filter-in-large\",R,[\"literal\",S.sort(wc)]]:[\"filter-in-small\",R,[\"literal\",S]]}}function bf(R){switch(R){case\"$type\":return!0;case\"$id\":return[\"filter-has-id\"];default:return[\"filter-has\",R]}}function jl(R){return[\"!\",R]}function lf(R){let S=typeof R;if(S===\"number\"||S===\"boolean\"||S===\"string\"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te=\"[\";for(let fe of R)te+=`${lf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W=\"{\";for(let te=0;te<F.length;te++)W+=`${JSON.stringify(F[te])}:${lf(R[F[te]])},`;return`${W}}`}function Xh(R){let S=\"\";for(let F of je)S+=`/${lf(R[F])}`;return S}function If(R){let S=R.value;return S?[new fr(R.key,S,\"constants have been deprecated as of v8\")]:[]}function Cs(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function du(R){if(Array.isArray(R))return R.map(du);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){let S={};for(let F in R)S[F]=du(R[F]);return S}return Cs(R)}function ku(R){let S=R.key,F=R.value,W=R.valueSpec||{},te=R.objectElementValidators||{},fe=R.style,pe=R.styleSpec,Fe=R.validateSpec,Ke=[],ct=gs(F);if(ct!==\"object\")return[new fr(S,F,`object expected, ${ct} found`)];for(let Lt in F){let Jt=Lt.split(\".\")[0],cr=W[Jt]||W[\"*\"],mr;if(te[Jt])mr=te[Jt];else if(W[Jt])mr=Fe;else if(te[\"*\"])mr=te[\"*\"];else{if(!W[\"*\"]){Ke.push(new fr(S,F[Lt],`unknown property \"${Lt}\"`));continue}mr=Fe}Ke=Ke.concat(mr({key:(S&&`${S}.`)+Lt,value:F[Lt],valueSpec:cr,style:fe,styleSpec:pe,object:F,objectKey:Lt,validateSpec:Fe},F))}for(let Lt in W)te[Lt]||W[Lt].required&&W[Lt].default===void 0&&F[Lt]===void 0&&Ke.push(new fr(S,F,`missing required property \"${Lt}\"`));return Ke}function Xf(R){let S=R.value,F=R.valueSpec,W=R.style,te=R.styleSpec,fe=R.key,pe=R.arrayElementValidator||R.validateSpec;if(gs(S)!==\"array\")return[new fr(fe,S,`array expected, ${gs(S)} found`)];if(F.length&&S.length!==F.length)return[new fr(fe,S,`array length ${F.length} expected, length ${S.length} found`)];if(F[\"min-length\"]&&S.length<F[\"min-length\"])return[new fr(fe,S,`array length at least ${F[\"min-length\"]} expected, length ${S.length} found`)];let Fe={type:F.value,values:F.values};te.$version<7&&(Fe.function=F.function),gs(F.value)===\"object\"&&(Fe=F.value);let Ke=[];for(let ct=0;ct<S.length;ct++)Ke=Ke.concat(pe({array:S,arrayIndex:ct,value:S[ct],valueSpec:Fe,validateSpec:R.validateSpec,style:W,styleSpec:te,key:`${fe}[${ct}]`}));return Ke}function Us(R){let S=R.key,F=R.value,W=R.valueSpec,te=gs(F);return te===\"number\"&&F!=F&&(te=\"NaN\"),te!==\"number\"?[new fr(S,F,`number expected, ${te} found`)]:\"minimum\"in W&&F<W.minimum?[new fr(S,F,`${F} is less than the minimum value ${W.minimum}`)]:\"maximum\"in W&&F>W.maximum?[new fr(S,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let S=R.valueSpec,F=Cs(R.value.type),W,te,fe,pe={},Fe=F!==\"categorical\"&&R.value.property===void 0,Ke=!Fe,ct=gs(R.value.stops)===\"array\"&&gs(R.value.stops[0])===\"array\"&&gs(R.value.stops[0][0])===\"object\",Lt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(mr){if(F===\"identity\")return[new fr(mr.key,mr.value,'identity function may not have a \"stops\" property')];let Pr=[],zr=mr.value;return Pr=Pr.concat(Xf({key:mr.key,value:zr,valueSpec:mr.valueSpec,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,arrayElementValidator:Jt})),gs(zr)===\"array\"&&zr.length===0&&Pr.push(new fr(mr.key,zr,\"array must have at least one stop\")),Pr},default:function(mr){return mr.validateSpec({key:mr.key,value:mr.value,valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec})}}});return F===\"identity\"&&Fe&&Lt.push(new fr(R.key,R.value,'missing required property \"property\"')),F===\"identity\"||R.value.stops||Lt.push(new fr(R.key,R.value,'missing required property \"stops\"')),F===\"exponential\"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Lt.push(new fr(R.key,R.value,\"exponential functions not supported\")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Lt.push(new fr(R.key,R.value,\"property functions not supported\")):Fe&&!Kc(R.valueSpec)&&Lt.push(new fr(R.key,R.value,\"zoom functions not supported\"))),F!==\"categorical\"&&!ct||R.value.property!==void 0||Lt.push(new fr(R.key,R.value,'\"property\" property is required')),Lt;function Jt(mr){let Pr=[],zr=mr.value,ui=mr.key;if(gs(zr)!==\"array\")return[new fr(ui,zr,`array expected, ${gs(zr)} found`)];if(zr.length!==2)return[new fr(ui,zr,`array length 2 expected, length ${zr.length} found`)];if(ct){if(gs(zr[0])!==\"object\")return[new fr(ui,zr,`object expected, ${gs(zr[0])} found`)];if(zr[0].zoom===void 0)return[new fr(ui,zr,\"object stop key must have zoom\")];if(zr[0].value===void 0)return[new fr(ui,zr,\"object stop key must have value\")];if(fe&&fe>Cs(zr[0].zoom))return[new fr(ui,zr[0].zoom,\"stop zoom values must appear in ascending order\")];Cs(zr[0].zoom)!==fe&&(fe=Cs(zr[0].zoom),te=void 0,pe={}),Pr=Pr.concat(ku({key:`${ui}[0]`,value:zr[0],valueSpec:{zoom:{}},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,objectElementValidators:{zoom:Us,value:cr}}))}else Pr=Pr.concat(cr({key:`${ui}[0]`,value:zr[0],valueSpec:{},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec},zr));return Dc(du(zr[1]))?Pr.concat([new fr(`${ui}[1]`,zr[1],\"expressions are not allowed in function stops.\")]):Pr.concat(mr.validateSpec({key:`${ui}[1]`,value:zr[1],valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec}))}function cr(mr,Pr){let zr=gs(mr.value),ui=Cs(mr.value),yi=mr.value!==null?mr.value:Pr;if(W){if(zr!==W)return[new fr(mr.key,yi,`${zr} stop domain type must match previous stop domain type ${W}`)]}else W=zr;if(zr!==\"number\"&&zr!==\"string\"&&zr!==\"boolean\")return[new fr(mr.key,yi,\"stop domain value must be a number, string, or boolean\")];if(zr!==\"number\"&&F!==\"categorical\"){let vn=`number expected, ${zr} found`;return Nl(S)&&F===void 0&&(vn+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new fr(mr.key,yi,vn)]}return F!==\"categorical\"||zr!==\"number\"||isFinite(ui)&&Math.floor(ui)===ui?F!==\"categorical\"&&zr===\"number\"&&te!==void 0&&ui<te?[new fr(mr.key,yi,\"stop domain values must appear in ascending order\")]:(te=ui,F===\"categorical\"&&ui in pe?[new fr(mr.key,yi,\"stop domain values must be unique\")]:(pe[ui]=!0,[])):[new fr(mr.key,yi,`integer expected, found ${ui}`)]}}function zc(R){let S=(R.expressionContext===\"property\"?_u:ks)(du(R.value),R.valueSpec);if(S.result===\"error\")return S.value.map(W=>new fr(`${R.key}${W.key}`,R.value,W.message));let F=S.value.expression||S.value._styleExpression.expression;if(R.expressionContext===\"property\"&&R.propertyKey===\"text-font\"&&!F.outputDefined())return[new fr(R.key,R.value,`Invalid data expression for \"${R.propertyKey}\". Output values must be contained as literals within the expression.`)];if(R.expressionContext===\"property\"&&R.propertyType===\"layout\"&&!ju(F))return[new fr(R.key,R.value,'\"feature-state\" data expressions are not supported with layout properties.')];if(R.expressionContext===\"filter\"&&!ju(F))return[new fr(R.key,R.value,'\"feature-state\" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf(\"cluster\")===0){if(!jf(F,[\"zoom\",\"feature-state\"]))return[new fr(R.key,R.value,'\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];if(R.expressionContext===\"cluster-initial\"&&!th(F))return[new fr(R.key,R.value,\"Feature data expressions are not supported with initial expression part of cluster properties.\")]}return[]}function Wu(R){let S=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&te.push(new fr(S,F,`expected one of [${W.values.join(\", \")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&te.push(new fr(S,F,`expected one of [${Object.keys(W.values).join(\", \")}], ${JSON.stringify(F)} found`)),te}function Rf(R){return Mh(du(R.value))?zc($e({},R,{expressionContext:\"filter\",valueSpec:{value:\"boolean\"}})):Xu(R)}function Xu(R){let S=R.value,F=R.key;if(gs(S)!==\"array\")return[new fr(F,S,`array expected, ${gs(S)} found`)];let W=R.styleSpec,te,fe=[];if(S.length<1)return[new fr(F,S,\"filter array must have at least 1 element\")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:S[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(S[0])){case\"<\":case\"<=\":case\">\":case\">=\":S.length>=2&&Cs(S[1])===\"$type\"&&fe.push(new fr(F,S,`\"$type\" cannot be use with operator \"${S[0]}\"`));case\"==\":case\"!=\":S.length!==3&&fe.push(new fr(F,S,`filter array for operator \"${S[0]}\" must have 3 elements`));case\"in\":case\"!in\":S.length>=2&&(te=gs(S[1]),te!==\"string\"&&fe.push(new fr(`${F}[1]`,S[1],`string expected, ${te} found`)));for(let pe=2;pe<S.length;pe++)te=gs(S[pe]),Cs(S[1])===\"$type\"?fe=fe.concat(Wu({key:`${F}[${pe}]`,value:S[pe],valueSpec:W.geometry_type,style:R.style,styleSpec:R.styleSpec})):te!==\"string\"&&te!==\"number\"&&te!==\"boolean\"&&fe.push(new fr(`${F}[${pe}]`,S[pe],`string, number, or boolean expected, ${te} found`));break;case\"any\":case\"all\":case\"none\":for(let pe=1;pe<S.length;pe++)fe=fe.concat(Xu({key:`${F}[${pe}]`,value:S[pe],style:R.style,styleSpec:R.styleSpec}));break;case\"has\":case\"!has\":te=gs(S[1]),S.length!==2?fe.push(new fr(F,S,`filter array for \"${S[0]}\" operator must have 2 elements`)):te!==\"string\"&&fe.push(new fr(`${F}[1]`,S[1],`string expected, ${te} found`))}return fe}function uf(R,S){let F=R.key,W=R.validateSpec,te=R.style,fe=R.styleSpec,pe=R.value,Fe=R.objectKey,Ke=fe[`${S}_${R.layerType}`];if(!Ke)return[];let ct=Fe.match(/^(.*)-transition$/);if(S===\"paint\"&&ct&&Ke[ct[1]]&&Ke[ct[1]].transition)return W({key:F,value:pe,valueSpec:fe.transition,style:te,styleSpec:fe});let Lt=R.valueSpec||Ke[Fe];if(!Lt)return[new fr(F,pe,`unknown property \"${Fe}\"`)];let Jt;if(gs(pe)===\"string\"&&Nl(Lt)&&!Lt.tokens&&(Jt=/^{([^}]+)}$/.exec(pe)))return[new fr(F,pe,`\"${Fe}\" does not support interpolation syntax\n",
       "Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(Jt[1])} }\\`.`)];let cr=[];return R.layerType===\"symbol\"&&(Fe===\"text-field\"&&te&&!te.glyphs&&cr.push(new fr(F,pe,'use of \"text-field\" requires a style \"glyphs\" property')),Fe===\"text-font\"&&Wf(du(pe))&&Cs(pe.type)===\"identity\"&&cr.push(new fr(F,pe,'\"text-font\" does not support identity functions'))),cr.concat(W({key:R.key,value:pe,valueSpec:Lt,style:te,styleSpec:fe,expressionContext:\"property\",propertyType:S,propertyKey:Fe}))}function Zf(R){return uf(R,\"paint\")}function Wl(R){return uf(R,\"layout\")}function ah(R){let S=[],F=R.value,W=R.key,te=R.style,fe=R.styleSpec;F.type||F.ref||S.push(new fr(W,F,'either \"type\" or \"ref\" is required'));let pe=Cs(F.type),Fe=Cs(F.ref);if(F.id){let Ke=Cs(F.id);for(let ct=0;ct<R.arrayIndex;ct++){let Lt=te.layers[ct];Cs(Lt.id)===Ke&&S.push(new fr(W,F.id,`duplicate layer id \"${F.id}\", previously used at line ${Lt.id.__line__}`))}}if(\"ref\"in F){let Ke;[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(ct=>{ct in F&&S.push(new fr(W,F[ct],`\"${ct}\" is prohibited for ref layers`))}),te.layers.forEach(ct=>{Cs(ct.id)===Fe&&(Ke=ct)}),Ke?Ke.ref?S.push(new fr(W,F.ref,\"ref cannot reference another ref layer\")):pe=Cs(Ke.type):S.push(new fr(W,F.ref,`ref layer \"${Fe}\" not found`))}else if(pe!==\"background\")if(F.source){let Ke=te.sources&&te.sources[F.source],ct=Ke&&Cs(Ke.type);Ke?ct===\"vector\"&&pe===\"raster\"?S.push(new fr(W,F.source,`layer \"${F.id}\" requires a raster source`)):ct!==\"raster-dem\"&&pe===\"hillshade\"?S.push(new fr(W,F.source,`layer \"${F.id}\" requires a raster-dem source`)):ct===\"raster\"&&pe!==\"raster\"?S.push(new fr(W,F.source,`layer \"${F.id}\" requires a vector source`)):ct!==\"vector\"||F[\"source-layer\"]?ct===\"raster-dem\"&&pe!==\"hillshade\"?S.push(new fr(W,F.source,\"raster-dem source can only be used with layer type 'hillshade'.\")):pe!==\"line\"||!F.paint||!F.paint[\"line-gradient\"]||ct===\"geojson\"&&Ke.lineMetrics||S.push(new fr(W,F,`layer \"${F.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):S.push(new fr(W,F,`layer \"${F.id}\" must specify a \"source-layer\"`)):S.push(new fr(W,F.source,`source \"${F.source}\" not found`))}else S.push(new fr(W,F,'missing required property \"source\"'));return S=S.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{\"*\":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:\"type\"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{\"*\":ct=>Wl($e({layerType:pe},ct))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{\"*\":ct=>Zf($e({layerType:pe},ct))}})}})),S}function Zu(R){let S=R.value,F=R.key,W=gs(S);return W!==\"string\"?[new fr(F,S,`string expected, ${W} found`)]:[]}let Oc={promoteId:function({key:R,value:S}){if(gs(S)===\"string\")return Zu({key:R,value:S});{let F=[];for(let W in S)F.push(...Zu({key:`${R}.${W}`,value:S[W]}));return F}}};function Tc(R){let S=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!S.type)return[new fr(F,S,'\"type\" is required')];let pe=Cs(S.type),Fe;switch(pe){case\"vector\":case\"raster\":return Fe=ku({key:F,value:S,valueSpec:W[`source_${pe.replace(\"-\",\"_\")}`],style:R.style,styleSpec:W,objectElementValidators:Oc,validateSpec:fe}),Fe;case\"raster-dem\":return Fe=function(Ke){var ct;let Lt=(ct=Ke.sourceName)!==null&&ct!==void 0?ct:\"\",Jt=Ke.value,cr=Ke.styleSpec,mr=cr.source_raster_dem,Pr=Ke.style,zr=[],ui=gs(Jt);if(Jt===void 0)return zr;if(ui!==\"object\")return zr.push(new fr(\"source_raster_dem\",Jt,`object expected, ${ui} found`)),zr;let yi=Cs(Jt.encoding)===\"custom\",vn=[\"redFactor\",\"greenFactor\",\"blueFactor\",\"baseShift\"],zi=Ke.value.encoding?`\"${Ke.value.encoding}\"`:\"Default\";for(let un in Jt)!yi&&vn.includes(un)?zr.push(new fr(un,Jt[un],`In \"${Lt}\": \"${un}\" is only valid when \"encoding\" is set to \"custom\". ${zi} encoding found`)):mr[un]?zr=zr.concat(Ke.validateSpec({key:un,value:Jt[un],valueSpec:mr[un],validateSpec:Ke.validateSpec,style:Pr,styleSpec:cr})):zr.push(new fr(un,Jt[un],`unknown property \"${un}\"`));return zr}({sourceName:F,value:S,style:R.style,styleSpec:W,validateSpec:fe}),Fe;case\"geojson\":if(Fe=ku({key:F,value:S,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:Oc}),S.cluster)for(let Ke in S.clusterProperties){let[ct,Lt]=S.clusterProperties[Ke],Jt=typeof ct==\"string\"?[ct,[\"accumulated\"],[\"get\",Ke]]:ct;Fe.push(...zc({key:`${F}.${Ke}.map`,value:Lt,validateSpec:fe,expressionContext:\"cluster-map\"})),Fe.push(...zc({key:`${F}.${Ke}.reduce`,value:Jt,validateSpec:fe,expressionContext:\"cluster-reduce\"}))}return Fe;case\"video\":return ku({key:F,value:S,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case\"image\":return ku({key:F,value:S,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case\"canvas\":return[new fr(F,null,\"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.\",\"source.canvas\")];default:return Wu({key:`${F}.type`,value:S.type,valueSpec:{values:[\"vector\",\"raster\",\"raster-dem\",\"geojson\",\"video\",\"image\"]},style:te,validateSpec:fe,styleSpec:W})}}function wl(R){let S=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=gs(S);if(S===void 0)return fe;if(pe!==\"object\")return fe=fe.concat([new fr(\"light\",S,`object expected, ${pe} found`)]),fe;for(let Fe in S){let Ke=Fe.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:Fe,value:S[Fe],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property \"${Fe}\"`)])}return fe}function vu(R){let S=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=gs(S);if(S===void 0)return[];if(fe!==\"object\")return[new fr(\"sky\",S,`object expected, ${fe} found`)];let pe=[];for(let Fe in S)pe=pe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property \"${Fe}\"`)]);return pe}function qc(R){let S=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=gs(S);if(S===void 0)return fe;if(pe!==\"object\")return fe=fe.concat([new fr(\"terrain\",S,`object expected, ${pe} found`)]),fe;for(let Fe in S)fe=fe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property \"${Fe}\"`)]);return fe}function cf(R){let S=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&S.push(new fr(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&S.push(new fr(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),S=S.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:\"string\",required:!0},url:{type:\"string\",required:!0}},validateSpec:R.validateSpec}));return S}return Zu({key:W,value:F})}let fc={\"*\":()=>[],array:Xf,boolean:function(R){let S=R.value,F=R.key,W=gs(S);return W!==\"boolean\"?[new fr(F,S,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let S=R.key,F=R.value,W=gs(F);return W!==\"string\"?[new fr(S,F,`color expected, ${W} found`)]:nr.parse(String(F))?[]:[new fr(S,F,`color expected, \"${F}\" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:qc,projection:function(R){let S=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=gs(S);if(S===void 0)return[];if(fe!==\"object\")return[new fr(\"projection\",S,`object expected, ${fe} found`)];let pe=[];for(let Fe in S)pe=pe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property \"${Fe}\"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let S=R.key,F=R.value;if(gs(F)===\"array\"){if(F.length<1||F.length>4)return[new fr(S,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:\"number\"},te=[];for(let fe=0;fe<F.length;fe++)te=te.concat(R.validateSpec({key:`${S}[${fe}]`,value:F[fe],validateSpec:R.validateSpec,valueSpec:W}));return te}return Us({key:S,value:F,valueSpec:{}})},variableAnchorOffsetCollection:function(R){let S=R.key,F=R.value,W=gs(F),te=R.styleSpec;if(W!==\"array\"||F.length<1||F.length%2!=0)return[new fr(S,F,\"variableAnchorOffsetCollection requires a non-empty array of even length\")];let fe=[];for(let pe=0;pe<F.length;pe+=2)fe=fe.concat(Wu({key:`${S}[${pe}]`,value:F[pe],valueSpec:te.layout_symbol[\"text-anchor\"]})),fe=fe.concat(Xf({key:`${S}[${pe+1}]`,value:F[pe+1],valueSpec:{length:2,value:\"number\"},validateSpec:R.validateSpec,style:R.style,styleSpec:te}));return fe},sprite:cf};function Bc(R){let S=R.value,F=R.valueSpec,W=R.styleSpec;return R.validateSpec=Bc,F.expression&&Wf(Cs(S))?wf(R):F.expression&&Dc(du(S))?zc(R):F.type&&fc[F.type]?fc[F.type](R):ku($e({},R,{valueSpec:F.type?W[F.type]:F}))}function At(R){let S=R.value,F=R.key,W=Zu(R);return W.length||(S.indexOf(\"{fontstack}\")===-1&&W.push(new fr(F,S,'\"glyphs\" url must include a \"{fontstack}\" token')),S.indexOf(\"{range}\")===-1&&W.push(new fr(F,S,'\"glyphs\" url must include a \"{range}\" token'))),W}function Xt(R,S=ce){let F=[];return F=F.concat(Bc({key:\"\",value:R,valueSpec:S.$root,styleSpec:S,style:R,validateSpec:Bc,objectElementValidators:{glyphs:At,\"*\":()=>[]}})),R.constants&&(F=F.concat(If({key:\"constants\",value:R.constants,style:R,styleSpec:S,validateSpec:Bc}))),Ar(F)}function Cr(R){return function(S){return R(j1(_g({},S),{validateSpec:Bc}))}}function Ar(R){return[].concat(R).sort((S,F)=>S.line-F.line)}function Kr(R){return function(...S){return Ar(R.apply(this,S))}}Xt.source=Kr(Cr(Tc)),Xt.sprite=Kr(Cr(cf)),Xt.glyphs=Kr(Cr(At)),Xt.light=Kr(Cr(wl)),Xt.sky=Kr(Cr(vu)),Xt.terrain=Kr(Cr(qc)),Xt.layer=Kr(Cr(ah)),Xt.filter=Kr(Cr(Rf)),Xt.paintProperty=Kr(Cr(Zf)),Xt.layoutProperty=Kr(Cr(Wl));let ki=Xt,Xi=ki.light,dn=ki.sky,wn=ki.paintProperty,Nn=ki.layoutProperty;function Yi(R,S){let F=!1;if(S&&S.length)for(let W of S)R.fire(new me(new Error(W.message))),F=!0;return F}class Qi{constructor(S,F,W){let te=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let pe=new Int32Array(this.arrayBuffer);S=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke<this.d*this.d;Ke++){let ct=pe[3+Ke],Lt=pe[3+Ke+1];te.push(ct===Lt?null:pe.subarray(ct,Lt))}let Fe=pe[3+te.length+1];this.keys=pe.subarray(pe[3+te.length],Fe),this.bboxes=pe.subarray(Fe),this.insert=this._insertReadonly}else{this.d=F+2*W;for(let pe=0;pe<this.d*this.d;pe++)te.push([]);this.keys=[],this.bboxes=[]}this.n=F,this.extent=S,this.padding=W,this.scale=F/S,this.uid=0;let fe=W/F*S;this.min=-fe,this.max=S+fe}insert(S,F,W,te,fe){this._forEachCell(F,W,te,fe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(S),this.bboxes.push(F),this.bboxes.push(W),this.bboxes.push(te),this.bboxes.push(fe)}_insertReadonly(){throw new Error(\"Cannot insert into a GridIndex created from an ArrayBuffer.\")}_insertCell(S,F,W,te,fe,pe){this.cells[fe].push(pe)}query(S,F,W,te,fe){let pe=this.min,Fe=this.max;if(S<=pe&&F<=pe&&Fe<=W&&Fe<=te&&!fe)return Array.prototype.slice.call(this.keys);{let Ke=[];return this._forEachCell(S,F,W,te,this._queryCell,Ke,{},fe),Ke}}_queryCell(S,F,W,te,fe,pe,Fe,Ke){let ct=this.cells[fe];if(ct!==null){let Lt=this.keys,Jt=this.bboxes;for(let cr=0;cr<ct.length;cr++){let mr=ct[cr];if(Fe[mr]===void 0){let Pr=4*mr;(Ke?Ke(Jt[Pr+0],Jt[Pr+1],Jt[Pr+2],Jt[Pr+3]):S<=Jt[Pr+2]&&F<=Jt[Pr+3]&&W>=Jt[Pr+0]&&te>=Jt[Pr+1])?(Fe[mr]=!0,pe.push(Lt[mr])):Fe[mr]=!1}}}}_forEachCell(S,F,W,te,fe,pe,Fe,Ke){let ct=this._convertToCellCoord(S),Lt=this._convertToCellCoord(F),Jt=this._convertToCellCoord(W),cr=this._convertToCellCoord(te);for(let mr=ct;mr<=Jt;mr++)for(let Pr=Lt;Pr<=cr;Pr++){let zr=this.d*Pr+mr;if((!Ke||Ke(this._convertFromCellCoord(mr),this._convertFromCellCoord(Pr),this._convertFromCellCoord(mr+1),this._convertFromCellCoord(Pr+1)))&&fe.call(this,S,F,W,te,zr,pe,Fe,Ke))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe<this.cells.length;pe++)W+=this.cells[pe].length;let te=new Int32Array(F+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let fe=F;for(let pe=0;pe<S.length;pe++){let Fe=S[pe];te[3+pe]=fe,te.set(Fe,fe),fe+=Fe.length}return te[3+S.length]=fe,te.set(this.keys,fe),fe+=this.keys.length,te[3+S.length+1]=fe,te.set(this.bboxes,fe),fe+=this.bboxes.length,te.buffer}static serialize(S,F){let W=S.toArrayBuffer();return F&&F.push(W),{buffer:W}}static deserialize(S){return new Qi(S.buffer)}}let on={};function Fi(R,S,F={}){if(on[R])throw new Error(`${R} is already registered.`);Object.defineProperty(S,\"_classRegistryKey\",{value:R,writeable:!1}),on[R]={klass:S,omit:F.omit||[],shallow:F.shallow||[]}}Fi(\"Object\",Object),Fi(\"TransferableGridIndex\",Qi),Fi(\"Color\",nr),Fi(\"Error\",Error),Fi(\"AJAXError\",ge),Fi(\"ResolvedImage\",tn),Fi(\"StylePropertyFunction\",nl),Fi(\"StyleExpression\",Eu,{omit:[\"_evaluator\"]}),Fi(\"ZoomDependentExpression\",hu),Fi(\"ZoomConstantExpression\",bc),Fi(\"CompoundExpression\",Bl,{omit:[\"_evaluate\"]});for(let R in yf)yf[R]._classRegistryKey||Fi(`Expression_${R}`,yf[R]);function Qn(R){return R&&typeof ArrayBuffer!=\"undefined\"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name===\"ArrayBuffer\")}function Ca(R){return R.$name||R.constructor._classRegistryKey}function Ra(R){return!function(S){if(S===null||typeof S!=\"object\")return!1;let F=Ca(S);return!(!F||F===\"Object\")}(R)&&(R==null||typeof R==\"boolean\"||typeof R==\"number\"||typeof R==\"string\"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||R instanceof Blob||R instanceof Error||Qn(R)||G(R)||ArrayBuffer.isView(R)||R instanceof ImageData)}function La(R,S){if(Ra(R))return(Qn(R)||G(R))&&S&&S.push(R),ArrayBuffer.isView(R)&&S&&S.push(R.buffer),R instanceof ImageData&&S&&S.push(R.data.buffer),R;if(Array.isArray(R)){let fe=[];for(let pe of R)fe.push(La(pe,S));return fe}if(typeof R!=\"object\")throw new Error(\"can't serialize object of type \"+typeof R);let F=Ca(R);if(!F)throw new Error(`can't serialize object of unregistered class ${R.constructor.name}`);if(!on[F])throw new Error(`${F} is not registered.`);let{klass:W}=on[F],te=W.serialize?W.serialize(R,S):{};if(W.serialize){if(S&&te===S[S.length-1])throw new Error(\"statically serialized object won't survive transfer of $name property\")}else{for(let fe in R){if(!R.hasOwnProperty(fe)||on[F].omit.indexOf(fe)>=0)continue;let pe=R[fe];te[fe]=on[F].shallow.indexOf(fe)>=0?pe:La(pe,S)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error(\"$name property is reserved for worker serialization logic.\");return F!==\"Object\"&&(te.$name=F),te}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!=\"object\")throw new Error(\"can't deserialize object of type \"+typeof R);let S=Ca(R)||\"Object\";if(!on[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:F}=on[S];if(!F)throw new Error(`can't deserialize unregistered class ${S}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te===\"$name\")continue;let fe=R[te];W[te]=on[S].shallow.indexOf(te)>=0?fe:Na(fe)}return W}class Yn{constructor(){this.first=!0}update(S,F){let W=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoom<W&&(this.lastIntegerZoom=W,this.lastIntegerZoomTime=F),S!==this.lastZoom&&(this.lastZoom=S,this.lastFloorZoom=W,!0))}}let Dn={\"Latin-1 Supplement\":R=>R>=128&&R<=255,\"Hangul Jamo\":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,\"General Punctuation\":R=>R>=8192&&R<=8303,\"Letterlike Symbols\":R=>R>=8448&&R<=8527,\"Number Forms\":R=>R>=8528&&R<=8591,\"Miscellaneous Technical\":R=>R>=8960&&R<=9215,\"Control Pictures\":R=>R>=9216&&R<=9279,\"Optical Character Recognition\":R=>R>=9280&&R<=9311,\"Enclosed Alphanumerics\":R=>R>=9312&&R<=9471,\"Geometric Shapes\":R=>R>=9632&&R<=9727,\"Miscellaneous Symbols\":R=>R>=9728&&R<=9983,\"Miscellaneous Symbols and Arrows\":R=>R>=11008&&R<=11263,\"Ideographic Description Characters\":R=>R>=12272&&R<=12287,\"CJK Symbols and Punctuation\":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,\"CJK Strokes\":R=>R>=12736&&R<=12783,\"Enclosed CJK Letters and Months\":R=>R>=12800&&R<=13055,\"CJK Compatibility\":R=>R>=13056&&R<=13311,\"Yijing Hexagram Symbols\":R=>R>=19904&&R<=19967,\"Private Use Area\":R=>R>=57344&&R<=63743,\"Vertical Forms\":R=>R>=65040&&R<=65055,\"CJK Compatibility Forms\":R=>R>=65072&&R<=65103,\"Small Form Variants\":R=>R>=65104&&R<=65135,\"Halfwidth and Fullwidth Forms\":R=>R>=65280&&R<=65519};function Ka(R){for(let S of R)if(Ho(S.charCodeAt(0)))return!0;return!1}function bo(R){for(let S of R)if(!as(S.charCodeAt(0)))return!1;return!0}function Zo(R){let S=R.map(F=>{try{return new RegExp(`\\\\p{sc=${F}}`,\"u\").source}catch(W){return null}}).filter(F=>F);return new RegExp(S.join(\"|\"),\"u\")}let Ss=Zo([\"Arab\",\"Dupl\",\"Mong\",\"Ougr\",\"Syrc\"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Zo([\"Bopo\",\"Hani\",\"Hira\",\"Kana\",\"Kits\",\"Nshu\",\"Tang\",\"Yiii\"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn[\"CJK Compatibility Forms\"](R)&&!(R>=65097&&R<=65103)||Dn[\"CJK Compatibility\"](R)||Dn[\"CJK Strokes\"](R)||!(!Dn[\"CJK Symbols and Punctuation\"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn[\"Enclosed CJK Letters and Months\"](R)||Dn[\"Ideographic Description Characters\"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn[\"Halfwidth and Fullwidth Forms\"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn[\"Small Form Variants\"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn[\"Vertical Forms\"](R)||Dn[\"Yijing Hexagram Symbols\"](R)||new RegExp(\"\\\\p{sc=Cans}\",\"u\").test(String.fromCodePoint(R))||new RegExp(\"\\\\p{sc=Hang}\",\"u\").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(S){return!!(Dn[\"Latin-1 Supplement\"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||Dn[\"General Punctuation\"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||Dn[\"Letterlike Symbols\"](S)||Dn[\"Number Forms\"](S)||Dn[\"Miscellaneous Technical\"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||Dn[\"Control Pictures\"](S)&&S!==9251||Dn[\"Optical Character Recognition\"](S)||Dn[\"Enclosed Alphanumerics\"](S)||Dn[\"Geometric Shapes\"](S)||Dn[\"Miscellaneous Symbols\"](S)&&!(S>=9754&&S<=9759)||Dn[\"Miscellaneous Symbols and Arrows\"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||Dn[\"CJK Symbols and Punctuation\"](S)||Dn.Katakana(S)||Dn[\"Private Use Area\"](S)||Dn[\"CJK Compatibility Forms\"](S)||Dn[\"Small Form Variants\"](S)||Dn[\"Halfwidth and Fullwidth Forms\"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(R))}let Ws=Zo([\"Adlm\",\"Arab\",\"Armi\",\"Avst\",\"Chrs\",\"Cprt\",\"Egyp\",\"Elym\",\"Gara\",\"Hatr\",\"Hebr\",\"Hung\",\"Khar\",\"Lydi\",\"Mand\",\"Mani\",\"Mend\",\"Merc\",\"Mero\",\"Narb\",\"Nbat\",\"Nkoo\",\"Orkh\",\"Palm\",\"Phli\",\"Phlp\",\"Phnx\",\"Prti\",\"Rohg\",\"Samr\",\"Sarb\",\"Sogo\",\"Syrc\",\"Thaa\",\"Todr\",\"Yezi\"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,S){return!(!S&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let S of R)if(Ls(S.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus=\"unavailable\",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(S,F){this.zoom=S,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yn,this.transition={})}isSupportedScript(S){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(S,ys.getRTLTextPluginStatus()===\"loaded\")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,F=S-Math.floor(S),W=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class Ql{constructor(S,F){this.property=S,this.value=F,this.expression=function(W,te){if(Wf(W))return new nl(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result===\"error\")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(\", \"));return fe.value}{let fe=W;return te.type===\"color\"&&typeof W==\"string\"?fe=nr.parse(W):te.type!==\"padding\"||typeof W!=\"number\"&&!Array.isArray(W)?te.type===\"variableAnchorOffsetCollection\"&&Array.isArray(W)&&(fe=$i.parse(W)):fe=Qr.parse(W),{kind:\"constant\",evaluate:()=>fe}}}(F===void 0?S.specification.default:F,S.specification)}isDataDriven(){return this.expression.kind===\"source\"||this.expression.kind===\"composite\"}possiblyEvaluate(S,F,W){return this.property.possiblyEvaluate(this,S,F,W)}}class Cu{constructor(S){this.property=S,this.value=new Ql(S,void 0)}transitioned(S,F){return new Nc(this.property,this.value,F,L({},S.transition,this.transition),S.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return g(this._values[S].value.value)}setValue(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Cu(this._values[S].property)),this._values[S].value=new Ql(this._values[S].property,F===null?void 0:g(F))}getTransition(S){return g(this._values[S].transition)}setTransition(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Cu(this._values[S].property)),this._values[S].transition=g(F)||void 0}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W);let te=this.getTransition(F);te!==void 0&&(S[`${F}-transition`]=te)}return S}transitioned(S,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(S,F._values[te]);return W}untransitioned(){let S=new pu(this._properties);for(let F of Object.keys(this._values))S._values[F]=this._values[F].untransitioned();return S}}class Nc{constructor(S,F,W,te,fe){this.property=S,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,S.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(S,F,W){let te=S.now||0,fe=this.value.possiblyEvaluate(S,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te<this.begin)return pe.possiblyEvaluate(S,F,W);{let Fe=(te-this.begin)/(this.end-this.begin);return this.property.interpolate(pe.possiblyEvaluate(S,F,W),fe,function(Ke){if(Ke<=0)return 0;if(Ke>=1)return 1;let ct=Ke*Ke,Lt=ct*Ke;return 4*(Ke<.5?Lt:3*(Ke-ct)+Lt-.75)}(Fe))}}return fe}}class pu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class Uc{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return g(this._values[S].value)}setValue(S,F){this._values[S]=new Ql(this._values[S].property,F===null?void 0:g(F))}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W)}return S}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}}class xu{constructor(S,F,W){this.property=S,this.value=F,this.parameters=W}isConstant(){return this.value.kind===\"constant\"}constantOr(S){return this.value.kind===\"constant\"?this.value.value:S}evaluate(S,F,W,te){return this.property.evaluate(this.value,this.parameters,S,F,W,te)}}class Ac{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Ua{constructor(S){this.specification=S}possiblyEvaluate(S,F){if(S.isDataDriven())throw new Error(\"Value should not be data driven\");return S.expression.evaluate(F)}interpolate(S,F,W){let te=Lo[this.specification.type];return te?te(S,F,W):S}}class oo{constructor(S,F){this.specification=S,this.overrides=F}possiblyEvaluate(S,F,W,te){return new xu(this,S.expression.kind===\"constant\"||S.expression.kind===\"camera\"?{kind:\"constant\",value:S.expression.evaluate(F,null,{},W,te)}:S.expression,F)}interpolate(S,F,W){if(S.value.kind!==\"constant\"||F.value.kind!==\"constant\")return S;if(S.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:\"constant\",value:void 0},S.parameters);let te=Lo[this.specification.type];if(te){let fe=te(S.value.value,F.value.value,W);return new xu(this,{kind:\"constant\",value:fe},S.parameters)}return S}evaluate(S,F,W,te,fe,pe){return S.kind===\"constant\"?S.value:S.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(S,F,W,te){if(S.value===void 0)return new xu(this,{kind:\"constant\",value:void 0},F);if(S.expression.kind===\"constant\"){let fe=S.expression.evaluate(F,null,{},W,te),pe=S.property.specification.type===\"resolvedImage\"&&typeof fe!=\"string\"?fe.name:fe,Fe=this._calculate(pe,pe,pe,F);return new xu(this,{kind:\"constant\",value:Fe},F)}if(S.expression.kind===\"camera\"){let fe=this._calculate(S.expression.evaluate({zoom:F.zoom-1}),S.expression.evaluate({zoom:F.zoom}),S.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:\"constant\",value:fe},F)}return new xu(this,S.expression,F)}evaluate(S,F,W,te,fe,pe){if(S.kind===\"source\"){let Fe=S.evaluate(F,W,te,fe,pe);return this._calculate(Fe,Fe,Fe,F)}return S.kind===\"composite\"?this._calculate(S.evaluate({zoom:Math.floor(F.zoom)-1},W,te),S.evaluate({zoom:Math.floor(F.zoom)},W,te),S.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):S.value}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class hc{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){if(S.value!==void 0){if(S.expression.kind===\"constant\"){let fe=S.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(S.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),S.expression.evaluate(new rs(Math.floor(F.zoom),F)),S.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class Ku{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){return!!S.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in S){let W=S[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new Ql(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Fi(\"DataDrivenProperty\",oo),Fi(\"DataConstantProperty\",Ua),Fi(\"CrossFadedDataDrivenProperty\",Vc),Fi(\"CrossFadedProperty\",hc),Fi(\"ColorRampProperty\",Ku);let w=\"-transition\";class B extends De{constructor(S,F){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!==\"custom\"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!==\"background\"&&(this.source=S.source,this.sourceLayer=S[\"source-layer\"],this.filter=S.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in S.paint)this.setPaintProperty(W,S.paint[W],{validate:!1});for(let W in S.layout)this.setLayoutProperty(W,S.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S===\"visibility\"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,F,W={}){F!=null&&this._validate(Nn,`layers.${this.id}.layout.${S}`,S,F,W)||(S!==\"visibility\"?this._unevaluatedLayout.setValue(S,F):this.visibility=F)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${S}`,S,F,W))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[S],fe=te.property.specification[\"property-type\"]===\"cross-faded-data-driven\",pe=te.value.isDataDriven(),Fe=te.value;this._transitionablePaint.setValue(S,F),this._handleSpecialPaintPropertyUpdate(S);let Ke=this._transitionablePaint._values[S].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(S,Fe,Ke)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,F,W){return!1}isHidden(S){return!!(this.minzoom&&S<this.minzoom)||!!(this.maxzoom&&S>=this.maxzoom)||this.visibility===\"none\"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,F){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,F)}serialize(){let S={id:this.id,type:this.type,source:this.source,\"source-layer\":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(F,W)=>!(F===void 0||W===\"layout\"&&!Object.keys(F).length||W===\"paint\"&&!Object.keys(F).length))}_validate(S,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,S.call(ki,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let F=this.paint.get(S);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind===\"source\"||F.value.kind===\"composite\")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(S,F){this._structArray=S,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(S,F){return S._trim(),F&&(S.isTransferred=!0,F.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let F=Object.create(this.prototype);return F.arrayBuffer=S.arrayBuffer,F.length=S.length,F.capacity=S.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error(\"_refreshViews() must be implemented by each concrete StructArray layout\")}}function Oe(R,S=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Ze(F,Math.max(S,fe)),Fe=te.components||1;return W=Math.max(W,fe),F+=fe*Fe,{name:te.name,type:te.type,components:Fe,offset:pe}}),size:Ze(F,Math.max(W,S)),alignment:S}}function Ze(R,S){return Math.ceil(R/S)*S}class st extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.int16[te+0]=F,this.int16[te+1]=W,S}}st.prototype.bytesPerElement=4,Fi(\"StructArrayLayout2i4\",st);class Tt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,S}}Tt.prototype.bytesPerElement=6,Fi(\"StructArrayLayout3i6\",Tt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,S}}Yt.prototype.bytesPerElement=8,Fi(\"StructArrayLayout4i8\",Yt);class Kt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Fe,S}}Kt.prototype.bytesPerElement=12,Fi(\"StructArrayLayout2i4i12\",Kt);class xr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=4*S,ct=8*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ct+4]=te,this.uint8[ct+5]=fe,this.uint8[ct+6]=pe,this.uint8[ct+7]=Fe,S}}xr.prototype.bytesPerElement=8,Fi(\"StructArrayLayout2i4ub8\",xr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.float32[te+0]=F,this.float32[te+1]=W,S}}Ir.prototype.bytesPerElement=8,Fi(\"StructArrayLayout2f8\",Ir);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,S,F,W,te,fe,pe,Fe,Ke,ct,Lt)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt){let cr=10*S;return this.uint16[cr+0]=F,this.uint16[cr+1]=W,this.uint16[cr+2]=te,this.uint16[cr+3]=fe,this.uint16[cr+4]=pe,this.uint16[cr+5]=Fe,this.uint16[cr+6]=Ke,this.uint16[cr+7]=ct,this.uint16[cr+8]=Lt,this.uint16[cr+9]=Jt,S}}ve.prototype.bytesPerElement=20,Fi(\"StructArrayLayout10ui20\",ve);class be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr){let mr=this.length;return this.resize(mr+1),this.emplace(mr,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr){let Pr=12*S;return this.int16[Pr+0]=F,this.int16[Pr+1]=W,this.int16[Pr+2]=te,this.int16[Pr+3]=fe,this.uint16[Pr+4]=pe,this.uint16[Pr+5]=Fe,this.uint16[Pr+6]=Ke,this.uint16[Pr+7]=ct,this.int16[Pr+8]=Lt,this.int16[Pr+9]=Jt,this.int16[Pr+10]=cr,this.int16[Pr+11]=mr,S}}be.prototype.bytesPerElement=24,Fi(\"StructArrayLayout4i4ui4i24\",be);class Re extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Re.prototype.bytesPerElement=12,Fi(\"StructArrayLayout3f12\",Re);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint32[1*S+0]=F,S}}qe.prototype.bytesPerElement=4,Fi(\"StructArrayLayout1ul4\",qe);class et extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct){let Lt=this.length;return this.resize(Lt+1),this.emplace(Lt,S,F,W,te,fe,pe,Fe,Ke,ct)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=10*S,cr=5*S;return this.int16[Jt+0]=F,this.int16[Jt+1]=W,this.int16[Jt+2]=te,this.int16[Jt+3]=fe,this.int16[Jt+4]=pe,this.int16[Jt+5]=Fe,this.uint32[cr+3]=Ke,this.uint16[Jt+8]=ct,this.uint16[Jt+9]=Lt,S}}et.prototype.bytesPerElement=20,Fi(\"StructArrayLayout6i1ul2ui20\",et);class Xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Fe,S}}Xe.prototype.bytesPerElement=12,Fi(\"StructArrayLayout2i2i2i12\",Xe);class it extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,F,W,te,fe)}emplace(S,F,W,te,fe,pe){let Fe=4*S,Ke=8*S;return this.float32[Fe+0]=F,this.float32[Fe+1]=W,this.float32[Fe+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,S}}it.prototype.bytesPerElement=16,Fi(\"StructArrayLayout2f1f2i16\",it);class Ft extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=16*S,ct=4*S,Lt=8*S;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ct+1]=te,this.float32[ct+2]=fe,this.int16[Lt+6]=pe,this.int16[Lt+7]=Fe,S}}Ft.prototype.bytesPerElement=16,Fi(\"StructArrayLayout2ub2f2i16\",Ft);class Ht extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,S}}Ht.prototype.bytesPerElement=6,Fi(\"StructArrayLayout3ui6\",Ht);class tr extends le{_refreshViews(){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)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn){let zi=24*S,un=12*S,Tn=48*S;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=te,this.uint16[zi+3]=fe,this.uint32[un+2]=pe,this.uint32[un+3]=Fe,this.uint32[un+4]=Ke,this.uint16[zi+10]=ct,this.uint16[zi+11]=Lt,this.uint16[zi+12]=Jt,this.float32[un+7]=cr,this.float32[un+8]=mr,this.uint8[Tn+36]=Pr,this.uint8[Tn+37]=zr,this.uint8[Tn+38]=ui,this.uint32[un+10]=yi,this.int16[zi+22]=vn,S}}tr.prototype.bytesPerElement=48,Fi(\"StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48\",tr);class dr extends le{_refreshViews(){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)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo,lo){let Xn=32*S,Ro=16*S;return this.int16[Xn+0]=F,this.int16[Xn+1]=W,this.int16[Xn+2]=te,this.int16[Xn+3]=fe,this.int16[Xn+4]=pe,this.int16[Xn+5]=Fe,this.int16[Xn+6]=Ke,this.int16[Xn+7]=ct,this.uint16[Xn+8]=Lt,this.uint16[Xn+9]=Jt,this.uint16[Xn+10]=cr,this.uint16[Xn+11]=mr,this.uint16[Xn+12]=Pr,this.uint16[Xn+13]=zr,this.uint16[Xn+14]=ui,this.uint16[Xn+15]=yi,this.uint16[Xn+16]=vn,this.uint16[Xn+17]=zi,this.uint16[Xn+18]=un,this.uint16[Xn+19]=Tn,this.uint16[Xn+20]=pa,this.uint16[Xn+21]=ro,this.uint16[Xn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=sa,this.float32[Ro+14]=Mo,this.uint16[Xn+30]=fo,this.uint16[Xn+31]=lo,S}}dr.prototype.bytesPerElement=64,Fi(\"StructArrayLayout8i15ui1ul2f2ui64\",dr);class Sr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.float32[1*S+0]=F,S}}Sr.prototype.bytesPerElement=4,Fi(\"StructArrayLayout1f4\",Sr);class Or extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[6*S+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Or.prototype.bytesPerElement=12,Fi(\"StructArrayLayout1ui2f12\",Or);class Wr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=4*S;return this.uint32[2*S+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,S}}Wr.prototype.bytesPerElement=8,Fi(\"StructArrayLayout1ul2ui8\",Wr);class ni extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.uint16[te+0]=F,this.uint16[te+1]=W,S}}ni.prototype.bytesPerElement=4,Fi(\"StructArrayLayout2ui4\",ni);class Pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint16[1*S+0]=F,S}}Pi.prototype.bytesPerElement=2,Fi(\"StructArrayLayout1ui2\",Pi);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,S}}cn.prototype.bytesPerElement=16,Fi(\"StructArrayLayout4f16\",cn);class ln extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}ln.prototype.size=20;class Cn extends et{get(S){return new ln(this,S)}}Fi(\"CollisionBoxArray\",Cn);class Kn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Kn.prototype.size=48;class Aa extends tr{get(S){return new Kn(this,S)}}Fi(\"PlacedSymbolArray\",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(S){this._structArray.uint32[this._pos4+12]=S}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends dr{get(S){return new fa(this,S)}}Fi(\"SymbolInstanceArray\",$a);class Co extends Sr{getoffsetX(S){return this.float32[1*S+0]}}Fi(\"GlyphOffsetArray\",Co);class Qa extends Tt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}Fi(\"SymbolLineVertexArray\",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Or{get(S){return new mo(this,S)}}Fi(\"TextAnchorOffsetArray\",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Wr{get(S){return new Ps(this,S)}}Fi(\"FeatureIndexArray\",Ts);class wo extends st{}class To extends st{}class hl extends st{}class Ul extends Kt{}class Lu extends xr{}class au extends Ir{}class Js extends ve{}class eu extends be{}class dc extends Re{}class Tl extends qe{}class Al extends Xe{}class X extends Ft{}class se extends Ht{}class Te extends ni{}let Ne=Oe([{name:\"a_pos\",components:2,type:\"Int16\"}],4),{members:He}=Ne;class Ye{constructor(S=[]){this.segments=S}prepareSegment(S,F,W,te){let fe=this.segments[this.segments.length-1];return S>Ye.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!fe||fe.vertexLength+S>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let S of this.segments)for(let F in S.vaos)S.vaos[F].destroy()}static simpleSegment(S,F,W,te){return new Ye([{vertexOffset:S,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function kt(R,S){return 256*(R=E(Math.floor(R),0,255))+E(Math.floor(S),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi(\"SegmentVector\",Ye);let nt=Oe([{name:\"a_pattern_from\",components:4,type:\"Uint16\"},{name:\"a_pattern_to\",components:4,type:\"Uint16\"},{name:\"a_pixel_ratio_from\",components:1,type:\"Uint16\"},{name:\"a_pixel_ratio_to\",components:1,type:\"Uint16\"}]);var jt={exports:{}},gr={exports:{}};gr.exports=function(R,S){var F,W,te,fe,pe,Fe,Ke,ct;for(W=R.length-(F=3&R.length),te=S,pe=3432918353,Fe=461845907,ct=0;ct<W;)Ke=255&R.charCodeAt(ct)|(255&R.charCodeAt(++ct))<<8|(255&R.charCodeAt(++ct))<<16|(255&R.charCodeAt(++ct))<<24,++ct,te=27492+(65535&(fe=5*(65535&(te=(te^=Ke=(65535&(Ke=(Ke=(65535&Ke)*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Fe+(((Ke>>>16)*Fe&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ct+2))<<16;case 2:Ke^=(255&R.charCodeAt(ct+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ct)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Fe+(((Ke>>>16)*Fe&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var yr=gr.exports,Hr={exports:{}};Hr.exports=function(R,S){for(var F,W=R.length,te=S^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var qr=yr,_i=Hr.exports;jt.exports=qr,jt.exports.murmur3=qr,jt.exports.murmur2=_i;var bi=o(jt.exports);class Zr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,F,W,te){this.ids.push(ai(S)),this.positions.push(F,W,te)}getPositions(S){if(!this.indexed)throw new Error(\"Trying to get index, but feature positions are not indexed\");let F=ai(S),W=0,te=this.ids.length-1;for(;W<te;){let pe=W+te>>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(S,F){let W=new Float64Array(S.ids),te=new Uint32Array(S.positions);return gi(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(S){let F=new Zr;return F.ids=S.ids,F.positions=S.positions,F.indexed=!0,F}}function ai(R){let S=+R;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:bi(String(R))}function gi(R,S,F,W){for(;F<W;){let te=R[F+W>>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]<te);do pe--;while(R[pe]>te);if(fe>=pe)break;Ii(R,fe,pe),Ii(S,3*fe,3*pe),Ii(S,3*fe+1,3*pe+1),Ii(S,3*fe+2,3*pe+2)}pe-F<W-pe?(gi(R,S,F,pe),F=pe+1):(gi(R,S,pe+1,W),W=pe)}}function Ii(R,S,F){let W=R[S];R[S]=R[F],R[F]=W}Fi(\"FeaturePositionMap\",Zr);class Si{constructor(S,F){this.gl=S.gl,this.location=F}}class ei extends Si{constructor(S,F){super(S,F),this.current=0}set(S){this.current!==S&&(this.current=S,this.gl.uniform1f(this.location,S))}}class Ln extends Si{constructor(S,F){super(S,F),this.current=[0,0,0,0]}set(S){S[0]===this.current[0]&&S[1]===this.current[1]&&S[2]===this.current[2]&&S[3]===this.current[3]||(this.current=S,this.gl.uniform4f(this.location,S[0],S[1],S[2],S[3]))}}class En extends Si{constructor(S,F){super(S,F),this.current=nr.transparent}set(S){S.r===this.current.r&&S.g===this.current.g&&S.b===this.current.b&&S.a===this.current.a||(this.current=S,this.gl.uniform4f(this.location,S.r,S.g,S.b,S.a))}}let Un=new Float32Array(16);function ia(R){return[kt(255*R.r,255*R.g),kt(255*R.b,255*R.a)]}class Ea{constructor(S,F,W){this.value=S,this.uniformNames=F.map(te=>`u_${te}`),this.type=W}setUniform(S,F,W){S.set(W.constantOr(this.value))}getBinding(S,F,W){return this.type===\"color\"?new En(S,F):new ei(S,F)}}class Ia{constructor(S,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=S.tlbr}setUniform(S,F,W,te){let fe=te===\"u_pattern_to\"?this.patternTo:te===\"u_pattern_from\"?this.patternFrom:te===\"u_pixel_ratio_to\"?this.pixelRatioTo:te===\"u_pixel_ratio_from\"?this.pixelRatioFrom:null;fe&&S.set(fe)}getBinding(S,F,W){return W.substr(0,9)===\"u_pattern\"?new Ln(S,F):new ei(S,F)}}class yo{constructor(S,F,W,te){this.expression=S,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:\"Float32\",components:W===\"color\"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(S,F,W,te,fe){let pe=this.paintVertexArray.length,Fe=this.expression.evaluate(new rs(0),F,{},te,[],fe);this.paintVertexArray.resize(S),this._setPaintValue(pe,S,Fe)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(S,F,fe)}_setPaintValue(S,F,W){if(this.type===\"color\"){let te=ia(W);for(let fe=S;fe<F;fe++)this.paintVertexArray.emplace(fe,te[0],te[1])}else{for(let te=S;te<F;te++)this.paintVertexArray.emplace(te,W);this.maxValue=Math.max(this.maxValue,Math.abs(W))}}upload(S){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=S.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Da{constructor(S,F,W,te,fe,pe){this.expression=S,this.uniformNames=F.map(Fe=>`u_${Fe}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(Fe=>({name:`a_${Fe}`,type:\"Float32\",components:W===\"color\"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(S,F,W,te,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},te,[],fe),Fe=this.expression.evaluate(new rs(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(Ke,S,pe,Fe)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(S,F,fe,pe)}_setPaintValue(S,F,W,te){if(this.type===\"color\"){let fe=ia(W),pe=ia(te);for(let Fe=S;Fe<F;Fe++)this.paintVertexArray.emplace(Fe,fe[0],fe[1],pe[0],pe[1])}else{for(let fe=S;fe<F;fe++)this.paintVertexArray.emplace(fe,W,te);this.maxValue=Math.max(this.maxValue,Math.abs(W),Math.abs(te))}}upload(S){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=S.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(S,F){let W=this.useIntegerZoom?Math.floor(F.zoom):F.zoom,te=E(this.expression.interpolationFactor(W,this.zoom,this.zoom+1),0,1);S.set(te)}getBinding(S,F,W){return new ei(S,F)}}class go{constructor(S,F,W,te,fe,pe){this.expression=S,this.type=F,this.useIntegerZoom=W,this.zoom=te,this.layerId=pe,this.zoomInPaintVertexArray=new fe,this.zoomOutPaintVertexArray=new fe}populatePaintArray(S,F,W){let te=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(S),this.zoomOutPaintVertexArray.resize(S),this._setPaintValues(te,S,F.patterns&&F.patterns[this.layerId],W)}updatePaintArray(S,F,W,te,fe){this._setPaintValues(S,F,W.patterns&&W.patterns[this.layerId],fe)}_setPaintValues(S,F,W,te){if(!te||!W)return;let{min:fe,mid:pe,max:Fe}=W,Ke=te[fe],ct=te[pe],Lt=te[Fe];if(Ke&&ct&&Lt)for(let Jt=S;Jt<F;Jt++)this.zoomInPaintVertexArray.emplace(Jt,ct.tl[0],ct.tl[1],ct.br[0],ct.br[1],Ke.tl[0],Ke.tl[1],Ke.br[0],Ke.br[1],ct.pixelRatio,Ke.pixelRatio),this.zoomOutPaintVertexArray.emplace(Jt,ct.tl[0],ct.tl[1],ct.br[0],ct.br[1],Lt.tl[0],Lt.tl[1],Lt.br[0],Lt.br[1],ct.pixelRatio,Lt.pixelRatio)}upload(S){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=S.createVertexBuffer(this.zoomInPaintVertexArray,nt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=S.createVertexBuffer(this.zoomOutPaintVertexArray,nt.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Is{constructor(S,F,W){this.binders={},this._buffers=[];let te=[];for(let fe in S.paint._values){if(!W(fe))continue;let pe=S.paint.get(fe);if(!(pe instanceof xu&&Nl(pe.property.specification)))continue;let Fe=Xs(fe,S.type),Ke=pe.value,ct=pe.property.specification.type,Lt=pe.property.useIntegerZoom,Jt=pe.property.specification[\"property-type\"],cr=Jt===\"cross-faded\"||Jt===\"cross-faded-data-driven\";if(Ke.kind===\"constant\")this.binders[fe]=cr?new Ia(Ke.value,Fe):new Ea(Ke.value,Fe,ct),te.push(`/u_${fe}`);else if(Ke.kind===\"source\"||cr){let mr=Gn(fe,ct,\"source\");this.binders[fe]=cr?new go(Ke,ct,Lt,F,mr,S.id):new yo(Ke,Fe,ct,mr),te.push(`/a_${fe}`)}else{let mr=Gn(fe,ct,\"composite\");this.binders[fe]=new Da(Ke,Fe,ct,Lt,F,mr),te.push(`/z_${fe}`)}}this.cacheKey=te.sort().join(\"\")}getMaxValue(S){let F=this.binders[S];return F instanceof yo||F instanceof Da?F.maxValue:0}populatePaintArrays(S,F,W,te,fe){for(let pe in this.binders){let Fe=this.binders[pe];(Fe instanceof yo||Fe instanceof Da||Fe instanceof go)&&Fe.populatePaintArray(S,F,W,te,fe)}}setConstantPatternPositions(S,F){for(let W in this.binders){let te=this.binders[W];te instanceof Ia&&te.setConstantPatternPositions(S,F)}}updatePaintArrays(S,F,W,te,fe){let pe=!1;for(let Fe in S){let Ke=F.getPositions(Fe);for(let ct of Ke){let Lt=W.feature(ct.index);for(let Jt in this.binders){let cr=this.binders[Jt];if((cr instanceof yo||cr instanceof Da||cr instanceof go)&&cr.expression.isStateDependent===!0){let mr=te.paint.get(Jt);cr.expression=mr.value,cr.updatePaintArray(ct.start,ct.end,Lt,S[Fe],fe),pe=!0}}}}return pe}defines(){let S=[];for(let F in this.binders){let W=this.binders[F];(W instanceof Ea||W instanceof Ia)&&S.push(...W.uniformNames.map(te=>`#define HAS_UNIFORM_${te}`))}return S}getBinderAttributes(){let S=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te<W.paintVertexAttributes.length;te++)S.push(W.paintVertexAttributes[te].name);else if(W instanceof go)for(let te=0;te<nt.members.length;te++)S.push(nt.members[te].name)}return S}getBinderUniforms(){let S=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof Ea||W instanceof Ia||W instanceof Da)for(let te of W.uniformNames)S.push(te)}return S}getPaintVertexBuffers(){return this._buffers}getUniforms(S,F){let W=[];for(let te in this.binders){let fe=this.binders[te];if(fe instanceof Ea||fe instanceof Ia||fe instanceof Da){for(let pe of fe.uniformNames)if(F[pe]){let Fe=fe.getBinding(S,F[pe],pe);W.push({name:pe,property:te,binding:Fe})}}}return W}setUniforms(S,F,W,te){for(let{name:fe,property:pe,binding:Fe}of F)this.binders[pe].setUniform(Fe,te,W.get(pe),fe)}updatePaintBuffers(S){this._buffers=[];for(let F in this.binders){let W=this.binders[F];if(S&&W instanceof go){let te=S.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof yo||W instanceof Da)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(S){for(let F in this.binders){let W=this.binders[F];(W instanceof yo||W instanceof Da||W instanceof go)&&W.upload(S)}this.updatePaintBuffers()}destroy(){for(let S in this.binders){let F=this.binders[S];(F instanceof yo||F instanceof Da||F instanceof go)&&F.destroy()}}}class Ms{constructor(S,F,W=()=>!0){this.programConfigurations={};for(let te of S)this.programConfigurations[te.id]=new Is(te,F,W);this.needsUpload=!1,this._featureMap=new Zr,this._bufferOffset=0}populatePaintArrays(S,F,W,te,fe,pe){for(let Fe in this.programConfigurations)this.programConfigurations[Fe].populatePaintArrays(S,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(S,this._featureMap,F,fe,te)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Xs(R,S){return{\"text-opacity\":[\"opacity\"],\"icon-opacity\":[\"opacity\"],\"text-color\":[\"fill_color\"],\"icon-color\":[\"fill_color\"],\"text-halo-color\":[\"halo_color\"],\"icon-halo-color\":[\"halo_color\"],\"text-halo-blur\":[\"halo_blur\"],\"icon-halo-blur\":[\"halo_blur\"],\"text-halo-width\":[\"halo_width\"],\"icon-halo-width\":[\"halo_width\"],\"line-gap-width\":[\"gapwidth\"],\"line-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"],\"fill-extrusion-pattern\":[\"pattern_to\",\"pattern_from\",\"pixel_ratio_to\",\"pixel_ratio_from\"]}[R]||[R.replace(`${S}-`,\"\").replace(/-/g,\"_\")]}function Gn(R,S,F){let W={color:{source:Ir,composite:cn},number:{source:Sr,composite:Ir}},te=function(fe){return{\"line-pattern\":{source:Js,composite:Js},\"fill-pattern\":{source:Js,composite:Js},\"fill-extrusion-pattern\":{source:Js,composite:Js}}[fe]}(R);return te&&te[F]||W[S][F]}Fi(\"ConstantBinder\",Ea),Fi(\"CrossFadedConstantBinder\",Ia),Fi(\"SourceExpressionBinder\",yo),Fi(\"CrossFadedCompositeBinder\",go),Fi(\"CompositeExpressionBinder\",Da),Fi(\"ProgramConfiguration\",Is,{omit:[\"_buffers\"]}),Fi(\"ProgramConfigurationSet\",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let S=ja/R.extent,F=R.loadGeometry();for(let W=0;W<F.length;W++){let te=F[W];for(let fe=0;fe<te.length;fe++){let pe=te[fe],Fe=Math.round(pe.x*S),Ke=Math.round(pe.y*S);pe.x=E(Fe,Uo,Fo),pe.y=E(Ke,Uo,Fo),(Fe<pe.x||Fe>pe.x+1||Ke<pe.y||Ke>pe.y+1)&&A(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}}return F}function Sl(R,S){return{type:R.type,id:R.id,properties:R.properties,geometry:S?$s(R):[]}}function bu(R,S,F,W,te){R.emplaceBack(2*S+(W+1)/2,2*F+(te+1)/2)}class dl{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){let te=this.layers[0],fe=[],pe=null,Fe=!1;te.type===\"circle\"&&(pe=te.layout.get(\"circle-sort-key\"),Fe=!pe.isConstant());for(let{feature:Ke,id:ct,index:Lt,sourceLayerIndex:Jt}of S){let cr=this.layers[0]._featureFilter.needGeometry,mr=Sl(Ke,cr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),mr,W))continue;let Pr=Fe?pe.evaluate(mr,{},W):void 0,zr={id:ct,properties:Ke.properties,type:Ke.type,sourceLayerIndex:Jt,index:Lt,geometry:cr?mr.geometry:$s(Ke),patterns:{},sortKey:Pr};fe.push(zr)}Fe&&fe.sort((Ke,ct)=>Ke.sortKey-ct.sortKey);for(let Ke of fe){let{geometry:ct,index:Lt,sourceLayerIndex:Jt}=Ke,cr=S[Lt].feature;this.addFeature(Ke,ct,Lt,W),F.featureIndex.insert(cr,ct,Lt,Jt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,He),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,F,W,te){for(let fe of F)for(let pe of fe){let Fe=pe.x,Ke=pe.y;if(Fe<0||Fe>=ja||Ke<0||Ke>=ja)continue;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Lt=ct.vertexLength;bu(this.layoutVertexArray,Fe,Ke,-1,-1),bu(this.layoutVertexArray,Fe,Ke,1,-1),bu(this.layoutVertexArray,Fe,Ke,1,1),bu(this.layoutVertexArray,Fe,Ke,-1,1),this.indexArray.emplaceBack(Lt,Lt+1,Lt+2),this.indexArray.emplaceBack(Lt,Lt+3,Lt+2),ct.vertexLength+=4,ct.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,{},te)}}function Sc(R,S){for(let F=0;F<R.length;F++)if(Ui(S,R[F]))return!0;for(let F=0;F<S.length;F++)if(Ui(R,S[F]))return!0;return!!Rr(R,S)}function Me(R,S,F){return!!Ui(R,S)||!!Nr(S,R,F)}function bt(R,S){if(R.length===1)return mi(S,R[0]);for(let F=0;F<S.length;F++){let W=S[F];for(let te=0;te<W.length;te++)if(Ui(R,W[te]))return!0}for(let F=0;F<R.length;F++)if(mi(S,R[F]))return!0;for(let F=0;F<S.length;F++)if(Rr(R,S[F]))return!0;return!1}function zt(R,S,F){if(R.length>1){if(Rr(R,S))return!0;for(let W=0;W<S.length;W++)if(Nr(S[W],R,F))return!0}for(let W=0;W<R.length;W++)if(Nr(R[W],S,F))return!0;return!1}function Rr(R,S){if(R.length===0||S.length===0)return!1;for(let F=0;F<R.length-1;F++){let W=R[F],te=R[F+1];for(let fe=0;fe<S.length-1;fe++)if(jr(W,te,S[fe],S[fe+1]))return!0}return!1}function jr(R,S,F,W){return z(R,F,W)!==z(S,F,W)&&z(R,S,F)!==z(R,S,W)}function Nr(R,S,F){let W=F*F;if(S.length===1)return R.distSqr(S[0])<W;for(let te=1;te<S.length;te++)if(Gr(R,S[te-1],S[te])<W)return!0;return!1}function Gr(R,S,F){let W=S.distSqr(F);if(W===0)return R.distSqr(S);let te=((R.x-S.x)*(F.x-S.x)+(R.y-S.y)*(F.y-S.y))/W;return R.distSqr(te<0?S:te>1?F:F.sub(S)._mult(te)._add(S))}function mi(R,S){let F,W,te,fe=!1;for(let pe=0;pe<R.length;pe++){F=R[pe];for(let Fe=0,Ke=F.length-1;Fe<F.length;Ke=Fe++)W=F[Fe],te=F[Ke],W.y>S.y!=te.y>S.y&&S.x<(te.x-W.x)*(S.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ui(R,S){let F=!1;for(let W=0,te=R.length-1;W<R.length;te=W++){let fe=R[W],pe=R[te];fe.y>S.y!=pe.y>S.y&&S.x<(pe.x-fe.x)*(S.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,S,F){let W=F[0],te=F[2];if(R.x<W.x&&S.x<W.x||R.x>te.x&&S.x>te.x||R.y<W.y&&S.y<W.y||R.y>te.y&&S.y>te.y)return!1;let fe=z(R,S,F[0]);return fe!==z(R,S,F[1])||fe!==z(R,S,F[2])||fe!==z(R,S,F[3])}function Ei(R,S,F){let W=S.paint.get(R).value;return W.kind===\"constant\"?W.value:F.programConfigurations.get(S.id).getMaxValue(R)}function Hn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function en(R,S,F,W,te){if(!S[0]&&!S[1])return R;let fe=u.convert(S)._mult(te);F===\"viewport\"&&fe._rotate(-W);let pe=[];for(let Fe=0;Fe<R.length;Fe++)pe.push(R[Fe].sub(fe));return pe}let Wi,si;Fi(\"CircleBucket\",dl,{omit:[\"layers\"]});var Mr={get paint(){return si=si||new ue({\"circle-radius\":new oo(ce.paint_circle[\"circle-radius\"]),\"circle-color\":new oo(ce.paint_circle[\"circle-color\"]),\"circle-blur\":new oo(ce.paint_circle[\"circle-blur\"]),\"circle-opacity\":new oo(ce.paint_circle[\"circle-opacity\"]),\"circle-translate\":new Ua(ce.paint_circle[\"circle-translate\"]),\"circle-translate-anchor\":new Ua(ce.paint_circle[\"circle-translate-anchor\"]),\"circle-pitch-scale\":new Ua(ce.paint_circle[\"circle-pitch-scale\"]),\"circle-pitch-alignment\":new Ua(ce.paint_circle[\"circle-pitch-alignment\"]),\"circle-stroke-width\":new oo(ce.paint_circle[\"circle-stroke-width\"]),\"circle-stroke-color\":new oo(ce.paint_circle[\"circle-stroke-color\"]),\"circle-stroke-opacity\":new oo(ce.paint_circle[\"circle-stroke-opacity\"])})},get layout(){return Wi=Wi||new ue({\"circle-sort-key\":new oo(ce.layout_circle[\"circle-sort-key\"])})}},Yr=1e-6,xi=typeof Float32Array!=\"undefined\"?Float32Array:Array;function Ri(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function ci(R,S,F){var W=S[0],te=S[1],fe=S[2],pe=S[3],Fe=S[4],Ke=S[5],ct=S[6],Lt=S[7],Jt=S[8],cr=S[9],mr=S[10],Pr=S[11],zr=S[12],ui=S[13],yi=S[14],vn=S[15],zi=F[0],un=F[1],Tn=F[2],pa=F[3];return R[0]=zi*W+un*Fe+Tn*Jt+pa*zr,R[1]=zi*te+un*Ke+Tn*cr+pa*ui,R[2]=zi*fe+un*ct+Tn*mr+pa*yi,R[3]=zi*pe+un*Lt+Tn*Pr+pa*vn,R[4]=(zi=F[4])*W+(un=F[5])*Fe+(Tn=F[6])*Jt+(pa=F[7])*zr,R[5]=zi*te+un*Ke+Tn*cr+pa*ui,R[6]=zi*fe+un*ct+Tn*mr+pa*yi,R[7]=zi*pe+un*Lt+Tn*Pr+pa*vn,R[8]=(zi=F[8])*W+(un=F[9])*Fe+(Tn=F[10])*Jt+(pa=F[11])*zr,R[9]=zi*te+un*Ke+Tn*cr+pa*ui,R[10]=zi*fe+un*ct+Tn*mr+pa*yi,R[11]=zi*pe+un*Lt+Tn*Pr+pa*vn,R[12]=(zi=F[12])*W+(un=F[13])*Fe+(Tn=F[14])*Jt+(pa=F[15])*zr,R[13]=zi*te+un*Ke+Tn*cr+pa*ui,R[14]=zi*fe+un*ct+Tn*mr+pa*yi,R[15]=zi*pe+un*Lt+Tn*Pr+pa*vn,R}Math.hypot||(Math.hypot=function(){for(var R=0,S=arguments.length;S--;)R+=arguments[S]*arguments[S];return Math.sqrt(R)});var an,Zi=ci;function Bn(R,S,F){var W=S[0],te=S[1],fe=S[2],pe=S[3];return R[0]=F[0]*W+F[4]*te+F[8]*fe+F[12]*pe,R[1]=F[1]*W+F[5]*te+F[9]*fe+F[13]*pe,R[2]=F[2]*W+F[6]*te+F[10]*fe+F[14]*pe,R[3]=F[3]*W+F[7]*te+F[11]*fe+F[15]*pe,R}an=new xi(4),xi!=Float32Array&&(an[0]=0,an[1]=0,an[2]=0,an[3]=0);class hi extends B{constructor(S){super(S,Mr)}createBucket(S){return new dl(S)}queryRadius(S){let F=S;return Ei(\"circle-radius\",this,F)+Ei(\"circle-stroke-width\",this,F)+Hn(this.paint.get(\"circle-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,Fe,Ke){let ct=en(S,this.paint.get(\"circle-translate\"),this.paint.get(\"circle-translate-anchor\"),pe.angle,Fe),Lt=this.paint.get(\"circle-radius\").evaluate(F,W)+this.paint.get(\"circle-stroke-width\").evaluate(F,W),Jt=this.paint.get(\"circle-pitch-alignment\")===\"map\",cr=Jt?ct:function(Pr,zr){return Pr.map(ui=>li(ui,zr))}(ct,Ke),mr=Jt?Lt*Fe:Lt;for(let Pr of te)for(let zr of Pr){let ui=Jt?zr:li(zr,Ke),yi=mr,vn=Bn([],[zr.x,zr.y,0,1],Ke);if(this.paint.get(\"circle-pitch-scale\")===\"viewport\"&&this.paint.get(\"circle-pitch-alignment\")===\"map\"?yi*=vn[3]/pe.cameraToCenterDistance:this.paint.get(\"circle-pitch-scale\")===\"map\"&&this.paint.get(\"circle-pitch-alignment\")===\"viewport\"&&(yi*=pe.cameraToCenterDistance/vn[3]),Me(cr,ui,yi))return!0}return!1}}function li(R,S){let F=Bn([],[R.x,R.y,0,1],S);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi(\"HeatmapBucket\",mn,{omit:[\"layers\"]});var Vi={get paint(){return Ji=Ji||new ue({\"heatmap-radius\":new oo(ce.paint_heatmap[\"heatmap-radius\"]),\"heatmap-weight\":new oo(ce.paint_heatmap[\"heatmap-weight\"]),\"heatmap-intensity\":new Ua(ce.paint_heatmap[\"heatmap-intensity\"]),\"heatmap-color\":new Ku(ce.paint_heatmap[\"heatmap-color\"]),\"heatmap-opacity\":new Ua(ce.paint_heatmap[\"heatmap-opacity\"])})}};function Ni(R,{width:S,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==S*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${S*F*W}`)}else te=new Uint8Array(S*F*W);return R.width=S,R.height=F,R.data=te,R}function pn(R,{width:S,height:F},W){if(S===R.width&&F===R.height)return;let te=Ni({},{width:S,height:F},W);Vn(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,S),height:Math.min(R.height,F)},W),R.width=S,R.height=F,R.data=te.data}function Vn(R,S,F,W,te,fe){if(te.width===0||te.height===0)return S;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError(\"out of range source coordinates for image copy\");if(te.width>S.width||te.height>S.height||W.x>S.width-te.width||W.y>S.height-te.height)throw new RangeError(\"out of range destination coordinates for image copy\");let pe=R.data,Fe=S.data;if(pe===Fe)throw new Error(\"srcData equals dstData, so image is already copied\");for(let Ke=0;Ke<te.height;Ke++){let ct=((F.y+Ke)*R.width+F.x)*fe,Lt=((W.y+Ke)*S.width+W.x)*fe;for(let Jt=0;Jt<te.width*fe;Jt++)Fe[Lt+Jt]=pe[ct+Jt]}return S}class na{constructor(S,F){Ni(this,S,1,F)}resize(S){pn(this,S,1)}clone(){return new na({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,F,W,te,fe){Vn(S,F,W,te,fe,1)}}class Ki{constructor(S,F){Ni(this,S,4,F)}resize(S){pn(this,S,4)}replace(S,F){F?this.data.set(S):this.data=S instanceof Uint8ClampedArray?new Uint8Array(S.buffer):S}clone(){return new Ki({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,F,W,te,fe){Vn(S,F,W,te,fe,4)}}function kn(R){let S={},F=R.resolution||256,W=R.clips?R.clips.length:1,te=R.image||new Ki({width:F,height:W});if(Math.log(F)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${F}`);let fe=(pe,Fe,Ke)=>{S[R.evaluationKey]=Ke;let ct=R.expression.evaluate(S);te.data[pe+Fe+0]=Math.floor(255*ct.r/ct.a),te.data[pe+Fe+1]=Math.floor(255*ct.g/ct.a),te.data[pe+Fe+2]=Math.floor(255*ct.b/ct.a),te.data[pe+Fe+3]=Math.floor(255*ct.a)};if(R.clips)for(let pe=0,Fe=0;pe<W;++pe,Fe+=4*F)for(let Ke=0,ct=0;Ke<F;Ke++,ct+=4){let Lt=Ke/(F-1),{start:Jt,end:cr}=R.clips[pe];fe(Fe,ct,Jt*(1-Lt)+cr*Lt)}else for(let pe=0,Fe=0;pe<F;pe++,Fe+=4)fe(0,Fe,pe/(F-1));return te}Fi(\"AlphaImage\",na),Fi(\"RGBAImage\",Ki);let ta=\"big-fb\";class oa extends B{createBucket(S){return new mn(S)}constructor(S){super(S,Vi),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(S){S===\"heatmap-color\"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=kn({expression:this._transitionablePaint._values[\"heatmap-color\"].value.expression,evaluationKey:\"heatmapDensity\",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(ta)&&this.heatmapFbos.delete(ta)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get(\"heatmap-opacity\")!==0&&this.visibility!==\"none\"}}let ba;var is={get paint(){return ba=ba||new ue({\"hillshade-illumination-direction\":new Ua(ce.paint_hillshade[\"hillshade-illumination-direction\"]),\"hillshade-illumination-anchor\":new Ua(ce.paint_hillshade[\"hillshade-illumination-anchor\"]),\"hillshade-exaggeration\":new Ua(ce.paint_hillshade[\"hillshade-exaggeration\"]),\"hillshade-shadow-color\":new Ua(ce.paint_hillshade[\"hillshade-shadow-color\"]),\"hillshade-highlight-color\":new Ua(ce.paint_hillshade[\"hillshade-highlight-color\"]),\"hillshade-accent-color\":new Ua(ce.paint_hillshade[\"hillshade-accent-color\"])})}};class Zs extends B{constructor(S){super(S,is)}hasOffscreenPass(){return this.paint.get(\"hillshade-exaggeration\")!==0&&this.visibility!==\"none\"}}let Va=Oe([{name:\"a_pos\",components:2,type:\"Int16\"}],4),{members:Ml}=Va;function zo(R,S,F=2){let W=S&&S.length,te=W?S[0]*F:R.length,fe=Qs(R,0,te,F,!0),pe=[];if(!fe||fe.next===fe.prev)return pe;let Fe,Ke,ct;if(W&&(fe=function(Lt,Jt,cr,mr){let Pr=[];for(let zr=0,ui=Jt.length;zr<ui;zr++){let yi=Qs(Lt,Jt[zr]*mr,zr<ui-1?Jt[zr+1]*mr:Lt.length,mr,!1);yi===yi.next&&(yi.steiner=!0),Pr.push(J(yi))}Pr.sort(ol);for(let zr=0;zr<Pr.length;zr++)cr=io(Pr[zr],cr);return cr}(R,S,fe,F)),R.length>80*F){Fe=1/0,Ke=1/0;let Lt=-1/0,Jt=-1/0;for(let cr=F;cr<te;cr+=F){let mr=R[cr],Pr=R[cr+1];mr<Fe&&(Fe=mr),Pr<Ke&&(Ke=Pr),mr>Lt&&(Lt=mr),Pr>Jt&&(Jt=Pr)}ct=Math.max(Lt-Fe,Jt-Ke),ct=ct!==0?32767/ct:0}return Vl(fe,pe,F,Fe,Ke,ct,0),pe}function Qs(R,S,F,W,te){let fe;if(te===function(pe,Fe,Ke,ct){let Lt=0;for(let Jt=Fe,cr=Ke-ct;Jt<Ke;Jt+=ct)Lt+=(pe[cr]-pe[Jt])*(pe[Jt+1]+pe[cr+1]),cr=Jt;return Lt}(R,S,F,W)>0)for(let pe=S;pe<F;pe+=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);else for(let pe=F-W;pe>=S;pe-=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ve(fe),fe=fe.next),fe}function al(R,S){if(!R)return R;S||(S=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ve(W),W=S=W.prev,W===W.next)break;F=!0}while(F||W!==S);return S}function Vl(R,S,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ct,Lt,Jt){let cr=Ke;do cr.z===0&&(cr.z=D(cr.x,cr.y,ct,Lt,Jt)),cr.prevZ=cr.prev,cr.nextZ=cr.next,cr=cr.next;while(cr!==Ke);cr.prevZ.nextZ=null,cr.prevZ=null,function(mr){let Pr,zr=1;do{let ui,yi=mr;mr=null;let vn=null;for(Pr=0;yi;){Pr++;let zi=yi,un=0;for(let pa=0;pa<zr&&(un++,zi=zi.nextZ,zi);pa++);let Tn=zr;for(;un>0||Tn>0&&zi;)un!==0&&(Tn===0||!zi||yi.z<=zi.z)?(ui=yi,yi=yi.nextZ,un--):(ui=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=ui:mr=ui,ui.prevZ=vn,vn=ui;yi=zi}vn.nextZ=null,zr*=2}while(Pr>1)}(cr)}(R,W,te,fe);let Fe=R;for(;R.prev!==R.next;){let Ke=R.prev,ct=R.next;if(fe?Vs(R,W,te,fe):ss(R))S.push(Ke.i,R.i,ct.i),Ve(R),R=ct.next,Fe=ct.next;else if((R=ct)===Fe){pe?pe===1?Vl(R=Ys(al(R),S),S,F,W,te,fe,2):pe===2&&wa(R,S,F,W,te,fe):Vl(al(R),S,F,W,te,fe,1);break}}}function ss(R){let S=R.prev,F=R,W=R.next;if(de(S,F,W)>=0)return!1;let te=S.x,fe=F.x,pe=W.x,Fe=S.y,Ke=F.y,ct=W.y,Lt=te<fe?te<pe?te:pe:fe<pe?fe:pe,Jt=Fe<Ke?Fe<ct?Fe:ct:Ke<ct?Ke:ct,cr=te>fe?te>pe?te:pe:fe>pe?fe:pe,mr=Fe>Ke?Fe>ct?Fe:ct:Ke>ct?Ke:ct,Pr=W.next;for(;Pr!==S;){if(Pr.x>=Lt&&Pr.x<=cr&&Pr.y>=Jt&&Pr.y<=mr&&q(te,Fe,fe,Ke,pe,ct,Pr.x,Pr.y)&&de(Pr.prev,Pr,Pr.next)>=0)return!1;Pr=Pr.next}return!0}function Vs(R,S,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let Fe=te.x,Ke=fe.x,ct=pe.x,Lt=te.y,Jt=fe.y,cr=pe.y,mr=Fe<Ke?Fe<ct?Fe:ct:Ke<ct?Ke:ct,Pr=Lt<Jt?Lt<cr?Lt:cr:Jt<cr?Jt:cr,zr=Fe>Ke?Fe>ct?Fe:ct:Ke>ct?Ke:ct,ui=Lt>Jt?Lt>cr?Lt:cr:Jt>cr?Jt:cr,yi=D(mr,Pr,S,F,W),vn=D(zr,ui,S,F,W),zi=R.prevZ,un=R.nextZ;for(;zi&&zi.z>=yi&&un&&un.z<=vn;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==te&&zi!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==te&&un!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,un.x,un.y)&&de(un.prev,un,un.next)>=0))return!1;un=un.nextZ}for(;zi&&zi.z>=yi;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==te&&zi!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;un&&un.z<=vn;){if(un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==te&&un!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,un.x,un.y)&&de(un.prev,un,un.next)>=0)return!1;un=un.nextZ}return!0}function Ys(R,S){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&we(W,F,F.next,te)&&Zt(W,te)&&Zt(te,W)&&(S.push(W.i,F.i,te.i),Ve(F),Ve(F.next),F=R=te),F=F.next}while(F!==R);return al(F)}function wa(R,S,F,W,te,fe){let pe=R;do{let Fe=pe.next.next;for(;Fe!==pe.prev;){if(pe.i!==Fe.i&&K(pe,Fe)){let Ke=hr(pe,Fe);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,S,F,W,te,fe,0),void Vl(Ke,S,F,W,te,fe,0)}Fe=Fe.next}pe=pe.next}while(pe!==R)}function ol(R,S){return R.x-S.x}function io(R,S){let F=function(te,fe){let pe=fe,Fe=te.x,Ke=te.y,ct,Lt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let zr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(zr<=Fe&&zr>Lt&&(Lt=zr,ct=pe.x<pe.next.x?pe:pe.next,zr===Fe))return ct}pe=pe.next}while(pe!==fe);if(!ct)return null;let Jt=ct,cr=ct.x,mr=ct.y,Pr=1/0;pe=ct;do{if(Fe>=pe.x&&pe.x>=cr&&Fe!==pe.x&&q(Ke<mr?Fe:Lt,Ke,cr,mr,Ke<mr?Lt:Fe,Ke,pe.x,pe.y)){let zr=Math.abs(Ke-pe.y)/(Fe-pe.x);Zt(pe,te)&&(zr<Pr||zr===Pr&&(pe.x>ct.x||pe.x===ct.x&&Y(ct,pe)))&&(ct=pe,Pr=zr)}pe=pe.next}while(pe!==Jt);return ct}(R,S);if(!F)return S;let W=hr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,S){return de(R.prev,R,S.prev)<0&&de(S.next,R,R.next)<0}function D(R,S,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-W)*te|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function J(R){let S=R,F=R;do(S.x<F.x||S.x===F.x&&S.y<F.y)&&(F=S),S=S.next;while(S!==R);return F}function q(R,S,F,W,te,fe,pe,Fe){return(te-pe)*(S-Fe)>=(R-pe)*(fe-Fe)&&(R-pe)*(W-Fe)>=(F-pe)*(S-Fe)&&(F-pe)*(fe-Fe)>=(te-pe)*(W-Fe)}function K(R,S){return R.next.i!==S.i&&R.prev.i!==S.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&we(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,S)&&(Zt(R,S)&&Zt(S,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,Fe=(F.y+W.y)/2;do te.y>Fe!=te.next.y>Fe&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(Fe-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,S)&&(de(R.prev,R,S.prev)||de(R,S.prev,S))||ne(R,S)&&de(R.prev,R,R.next)>0&&de(S.prev,S,S.next)>0)}function de(R,S,F){return(S.y-R.y)*(F.x-S.x)-(S.x-R.x)*(F.y-S.y)}function ne(R,S){return R.x===S.x&&R.y===S.y}function we(R,S,F,W){let te=ft(de(R,S,F)),fe=ft(de(R,S,W)),pe=ft(de(F,W,R)),Fe=ft(de(F,W,S));return te!==fe&&pe!==Fe||!(te!==0||!Ue(R,F,S))||!(fe!==0||!Ue(R,W,S))||!(pe!==0||!Ue(F,R,W))||!(Fe!==0||!Ue(F,S,W))}function Ue(R,S,F){return S.x<=Math.max(R.x,F.x)&&S.x>=Math.min(R.x,F.x)&&S.y<=Math.max(R.y,F.y)&&S.y>=Math.min(R.y,F.y)}function ft(R){return R>0?1:R<0?-1:0}function Zt(R,S){return de(R.prev,R,R.next)<0?de(R,S,R.next)>=0&&de(R,R.prev,S)>=0:de(R,S,R.prev)<0||de(R,R.next,S)<0}function hr(R,S){let F=Qe(R.i,R.x,R.y),W=Qe(S.i,S.x,S.y),te=R.next,fe=S.prev;return R.next=S,S.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function qt(R,S,F,W){let te=Qe(R,S,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ve(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function Qe(R,S,F){return{i:R,x:S,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function at(R,S,F){let W=F.patternDependencies,te=!1;for(let fe of S){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let Fe=pe.constantOr(null);Fe&&(te=!0,W[Fe.to]=!0,W[Fe.from]=!0)}return te}function Ct(R,S,F,W,te){let fe=te.patternDependencies;for(let pe of S){let Fe=pe.paint.get(`${R}-pattern`).value;if(Fe.kind!==\"constant\"){let Ke=Fe.evaluate({zoom:W-1},F,{},te.availableImages),ct=Fe.evaluate({zoom:W},F,{},te.availableImages),Lt=Fe.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ct=ct&&ct.name?ct.name:ct,Lt=Lt&&Lt.name?Lt.name:Lt,fe[Ke]=!0,fe[ct]=!0,fe[Lt]=!0,F.patterns[pe.id]={min:Ke,mid:ct,max:Lt}}}return F}class Ot{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at(\"fill\",this.layers,F);let te=this.layers[0].layout.get(\"fill-sort-key\"),fe=!te.isConstant(),pe=[];for(let{feature:Fe,id:Ke,index:ct,sourceLayerIndex:Lt}of S){let Jt=this.layers[0]._featureFilter.needGeometry,cr=Sl(Fe,Jt);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),cr,W))continue;let mr=fe?te.evaluate(cr,{},W,F.availableImages):void 0,Pr={id:Ke,properties:Fe.properties,type:Fe.type,sourceLayerIndex:Lt,index:ct,geometry:Jt?cr.geometry:$s(Fe),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((Fe,Ke)=>Fe.sortKey-Ke.sortKey);for(let Fe of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=Fe;if(this.hasPattern){let Jt=Ct(\"fill\",this.layers,Fe,this.zoom,F);this.patternFeatures.push(Jt)}else this.addFeature(Fe,Ke,ct,W,{});F.featureIndex.insert(S[ct].feature,Ke,ct,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let Fe=0;for(let mr of pe)Fe+=mr.length;let Ke=this.segments.prepareSegment(Fe,this.layoutVertexArray,this.indexArray),ct=Ke.vertexLength,Lt=[],Jt=[];for(let mr of pe){if(mr.length===0)continue;mr!==pe[0]&&Jt.push(Lt.length/2);let Pr=this.segments2.prepareSegment(mr.length,this.layoutVertexArray,this.indexArray2),zr=Pr.vertexLength;this.layoutVertexArray.emplaceBack(mr[0].x,mr[0].y),this.indexArray2.emplaceBack(zr+mr.length-1,zr),Lt.push(mr[0].x),Lt.push(mr[0].y);for(let ui=1;ui<mr.length;ui++)this.layoutVertexArray.emplaceBack(mr[ui].x,mr[ui].y),this.indexArray2.emplaceBack(zr+ui-1,zr+ui),Lt.push(mr[ui].x),Lt.push(mr[ui].y);Pr.vertexLength+=mr.length,Pr.primitiveLength+=mr.length}let cr=zo(Lt,Jt);for(let mr=0;mr<cr.length;mr+=3)this.indexArray.emplaceBack(ct+cr[mr],ct+cr[mr+1],ct+cr[mr+2]);Ke.vertexLength+=Fe,Ke.primitiveLength+=cr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}}let Rt,Bt;Fi(\"FillBucket\",Ot,{omit:[\"layers\",\"patternFeatures\"]});var Dt={get paint(){return Bt=Bt||new ue({\"fill-antialias\":new Ua(ce.paint_fill[\"fill-antialias\"]),\"fill-opacity\":new oo(ce.paint_fill[\"fill-opacity\"]),\"fill-color\":new oo(ce.paint_fill[\"fill-color\"]),\"fill-outline-color\":new oo(ce.paint_fill[\"fill-outline-color\"]),\"fill-translate\":new Ua(ce.paint_fill[\"fill-translate\"]),\"fill-translate-anchor\":new Ua(ce.paint_fill[\"fill-translate-anchor\"]),\"fill-pattern\":new Vc(ce.paint_fill[\"fill-pattern\"])})},get layout(){return Rt=Rt||new ue({\"fill-sort-key\":new oo(ce.layout_fill[\"fill-sort-key\"])})}};class yt extends B{constructor(S){super(S,Dt)}recalculate(S,F){super.recalculate(S,F);let W=this.paint._values[\"fill-outline-color\"];W.value.kind===\"constant\"&&W.value.value===void 0&&(this.paint._values[\"fill-outline-color\"]=this.paint._values[\"fill-color\"])}createBucket(S){return new Ot(S)}queryRadius(){return Hn(this.paint.get(\"fill-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,Fe){return bt(en(S,this.paint.get(\"fill-translate\"),this.paint.get(\"fill-translate-anchor\"),pe.angle,Fe),te)}isTileClipped(){return!0}}let Pt=Oe([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal_ed\",components:4,type:\"Int16\"}],4),ht=Oe([{name:\"a_centroid\",components:2,type:\"Int16\"}],4),{members:ur}=Pt;var br={},Ur=s,Di=fi;function fi(R,S,F,W,te){this.properties={},this.extent=F,this.type=0,this._pbf=R,this._geometry=-1,this._keys=W,this._values=te,R.readFields(Ti,this,S)}function Ti(R,S,F){R==1?S.id=F.readVarint():R==2?function(W,te){for(var fe=W.readVarint()+W.pos;W.pos<fe;){var pe=te._keys[W.readVarint()],Fe=te._values[W.readVarint()];te.properties[pe]=Fe}}(F,S):R==3?S.type=F.readVarint():R==4&&(S._geometry=F.pos)}function gn(R){for(var S,F,W=0,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)W+=((F=R[pe]).x-(S=R[te]).x)*(S.y+F.y);return W}fi.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],fi.prototype.loadGeometry=function(){var R=this._pbf;R.pos=this._geometry;for(var S,F=R.readVarint()+R.pos,W=1,te=0,fe=0,pe=0,Fe=[];R.pos<F;){if(te<=0){var Ke=R.readVarint();W=7&Ke,te=Ke>>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(S&&Fe.push(S),S=[]),S.push(new Ur(fe,pe));else{if(W!==7)throw new Error(\"unknown command \"+W);S&&S.push(S[0].clone())}}return S&&Fe.push(S),Fe},fi.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var S=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,Fe=-1/0,Ke=1/0,ct=-1/0;R.pos<S;){if(W<=0){var Lt=R.readVarint();F=7&Lt,W=Lt>>3}if(W--,F===1||F===2)(te+=R.readSVarint())<pe&&(pe=te),te>Fe&&(Fe=te),(fe+=R.readSVarint())<Ke&&(Ke=fe),fe>ct&&(ct=fe);else if(F!==7)throw new Error(\"unknown command \"+F)}return[pe,Ke,Fe,ct]},fi.prototype.toGeoJSON=function(R,S,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,Fe=this.extent*S,Ke=this.loadGeometry(),ct=fi.types[this.type];function Lt(mr){for(var Pr=0;Pr<mr.length;Pr++){var zr=mr[Pr];mr[Pr]=[360*(zr.x+pe)/fe-180,360/Math.PI*Math.atan(Math.exp((180-360*(zr.y+Fe)/fe)*Math.PI/180))-90]}}switch(this.type){case 1:var Jt=[];for(W=0;W<Ke.length;W++)Jt[W]=Ke[W][0];Lt(Ke=Jt);break;case 2:for(W=0;W<Ke.length;W++)Lt(Ke[W]);break;case 3:for(Ke=function(mr){var Pr=mr.length;if(Pr<=1)return[mr];for(var zr,ui,yi=[],vn=0;vn<Pr;vn++){var zi=gn(mr[vn]);zi!==0&&(ui===void 0&&(ui=zi<0),ui===zi<0?(zr&&yi.push(zr),zr=[mr[vn]]):zr.push(mr[vn]))}return zr&&yi.push(zr),yi}(Ke),W=0;W<Ke.length;W++)for(te=0;te<Ke[W].length;te++)Lt(Ke[W][te])}Ke.length===1?Ke=Ke[0]:ct=\"Multi\"+ct;var cr={type:\"Feature\",geometry:{type:ct,coordinates:Ke},properties:this.properties};return\"id\"in this&&(cr.id=this.id),cr};var rn=Di,Ci=Bi;function Bi(R,S){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(Gi,this,S),this.length=this._features.length}function Gi(R,S,F){R===15?S.version=F.readVarint():R===1?S.name=F.readString():R===5?S.extent=F.readVarint():R===2?S._features.push(F.pos):R===3?S._keys.push(F.readString()):R===4&&S._values.push(function(W){for(var te=null,fe=W.readVarint()+W.pos;W.pos<fe;){var pe=W.readVarint()>>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}Bi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[R];var S=this._pbf.readVarint()+this._pbf.pos;return new rn(this._pbf,S,this.extent,this._keys,this._values)};var sn=Ci;function zn(R,S,F){if(R===3){var W=new sn(F,F.readVarint()+F.pos);W.length&&(S[W.name]=W)}}br.VectorTile=function(R,S){this.layers=R.readFields(zn,{},S)},br.VectorTileFeature=Di,br.VectorTileLayer=Ci;let Ja=br.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,S,F,W,te,fe,pe,Fe){R.emplaceBack(S,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(Fe))}class so{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.features=[],this.hasPattern=at(\"fill-extrusion\",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:Fe}of S){let Ke=this.layers[0]._featureFilter.needGeometry,ct=Sl(te,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ct,W))continue;let Lt={id:fe,sourceLayerIndex:Fe,index:pe,geometry:Ke?ct.geometry:$s(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(Ct(\"fill-extrusion\",this.layers,Lt,this.zoom,F)):this.addFeature(Lt,Lt.geometry,pe,W,{}),F.featureIndex.insert(te,Lt.geometry,pe,Fe,this.index,!0)}}addFeatures(S,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,ur),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,ht.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let Fe={x:0,y:0,vertexCount:0},Ke=0;for(let Pr of pe)Ke+=Pr.length;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Pr of pe){if(Pr.length===0||ms(Pr))continue;let zr=0;for(let ui=0;ui<Pr.length;ui++){let yi=Pr[ui];if(ui>=1){let vn=Pr[ui-1];if(!Yo(yi,vn)){ct.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=yi.sub(vn)._perp()._unit(),un=vn.dist(yi);zr+un>32768&&(zr=0),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,1,zr),Fe.x+=2*yi.x,Fe.y+=2*yi.y,Fe.vertexCount+=2,zr+=un,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,zr),Fe.x+=2*vn.x,Fe.y+=2*vn.y,Fe.vertexCount+=2;let Tn=ct.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ct.vertexLength+=4,ct.primitiveLength+=2}}}}if(ct.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[S.type]!==\"Polygon\")continue;let Lt=[],Jt=[],cr=ct.vertexLength;for(let Pr of pe)if(Pr.length!==0){Pr!==pe[0]&&Jt.push(Lt.length/2);for(let zr=0;zr<Pr.length;zr++){let ui=Pr[zr];ts(this.layoutVertexArray,ui.x,ui.y,0,0,1,1,0),Fe.x+=ui.x,Fe.y+=ui.y,Fe.vertexCount+=1,Lt.push(ui.x),Lt.push(ui.y)}}let mr=zo(Lt,Jt);for(let Pr=0;Pr<mr.length;Pr+=3)this.indexArray.emplaceBack(cr+mr[Pr],cr+mr[Pr+2],cr+mr[Pr+1]);ct.primitiveLength+=mr.length/3,ct.vertexLength+=Ke;for(let Pr=0;Pr<Fe.vertexCount;Pr++){let zr=Math.floor(Fe.x/Fe.vertexCount),ui=Math.floor(Fe.y/Fe.vertexCount);this.centroidVertexArray.emplaceBack(zr,ui)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}}function Yo(R,S){return R.x===S.x&&(R.x<0||R.x>ja)||R.y===S.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(S=>S.x<0)||R.every(S=>S.x>ja)||R.every(S=>S.y<0)||R.every(S=>S.y>ja)}let ou;Fi(\"FillExtrusionBucket\",so,{omit:[\"layers\",\"features\"]});var Cv={get paint(){return ou=ou||new ue({\"fill-extrusion-opacity\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-opacity\"]),\"fill-extrusion-color\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-color\"]),\"fill-extrusion-translate\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-translate\"]),\"fill-extrusion-translate-anchor\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-translate-anchor\"]),\"fill-extrusion-pattern\":new Vc(ce[\"paint_fill-extrusion\"][\"fill-extrusion-pattern\"]),\"fill-extrusion-height\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-height\"]),\"fill-extrusion-base\":new oo(ce[\"paint_fill-extrusion\"][\"fill-extrusion-base\"]),\"fill-extrusion-vertical-gradient\":new Ua(ce[\"paint_fill-extrusion\"][\"fill-extrusion-vertical-gradient\"])})}};class Lv extends B{constructor(S){super(S,Cv)}createBucket(S){return new so(S)}queryRadius(){return Hn(this.paint.get(\"fill-extrusion-translate\"))}is3D(){return!0}queryIntersectsFeature(S,F,W,te,fe,pe,Fe,Ke){let ct=en(S,this.paint.get(\"fill-extrusion-translate\"),this.paint.get(\"fill-extrusion-translate-anchor\"),pe.angle,Fe),Lt=this.paint.get(\"fill-extrusion-height\").evaluate(F,W),Jt=this.paint.get(\"fill-extrusion-base\").evaluate(F,W),cr=function(Pr,zr,ui,yi){let vn=[];for(let zi of Pr){let un=[zi.x,zi.y,0,1];Bn(un,un,zr),vn.push(new u(un[0]/un[3],un[1]/un[3]))}return vn}(ct,Ke),mr=function(Pr,zr,ui,yi){let vn=[],zi=[],un=yi[8]*zr,Tn=yi[9]*zr,pa=yi[10]*zr,ro=yi[11]*zr,Vo=yi[8]*ui,Xa=yi[9]*ui,sa=yi[10]*ui,Mo=yi[11]*ui;for(let fo of Pr){let lo=[],Xn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=yi[0]*uo+yi[4]*$o+yi[12],qu=yi[1]*uo+yi[5]*$o+yi[13],kh=yi[2]*uo+yi[6]*$o+yi[14],Qv=yi[3]*uo+yi[7]*$o+yi[15],ud=kh+pa,Ch=Qv+ro,Vd=Ju+Vo,Gd=qu+Xa,Hd=kh+sa,Af=Qv+Mo,Lh=new u((Ju+un)/Ch,(qu+Tn)/Ch);Lh.z=ud/Ch,lo.push(Lh);let Ed=new u(Vd/Af,Gd/Af);Ed.z=Hd/Af,Xn.push(Ed)}vn.push(lo),zi.push(Xn)}return[vn,zi]}(te,Jt,Lt,Ke);return function(Pr,zr,ui){let yi=1/0;bt(ui,zr)&&(yi=Kv(ui,zr[0]));for(let vn=0;vn<zr.length;vn++){let zi=zr[vn],un=Pr[vn];for(let Tn=0;Tn<zi.length-1;Tn++){let pa=zi[Tn],ro=[pa,zi[Tn+1],un[Tn+1],un[Tn],pa];Sc(ui,ro)&&(yi=Math.min(yi,Kv(ui,ro)))}}return yi!==1/0&&yi}(mr[0],mr[1],cr)}}function wd(R,S){return R.x*S.x+R.y*S.y}function Kv(R,S){if(R.length===1){let F=0,W=S[F++],te;for(;!te||W.equals(te);)if(te=S[F++],!te)return 1/0;for(;F<S.length;F++){let fe=S[F],pe=R[0],Fe=te.sub(W),Ke=fe.sub(W),ct=pe.sub(W),Lt=wd(Fe,Fe),Jt=wd(Fe,Ke),cr=wd(Ke,Ke),mr=wd(ct,Fe),Pr=wd(ct,Ke),zr=Lt*cr-Jt*Jt,ui=(cr*mr-Jt*Pr)/zr,yi=(Lt*Pr-Jt*mr)/zr,vn=W.z*(1-ui-yi)+te.z*ui+fe.z*yi;if(isFinite(vn))return vn}return 1/0}{let F=1/0;for(let W of S)F=Math.min(F,W.z);return F}}let hg=Oe([{name:\"a_pos_normal\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}],4),{members:gp}=hg,Td=Oe([{name:\"a_uv_x\",components:1,type:\"Float32\"},{name:\"a_split_index\",components:1,type:\"Float32\"}]),{members:mp}=Td,Ud=br.VectorTileFeature.types,Ad=Math.cos(Math.PI/180*37.5),Pv=Math.pow(2,14)/.5;class Jv{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at(\"line\",this.layers,F);let te=this.layers[0].layout.get(\"line-sort-key\"),fe=!te.isConstant(),pe=[];for(let{feature:Fe,id:Ke,index:ct,sourceLayerIndex:Lt}of S){let Jt=this.layers[0]._featureFilter.needGeometry,cr=Sl(Fe,Jt);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),cr,W))continue;let mr=fe?te.evaluate(cr,{},W):void 0,Pr={id:Ke,properties:Fe.properties,type:Fe.type,sourceLayerIndex:Lt,index:ct,geometry:Jt?cr.geometry:$s(Fe),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((Fe,Ke)=>Fe.sortKey-Ke.sortKey);for(let Fe of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=Fe;if(this.hasPattern){let Jt=Ct(\"line\",this.layers,Fe,this.zoom,F);this.patternFeatures.push(Jt)}else this.addFeature(Fe,Ke,ct,W,{});F.featureIndex.insert(S[ct].feature,Ke,ct,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,mp)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,gp),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,\"mapbox_clip_start\")&&Object.prototype.hasOwnProperty.call(S.properties,\"mapbox_clip_end\"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,F,W,te,fe){let pe=this.layers[0].layout,Fe=pe.get(\"line-join\").evaluate(S,{}),Ke=pe.get(\"line-cap\"),ct=pe.get(\"line-miter-limit\"),Lt=pe.get(\"line-round-limit\");this.lineClips=this.lineFeatureClips(S);for(let Jt of F)this.addLine(Jt,S,Fe,Ke,ct,Lt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}addLine(S,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let yi=0;yi<S.length-1;yi++)this.totalDistance+=S[yi].dist(S[yi+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let Fe=Ud[F.type]===\"Polygon\",Ke=S.length;for(;Ke>=2&&S[Ke-1].equals(S[Ke-2]);)Ke--;let ct=0;for(;ct<Ke-1&&S[ct].equals(S[ct+1]);)ct++;if(Ke<(Fe?3:2))return;W===\"bevel\"&&(fe=1.05);let Lt=this.overscaling<=16?15*ja/(512*this.overscaling):0,Jt=this.segments.prepareSegment(10*Ke,this.layoutVertexArray,this.indexArray),cr,mr,Pr,zr,ui;this.e1=this.e2=-1,Fe&&(cr=S[Ke-2],ui=S[ct].sub(cr)._unit()._perp());for(let yi=ct;yi<Ke;yi++){if(Pr=yi===Ke-1?Fe?S[ct+1]:void 0:S[yi+1],Pr&&S[yi].equals(Pr))continue;ui&&(zr=ui),cr&&(mr=cr),cr=S[yi],ui=Pr?Pr.sub(cr)._unit()._perp():zr,zr=zr||ui;let vn=zr.add(ui);vn.x===0&&vn.y===0||vn._unit();let zi=zr.x*ui.x+zr.y*ui.y,un=vn.x*ui.x+vn.y*ui.y,Tn=un!==0?1/un:1/0,pa=2*Math.sqrt(2-2*un),ro=un<Ad&&mr&&Pr,Vo=zr.x*ui.y-zr.y*ui.x>0;if(ro&&yi>ct){let Mo=cr.dist(mr);if(Mo>2*Lt){let fo=cr.sub(cr.sub(mr)._mult(Lt/Mo)._round());this.updateDistance(mr,fo),this.addCurrentVertex(fo,zr,0,0,Jt),mr=fo}}let Xa=mr&&Pr,sa=Xa?W:Fe?\"butt\":te;if(Xa&&sa===\"round\"&&(Tn<pe?sa=\"miter\":Tn<=2&&(sa=\"fakeround\")),sa===\"miter\"&&Tn>fe&&(sa=\"bevel\"),sa===\"bevel\"&&(Tn>2&&(sa=\"flipbevel\"),Tn<fe&&(sa=\"miter\")),mr&&this.updateDistance(mr,cr),sa===\"miter\")vn._mult(Tn),this.addCurrentVertex(cr,vn,0,0,Jt);else if(sa===\"flipbevel\"){if(Tn>100)vn=ui.mult(-1);else{let Mo=Tn*zr.add(ui).mag()/zr.sub(ui).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(cr,vn,0,0,Jt),this.addCurrentVertex(cr,vn.mult(-1),0,0,Jt)}else if(sa===\"bevel\"||sa===\"fakeround\"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(mr&&this.addCurrentVertex(cr,zr,fo,lo,Jt),sa===\"fakeround\"){let Xn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro<Xn;Ro++){let uo=Ro/Xn;if(uo!==.5){let Ju=uo-.5;uo+=uo*Ju*(uo-1)*((1.0904+zi*(zi*(3.55645-1.43519*zi)-3.2452))*Ju*Ju+(.848013+zi*(.215638*zi-1.06021)))}let $o=ui.sub(zr)._mult(uo)._add(zr)._unit()._mult(Vo?-1:1);this.addHalfVertex(cr,$o.x,$o.y,!1,Vo,0,Jt)}}Pr&&this.addCurrentVertex(cr,ui,-fo,-lo,Jt)}else if(sa===\"butt\")this.addCurrentVertex(cr,vn,0,0,Jt);else if(sa===\"square\"){let Mo=mr?1:-1;this.addCurrentVertex(cr,vn,Mo,Mo,Jt)}else sa===\"round\"&&(mr&&(this.addCurrentVertex(cr,zr,0,0,Jt),this.addCurrentVertex(cr,zr,1,1,Jt,!0)),Pr&&(this.addCurrentVertex(cr,ui,-1,-1,Jt,!0),this.addCurrentVertex(cr,ui,0,0,Jt)));if(ro&&yi<Ke-1){let Mo=cr.dist(Pr);if(Mo>2*Lt){let fo=cr.add(Pr.sub(cr)._mult(Lt/Mo)._round());this.updateDistance(cr,fo),this.addCurrentVertex(fo,ui,0,0,Jt),cr=fo}}}}addCurrentVertex(S,F,W,te,fe,pe=!1){let Fe=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(S,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(S,Fe,Ke,pe,!0,-te,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,F,W,te,fe,pe))}addHalfVertex({x:S,y:F},W,te,fe,pe,Fe,Ke){let ct=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(Fe===0?0:Fe<0?-1:1)|(63&ct)<<2,ct>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Lt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Lt),Ke.primitiveLength++),pe?this.e2=Lt:this.e1=Lt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,F){this.distance+=S.dist(F),this.updateScaledDistance()}}let Iv,fy;Fi(\"LineBucket\",Jv,{omit:[\"layers\",\"patternFeatures\"]});var dg={get paint(){return fy=fy||new ue({\"line-opacity\":new oo(ce.paint_line[\"line-opacity\"]),\"line-color\":new oo(ce.paint_line[\"line-color\"]),\"line-translate\":new Ua(ce.paint_line[\"line-translate\"]),\"line-translate-anchor\":new Ua(ce.paint_line[\"line-translate-anchor\"]),\"line-width\":new oo(ce.paint_line[\"line-width\"]),\"line-gap-width\":new oo(ce.paint_line[\"line-gap-width\"]),\"line-offset\":new oo(ce.paint_line[\"line-offset\"]),\"line-blur\":new oo(ce.paint_line[\"line-blur\"]),\"line-dasharray\":new hc(ce.paint_line[\"line-dasharray\"]),\"line-pattern\":new Vc(ce.paint_line[\"line-pattern\"]),\"line-gradient\":new Ku(ce.paint_line[\"line-gradient\"])})},get layout(){return Iv=Iv||new ue({\"line-cap\":new Ua(ce.layout_line[\"line-cap\"]),\"line-join\":new oo(ce.layout_line[\"line-join\"]),\"line-miter-limit\":new Ua(ce.layout_line[\"line-miter-limit\"]),\"line-round-limit\":new Ua(ce.layout_line[\"line-round-limit\"]),\"line-sort-key\":new oo(ce.layout_line[\"line-sort-key\"])})}};class oh extends oo{possiblyEvaluate(S,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(S,F)}evaluate(S,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(S,F,W,te)}}let vg;class hy extends B{constructor(S){super(S,dg),this.gradientVersion=0,vg||(vg=new oh(dg.paint.properties[\"line-width\"].specification),vg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S===\"line-gradient\"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values[\"line-gradient\"].value.expression}recalculate(S,F){super.recalculate(S,F),this.paint._values[\"line-floorwidth\"]=vg.possiblyEvaluate(this._transitioningPaint._values[\"line-width\"].value,S)}createBucket(S){return new Jv(S)}queryRadius(S){let F=S,W=Zh(Ei(\"line-width\",this,F),Ei(\"line-gap-width\",this,F)),te=Ei(\"line-offset\",this,F);return W/2+Math.abs(te)+Hn(this.paint.get(\"line-translate\"))}queryIntersectsFeature(S,F,W,te,fe,pe,Fe){let Ke=en(S,this.paint.get(\"line-translate\"),this.paint.get(\"line-translate-anchor\"),pe.angle,Fe),ct=Fe/2*Zh(this.paint.get(\"line-width\").evaluate(F,W),this.paint.get(\"line-gap-width\").evaluate(F,W)),Lt=this.paint.get(\"line-offset\").evaluate(F,W);return Lt&&(te=function(Jt,cr){let mr=[];for(let Pr=0;Pr<Jt.length;Pr++){let zr=Jt[Pr],ui=[];for(let yi=0;yi<zr.length;yi++){let vn=zr[yi-1],zi=zr[yi],un=zr[yi+1],Tn=yi===0?new u(0,0):zi.sub(vn)._unit()._perp(),pa=yi===zr.length-1?new u(0,0):un.sub(zi)._unit()._perp(),ro=Tn._add(pa)._unit(),Vo=ro.x*pa.x+ro.y*pa.y;Vo!==0&&ro._mult(1/Vo),ui.push(ro._mult(cr)._add(zi))}mr.push(ui)}return mr}(te,Lt*Fe)),function(Jt,cr,mr){for(let Pr=0;Pr<cr.length;Pr++){let zr=cr[Pr];if(Jt.length>=3){for(let ui=0;ui<zr.length;ui++)if(Ui(Jt,zr[ui]))return!0}if(zt(Jt,zr,mr))return!0}return!1}(Ke,te,ct)}isTileClipped(){return!0}}function Zh(R,S){return S>0?S+2*R:R}let am=Oe([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint16\"},{name:\"a_pixeloffset\",components:4,type:\"Int16\"}],4),k1=Oe([{name:\"a_projected_pos\",components:3,type:\"Float32\"}],4);Oe([{name:\"a_fade_opacity\",components:1,type:\"Uint32\"}],4);let C1=Oe([{name:\"a_placed\",components:2,type:\"Uint8\"},{name:\"a_shift\",components:2,type:\"Float32\"},{name:\"a_box_real\",components:2,type:\"Int16\"}]);Oe([{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]);let dy=Oe([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_anchor_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"}],4),om=Oe([{name:\"a_pos\",components:2,type:\"Float32\"},{name:\"a_radius\",components:1,type:\"Float32\"},{name:\"a_flags\",components:2,type:\"Int16\"}],4);function sm(R,S,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let Fe=fe.layout.get(\"text-transform\").evaluate(pe,{});return Fe===\"uppercase\"?te=te.toLocaleUpperCase():Fe===\"lowercase\"&&(te=te.toLocaleLowerCase()),ys.applyArabicShaping&&(te=ys.applyArabicShaping(te)),te}(W.text,S,F)}),R}Oe([{name:\"triangle\",components:3,type:\"Uint16\"}]),Oe([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Uint16\",name:\"glyphStartIndex\"},{type:\"Uint16\",name:\"numGlyphs\"},{type:\"Uint32\",name:\"vertexStartIndex\"},{type:\"Uint32\",name:\"lineStartIndex\"},{type:\"Uint32\",name:\"lineLength\"},{type:\"Uint16\",name:\"segment\"},{type:\"Uint16\",name:\"lowerSize\"},{type:\"Uint16\",name:\"upperSize\"},{type:\"Float32\",name:\"lineOffsetX\"},{type:\"Float32\",name:\"lineOffsetY\"},{type:\"Uint8\",name:\"writingMode\"},{type:\"Uint8\",name:\"placedOrientation\"},{type:\"Uint8\",name:\"hidden\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Int16\",name:\"associatedIconIndex\"}]),Oe([{type:\"Int16\",name:\"anchorX\"},{type:\"Int16\",name:\"anchorY\"},{type:\"Int16\",name:\"rightJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"centerJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"leftJustifiedTextSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedTextSymbolIndex\"},{type:\"Int16\",name:\"placedIconSymbolIndex\"},{type:\"Int16\",name:\"verticalPlacedIconSymbolIndex\"},{type:\"Uint16\",name:\"key\"},{type:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"verticalTextBoxStartIndex\"},{type:\"Uint16\",name:\"verticalTextBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"verticalIconBoxStartIndex\"},{type:\"Uint16\",name:\"verticalIconBoxEndIndex\"},{type:\"Uint16\",name:\"featureIndex\"},{type:\"Uint16\",name:\"numHorizontalGlyphVertices\"},{type:\"Uint16\",name:\"numVerticalGlyphVertices\"},{type:\"Uint16\",name:\"numIconVertices\"},{type:\"Uint16\",name:\"numVerticalIconVertices\"},{type:\"Uint16\",name:\"useRuntimeCollisionCircles\"},{type:\"Uint32\",name:\"crossTileID\"},{type:\"Float32\",name:\"textBoxScale\"},{type:\"Float32\",name:\"collisionCircleDiameter\"},{type:\"Uint16\",name:\"textAnchorOffsetStartIndex\"},{type:\"Uint16\",name:\"textAnchorOffsetEndIndex\"}]),Oe([{type:\"Float32\",name:\"offsetX\"}]),Oe([{type:\"Int16\",name:\"x\"},{type:\"Int16\",name:\"y\"},{type:\"Int16\",name:\"tileUnitDistanceFromAnchor\"}]),Oe([{type:\"Uint16\",name:\"textAnchor\"},{type:\"Float32\",components:2,name:\"textOffset\"}]);let vc={\"!\":\"\\uFE15\",\"#\":\"\\uFF03\",$:\"\\uFF04\",\"%\":\"\\uFF05\",\"&\":\"\\uFF06\",\"(\":\"\\uFE35\",\")\":\"\\uFE36\",\"*\":\"\\uFF0A\",\"+\":\"\\uFF0B\",\",\":\"\\uFE10\",\"-\":\"\\uFE32\",\".\":\"\\u30FB\",\"/\":\"\\uFF0F\",\":\":\"\\uFE13\",\";\":\"\\uFE14\",\"<\":\"\\uFE3F\",\"=\":\"\\uFF1D\",\">\":\"\\uFE40\",\"?\":\"\\uFE16\",\"@\":\"\\uFF20\",\"[\":\"\\uFE47\",\"\\\\\":\"\\uFF3C\",\"]\":\"\\uFE48\",\"^\":\"\\uFF3E\",_:\"\\uFE33\",\"`\":\"\\uFF40\",\"{\":\"\\uFE37\",\"|\":\"\\u2015\",\"}\":\"\\uFE38\",\"~\":\"\\uFF5E\",\"\\xA2\":\"\\uFFE0\",\"\\xA3\":\"\\uFFE1\",\"\\xA5\":\"\\uFFE5\",\"\\xA6\":\"\\uFFE4\",\"\\xAC\":\"\\uFFE2\",\"\\xAF\":\"\\uFFE3\",\"\\u2013\":\"\\uFE32\",\"\\u2014\":\"\\uFE31\",\"\\u2018\":\"\\uFE43\",\"\\u2019\":\"\\uFE44\",\"\\u201C\":\"\\uFE41\",\"\\u201D\":\"\\uFE42\",\"\\u2026\":\"\\uFE19\",\"\\u2027\":\"\\u30FB\",\"\\u20A9\":\"\\uFFE6\",\"\\u3001\":\"\\uFE11\",\"\\u3002\":\"\\uFE12\",\"\\u3008\":\"\\uFE3F\",\"\\u3009\":\"\\uFE40\",\"\\u300A\":\"\\uFE3D\",\"\\u300B\":\"\\uFE3E\",\"\\u300C\":\"\\uFE41\",\"\\u300D\":\"\\uFE42\",\"\\u300E\":\"\\uFE43\",\"\\u300F\":\"\\uFE44\",\"\\u3010\":\"\\uFE3B\",\"\\u3011\":\"\\uFE3C\",\"\\u3014\":\"\\uFE39\",\"\\u3015\":\"\\uFE3A\",\"\\u3016\":\"\\uFE17\",\"\\u3017\":\"\\uFE18\",\"\\uFF01\":\"\\uFE15\",\"\\uFF08\":\"\\uFE35\",\"\\uFF09\":\"\\uFE36\",\"\\uFF0C\":\"\\uFE10\",\"\\uFF0D\":\"\\uFE32\",\"\\uFF0E\":\"\\u30FB\",\"\\uFF1A\":\"\\uFE13\",\"\\uFF1B\":\"\\uFE14\",\"\\uFF1C\":\"\\uFE3F\",\"\\uFF1E\":\"\\uFE40\",\"\\uFF1F\":\"\\uFE16\",\"\\uFF3B\":\"\\uFE47\",\"\\uFF3D\":\"\\uFE48\",\"\\uFF3F\":\"\\uFE33\",\"\\uFF5B\":\"\\uFE37\",\"\\uFF5C\":\"\\u2015\",\"\\uFF5D\":\"\\uFE38\",\"\\uFF5F\":\"\\uFE35\",\"\\uFF60\":\"\\uFE36\",\"\\uFF61\":\"\\uFE12\",\"\\uFF62\":\"\\uFE41\",\"\\uFF63\":\"\\uFE42\"};var tu=24,Sd=wu,vy=function(R,S,F,W,te){var fe,pe,Fe=8*te-W-1,Ke=(1<<Fe)-1,ct=Ke>>1,Lt=-7,Jt=F?te-1:0,cr=F?-1:1,mr=R[S+Jt];for(Jt+=cr,fe=mr&(1<<-Lt)-1,mr>>=-Lt,Lt+=Fe;Lt>0;fe=256*fe+R[S+Jt],Jt+=cr,Lt-=8);for(pe=fe&(1<<-Lt)-1,fe>>=-Lt,Lt+=W;Lt>0;pe=256*pe+R[S+Jt],Jt+=cr,Lt-=8);if(fe===0)fe=1-ct;else{if(fe===Ke)return pe?NaN:1/0*(mr?-1:1);pe+=Math.pow(2,W),fe-=ct}return(mr?-1:1)*pe*Math.pow(2,fe-W)},L1=function(R,S,F,W,te,fe){var pe,Fe,Ke,ct=8*fe-te-1,Lt=(1<<ct)-1,Jt=Lt>>1,cr=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,mr=W?0:fe-1,Pr=W?1:-1,zr=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(Fe=isNaN(S)?1:0,pe=Lt):(pe=Math.floor(Math.log(S)/Math.LN2),S*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(S+=pe+Jt>=1?cr/Ke:cr*Math.pow(2,1-Jt))*Ke>=2&&(pe++,Ke/=2),pe+Jt>=Lt?(Fe=0,pe=Lt):pe+Jt>=1?(Fe=(S*Ke-1)*Math.pow(2,te),pe+=Jt):(Fe=S*Math.pow(2,Jt-1)*Math.pow(2,te),pe=0));te>=8;R[F+mr]=255&Fe,mr+=Pr,Fe/=256,te-=8);for(pe=pe<<te|Fe,ct+=te;ct>0;R[F+mr]=255&pe,mr+=Pr,pe/=256,ct-=8);R[F+mr-Pr]|=128*zr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Yx=4294967296,lm=1/Yx,Ow=typeof TextDecoder==\"undefined\"?null:new TextDecoder(\"utf-8\");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function um(R,S,F){return F?4294967296*S+(R>>>0):4294967296*(S>>>0)+(R>>>0)}function qw(R,S,F){var W=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Kx(R,S){for(var F=0;F<R.length;F++)S.writeVarint(R[F])}function V9(R,S){for(var F=0;F<R.length;F++)S.writeSVarint(R[F])}function G9(R,S){for(var F=0;F<R.length;F++)S.writeFloat(R[F])}function H9(R,S){for(var F=0;F<R.length;F++)S.writeDouble(R[F])}function j9(R,S){for(var F=0;F<R.length;F++)S.writeBoolean(R[F])}function OQ(R,S){for(var F=0;F<R.length;F++)S.writeFixed32(R[F])}function W9(R,S){for(var F=0;F<R.length;F++)S.writeSFixed32(R[F])}function X9(R,S){for(var F=0;F<R.length;F++)S.writeFixed64(R[F])}function Z9(R,S){for(var F=0;F<R.length;F++)S.writeSFixed64(R[F])}function py(R,S){return(R[S]|R[S+1]<<8|R[S+2]<<16)+16777216*R[S+3]}function Jx(R,S,F){R[F]=S,R[F+1]=S>>>8,R[F+2]=S>>>16,R[F+3]=S>>>24}function SC(R,S){return(R[S]|R[S+1]<<8|R[S+2]<<16)+(R[S+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,S,F){for(F=F||this.length;this.pos<F;){var W=this.readVarint(),te=W>>3,fe=this.pos;this.type=7&W,R(te,S,this),this.pos===fe&&this.skip(W)}return S},readMessage:function(R,S){return this.readFields(R,S,this.readVarint()+this.pos)},readFixed32:function(){var R=py(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=SC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=py(this.buf,this.pos)+py(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readSFixed64:function(){var R=py(this.buf,this.pos)+SC(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readFloat:function(){var R=vy(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=vy(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var S,F,W=this.buf;return S=127&(F=W[this.pos++]),F<128?S:(S|=(127&(F=W[this.pos++]))<<7,F<128?S:(S|=(127&(F=W[this.pos++]))<<14,F<128?S:(S|=(127&(F=W[this.pos++]))<<21,F<128?S:function(te,fe,pe){var Fe,Ke,ct=pe.buf;if(Fe=(112&(Ke=ct[pe.pos++]))>>4,Ke<128||(Fe|=(127&(Ke=ct[pe.pos++]))<<3,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<10,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<17,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<24,Ke<128)||(Fe|=(1&(Ke=ct[pe.pos++]))<<31,Ke<128))return um(te,Fe,fe);throw new Error(\"Expected varint not more than 10 bytes\")}(S|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,S=this.pos;return this.pos=R,R-S>=12&&Ow?function(F,W,te){return Ow.decode(F.subarray(W,te))}(this.buf,S,R):function(F,W,te){for(var fe=\"\",pe=W;pe<te;){var Fe,Ke,ct,Lt=F[pe],Jt=null,cr=Lt>239?4:Lt>223?3:Lt>191?2:1;if(pe+cr>te)break;cr===1?Lt<128&&(Jt=Lt):cr===2?(192&(Fe=F[pe+1]))==128&&(Jt=(31&Lt)<<6|63&Fe)<=127&&(Jt=null):cr===3?(Ke=F[pe+2],(192&(Fe=F[pe+1]))==128&&(192&Ke)==128&&((Jt=(15&Lt)<<12|(63&Fe)<<6|63&Ke)<=2047||Jt>=55296&&Jt<=57343)&&(Jt=null)):cr===4&&(Ke=F[pe+2],ct=F[pe+3],(192&(Fe=F[pe+1]))==128&&(192&Ke)==128&&(192&ct)==128&&((Jt=(15&Lt)<<18|(63&Fe)<<12|(63&Ke)<<6|63&ct)<=65535||Jt>=1114112)&&(Jt=null)),Jt===null?(Jt=65533,cr=1):Jt>65535&&(Jt-=65536,fe+=String.fromCharCode(Jt>>>10&1023|55296),Jt=56320|1023&Jt),fe+=String.fromCharCode(Jt),pe+=cr}return fe}(this.buf,S,R)},readBytes:function(){var R=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,R);return this.pos=R,S},readPackedVarint:function(R,S){if(this.type!==wu.Bytes)return R.push(this.readVarint(S));var F=Rv(this);for(R=R||[];this.pos<F;)R.push(this.readVarint(S));return R},readPackedSVarint:function(R){if(this.type!==wu.Bytes)return R.push(this.readSVarint());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==wu.Bytes)return R.push(this.readBoolean());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==wu.Bytes)return R.push(this.readFloat());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==wu.Bytes)return R.push(this.readDouble());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed32());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed32());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed64());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed64());var S=Rv(this);for(R=R||[];this.pos<S;)R.push(this.readSFixed64());return R},skip:function(R){var S=7&R;if(S===wu.Varint)for(;this.buf[this.pos++]>127;);else if(S===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(S===wu.Fixed32)this.pos+=4;else{if(S!==wu.Fixed64)throw new Error(\"Unimplemented type: \"+S);this.pos+=8}},writeTag:function(R,S){this.writeVarint(R<<3|S)},realloc:function(R){for(var S=this.length||16;S<this.pos+R;)S*=2;if(S!==this.length){var F=new Uint8Array(S);F.set(this.buf),this.buf=F,this.length=S}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),Jx(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),Jx(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),Jx(this.buf,-1&R,this.pos),Jx(this.buf,Math.floor(R*lm),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),Jx(this.buf,-1&R,this.pos),Jx(this.buf,Math.floor(R*lm),this.pos+4),this.pos+=8},writeVarint:function(R){(R=+R||0)>268435455||R<0?function(S,F){var W,te;if(S>=0?(W=S%4294967296|0,te=S/4294967296|0):(te=~(-S/4294967296),4294967295^(W=~(-S%4294967296))?W=W+1|0:(W=0,te=te+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error(\"Given varint doesn't fit into 10 bytes\");F.realloc(10),function(fe,pe,Fe){Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,Fe.buf[Fe.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var Fe=(7&fe)<<4;pe.buf[pe.pos++]|=Fe|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var S=this.pos;this.pos=function(W,te,fe){for(var pe,Fe,Ke=0;Ke<te.length;Ke++){if((pe=te.charCodeAt(Ke))>55295&&pe<57344){if(!Fe){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):Fe=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,Fe=pe;continue}pe=Fe-55296<<10|pe-56320|65536,Fe=null}else Fe&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,Fe=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-S;F>=128&&qw(S,F,this),this.pos=S-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),L1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),L1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var S=R.length;this.writeVarint(S),this.realloc(S);for(var F=0;F<S;F++)this.buf[this.pos++]=R[F]},writeRawMessage:function(R,S){this.pos++;var F=this.pos;R(S,this);var W=this.pos-F;W>=128&&qw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,S,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(S,F)},writePackedVarint:function(R,S){S.length&&this.writeMessage(R,Kx,S)},writePackedSVarint:function(R,S){S.length&&this.writeMessage(R,V9,S)},writePackedBoolean:function(R,S){S.length&&this.writeMessage(R,j9,S)},writePackedFloat:function(R,S){S.length&&this.writeMessage(R,G9,S)},writePackedDouble:function(R,S){S.length&&this.writeMessage(R,H9,S)},writePackedFixed32:function(R,S){S.length&&this.writeMessage(R,OQ,S)},writePackedSFixed32:function(R,S){S.length&&this.writeMessage(R,W9,S)},writePackedFixed64:function(R,S){S.length&&this.writeMessage(R,X9,S)},writePackedSFixed64:function(R,S){S.length&&this.writeMessage(R,Z9,S)},writeBytesField:function(R,S){this.writeTag(R,wu.Bytes),this.writeBytes(S)},writeFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeSFixed64(S)},writeVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeVarint(S)},writeSVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeSVarint(S)},writeStringField:function(R,S){this.writeTag(R,wu.Bytes),this.writeString(S)},writeFloatField:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFloat(S)},writeDoubleField:function(R,S){this.writeTag(R,wu.Fixed64),this.writeDouble(S)},writeBooleanField:function(R,S){this.writeVarintField(R,!!S)}};var lS=o(Sd);let uS=3;function qQ(R,S,F){R===1&&F.readMessage(Y9,S)}function Y9(R,S,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:Fe,top:Ke,advance:ct}=F.readMessage(MC,{});S.push({id:W,bitmap:new na({width:fe+2*uS,height:pe+2*uS},te),metrics:{width:fe,height:pe,left:Fe,top:Ke,advance:ct}})}}function MC(R,S,F){R===1?S.id=F.readVarint():R===2?S.bitmap=F.readBytes():R===3?S.width=F.readVarint():R===4?S.height=F.readVarint():R===5?S.left=F.readSVarint():R===6?S.top=F.readSVarint():R===7&&(S.advance=F.readVarint())}let EC=uS;function cS(R){let S=0,F=0;for(let pe of R)S+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,Fe)=>Fe.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let Fe=W.length-1;Fe>=0;Fe--){let Ke=W[Fe];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ct=W.pop();Fe<W.length&&(W[Fe]=ct)}else pe.h===Ke.h?(Ke.x+=pe.w,Ke.w-=pe.w):pe.w===Ke.w?(Ke.y+=pe.h,Ke.h-=pe.h):(W.push({x:Ke.x+pe.w,y:Ke.y,w:Ke.w-pe.w,h:pe.h}),Ke.y+=pe.h,Ke.h-=pe.h);break}}return{w:te,h:fe,fill:S/(te*fe)||0}}let Md=1;class Bw{constructor(S,{pixelRatio:F,version:W,stretchX:te,stretchY:fe,content:pe,textFitWidth:Fe,textFitHeight:Ke}){this.paddedRect=S,this.pixelRatio=F,this.stretchX=te,this.stretchY=fe,this.content=pe,this.version=W,this.textFitWidth=Fe,this.textFitHeight=Ke}get tl(){return[this.paddedRect.x+Md,this.paddedRect.y+Md]}get br(){return[this.paddedRect.x+this.paddedRect.w-Md,this.paddedRect.y+this.paddedRect.h-Md]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Md)/this.pixelRatio,(this.paddedRect.h-2*Md)/this.pixelRatio]}}class Nw{constructor(S,F){let W={},te={};this.haveRenderCallbacks=[];let fe=[];this.addImages(S,W,fe),this.addImages(F,te,fe);let{w:pe,h:Fe}=cS(fe),Ke=new Ki({width:pe||1,height:Fe||1});for(let ct in S){let Lt=S[ct],Jt=W[ct].paddedRect;Ki.copy(Lt.data,Ke,{x:0,y:0},{x:Jt.x+Md,y:Jt.y+Md},Lt.data)}for(let ct in F){let Lt=F[ct],Jt=te[ct].paddedRect,cr=Jt.x+Md,mr=Jt.y+Md,Pr=Lt.data.width,zr=Lt.data.height;Ki.copy(Lt.data,Ke,{x:0,y:0},{x:cr,y:mr},Lt.data),Ki.copy(Lt.data,Ke,{x:0,y:zr-1},{x:cr,y:mr-1},{width:Pr,height:1}),Ki.copy(Lt.data,Ke,{x:0,y:0},{x:cr,y:mr+zr},{width:Pr,height:1}),Ki.copy(Lt.data,Ke,{x:Pr-1,y:0},{x:cr-1,y:mr},{width:1,height:zr}),Ki.copy(Lt.data,Ke,{x:0,y:0},{x:cr+Pr,y:mr},{width:1,height:zr})}this.image=Ke,this.iconPositions=W,this.patternPositions=te}addImages(S,F,W){for(let te in S){let fe=S[te],pe={x:0,y:0,w:fe.data.width+2*Md,h:fe.data.height+2*Md};W.push(pe),F[te]=new Bw(pe,fe),fe.hasRenderCallback&&this.haveRenderCallbacks.push(te)}}patchUpdatedImages(S,F){S.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let W in S.updatedImages)this.patchUpdatedImage(this.iconPositions[W],S.getImage(W),F),this.patchUpdatedImage(this.patternPositions[W],S.getImage(W),F)}patchUpdatedImage(S,F,W){if(!S||!F||S.version===F.version)return;S.version=F.version;let[te,fe]=S.tl;W.update(F.data,void 0,{x:te,y:fe})}}var Dv;Fi(\"ImagePosition\",Bw),Fi(\"ImageAtlas\",Nw),i.ah=void 0,(Dv=i.ah||(i.ah={}))[Dv.none=0]=\"none\",Dv[Dv.horizontal=1]=\"horizontal\",Dv[Dv.vertical=2]=\"vertical\",Dv[Dv.horizontalOnly=3]=\"horizontalOnly\";let Eh=-17;class $x{constructor(){this.scale=1,this.fontStack=\"\",this.imageName=null}static forText(S,F){let W=new $x;return W.scale=S||1,W.fontStack=F,W}static forImage(S){let F=new $x;return F.imageName=S,F}}class P1{constructor(){this.text=\"\",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(S,F){let W=new P1;for(let te=0;te<S.sections.length;te++){let fe=S.sections[te];fe.image?W.addImageSection(fe):W.addTextSection(fe,F)}return W}length(){return this.text.length}getSection(S){return this.sections[this.sectionIndex[S]]}getSectionIndex(S){return this.sectionIndex[S]}getCharCode(S){return this.text.charCodeAt(S)}verticalizePunctuation(){this.text=function(S){let F=\"\";for(let W=0;W<S.length;W++){let te=S.charCodeAt(W+1)||null,fe=S.charCodeAt(W-1)||null;F+=te&&ml(te)&&!vc[S[W+1]]||fe&&ml(fe)&&!vc[S[W-1]]||!vc[S[W]]?S[W]:vc[S[W]]}return F}(this.text)}trim(){let S=0;for(let W=0;W<this.text.length&&Uw[this.text.charCodeAt(W)];W++)S++;let F=this.text.length;for(let W=this.text.length-1;W>=0&&W>=S&&Uw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(S,F),this.sectionIndex=this.sectionIndex.slice(S,F)}substring(S,F){let W=new P1;return W.text=this.text.substring(S,F),W.sectionIndex=this.sectionIndex.slice(S,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,F)=>Math.max(S,this.sections[F].scale),0)}addTextSection(S,F){this.text+=S.text,this.sections.push($x.forText(S.scale,S.fontStack||F));let W=this.sections.length-1;for(let te=0;te<S.text.length;++te)this.sectionIndex.push(W)}addImageSection(S){let F=S.image?S.image.name:\"\";if(F.length===0)return void A(\"Can't add FormattedSection with an empty image.\");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push($x.forImage(F)),this.sectionIndex.push(this.sections.length-1)):A(\"Reached maximum number of images 6401\")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qx(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr){let zr=P1.fromFeature(R,te),ui;Jt===i.ah.vertical&&zr.verticalizePunctuation();let{processBidirectionalText:yi,processStyledBidirectionalText:vn}=ys;if(yi&&zr.sections.length===1){ui=[];let Tn=yi(zr.toString(),I1(zr,ct,fe,S,W,mr));for(let pa of Tn){let ro=new P1;ro.text=pa,ro.sections=zr.sections;for(let Vo=0;Vo<pa.length;Vo++)ro.sectionIndex.push(0);ui.push(ro)}}else if(vn){ui=[];let Tn=vn(zr.text,zr.sectionIndex,I1(zr,ct,fe,S,W,mr));for(let pa of Tn){let ro=new P1;ro.text=pa[0],ro.sectionIndex=pa[1],ro.sections=zr.sections,ui.push(ro)}}else ui=function(Tn,pa){let ro=[],Vo=Tn.text,Xa=0;for(let sa of pa)ro.push(Tn.substring(Xa,sa)),Xa=sa;return Xa<Vo.length&&ro.push(Tn.substring(Xa,Vo.length)),ro}(zr,I1(zr,ct,fe,S,W,mr));let zi=[],un={positionedLines:zi,text:zr.toString(),top:Lt[1],bottom:Lt[1],left:Lt[0],right:Lt[0],writingMode:Jt,iconsInText:!1,verticalizable:!1};return function(Tn,pa,ro,Vo,Xa,sa,Mo,fo,lo,Xn,Ro,uo){let $o=0,Ju=Eh,qu=0,kh=0,Qv=fo===\"right\"?1:fo===\"left\"?0:.5,ud=0;for(let Af of Xa){Af.trim();let Lh=Af.getMaxScale(),Ed=(Lh-1)*tu,cd={positionedGlyphs:[],lineOffset:0};Tn.positionedLines[ud]=cd;let Yh=cd.positionedGlyphs,Df=0;if(!Af.length()){Ju+=sa,++ud;continue}for(let lv=0;lv<Af.length();lv++){let ru=Af.getSection(lv),pc=Af.getSectionIndex(lv),$u=Af.getCharCode(lv),zv=0,ff=null,q1=null,p0=null,Gp=tu,ep=!(lo===i.ah.horizontal||!Ro&&!Ho($u)||Ro&&(Uw[$u]||(Ch=$u,new RegExp(\"\\\\p{sc=Arab}\",\"u\").test(String.fromCodePoint(Ch)))));if(ru.imageName){let Gc=Vo[ru.imageName];if(!Gc)continue;p0=ru.imageName,Tn.iconsInText=Tn.iconsInText||!0,q1=Gc.paddedRect;let Yf=Gc.displaySize;ru.scale=ru.scale*tu/uo,ff={width:Yf[0],height:Yf[1],left:Md,top:-EC,advance:ep?Yf[1]:Yf[0]},zv=Ed+(tu-Yf[1]*ru.scale),Gp=ff.advance;let tp=ep?Yf[0]*ru.scale-tu*Lh:Yf[1]*ru.scale-tu*Lh;tp>0&&tp>Df&&(Df=tp)}else{let Gc=ro[ru.fontStack],Yf=Gc&&Gc[$u];if(Yf&&Yf.rect)q1=Yf.rect,ff=Yf.metrics;else{let tp=pa[ru.fontStack],yg=tp&&tp[$u];if(!yg)continue;ff=yg.metrics}zv=(Lh-ru.scale)*tu}ep?(Tn.verticalizable=!0,Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:q1}),$o+=Gp*ru.scale+Xn):(Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:q1}),$o+=ff.advance*ru.scale+Xn)}Yh.length!==0&&(qu=Math.max($o-Xn,qu),cm(Yh,0,Yh.length-1,Qv,Df)),$o=0;let Fv=sa*Lh+Df;cd.lineOffset=Math.max(Df,Ed),Ju+=Fv,kh=Math.max(Fv,kh),++ud}var Ch;let Vd=Ju-Eh,{horizontalAlign:Gd,verticalAlign:Hd}=Gw(Mo);(function(Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru){let pc=(Lh-Ed)*Yh,$u=0;$u=Df!==Fv?-lv*cd-Eh:(-cd*ru+.5)*Fv;for(let zv of Af)for(let ff of zv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(Tn.positionedLines,Qv,Gd,Hd,qu,kh,sa,Vd,Xa.length),Tn.top+=-Hd*Vd,Tn.bottom=Tn.top+Vd,Tn.left+=-Gd*qu,Tn.right=Tn.left+qu}(un,S,F,W,ui,pe,Fe,Ke,Jt,ct,cr,Pr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&un}let Uw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},K9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},J9={40:!0};function kC(R,S,F,W,te,fe){if(S.imageName){let pe=W[S.imageName];return pe?pe.displaySize[0]*S.scale*tu/fe+te:0}{let pe=F[S.fontStack],Fe=pe&&pe[R];return Fe?Fe.metrics.advance*S.scale+te:0}}function CC(R,S,F,W){let te=Math.pow(R-S,2);return W?R<S?te/2:2*te:te+Math.abs(F)*F}function $9(R,S,F){let W=0;return R===10&&(W-=1e4),F&&(W+=150),R!==40&&R!==65288||(W+=50),S!==41&&S!==65289||(W+=50),W}function Vw(R,S,F,W,te,fe){let pe=null,Fe=CC(S,F,te,fe);for(let Ke of W){let ct=CC(S-Ke.x,F,te,fe)+Ke.badness;ct<=Fe&&(pe=Ke,Fe=ct)}return{index:R,x:S,priorBreak:pe,badness:Fe}}function LC(R){return R?LC(R.priorBreak).concat(R.index):[]}function I1(R,S,F,W,te,fe){if(!R)return[];let pe=[],Fe=function(Jt,cr,mr,Pr,zr,ui){let yi=0;for(let vn=0;vn<Jt.length();vn++){let zi=Jt.getSection(vn);yi+=kC(Jt.getCharCode(vn),zi,Pr,zr,cr,ui)}return yi/Math.max(1,Math.ceil(yi/mr))}(R,S,F,W,te,fe),Ke=R.text.indexOf(\"\\u200B\")>=0,ct=0;for(let Jt=0;Jt<R.length();Jt++){let cr=R.getSection(Jt),mr=R.getCharCode(Jt);if(Uw[mr]||(ct+=kC(mr,cr,W,te,S,fe)),Jt<R.length()-1){let Pr=!((Lt=mr)<11904)&&(!!Dn[\"CJK Compatibility Forms\"](Lt)||!!Dn[\"CJK Compatibility\"](Lt)||!!Dn[\"CJK Strokes\"](Lt)||!!Dn[\"CJK Symbols and Punctuation\"](Lt)||!!Dn[\"Enclosed CJK Letters and Months\"](Lt)||!!Dn[\"Halfwidth and Fullwidth Forms\"](Lt)||!!Dn[\"Ideographic Description Characters\"](Lt)||!!Dn[\"Vertical Forms\"](Lt)||ws.test(String.fromCodePoint(Lt)));(K9[mr]||Pr||cr.imageName||Jt!==R.length()-2&&J9[R.getCharCode(Jt+1)])&&pe.push(Vw(Jt+1,ct,Fe,pe,$9(mr,R.getCharCode(Jt+1),Pr&&Ke),!1))}}var Lt;return LC(Vw(R.length(),ct,Fe,pe,0,!0))}function Gw(R){let S=.5,F=.5;switch(R){case\"right\":case\"top-right\":case\"bottom-right\":S=1;break;case\"left\":case\"top-left\":case\"bottom-left\":S=0}switch(R){case\"bottom\":case\"bottom-right\":case\"bottom-left\":F=1;break;case\"top\":case\"top-right\":case\"top-left\":F=0}return{horizontalAlign:S,verticalAlign:F}}function cm(R,S,F,W,te){if(!W&&!te)return;let fe=R[F],pe=(R[F].x+fe.metrics.advance*fe.scale)*W;for(let Fe=S;Fe<=F;Fe++)R[Fe].x-=pe,R[Fe].y+=te}function eb(R,S,F){let{horizontalAlign:W,verticalAlign:te}=Gw(F),fe=S[0]-R.displaySize[0]*W,pe=S[1]-R.displaySize[1]*te;return{image:R,top:pe,bottom:pe+R.displaySize[1],left:fe,right:fe+R.displaySize[0]}}function PC(R){var S,F;let W=R.left,te=R.top,fe=R.right-W,pe=R.bottom-te,Fe=(S=R.image.textFitWidth)!==null&&S!==void 0?S:\"stretchOrShrink\",Ke=(F=R.image.textFitHeight)!==null&&F!==void 0?F:\"stretchOrShrink\",ct=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ke===\"proportional\"){if(Fe===\"stretchOnly\"&&fe/pe<ct||Fe===\"proportional\"){let Lt=Math.ceil(pe*ct);W*=Lt/fe,fe=Lt}}else if(Fe===\"proportional\"&&Ke===\"stretchOnly\"&&ct!==0&&fe/pe>ct){let Lt=Math.ceil(fe/ct);te*=Lt/pe,pe=Lt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function IC(R,S,F,W,te,fe){let pe=R.image,Fe;if(pe.content){let ui=pe.content,yi=pe.pixelRatio||1;Fe=[ui[0]/yi,ui[1]/yi,pe.displaySize[0]-ui[2]/yi,pe.displaySize[1]-ui[3]/yi]}let Ke=S.left*fe,ct=S.right*fe,Lt,Jt,cr,mr;F===\"width\"||F===\"both\"?(mr=te[0]+Ke-W[3],Jt=te[0]+ct+W[1]):(mr=te[0]+(Ke+ct-pe.displaySize[0])/2,Jt=mr+pe.displaySize[0]);let Pr=S.top*fe,zr=S.bottom*fe;return F===\"height\"||F===\"both\"?(Lt=te[1]+Pr-W[0],cr=te[1]+zr+W[2]):(Lt=te[1]+(Pr+zr-pe.displaySize[1])/2,cr=Lt+pe.displaySize[1]),{image:pe,top:Lt,right:Jt,bottom:cr,left:mr,collisionPadding:Fe}}let tb=255,v0=128,fm=tb*v0;function RC(R,S){let{expression:F}=S;if(F.kind===\"constant\")return{kind:\"constant\",layoutSize:F.evaluate(new rs(R+1))};if(F.kind===\"source\")return{kind:\"source\"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fe<W.length&&W[fe]<=R;)fe++;fe=Math.max(0,fe-1);let pe=fe;for(;pe<W.length&&W[pe]<R+1;)pe++;pe=Math.min(W.length-1,pe);let Fe=W[fe],Ke=W[pe];return F.kind===\"composite\"?{kind:\"composite\",minZoom:Fe,maxZoom:Ke,interpolationType:te}:{kind:\"camera\",minZoom:Fe,maxZoom:Ke,minSize:F.evaluate(new rs(Fe)),maxSize:F.evaluate(new rs(Ke)),interpolationType:te}}}function fS(R,S,F){let W=\"never\",te=R.get(S);return te?W=te:R.get(F)&&(W=\"always\"),W}let Q9=br.VectorTileFeature.types,eO=[{name:\"a_fade_opacity\",components:1,type:\"Uint8\",offset:0}];function Hw(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr){let mr=Fe?Math.min(fm,Math.round(Fe[0])):0,Pr=Fe?Math.min(fm,Math.round(Fe[1])):0;R.emplaceBack(S,F,Math.round(32*W),Math.round(32*te),fe,pe,(mr<<1)+(Ke?1:0),Pr,16*ct,16*Lt,256*Jt,256*cr)}function hS(R,S,F){R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F),R.emplaceBack(S.x,S.y,F)}function dS(R){for(let S of R.sections)if(no(S.text))return!0;return!1}class vS{constructor(S){this.layoutVertexArray=new eu,this.indexArray=new se,this.programConfigurations=S,this.segments=new Ye,this.dynamicLayoutVertexArray=new dc,this.opacityVertexArray=new Tl,this.hasVisibleVertices=!1,this.placedSymbolArray=new Aa}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(S,F,W,te){this.isEmpty()||(W&&(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,am.members),this.indexBuffer=S.createIndexBuffer(this.indexArray,F),this.dynamicLayoutVertexBuffer=S.createVertexBuffer(this.dynamicLayoutVertexArray,k1.members,!0),this.opacityVertexBuffer=S.createVertexBuffer(this.opacityVertexArray,eO,!0),this.opacityVertexBuffer.itemSize=1),(W||te)&&this.programConfigurations.upload(S))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Fi(\"SymbolBuffers\",vS);class hm{constructor(S,F,W){this.layoutVertexArray=new S,this.layoutAttributes=F,this.indexArray=new W,this.segments=new Ye,this.collisionVertexArray=new X}upload(S){this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=S.createVertexBuffer(this.collisionVertexArray,C1.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Fi(\"CollisionBuffers\",hm);class R1{constructor(S){this.collisionBoxArray=S.collisionBoxArray,this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(pe=>pe.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ri([]),this.placementViewportMatrix=Ri([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=RC(this.zoom,F[\"text-size\"]),this.iconSizeData=RC(this.zoom,F[\"icon-size\"]);let W=this.layers[0].layout,te=W.get(\"symbol-sort-key\"),fe=W.get(\"symbol-z-order\");this.canOverlap=fS(W,\"text-overlap\",\"text-allow-overlap\")!==\"never\"||fS(W,\"icon-overlap\",\"icon-allow-overlap\")!==\"never\"||W.get(\"text-ignore-placement\")||W.get(\"icon-ignore-placement\"),this.sortFeaturesByKey=fe!==\"viewport-y\"&&!te.isConstant(),this.sortFeaturesByY=(fe===\"viewport-y\"||fe===\"auto\"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get(\"symbol-placement\")===\"point\"&&(this.writingModes=W.get(\"text-writing-mode\").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=S.sourceID}createArrays(){this.text=new vS(new Ms(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new vS(new Ms(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(S,F,W,te,fe){for(let pe=0;pe<S.length;pe++)if(F[S.charCodeAt(pe)]=!0,(W||te)&&fe){let Fe=vc[S.charAt(pe)];Fe&&(F[Fe.charCodeAt(0)]=!0)}}populate(S,F,W){let te=this.layers[0],fe=te.layout,pe=fe.get(\"text-font\"),Fe=fe.get(\"text-field\"),Ke=fe.get(\"icon-image\"),ct=(Fe.value.kind!==\"constant\"||Fe.value.value instanceof ri&&!Fe.value.value.isEmpty()||Fe.value.value.toString().length>0)&&(pe.value.kind!==\"constant\"||pe.value.value.length>0),Lt=Ke.value.kind!==\"constant\"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,Jt=fe.get(\"symbol-sort-key\");if(this.features=[],!ct&&!Lt)return;let cr=F.iconDependencies,mr=F.glyphDependencies,Pr=F.availableImages,zr=new rs(this.zoom);for(let{feature:ui,id:yi,index:vn,sourceLayerIndex:zi}of S){let un=te._featureFilter.needGeometry,Tn=Sl(ui,un);if(!te._featureFilter.filter(zr,Tn,W))continue;let pa,ro;if(un||(Tn.geometry=$s(ui)),ct){let Xa=te.getValueAndResolveTokens(\"text-field\",Tn,W,Pr),sa=ri.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||dS(sa);(!Mo||ys.getRTLTextPluginStatus()===\"unavailable\"||Mo&&ys.isParsed())&&(pa=sm(sa,te,Tn))}if(Lt){let Xa=te.getValueAndResolveTokens(\"icon-image\",Tn,W,Pr);ro=Xa instanceof tn?Xa:tn.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?Jt.evaluate(Tn,{},W):void 0;if(this.features.push({id:yi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:ui.properties,type:Q9[ui.type],sortKey:Vo}),ro&&(cr[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(\",\"),sa=fe.get(\"text-rotation-alignment\")!==\"viewport\"&&fe.get(\"symbol-placement\")!==\"point\";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)cr[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Xn=mr[lo]=mr[lo]||{};this.calculateGlyphDependencies(Mo.text,Xn,sa,this.allowVerticalPlacement,fo)}}}fe.get(\"symbol-placement\")===\"line\"&&(this.features=function(ui){let yi={},vn={},zi=[],un=0;function Tn(Xa){zi.push(ui[Xa]),un++}function pa(Xa,sa,Mo){let fo=vn[Xa];return delete vn[Xa],vn[sa]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,sa,Mo){let fo=yi[sa];return delete yi[sa],yi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,sa,Mo){let fo=Mo?sa[0][sa[0].length-1]:sa[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;Xa<ui.length;Xa++){let sa=ui[Xa],Mo=sa.geometry,fo=sa.text?sa.text.toString():null;if(!fo){Tn(Xa);continue}let lo=Vo(fo,Mo),Xn=Vo(fo,Mo,!0);if(lo in vn&&Xn in yi&&vn[lo]!==yi[Xn]){let Ro=ro(lo,Xn,Mo),uo=pa(lo,Xn,zi[Ro].geometry);delete yi[lo],delete vn[Xn],vn[Vo(fo,zi[uo].geometry,!0)]=uo,zi[Ro].geometry=null}else lo in vn?pa(lo,Xn,Mo):Xn in yi?ro(lo,Xn,Mo):(Tn(Xa),yi[lo]=un-1,vn[Xn]=un-1)}return zi.filter(Xa=>Xa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ui,yi)=>ui.sortKey-yi.sortKey)}update(S,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(S,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(S,F){let W=this.lineVertexArray.length;if(S.segment!==void 0){let te=S.dist(F[S.segment+1]),fe=S.dist(F[S.segment]),pe={};for(let Fe=S.segment+1;Fe<F.length;Fe++)pe[Fe]={x:F[Fe].x,y:F[Fe].y,tileUnitDistanceFromAnchor:te},Fe<F.length-1&&(te+=F[Fe+1].dist(F[Fe]));for(let Fe=S.segment||0;Fe>=0;Fe--)pe[Fe]={x:F[Fe].x,y:F[Fe].y,tileUnitDistanceFromAnchor:fe},Fe>0&&(fe+=F[Fe-1].dist(F[Fe]));for(let Fe=0;Fe<F.length;Fe++){let Ke=pe[Fe];this.lineVertexArray.emplaceBack(Ke.x,Ke.y,Ke.tileUnitDistanceFromAnchor)}}return{lineStartIndex:W,lineLength:this.lineVertexArray.length-W}}addSymbols(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr){let mr=S.indexArray,Pr=S.layoutVertexArray,zr=S.segments.prepareSegment(4*F.length,Pr,mr,this.canOverlap?pe.sortKey:void 0),ui=this.glyphOffsetArray.length,yi=zr.vertexLength,vn=this.allowVerticalPlacement&&Fe===i.ah.vertical?Math.PI/2:0,zi=pe.text&&pe.text.sections;for(let un=0;un<F.length;un++){let{tl:Tn,tr:pa,bl:ro,br:Vo,tex:Xa,pixelOffsetTL:sa,pixelOffsetBR:Mo,minFontScaleX:fo,minFontScaleY:lo,glyphOffset:Xn,isSDF:Ro,sectionIndex:uo}=F[un],$o=zr.vertexLength,Ju=Xn[1];Hw(Pr,Ke.x,Ke.y,Tn.x,Ju+Tn.y,Xa.x,Xa.y,W,Ro,sa.x,sa.y,fo,lo),Hw(Pr,Ke.x,Ke.y,pa.x,Ju+pa.y,Xa.x+Xa.w,Xa.y,W,Ro,Mo.x,sa.y,fo,lo),Hw(Pr,Ke.x,Ke.y,ro.x,Ju+ro.y,Xa.x,Xa.y+Xa.h,W,Ro,sa.x,Mo.y,fo,lo),Hw(Pr,Ke.x,Ke.y,Vo.x,Ju+Vo.y,Xa.x+Xa.w,Xa.y+Xa.h,W,Ro,Mo.x,Mo.y,fo,lo),hS(S.dynamicLayoutVertexArray,Ke,vn),mr.emplaceBack($o,$o+1,$o+2),mr.emplaceBack($o+1,$o+2,$o+3),zr.vertexLength+=4,zr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Xn[0]),un!==F.length-1&&uo===F[un+1].sectionIndex||S.programConfigurations.populatePaintArrays(Pr.length,pe,pe.index,{},cr,zi&&zi[uo])}S.placedSymbolArray.emplaceBack(Ke.x,Ke.y,ui,this.glyphOffsetArray.length-ui,yi,ct,Lt,Ke.segment,W?W[0]:0,W?W[1]:0,te[0],te[1],Fe,0,!1,0,Jt)}_addCollisionDebugVertex(S,F,W,te,fe,pe){return F.emplaceBack(0,0),S.emplaceBack(W.x,W.y,te,fe,Math.round(pe.x),Math.round(pe.y))}addCollisionDebugVertices(S,F,W,te,fe,pe,Fe){let Ke=fe.segments.prepareSegment(4,fe.layoutVertexArray,fe.indexArray),ct=Ke.vertexLength,Lt=fe.layoutVertexArray,Jt=fe.collisionVertexArray,cr=Fe.anchorX,mr=Fe.anchorY;this._addCollisionDebugVertex(Lt,Jt,pe,cr,mr,new u(S,F)),this._addCollisionDebugVertex(Lt,Jt,pe,cr,mr,new u(W,F)),this._addCollisionDebugVertex(Lt,Jt,pe,cr,mr,new u(W,te)),this._addCollisionDebugVertex(Lt,Jt,pe,cr,mr,new u(S,te)),Ke.vertexLength+=4;let Pr=fe.indexArray;Pr.emplaceBack(ct,ct+1),Pr.emplaceBack(ct+1,ct+2),Pr.emplaceBack(ct+2,ct+3),Pr.emplaceBack(ct+3,ct),Ke.primitiveLength+=4}addDebugCollisionBoxes(S,F,W,te){for(let fe=S;fe<F;fe++){let pe=this.collisionBoxArray.get(fe);this.addCollisionDebugVertices(pe.x1,pe.y1,pe.x2,pe.y2,te?this.textCollisionBox:this.iconCollisionBox,pe.anchorPoint,W)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new hm(Al,dy.members,Te),this.iconCollisionBox=new hm(Al,dy.members,Te);for(let S=0;S<this.symbolInstances.length;S++){let F=this.symbolInstances.get(S);this.addDebugCollisionBoxes(F.textBoxStartIndex,F.textBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.verticalTextBoxStartIndex,F.verticalTextBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.iconBoxStartIndex,F.iconBoxEndIndex,F,!1),this.addDebugCollisionBoxes(F.verticalIconBoxStartIndex,F.verticalIconBoxEndIndex,F,!1)}}_deserializeCollisionBoxesForSymbol(S,F,W,te,fe,pe,Fe,Ke,ct){let Lt={};for(let Jt=F;Jt<W;Jt++){let cr=S.get(Jt);Lt.textBox={x1:cr.x1,y1:cr.y1,x2:cr.x2,y2:cr.y2,anchorPointX:cr.anchorPointX,anchorPointY:cr.anchorPointY},Lt.textFeatureIndex=cr.featureIndex;break}for(let Jt=te;Jt<fe;Jt++){let cr=S.get(Jt);Lt.verticalTextBox={x1:cr.x1,y1:cr.y1,x2:cr.x2,y2:cr.y2,anchorPointX:cr.anchorPointX,anchorPointY:cr.anchorPointY},Lt.verticalTextFeatureIndex=cr.featureIndex;break}for(let Jt=pe;Jt<Fe;Jt++){let cr=S.get(Jt);Lt.iconBox={x1:cr.x1,y1:cr.y1,x2:cr.x2,y2:cr.y2,anchorPointX:cr.anchorPointX,anchorPointY:cr.anchorPointY},Lt.iconFeatureIndex=cr.featureIndex;break}for(let Jt=Ke;Jt<ct;Jt++){let cr=S.get(Jt);Lt.verticalIconBox={x1:cr.x1,y1:cr.y1,x2:cr.x2,y2:cr.y2,anchorPointX:cr.anchorPointX,anchorPointY:cr.anchorPointY},Lt.verticalIconFeatureIndex=cr.featureIndex;break}return Lt}deserializeCollisionBoxes(S){this.collisionArrays=[];for(let F=0;F<this.symbolInstances.length;F++){let W=this.symbolInstances.get(F);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(S,W.textBoxStartIndex,W.textBoxEndIndex,W.verticalTextBoxStartIndex,W.verticalTextBoxEndIndex,W.iconBoxStartIndex,W.iconBoxEndIndex,W.verticalIconBoxStartIndex,W.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(S,F){let W=S.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fe<te;fe+=4)S.indexArray.emplaceBack(fe,fe+1,fe+2),S.indexArray.emplaceBack(fe+1,fe+2,fe+3)}getSortedSymbolIndexes(S){if(this.sortedAngle===S&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let F=Math.sin(S),W=Math.cos(S),te=[],fe=[],pe=[];for(let Fe=0;Fe<this.symbolInstances.length;++Fe){pe.push(Fe);let Ke=this.symbolInstances.get(Fe);te.push(0|Math.round(F*Ke.anchorX+W*Ke.anchorY)),fe.push(Ke.featureIndex)}return pe.sort((Fe,Ke)=>te[Fe]-te[Ke]||fe[Ke]-fe[Fe]),pe}addToSortKeyRanges(S,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,rb;Fi(\"SymbolBucket\",R1,{omit:[\"layers\",\"collisionBoxArray\",\"features\",\"compareText\"]}),R1.MAX_GLYPHS=65535,R1.addDynamicAttributes=hS;var jw={get paint(){return rb=rb||new ue({\"icon-opacity\":new oo(ce.paint_symbol[\"icon-opacity\"]),\"icon-color\":new oo(ce.paint_symbol[\"icon-color\"]),\"icon-halo-color\":new oo(ce.paint_symbol[\"icon-halo-color\"]),\"icon-halo-width\":new oo(ce.paint_symbol[\"icon-halo-width\"]),\"icon-halo-blur\":new oo(ce.paint_symbol[\"icon-halo-blur\"]),\"icon-translate\":new Ua(ce.paint_symbol[\"icon-translate\"]),\"icon-translate-anchor\":new Ua(ce.paint_symbol[\"icon-translate-anchor\"]),\"text-opacity\":new oo(ce.paint_symbol[\"text-opacity\"]),\"text-color\":new oo(ce.paint_symbol[\"text-color\"],{runtimeType:er,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),\"text-halo-color\":new oo(ce.paint_symbol[\"text-halo-color\"]),\"text-halo-width\":new oo(ce.paint_symbol[\"text-halo-width\"]),\"text-halo-blur\":new oo(ce.paint_symbol[\"text-halo-blur\"]),\"text-translate\":new Ua(ce.paint_symbol[\"text-translate\"]),\"text-translate-anchor\":new Ua(ce.paint_symbol[\"text-translate-anchor\"])})},get layout(){return Tf=Tf||new ue({\"symbol-placement\":new Ua(ce.layout_symbol[\"symbol-placement\"]),\"symbol-spacing\":new Ua(ce.layout_symbol[\"symbol-spacing\"]),\"symbol-avoid-edges\":new Ua(ce.layout_symbol[\"symbol-avoid-edges\"]),\"symbol-sort-key\":new oo(ce.layout_symbol[\"symbol-sort-key\"]),\"symbol-z-order\":new Ua(ce.layout_symbol[\"symbol-z-order\"]),\"icon-allow-overlap\":new Ua(ce.layout_symbol[\"icon-allow-overlap\"]),\"icon-overlap\":new Ua(ce.layout_symbol[\"icon-overlap\"]),\"icon-ignore-placement\":new Ua(ce.layout_symbol[\"icon-ignore-placement\"]),\"icon-optional\":new Ua(ce.layout_symbol[\"icon-optional\"]),\"icon-rotation-alignment\":new Ua(ce.layout_symbol[\"icon-rotation-alignment\"]),\"icon-size\":new oo(ce.layout_symbol[\"icon-size\"]),\"icon-text-fit\":new Ua(ce.layout_symbol[\"icon-text-fit\"]),\"icon-text-fit-padding\":new Ua(ce.layout_symbol[\"icon-text-fit-padding\"]),\"icon-image\":new oo(ce.layout_symbol[\"icon-image\"]),\"icon-rotate\":new oo(ce.layout_symbol[\"icon-rotate\"]),\"icon-padding\":new oo(ce.layout_symbol[\"icon-padding\"]),\"icon-keep-upright\":new Ua(ce.layout_symbol[\"icon-keep-upright\"]),\"icon-offset\":new oo(ce.layout_symbol[\"icon-offset\"]),\"icon-anchor\":new oo(ce.layout_symbol[\"icon-anchor\"]),\"icon-pitch-alignment\":new Ua(ce.layout_symbol[\"icon-pitch-alignment\"]),\"text-pitch-alignment\":new Ua(ce.layout_symbol[\"text-pitch-alignment\"]),\"text-rotation-alignment\":new Ua(ce.layout_symbol[\"text-rotation-alignment\"]),\"text-field\":new oo(ce.layout_symbol[\"text-field\"]),\"text-font\":new oo(ce.layout_symbol[\"text-font\"]),\"text-size\":new oo(ce.layout_symbol[\"text-size\"]),\"text-max-width\":new oo(ce.layout_symbol[\"text-max-width\"]),\"text-line-height\":new Ua(ce.layout_symbol[\"text-line-height\"]),\"text-letter-spacing\":new oo(ce.layout_symbol[\"text-letter-spacing\"]),\"text-justify\":new oo(ce.layout_symbol[\"text-justify\"]),\"text-radial-offset\":new oo(ce.layout_symbol[\"text-radial-offset\"]),\"text-variable-anchor\":new Ua(ce.layout_symbol[\"text-variable-anchor\"]),\"text-variable-anchor-offset\":new oo(ce.layout_symbol[\"text-variable-anchor-offset\"]),\"text-anchor\":new oo(ce.layout_symbol[\"text-anchor\"]),\"text-max-angle\":new Ua(ce.layout_symbol[\"text-max-angle\"]),\"text-writing-mode\":new Ua(ce.layout_symbol[\"text-writing-mode\"]),\"text-rotate\":new oo(ce.layout_symbol[\"text-rotate\"]),\"text-padding\":new Ua(ce.layout_symbol[\"text-padding\"]),\"text-keep-upright\":new Ua(ce.layout_symbol[\"text-keep-upright\"]),\"text-transform\":new oo(ce.layout_symbol[\"text-transform\"]),\"text-offset\":new oo(ce.layout_symbol[\"text-offset\"]),\"text-allow-overlap\":new Ua(ce.layout_symbol[\"text-allow-overlap\"]),\"text-overlap\":new Ua(ce.layout_symbol[\"text-overlap\"]),\"text-ignore-placement\":new Ua(ce.layout_symbol[\"text-ignore-placement\"]),\"text-optional\":new Ua(ce.layout_symbol[\"text-optional\"])})}};class ib{constructor(S){if(S.property.overrides===void 0)throw new Error(\"overrides must be provided to instantiate FormatSectionOverride class\");this.type=S.property.overrides?S.property.overrides.runtimeType:Gt,this.defaultValue=S}evaluate(S){if(S.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(S.formattedSection))return F.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi(\"FormatSectionOverride\",ib,{omit:[\"defaultValue\"]});class gy extends B{constructor(S){super(S,jw)}recalculate(S,F){if(super.recalculate(S,F),this.layout.get(\"icon-rotation-alignment\")===\"auto\"&&(this.layout._values[\"icon-rotation-alignment\"]=this.layout.get(\"symbol-placement\")!==\"point\"?\"map\":\"viewport\"),this.layout.get(\"text-rotation-alignment\")===\"auto\"&&(this.layout._values[\"text-rotation-alignment\"]=this.layout.get(\"symbol-placement\")!==\"point\"?\"map\":\"viewport\"),this.layout.get(\"text-pitch-alignment\")===\"auto\"&&(this.layout._values[\"text-pitch-alignment\"]=this.layout.get(\"text-rotation-alignment\")===\"map\"?\"map\":\"viewport\"),this.layout.get(\"icon-pitch-alignment\")===\"auto\"&&(this.layout._values[\"icon-pitch-alignment\"]=this.layout.get(\"icon-rotation-alignment\")),this.layout.get(\"symbol-placement\")===\"point\"){let W=this.layout.get(\"text-writing-mode\");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values[\"text-writing-mode\"]=te}else this.layout._values[\"text-writing-mode\"]=[\"horizontal\"]}this._setPaintOverrides()}getValueAndResolveTokens(S,F,W,te){let fe=this.layout.get(S).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[S];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(Fe,Ke){return Ke.replace(/{([^{}]+)}/g,(ct,Lt)=>Fe&&Lt in Fe?String(Fe[Lt]):\"\")}(F.properties,fe)}createBucket(S){return new R1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error(\"Should take a different path in FeatureIndex\")}_setPaintOverrides(){for(let S of jw.paint.overridableProperties){if(!gy.hasPaintOverride(this.layout,S))continue;let F=this.paint.get(S),W=new ib(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind===\"constant\"||F.value.kind===\"source\"?new bc(\"source\",te):new hu(\"composite\",te,F.value.zoomStops),this.paint._values[S]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(S,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&gy.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,F){let W=S.get(\"text-field\"),te=jw.paint.properties[F],fe=!1,pe=Fe=>{for(let Ke of Fe)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind===\"constant\"&&W.value.value instanceof ri)pe(W.value.value.sections);else if(W.value.kind===\"source\"){let Fe=ct=>{fe||(ct instanceof ua&&Sn(ct.value)===ti?pe(ct.value.sections):ct instanceof Yl?pe(ct.sections):ct.eachChild(Fe))},Ke=W.value;Ke._styleExpression&&Fe(Ke._styleExpression.expression)}return fe}}let DC;var nb={get paint(){return DC=DC||new ue({\"background-color\":new Ua(ce.paint_background[\"background-color\"]),\"background-pattern\":new hc(ce.paint_background[\"background-pattern\"]),\"background-opacity\":new Ua(ce.paint_background[\"background-opacity\"])})}};class tO extends B{constructor(S){super(S,nb)}}let pS;var FC={get paint(){return pS=pS||new ue({\"raster-opacity\":new Ua(ce.paint_raster[\"raster-opacity\"]),\"raster-hue-rotate\":new Ua(ce.paint_raster[\"raster-hue-rotate\"]),\"raster-brightness-min\":new Ua(ce.paint_raster[\"raster-brightness-min\"]),\"raster-brightness-max\":new Ua(ce.paint_raster[\"raster-brightness-max\"]),\"raster-saturation\":new Ua(ce.paint_raster[\"raster-saturation\"]),\"raster-contrast\":new Ua(ce.paint_raster[\"raster-contrast\"]),\"raster-resampling\":new Ua(ce.paint_raster[\"raster-resampling\"]),\"raster-fade-duration\":new Ua(ce.paint_raster[\"raster-fade-duration\"])})}};class ab extends B{constructor(S){super(S,FC)}}class gS extends B{constructor(S){super(S,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=S}is3D(){return this.implementation.renderingMode===\"3d\"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error(\"Custom layers cannot be serialized\")}}class mS{constructor(S){this._methodToThrottle=S,this._triggered=!1,typeof MessageChannel!=\"undefined\"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let yS=63710088e-1;class pg{constructor(S,F){if(isNaN(S)||isNaN(F))throw new Error(`Invalid LngLat object: (${S}, ${F})`);if(this.lng=+S,this.lat=+F,this.lat>90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")}wrap(){return new pg(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let F=Math.PI/180,W=this.lat*F,te=S.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((S.lng-this.lng)*F);return yS*Math.acos(Math.min(fe,1))}static convert(S){if(S instanceof pg)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new pg(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S==\"object\"&&S!==null)return new pg(Number(\"lng\"in S?S.lng:S.lon),Number(S.lat));throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]\")}}let D1=2*Math.PI*yS;function zC(R){return D1*Math.cos(R*Math.PI/180)}function Ww(R){return(180+R)/360}function OC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function Xw(R,S){return R/zC(S)}function ob(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class sb{constructor(S,F,W=0){this.x=+S,this.y=+F,this.z=+W}static fromLngLat(S,F=0){let W=pg.convert(S);return new sb(Ww(W.lng),OC(W.lat),Xw(F,W.lat))}toLngLat(){return new pg(360*this.x-180,ob(this.y))}toAltitude(){return this.z*zC(ob(this.y))}meterInMercatorCoordinateUnits(){return 1/D1*(S=ob(this.y),1/Math.cos(S*Math.PI/180));var S}}function yp(R,S,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,S*W-2*Math.PI*6378137/2]}class _S{constructor(S,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(S,F,W))throw new Error(`x=${F}, y=${W}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=F,this.y=W,this.key=lb(0,S,S,F,W)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,F,W){let te=(pe=this.y,Fe=this.z,Ke=yp(256*(fe=this.x),256*(pe=Math.pow(2,Fe)-pe-1),Fe),ct=yp(256*(fe+1),256*(pe+1),Fe),Ke[0]+\",\"+Ke[1]+\",\"+ct[0]+\",\"+ct[1]);var fe,pe,Fe,Ke,ct;let Lt=function(Jt,cr,mr){let Pr,zr=\"\";for(let ui=Jt;ui>0;ui--)Pr=1<<ui-1,zr+=(cr&Pr?1:0)+(mr&Pr?2:0);return zr}(this.z,this.x,this.y);return S[(this.x+this.y)%S.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(W===\"tms\"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,F>1?\"@2x\":\"\").replace(/{quadkey}/g,Lt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(S){let F=this.z-S.z;return F>0&&S.x===this.x>>F&&S.y===this.y>>F}getTilePoint(S){let F=Math.pow(2,this.z);return new u((S.x*F-this.x)*ja,(S.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class qC{constructor(S,F){this.wrap=S,this.canonical=F,this.key=lb(S,F.z,F.z,F.x,F.y)}}class $v{constructor(S,F,W,te,fe){if(S<W)throw new Error(`overscaledZ should be >= z; overscaledZ = ${S}; z = ${W}`);this.overscaledZ=S,this.wrap=F,this.canonical=new _S(W,+te,+fe),this.key=lb(F,S,W,te,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-S;return S>this.canonical.z?new $v(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(S,this.wrap,S,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(S,F){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-S;return S>this.canonical.z?lb(this.wrap*+F,S,this.canonical.z,this.canonical.x,this.canonical.y):lb(this.wrap*+F,S,S,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let F=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ<this.overscaledZ&&S.canonical.x===this.canonical.x>>F&&S.canonical.y===this.canonical.y>>F}children(S){if(this.overscaledZ>=S)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new $v(F,this.wrap,F,W,te),new $v(F,this.wrap,F,W+1,te),new $v(F,this.wrap,F,W,te+1),new $v(F,this.wrap,F,W+1,te+1)]}isLessThan(S){return this.wrap<S.wrap||!(this.wrap>S.wrap)&&(this.overscaledZ<S.overscaledZ||!(this.overscaledZ>S.overscaledZ)&&(this.canonical.x<S.canonical.x||!(this.canonical.x>S.canonical.x)&&this.canonical.y<S.canonical.y))}wrapped(){return new $v(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(S){return new $v(this.overscaledZ,S,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new qC(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(S){return this.canonical.getTilePoint(new sb(S.x-this.wrap,S.y))}}function lb(R,S,F,W,te){(R*=2)<0&&(R=-1*R-1);let fe=1<<F;return(fe*fe*R+fe*te+W).toString(36)+F.toString(36)+S.toString(36)}Fi(\"CanonicalTileID\",_S),Fi(\"OverscaledTileID\",$v,{omit:[\"posMatrix\"]});class BC{constructor(S,F,W,te=1,fe=1,pe=1,Fe=0){if(this.uid=S,F.height!==F.width)throw new RangeError(\"DEM tiles must be square\");if(W&&![\"mapbox\",\"terrarium\",\"custom\"].includes(W))return void A(`\"${W}\" is not a valid encoding type. Valid types include \"mapbox\", \"terrarium\" and \"custom\".`);this.stride=F.height;let Ke=this.dim=F.height-2;switch(this.data=new Uint32Array(F.data.buffer),W){case\"terrarium\":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case\"custom\":this.redFactor=te,this.greenFactor=fe,this.blueFactor=pe,this.baseShift=Fe;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ct=0;ct<Ke;ct++)this.data[this._idx(-1,ct)]=this.data[this._idx(0,ct)],this.data[this._idx(Ke,ct)]=this.data[this._idx(Ke-1,ct)],this.data[this._idx(ct,-1)]=this.data[this._idx(ct,0)],this.data[this._idx(ct,Ke)]=this.data[this._idx(ct,Ke-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Ke,-1)]=this.data[this._idx(Ke-1,0)],this.data[this._idx(-1,Ke)]=this.data[this._idx(0,Ke-1)],this.data[this._idx(Ke,Ke)]=this.data[this._idx(Ke-1,Ke-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ct=0;ct<Ke;ct++)for(let Lt=0;Lt<Ke;Lt++){let Jt=this.get(ct,Lt);Jt>this.max&&(this.max=Jt),Jt<this.min&&(this.min=Jt)}}get(S,F){let W=new Uint8Array(this.data.buffer),te=4*this._idx(S,F);return this.unpack(W[te],W[te+1],W[te+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(S,F){if(S<-1||S>=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError(\"out of range source coordinates for DEM data\");return(F+1)*this.stride+(S+1)}unpack(S,F,W){return S*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,F,W){if(this.dim!==S.dim)throw new Error(\"dem dimension mismatch\");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,Fe=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=Fe-1;break;case 1:Fe=pe+1}let Ke=-F*this.dim,ct=-W*this.dim;for(let Lt=pe;Lt<Fe;Lt++)for(let Jt=te;Jt<fe;Jt++)this.data[this._idx(Jt,Lt)]=S.data[this._idx(Jt+Ke,Lt+ct)]}}Fi(\"DEMData\",BC);class NC{constructor(S){this._stringToNumber={},this._numberToString=[];for(let F=0;F<S.length;F++){let W=S[F];this._stringToNumber[W]=F,this._numberToString[F]=W}}encode(S){return this._stringToNumber[S]}decode(S){if(S>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class xS{constructor(S,F,W,te,fe){this.type=\"Feature\",this._vectorTileFeature=S,S._z=F,S._x=W,S._y=te,this.properties=S.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let F in this)F!==\"_geometry\"&&F!==\"_vectorTileFeature\"&&(S[F]=this[F]);return S}}class my{constructor(S,F){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new Qi(ja,16,0),this.grid3D=new Qi(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(S,F,W,te,fe,pe){let Fe=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ct=0;ct<F.length;ct++){let Lt=F[ct],Jt=[1/0,1/0,-1/0,-1/0];for(let cr=0;cr<Lt.length;cr++){let mr=Lt[cr];Jt[0]=Math.min(Jt[0],mr.x),Jt[1]=Math.min(Jt[1],mr.y),Jt[2]=Math.max(Jt[2],mr.x),Jt[3]=Math.max(Jt[3],mr.y)}Jt[0]<ja&&Jt[1]<ja&&Jt[2]>=0&&Jt[3]>=0&&Ke.insert(Fe,Jt[0],Jt[1],Jt[2],Jt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new br.VectorTile(new lS(this.rawTileData)).layers,this.sourceLayerCoder=new NC(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"])),this.vtLayers}query(S,F,W,te){this.loadVTLayers();let fe=S.params||{},pe=ja/S.tileSize/S.scale,Fe=Fc(fe.filter),Ke=S.queryGeometry,ct=S.queryPadding*pe,Lt=VC(Ke),Jt=this.grid.query(Lt.minX-ct,Lt.minY-ct,Lt.maxX+ct,Lt.maxY+ct),cr=VC(S.cameraQueryGeometry),mr=this.grid3D.query(cr.minX-ct,cr.minY-ct,cr.maxX+ct,cr.maxY+ct,(ui,yi,vn,zi)=>function(un,Tn,pa,ro,Vo){for(let sa of un)if(Tn<=sa.x&&pa<=sa.y&&ro>=sa.x&&Vo>=sa.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(un.length>2){for(let sa of Xa)if(Ui(un,sa))return!0}for(let sa=0;sa<un.length-1;sa++)if(qi(un[sa],un[sa+1],Xa))return!0;return!1}(S.cameraQueryGeometry,ui-ct,yi-ct,vn+ct,zi+ct));for(let ui of mr)Jt.push(ui);Jt.sort(rO);let Pr={},zr;for(let ui=0;ui<Jt.length;ui++){let yi=Jt[ui];if(yi===zr)continue;zr=yi;let vn=this.featureIndexArray.get(yi),zi=null;this.loadMatchingFeature(Pr,vn.bucketIndex,vn.sourceLayerIndex,vn.featureIndex,Fe,fe.layers,fe.availableImages,F,W,te,(un,Tn,pa)=>(zi||(zi=$s(un)),Tn.queryIntersectsFeature(Ke,un,pa,zi,this.z,S.transform,pe,S.pixelPosMatrix)))}return Pr}loadMatchingFeature(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt){let cr=this.bucketLayerIDs[F];if(pe&&!function(ui,yi){for(let vn=0;vn<ui.length;vn++)if(yi.indexOf(ui[vn])>=0)return!0;return!1}(pe,cr))return;let mr=this.sourceLayerCoder.decode(W),Pr=this.vtLayers[mr].feature(te);if(fe.needGeometry){let ui=Sl(Pr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),ui,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),Pr))return;let zr=this.getId(Pr,mr);for(let ui=0;ui<cr.length;ui++){let yi=cr[ui];if(pe&&pe.indexOf(yi)<0)continue;let vn=Ke[yi];if(!vn)continue;let zi={};zr&&Lt&&(zi=Lt.getState(vn.sourceLayer||\"_geojsonTileLayer\",zr));let un=L({},ct[yi]);un.paint=UC(un.paint,vn.paint,Pr,zi,Fe),un.layout=UC(un.layout,vn.layout,Pr,zi,Fe);let Tn=!Jt||Jt(Pr,vn,zi);if(!Tn)continue;let pa=new xS(Pr,this.z,this.x,this.y,zr);pa.layer=un;let ro=S[yi];ro===void 0&&(ro=S[yi]=[]),ro.push({featureIndex:te,feature:pa,intersectionZ:Tn})}}lookupSymbolFeatures(S,F,W,te,fe,pe,Fe,Ke){let ct={};this.loadVTLayers();let Lt=Fc(fe);for(let Jt of S)this.loadMatchingFeature(ct,W,te,Jt,Lt,pe,Fe,Ke,F);return ct}hasLayer(S){for(let F of this.bucketLayerIDs)for(let W of F)if(S===W)return!0;return!1}getId(S,F){let W=S.id;return this.promoteId&&(W=S.properties[typeof this.promoteId==\"string\"?this.promoteId:this.promoteId[F]],typeof W==\"boolean\"&&(W=Number(W))),W}}function UC(R,S,F,W,te){return C(R,(fe,pe)=>{let Fe=S instanceof Ac?S.get(pe):null;return Fe&&Fe.evaluate?Fe.evaluate(F,W,te):Fe})}function VC(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:S,minY:F,maxX:W,maxY:te}}function rO(R,S){return S-R}function GC(R,S,F,W,te){let fe=[];for(let pe=0;pe<R.length;pe++){let Fe=R[pe],Ke;for(let ct=0;ct<Fe.length-1;ct++){let Lt=Fe[ct],Jt=Fe[ct+1];Lt.x<S&&Jt.x<S||(Lt.x<S?Lt=new u(S,Lt.y+(S-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round():Jt.x<S&&(Jt=new u(S,Lt.y+(S-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round()),Lt.y<F&&Jt.y<F||(Lt.y<F?Lt=new u(Lt.x+(F-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),F)._round():Jt.y<F&&(Jt=new u(Lt.x+(F-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),F)._round()),Lt.x>=W&&Jt.x>=W||(Lt.x>=W?Lt=new u(W,Lt.y+(W-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round():Jt.x>=W&&(Jt=new u(W,Lt.y+(W-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round()),Lt.y>=te&&Jt.y>=te||(Lt.y>=te?Lt=new u(Lt.x+(te-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),te)._round():Jt.y>=te&&(Jt=new u(Lt.x+(te-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),te)._round()),Ke&&Lt.equals(Ke[Ke.length-1])||(Ke=[Lt],fe.push(Ke)),Ke.push(Jt)))))}}return fe}Fi(\"FeatureIndex\",my,{omit:[\"rawTileData\",\"sourceLayerCoder\"]});class gg extends u{constructor(S,F,W,te){super(S,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new gg(this.x,this.y,this.angle,this.segment)}}function bS(R,S,F,W,te){if(S.segment===void 0||F===0)return!0;let fe=S,pe=S.segment+1,Fe=0;for(;Fe>-F/2;){if(pe--,pe<0)return!1;Fe-=R[pe].dist(fe),fe=R[pe]}Fe+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ct=0;for(;Fe<F/2;){let Lt=R[pe],Jt=R[pe+1];if(!Jt)return!1;let cr=R[pe-1].angleTo(Lt)-Lt.angleTo(Jt);for(cr=Math.abs((cr+3*Math.PI)%(2*Math.PI)-Math.PI),Ke.push({distance:Fe,angleDelta:cr}),ct+=cr;Fe-Ke[0].distance>W;)ct-=Ke.shift().angleDelta;if(ct>te)return!1;pe++,Fe+=Lt.dist(Jt)}return!0}function HC(R){let S=0;for(let F=0;F<R.length-1;F++)S+=R[F].dist(R[F+1]);return S}function jC(R,S,F){return R?.6*S*F:0}function WC(R,S){return Math.max(R?R.right-R.left:0,S?S.right-S.left:0)}function iO(R,S,F,W,te,fe){let pe=jC(F,te,fe),Fe=WC(F,W)*fe,Ke=0,ct=HC(R)/2;for(let Lt=0;Lt<R.length-1;Lt++){let Jt=R[Lt],cr=R[Lt+1],mr=Jt.dist(cr);if(Ke+mr>ct){let Pr=(ct-Ke)/mr,zr=Lo.number(Jt.x,cr.x,Pr),ui=Lo.number(Jt.y,cr.y,Pr),yi=new gg(zr,ui,cr.angleTo(Jt),Lt);return yi._round(),!pe||bS(R,yi,Fe,pe,S)?yi:void 0}Ke+=mr}}function nO(R,S,F,W,te,fe,pe,Fe,Ke){let ct=jC(W,fe,pe),Lt=WC(W,te),Jt=Lt*pe,cr=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return S-Jt<S/4&&(S=Jt+S/4),XC(R,cr?S/2*Fe%S:(Lt/2+2*fe)*pe*Fe%S,S,ct,F,Jt,cr,!1,Ke)}function XC(R,S,F,W,te,fe,pe,Fe,Ke){let ct=fe/2,Lt=HC(R),Jt=0,cr=S-F,mr=[];for(let Pr=0;Pr<R.length-1;Pr++){let zr=R[Pr],ui=R[Pr+1],yi=zr.dist(ui),vn=ui.angleTo(zr);for(;cr+F<Jt+yi;){cr+=F;let zi=(cr-Jt)/yi,un=Lo.number(zr.x,ui.x,zi),Tn=Lo.number(zr.y,ui.y,zi);if(un>=0&&un<Ke&&Tn>=0&&Tn<Ke&&cr-ct>=0&&cr+ct<=Lt){let pa=new gg(un,Tn,vn,Pr);pa._round(),W&&!bS(R,pa,fe,W,te)||mr.push(pa)}}Jt+=yi}return Fe||mr.length||pe||(mr=XC(R,Jt/2,F,W,te,fe,pe,!0,Ke)),mr}Fi(\"Anchor\",gg);let F1=Md;function ZC(R,S,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,Fe=fe.paddedRect.w-2*F1,Ke=fe.paddedRect.h-2*F1,ct={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Lt=fe.stretchX||[[0,Fe]],Jt=fe.stretchY||[[0,Ke]],cr=(Xn,Ro)=>Xn+Ro[1]-Ro[0],mr=Lt.reduce(cr,0),Pr=Jt.reduce(cr,0),zr=Fe-mr,ui=Ke-Pr,yi=0,vn=mr,zi=0,un=Pr,Tn=0,pa=zr,ro=0,Vo=ui;if(fe.content&&W){let Xn=fe.content,Ro=Xn[2]-Xn[0],uo=Xn[3]-Xn[1];(fe.textFitWidth||fe.textFitHeight)&&(ct=PC(R)),yi=mg(Lt,0,Xn[0]),zi=mg(Jt,0,Xn[1]),vn=mg(Lt,Xn[0],Xn[2]),un=mg(Jt,Xn[1],Xn[3]),Tn=Xn[0]-yi,ro=Xn[1]-zi,pa=Ro-vn,Vo=uo-un}let Xa=ct.x1,sa=ct.y1,Mo=ct.x2-Xa,fo=ct.y2-sa,lo=(Xn,Ro,uo,$o)=>{let Ju=Zw(Xn.stretch-yi,vn,Mo,Xa),qu=z1(Xn.fixed-Tn,pa,Xn.stretch,mr),kh=Zw(Ro.stretch-zi,un,fo,sa),Qv=z1(Ro.fixed-ro,Vo,Ro.stretch,Pr),ud=Zw(uo.stretch-yi,vn,Mo,Xa),Ch=z1(uo.fixed-Tn,pa,uo.stretch,mr),Vd=Zw($o.stretch-zi,un,fo,sa),Gd=z1($o.fixed-ro,Vo,$o.stretch,Pr),Hd=new u(Ju,kh),Af=new u(ud,kh),Lh=new u(ud,Vd),Ed=new u(Ju,Vd),cd=new u(qu/pe,Qv/pe),Yh=new u(Ch/pe,Gd/pe),Df=S*Math.PI/180;if(Df){let ru=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-ru,ru,pc];Hd._matMult($u),Af._matMult($u),Ed._matMult($u),Lh._matMult($u)}let Fv=Xn.stretch+Xn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:Hd,tr:Af,bl:Ed,br:Lh,tex:{x:fe.paddedRect.x+F1+Fv,y:fe.paddedRect.y+F1+lv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cd,pixelOffsetBR:Yh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Xn=YC(Lt,zr,mr),Ro=YC(Jt,ui,Pr);for(let uo=0;uo<Xn.length-1;uo++){let $o=Xn[uo],Ju=Xn[uo+1];for(let qu=0;qu<Ro.length-1;qu++)te.push(lo($o,Ro[qu],Ju,Ro[qu+1]))}}else te.push(lo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:Ke+1}));return te}function mg(R,S,F){let W=0;for(let te of R)W+=Math.max(S,Math.min(F,te[1]))-Math.max(S,Math.min(F,te[0]));return W}function YC(R,S,F){let W=[{fixed:-F1,stretch:0}];for(let[te,fe]of R){let pe=W[W.length-1];W.push({fixed:te-pe.stretch,stretch:pe.stretch}),W.push({fixed:te-pe.stretch,stretch:pe.stretch+(fe-te)})}return W.push({fixed:S+F1,stretch:F}),W}function Zw(R,S,F,W){return R/S*F+W}function z1(R,S,F,W){return R-S*F/W}class dm{constructor(S,F,W,te,fe,pe,Fe,Ke,ct,Lt){var Jt;if(this.boxStartIndex=S.length,ct){let cr=pe.top,mr=pe.bottom,Pr=pe.collisionPadding;Pr&&(cr-=Pr[1],mr+=Pr[3]);let zr=mr-cr;zr>0&&(zr=Math.max(10,zr),this.circleDiameter=zr)}else{let cr=!((Jt=pe.image)===null||Jt===void 0)&&Jt.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?PC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};cr.y1=cr.y1*Fe-Ke[0],cr.y2=cr.y2*Fe+Ke[2],cr.x1=cr.x1*Fe-Ke[3],cr.x2=cr.x2*Fe+Ke[1];let mr=pe.collisionPadding;if(mr&&(cr.x1-=mr[0]*Fe,cr.y1-=mr[1]*Fe,cr.x2+=mr[2]*Fe,cr.y2+=mr[3]*Fe),Lt){let Pr=new u(cr.x1,cr.y1),zr=new u(cr.x2,cr.y1),ui=new u(cr.x1,cr.y2),yi=new u(cr.x2,cr.y2),vn=Lt*Math.PI/180;Pr._rotate(vn),zr._rotate(vn),ui._rotate(vn),yi._rotate(vn),cr.x1=Math.min(Pr.x,zr.x,ui.x,yi.x),cr.x2=Math.max(Pr.x,zr.x,ui.x,yi.x),cr.y1=Math.min(Pr.y,zr.y,ui.y,yi.y),cr.y2=Math.max(Pr.y,zr.y,ui.y,yi.y)}S.emplaceBack(F.x,F.y,cr.x1,cr.y1,cr.x2,cr.y2,W,te,fe)}this.boxEndIndex=S.length}}class Vp{constructor(S=[],F=(W,te)=>W<te?-1:W>te?1:0){if(this.data=S,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:F,compare:W}=this,te=F[S];for(;S>0;){let fe=S-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[S]=pe,S=fe}F[S]=te}_down(S){let{data:F,compare:W}=this,te=this.length>>1,fe=F[S];for(;S<te;){let pe=1+(S<<1),Fe=pe+1;if(Fe<this.length&&W(F[Fe],F[pe])<0&&(pe=Fe),W(F[pe],fe)>=0)break;F[S]=F[pe],S=pe}F[S]=fe}}function aO(R,S=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,Fe=R[0];for(let mr=0;mr<Fe.length;mr++){let Pr=Fe[mr];(!mr||Pr.x<W)&&(W=Pr.x),(!mr||Pr.y<te)&&(te=Pr.y),(!mr||Pr.x>fe)&&(fe=Pr.x),(!mr||Pr.y>pe)&&(pe=Pr.y)}let Ke=Math.min(fe-W,pe-te),ct=Ke/2,Lt=new Vp([],oO);if(Ke===0)return new u(W,te);for(let mr=W;mr<fe;mr+=Ke)for(let Pr=te;Pr<pe;Pr+=Ke)Lt.push(new O1(mr+ct,Pr+ct,ct,R));let Jt=function(mr){let Pr=0,zr=0,ui=0,yi=mr[0];for(let vn=0,zi=yi.length,un=zi-1;vn<zi;un=vn++){let Tn=yi[vn],pa=yi[un],ro=Tn.x*pa.y-pa.x*Tn.y;zr+=(Tn.x+pa.x)*ro,ui+=(Tn.y+pa.y)*ro,Pr+=3*ro}return new O1(zr/Pr,ui/Pr,0,mr)}(R),cr=Lt.length;for(;Lt.length;){let mr=Lt.pop();(mr.d>Jt.d||!Jt.d)&&(Jt=mr,F&&console.log(\"found best %d after %d probes\",Math.round(1e4*mr.d)/1e4,cr)),mr.max-Jt.d<=S||(ct=mr.h/2,Lt.push(new O1(mr.p.x-ct,mr.p.y-ct,ct,R)),Lt.push(new O1(mr.p.x+ct,mr.p.y-ct,ct,R)),Lt.push(new O1(mr.p.x-ct,mr.p.y+ct,ct,R)),Lt.push(new O1(mr.p.x+ct,mr.p.y+ct,ct,R)),cr+=4)}return F&&(console.log(`num probes: ${cr}`),console.log(`best distance: ${Jt.d}`)),Jt.p}function oO(R,S){return S.max-R.max}function O1(R,S,F,W){this.p=new u(R,S),this.h=F,this.d=function(te,fe){let pe=!1,Fe=1/0;for(let Ke=0;Ke<fe.length;Ke++){let ct=fe[Ke];for(let Lt=0,Jt=ct.length,cr=Jt-1;Lt<Jt;cr=Lt++){let mr=ct[Lt],Pr=ct[cr];mr.y>te.y!=Pr.y>te.y&&te.x<(Pr.x-mr.x)*(te.y-mr.y)/(Pr.y-mr.y)+mr.x&&(pe=!pe),Fe=Math.min(Fe,Gr(te,mr,Pr))}}return(pe?1:-1)*Math.sqrt(Fe)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]=\"center\",ld[ld.left=2]=\"left\",ld[ld.right=3]=\"right\",ld[ld.top=4]=\"top\",ld[ld.bottom=5]=\"bottom\",ld[ld[\"top-left\"]=6]=\"top-left\",ld[ld[\"top-right\"]=7]=\"top-right\",ld[ld[\"bottom-left\"]=8]=\"bottom-left\",ld[ld[\"bottom-right\"]=9]=\"bottom-right\";let vm=7,yy=Number.POSITIVE_INFINITY;function wS(R,S){return S[1]!==yy?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case\"top-right\":case\"top-left\":case\"top\":pe=te-vm;break;case\"bottom-right\":case\"bottom-left\":case\"bottom\":pe=-te+vm}switch(F){case\"top-right\":case\"bottom-right\":case\"right\":fe=-W;break;case\"top-left\":case\"bottom-left\":case\"left\":fe=W}return[fe,pe]}(R,S[0],S[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case\"top-right\":case\"top-left\":fe=pe-vm;break;case\"bottom-right\":case\"bottom-left\":fe=-pe+vm;break;case\"bottom\":fe=-W+vm;break;case\"top\":fe=W-vm}switch(F){case\"top-right\":case\"bottom-right\":te=-pe;break;case\"top-left\":case\"bottom-left\":te=pe;break;case\"left\":te=W;break;case\"right\":te=-W}return[te,fe]}(R,S[0])}function KC(R,S,F){var W;let te=R.layout,fe=(W=te.get(\"text-variable-anchor-offset\"))===null||W===void 0?void 0:W.evaluate(S,{},F);if(fe){let Fe=fe.values,Ke=[];for(let ct=0;ct<Fe.length;ct+=2){let Lt=Ke[ct]=Fe[ct],Jt=Fe[ct+1].map(cr=>cr*tu);Lt.startsWith(\"top\")?Jt[1]-=vm:Lt.startsWith(\"bottom\")&&(Jt[1]+=vm),Ke[ct+1]=Jt}return new $i(Ke)}let pe=te.get(\"text-variable-anchor\");if(pe){let Fe;Fe=R._unevaluatedLayout.getValue(\"text-radial-offset\")!==void 0?[te.get(\"text-radial-offset\").evaluate(S,{},F)*tu,yy]:te.get(\"text-offset\").evaluate(S,{},F).map(ct=>ct*tu);let Ke=[];for(let ct of pe)Ke.push(ct,wS(ct,Fe));return new $i(Ke)}return null}function TS(R){switch(R){case\"right\":case\"top-right\":case\"bottom-right\":return\"right\";case\"left\":case\"top-left\":case\"bottom-left\":return\"left\"}return\"center\"}function sO(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=fe.textMaxSize.evaluate(S,{});Jt===void 0&&(Jt=pe);let cr=R.layers[0].layout,mr=cr.get(\"icon-offset\").evaluate(S,{},Lt),Pr=$C(F.horizontal),zr=pe/24,ui=R.tilePixelRatio*zr,yi=R.tilePixelRatio*Jt/24,vn=R.tilePixelRatio*Fe,zi=R.tilePixelRatio*cr.get(\"symbol-spacing\"),un=cr.get(\"text-padding\")*R.tilePixelRatio,Tn=function(Xn,Ro,uo,$o=1){let Ju=Xn.get(\"icon-padding\").evaluate(Ro,{},uo),qu=Ju&&Ju.values;return[qu[0]*$o,qu[1]*$o,qu[2]*$o,qu[3]*$o]}(cr,S,Lt,R.tilePixelRatio),pa=cr.get(\"text-max-angle\")/180*Math.PI,ro=cr.get(\"text-rotation-alignment\")!==\"viewport\"&&cr.get(\"symbol-placement\")!==\"point\",Vo=cr.get(\"icon-rotation-alignment\")===\"map\"&&cr.get(\"symbol-placement\")!==\"point\",Xa=cr.get(\"symbol-placement\"),sa=zi/2,Mo=cr.get(\"icon-text-fit\"),fo;W&&Mo!==\"none\"&&(R.allowVerticalPlacement&&F.vertical&&(fo=IC(W,F.vertical,Mo,cr.get(\"icon-text-fit-padding\"),mr,zr)),Pr&&(W=IC(W,Pr,Mo,cr.get(\"icon-text-fit-padding\"),mr,zr)));let lo=(Xn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,qu,kh,Qv,ud,Ch,Vd,Gd,Hd,Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru,pc,$u,zv,ff,q1){let p0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Yf,tp=0,yg=0,uv=0,B1=0,kS=-1,$w=-1,g0={},_y=bi(\"\");if(uo.allowVerticalPlacement&&qu.vertical){let kd=Ch.layout.get(\"text-rotate\").evaluate(pc,{},ff)+90;Gc=new dm(Vd,$o,Gd,Hd,Af,qu.vertical,Lh,Ed,cd,kd),ud&&(Yf=new dm(Vd,$o,Gd,Hd,Af,ud,Df,Fv,cd,kd))}if(kh){let kd=Ch.layout.get(\"icon-rotate\").evaluate(pc,{}),rp=Ch.layout.get(\"icon-text-fit\")!==\"none\",pm=ZC(kh,kd,zv,rp),jd=ud?ZC(ud,kd,zv,rp):void 0;ep=new dm(Vd,$o,Gd,Hd,Af,kh,Df,Fv,!1,kd),tp=4*pm.length;let Cd=uo.iconSizeData,xp=null;Cd.kind===\"source\"?(xp=[v0*Ch.layout.get(\"icon-size\").evaluate(pc,{})],xp[0]>fm&&A(`${uo.layerIds[0]}: Value for \"icon-size\" is >= ${tb}. Reduce your \"icon-size\".`)):Cd.kind===\"composite\"&&(xp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},ff),v0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(xp[0]>fm||xp[1]>fm)&&A(`${uo.layerIds[0]}: Value for \"icon-size\" is >= ${tb}. Reduce your \"icon-size\".`)),uo.addSymbols(uo.icon,pm,xp,ru,lv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,ff),kS=uo.icon.placedSymbolArray.length-1,jd&&(yg=4*jd.length,uo.addSymbols(uo.icon,jd,xp,ru,lv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,ff),$w=uo.icon.placedSymbolArray.length-1)}let Kh=Object.keys(qu.horizontal);for(let kd of Kh){let rp=qu.horizontal[kd];if(!Gp){_y=bi(rp.text);let jd=Ch.layout.get(\"text-rotate\").evaluate(pc,{},ff);Gp=new dm(Vd,$o,Gd,Hd,Af,rp,Lh,Ed,cd,jd)}let pm=rp.positionedLines.length===1;if(uv+=JC(uo,$o,rp,Qv,Ch,cd,pc,Yh,p0,qu.vertical?i.ah.horizontal:i.ah.horizontalOnly,pm?Kh:[kd],g0,kS,$u,ff),pm)break}qu.vertical&&(B1+=JC(uo,$o,qu.vertical,Qv,Ch,cd,pc,Yh,p0,i.ah.vertical,[\"vertical\"],g0,$w,$u,ff));let cO=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,Qw=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,r6=ep?ep.boxStartIndex:uo.collisionBoxArray.length,fO=ep?ep.boxEndIndex:uo.collisionBoxArray.length,i6=Yf?Yf.boxStartIndex:uo.collisionBoxArray.length,hO=Yf?Yf.boxEndIndex:uo.collisionBoxArray.length,_p=-1,fb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;_p=fb(Gp,_p),_p=fb(Gc,_p),_p=fb(ep,_p),_p=fb(Yf,_p);let e3=_p>-1?1:0;e3&&(_p*=q1/tu),uo.glyphOffsetArray.length>=R1.MAX_GLYPHS&&A(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let CS=KC(Ch,pc,ff),[dO,vO]=function(kd,rp){let pm=kd.length,jd=rp==null?void 0:rp.values;if((jd==null?void 0:jd.length)>0)for(let Cd=0;Cd<jd.length;Cd+=2){let xp=jd[Cd+1];kd.emplaceBack(i.aq[jd[Cd]],xp[0],xp[1])}return[pm,kd.length]}(uo.textAnchorOffsets,CS);uo.symbolInstances.emplaceBack($o.x,$o.y,g0.right>=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,kS,$w,_y,cO,Qw,m0,cv,r6,fO,i6,hO,Gd,uv,B1,tp,yg,e3,0,Lh,_p,dO,vO)}(R,Ro,Xn,F,W,te,fo,R.layers[0],R.collisionBoxArray,S.index,S.sourceLayerIndex,R.index,ui,[un,un,un,un],ro,Ke,vn,Tn,Vo,mr,S,fe,ct,Lt,pe)};if(Xa===\"line\")for(let Xn of GC(S.geometry,0,0,ja,ja)){let Ro=nO(Xn,zi,pa,F.vertical||Pr,W,24,yi,R.overscaling,ja);for(let uo of Ro)Pr&&lO(R,Pr.text,sa,uo)||lo(Xn,uo)}else if(Xa===\"line-center\"){for(let Xn of S.geometry)if(Xn.length>1){let Ro=iO(Xn,pa,F.vertical||Pr,W,24,yi);Ro&&lo(Xn,Ro)}}else if(S.type===\"Polygon\")for(let Xn of Cf(S.geometry,0)){let Ro=aO(Xn,16);lo(Xn[0],new gg(Ro.x,Ro.y,0))}else if(S.type===\"LineString\")for(let Xn of S.geometry)lo(Xn,new gg(Xn[0].x,Xn[0].y,0));else if(S.type===\"Point\")for(let Xn of S.geometry)for(let Ro of Xn)lo([Ro],new gg(Ro.x,Ro.y,0))}function JC(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr){let zr=function(vn,zi,un,Tn,pa,ro,Vo,Xa){let sa=Tn.layout.get(\"text-rotate\").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Xn=lo.rect||{},Ro=EC+1,uo=!0,$o=1,Ju=0,qu=(pa||Xa)&&lo.vertical,kh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(tu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*tu)),lo.imageName){let ru=Vo[lo.imageName];uo=ru.sdf,$o=ru.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+kh,lo.y]:[0,0],ud=pa?[0,0]:[lo.x+kh+un[0],lo.y+un[1]-Ju],Ch=[0,0];qu&&(Ch=ud,ud=[0,0]);let Vd=lo.metrics.isDoubleResolution?2:1,Gd=(lo.metrics.left-Ro)*lo.scale-kh+ud[0],Hd=(-lo.metrics.top-Ro)*lo.scale+ud[1],Af=Gd+Xn.w/Vd*lo.scale/$o,Lh=Hd+Xn.h/Vd*lo.scale/$o,Ed=new u(Gd,Hd),cd=new u(Af,Hd),Yh=new u(Gd,Lh),Df=new u(Af,Lh);if(qu){let ru=new u(-kh,kh-Eh),pc=-Math.PI/2,$u=tu/2-kh,zv=new u(5-Eh-$u,-(lo.imageName?$u:0)),ff=new u(...Ch);Ed._rotateAround(pc,ru)._add(zv)._add(ff),cd._rotateAround(pc,ru)._add(zv)._add(ff),Yh._rotateAround(pc,ru)._add(zv)._add(ff),Df._rotateAround(pc,ru)._add(zv)._add(ff)}if(sa){let ru=Math.sin(sa),pc=Math.cos(sa),$u=[pc,-ru,ru,pc];Ed._matMult($u),cd._matMult($u),Yh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:cd,bl:Yh,br:Df,tex:Xn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,Fe,te,fe,pe,W,R.allowVerticalPlacement),ui=R.textSizeData,yi=null;ui.kind===\"source\"?(yi=[v0*te.layout.get(\"text-size\").evaluate(pe,{})],yi[0]>fm&&A(`${R.layerIds[0]}: Value for \"text-size\" is >= ${tb}. Reduce your \"text-size\".`)):ui.kind===\"composite\"&&(yi=[v0*mr.compositeTextSizes[0].evaluate(pe,{},Pr),v0*mr.compositeTextSizes[1].evaluate(pe,{},Pr)],(yi[0]>fm||yi[1]>fm)&&A(`${R.layerIds[0]}: Value for \"text-size\" is >= ${tb}. Reduce your \"text-size\".`)),R.addSymbols(R.text,zr,yi,Fe,fe,pe,ct,S,Ke.lineStartIndex,Ke.lineLength,cr,Pr);for(let vn of Lt)Jt[vn]=R.text.placedSymbolArray.length-1;return 4*zr.length}function $C(R){for(let S in R)return R[S];return null}function lO(R,S,F,W){let te=R.compareText;if(S in te){let fe=te[S];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])<F)return!0}else te[S]=[];return te[S].push(W),!1}let QC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class AS{static from(S){if(!(S instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");let[F,W]=new Uint8Array(S,0,2);if(F!==219)throw new Error(\"Data does not appear to be in a KDBush format.\");let te=W>>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=QC[15&W];if(!fe)throw new Error(\"Unrecognized array type.\");let[pe]=new Uint16Array(S,2,1),[Fe]=new Uint32Array(S,4,1);return new AS(Fe,pe,fe,S)}constructor(S,F=64,W=Float64Array,te){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let fe=QC.indexOf(this.ArrayType),pe=2*S*this.ArrayType.BYTES_PER_ELEMENT,Fe=S*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-Fe%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Fe+Ke,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+pe+Fe+Ke),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Fe+Ke,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=S)}add(S,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=S,this.coords[this._pos++]=F,W}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Yw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,F,W,te){if(!this._finished)throw new Error(\"Data not yet indexed - call index.finish().\");let{ids:fe,coords:pe,nodeSize:Fe}=this,Ke=[0,fe.length-1,0],ct=[];for(;Ke.length;){let Lt=Ke.pop()||0,Jt=Ke.pop()||0,cr=Ke.pop()||0;if(Jt-cr<=Fe){for(let ui=cr;ui<=Jt;ui++){let yi=pe[2*ui],vn=pe[2*ui+1];yi>=S&&yi<=W&&vn>=F&&vn<=te&&ct.push(fe[ui])}continue}let mr=cr+Jt>>1,Pr=pe[2*mr],zr=pe[2*mr+1];Pr>=S&&Pr<=W&&zr>=F&&zr<=te&&ct.push(fe[mr]),(Lt===0?S<=Pr:F<=zr)&&(Ke.push(cr),Ke.push(mr-1),Ke.push(1-Lt)),(Lt===0?W>=Pr:te>=zr)&&(Ke.push(mr+1),Ke.push(Jt),Ke.push(1-Lt))}return ct}within(S,F,W){if(!this._finished)throw new Error(\"Data not yet indexed - call index.finish().\");let{ids:te,coords:fe,nodeSize:pe}=this,Fe=[0,te.length-1,0],Ke=[],ct=W*W;for(;Fe.length;){let Lt=Fe.pop()||0,Jt=Fe.pop()||0,cr=Fe.pop()||0;if(Jt-cr<=pe){for(let ui=cr;ui<=Jt;ui++)t6(fe[2*ui],fe[2*ui+1],S,F)<=ct&&Ke.push(te[ui]);continue}let mr=cr+Jt>>1,Pr=fe[2*mr],zr=fe[2*mr+1];t6(Pr,zr,S,F)<=ct&&Ke.push(te[mr]),(Lt===0?S-W<=Pr:F-W<=zr)&&(Fe.push(cr),Fe.push(mr-1),Fe.push(1-Lt)),(Lt===0?S+W>=Pr:F+W>=zr)&&(Fe.push(mr+1),Fe.push(Jt),Fe.push(1-Lt))}return Ke}}function Yw(R,S,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;e6(R,S,pe,W,te,fe),Yw(R,S,F,W,pe-1,1-fe),Yw(R,S,F,pe+1,te,1-fe)}function e6(R,S,F,W,te,fe){for(;te>W;){if(te-W>600){let ct=te-W+1,Lt=F-W+1,Jt=Math.log(ct),cr=.5*Math.exp(2*Jt/3),mr=.5*Math.sqrt(Jt*cr*(ct-cr)/ct)*(Lt-ct/2<0?-1:1);e6(R,S,F,Math.max(W,Math.floor(F-Lt*cr/ct+mr)),Math.min(te,Math.floor(F+(ct-Lt)*cr/ct+mr)),fe)}let pe=S[2*F+fe],Fe=W,Ke=te;for(ub(R,S,W,F),S[2*te+fe]>pe&&ub(R,S,W,te);Fe<Ke;){for(ub(R,S,Fe,Ke),Fe++,Ke--;S[2*Fe+fe]<pe;)Fe++;for(;S[2*Ke+fe]>pe;)Ke--}S[2*W+fe]===pe?ub(R,S,W,Ke):(Ke++,ub(R,S,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function ub(R,S,F,W){SS(R,F,W),SS(S,2*F,2*W),SS(S,2*F+1,2*W+1)}function SS(R,S,F){let W=R[S];R[S]=R[F],R[F]=W}function t6(R,S,F,W){let te=R-F,fe=S-W;return te*te+fe*fe}var Kw;i.bg=void 0,(Kw=i.bg||(i.bg={})).create=\"create\",Kw.load=\"load\",Kw.fullLoad=\"fullLoad\";let cb=null,sh=[],MS=1e3/60,ES=\"loadTime\",Jw=\"fullLoadTime\",uO={mark(R){performance.mark(R)},frame(R){let S=R;cb!=null&&sh.push(S-cb),cb=S},clearMetrics(){cb=null,sh=[],performance.clearMeasures(ES),performance.clearMeasures(Jw);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(ES,i.bg.create,i.bg.load),performance.measure(Jw,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(ES)[0].duration,S=performance.getEntriesByName(Jw)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>MS).reduce((fe,pe)=>fe+(pe-MS)/MS,0);return{loadTime:R,fullLoadTime:S,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Yt{},i.A=xi,i.B=dn,i.C=function(R){if(U==null){let S=R.navigator?R.navigator.userAgent:null;U=!!R.safari||!(!S||!(/\\b(iPad|iPhone|iPod)\\b/.test(S)||S.match(\"Safari\")&&!S.match(\"Chrome\")))}return U},i.D=Ua,i.E=De,i.F=class{constructor(R,S){this.target=R,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,\"message\",F=>this.receive(F)),this.globalScope=O(self)?R:window}registerMessageHandler(R,S){this.messageHandlers[R]=S}sendAsync(R,S){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},S&&S.signal.addEventListener(\"abort\",()=>{delete this.resolveRejects[te];let Fe={id:te,type:\"<cancel>\",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Fe)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let S=R.data,F=S.id;if(!(S.origin!==\"file://\"&&location.origin!==\"file://\"&&S.origin!==\"resource://android\"&&location.origin!==\"resource://android\"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===\"<cancel>\"){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(O(self)||S.mustQueue)return this.tasks[F]=S,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,S)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),S=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(R,S)}processTask(R,S){return a(this,void 0,void 0,function*(){if(S.type===\"<response>\"){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(S.error?te.reject(Na(S.error)):te.resolve(Na(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(\", \")}`));let F=Na(S.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[S.type](S.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,S,F){let W=[];delete this.abortControllers[R];let te={id:R,type:\"<response>\",sourceMapId:this.mapId,origin:location.origin,error:S?La(S):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Le,i.H=function(){var R=new xi(16);return xi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Bw,i.J=function(R,S,F){var W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr=F[0],ui=F[1],yi=F[2];return S===R?(R[12]=S[0]*zr+S[4]*ui+S[8]*yi+S[12],R[13]=S[1]*zr+S[5]*ui+S[9]*yi+S[13],R[14]=S[2]*zr+S[6]*ui+S[10]*yi+S[14],R[15]=S[3]*zr+S[7]*ui+S[11]*yi+S[15]):(te=S[1],fe=S[2],pe=S[3],Fe=S[4],Ke=S[5],ct=S[6],Lt=S[7],Jt=S[8],cr=S[9],mr=S[10],Pr=S[11],R[0]=W=S[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=Fe,R[5]=Ke,R[6]=ct,R[7]=Lt,R[8]=Jt,R[9]=cr,R[10]=mr,R[11]=Pr,R[12]=W*zr+Fe*ui+Jt*yi+S[12],R[13]=te*zr+Ke*ui+cr*yi+S[13],R[14]=fe*zr+ct*ui+mr*yi+S[14],R[15]=pe*zr+Lt*ui+Pr*yi+S[15]),R},i.K=function(R,S,F){var W=F[0],te=F[1],fe=F[2];return R[0]=S[0]*W,R[1]=S[1]*W,R[2]=S[2]*W,R[3]=S[3]*W,R[4]=S[4]*te,R[5]=S[5]*te,R[6]=S[6]*te,R[7]=S[7]*te,R[8]=S[8]*fe,R[9]=S[9]*fe,R[10]=S[10]*fe,R[11]=S[11]*fe,R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15],R},i.L=ci,i.M=function(R,S){let F={};for(let W=0;W<S.length;W++){let te=S[W];te in R&&(F[te]=R[te])}return F},i.N=pg,i.O=Ww,i.P=u,i.Q=OC,i.R=Ki,i.S=$v,i.T=Yu,i.U=_,i.V=b,i.W=j,i.X=ja,i.Y=Oe,i.Z=sb,i._=a,i.a=_e,i.a$=function(R,S){var F=R[0],W=R[1],te=R[2],fe=R[3],pe=R[4],Fe=R[5],Ke=R[6],ct=R[7],Lt=R[8],Jt=R[9],cr=R[10],mr=R[11],Pr=R[12],zr=R[13],ui=R[14],yi=R[15],vn=S[0],zi=S[1],un=S[2],Tn=S[3],pa=S[4],ro=S[5],Vo=S[6],Xa=S[7],sa=S[8],Mo=S[9],fo=S[10],lo=S[11],Xn=S[12],Ro=S[13],uo=S[14],$o=S[15];return Math.abs(F-vn)<=Yr*Math.max(1,Math.abs(F),Math.abs(vn))&&Math.abs(W-zi)<=Yr*Math.max(1,Math.abs(W),Math.abs(zi))&&Math.abs(te-un)<=Yr*Math.max(1,Math.abs(te),Math.abs(un))&&Math.abs(fe-Tn)<=Yr*Math.max(1,Math.abs(fe),Math.abs(Tn))&&Math.abs(pe-pa)<=Yr*Math.max(1,Math.abs(pe),Math.abs(pa))&&Math.abs(Fe-ro)<=Yr*Math.max(1,Math.abs(Fe),Math.abs(ro))&&Math.abs(Ke-Vo)<=Yr*Math.max(1,Math.abs(Ke),Math.abs(Vo))&&Math.abs(ct-Xa)<=Yr*Math.max(1,Math.abs(ct),Math.abs(Xa))&&Math.abs(Lt-sa)<=Yr*Math.max(1,Math.abs(Lt),Math.abs(sa))&&Math.abs(Jt-Mo)<=Yr*Math.max(1,Math.abs(Jt),Math.abs(Mo))&&Math.abs(cr-fo)<=Yr*Math.max(1,Math.abs(cr),Math.abs(fo))&&Math.abs(mr-lo)<=Yr*Math.max(1,Math.abs(mr),Math.abs(lo))&&Math.abs(Pr-Xn)<=Yr*Math.max(1,Math.abs(Pr),Math.abs(Xn))&&Math.abs(zr-Ro)<=Yr*Math.max(1,Math.abs(zr),Math.abs(Ro))&&Math.abs(ui-uo)<=Yr*Math.max(1,Math.abs(ui),Math.abs(uo))&&Math.abs(yi-$o)<=Yr*Math.max(1,Math.abs(yi),Math.abs($o))},i.a0=Ye,i.a1=_S,i.a2=fr,i.a3=R=>{let S=window.document.createElement(\"video\");return S.muted=!0,new Promise(F=>{S.onloadstart=()=>{F(S)};for(let W of R){let te=window.document.createElement(\"source\");Ee(W)||(S.crossOrigin=\"Anonymous\"),te.src=W,S.appendChild(te)}})},i.a4=function(){return x++},i.a5=Cn,i.a6=R1,i.a7=Fc,i.a8=Sl,i.a9=xS,i.aA=function(R){if(R.type===\"custom\")return new gS(R);switch(R.type){case\"background\":return new tO(R);case\"circle\":return new hi(R);case\"fill\":return new yt(R);case\"fill-extrusion\":return new Lv(R);case\"heatmap\":return new oa(R);case\"hillshade\":return new Zs(R);case\"line\":return new hy(R);case\"raster\":return new ab(R);case\"symbol\":return new gy(R)}},i.aB=g,i.aC=function(R,S){if(!R)return[{command:\"setStyle\",args:[S]}];let F=[];try{if(!pt(R.version,S.version))return[{command:\"setStyle\",args:[S]}];pt(R.center,S.center)||F.push({command:\"setCenter\",args:[S.center]}),pt(R.zoom,S.zoom)||F.push({command:\"setZoom\",args:[S.zoom]}),pt(R.bearing,S.bearing)||F.push({command:\"setBearing\",args:[S.bearing]}),pt(R.pitch,S.pitch)||F.push({command:\"setPitch\",args:[S.pitch]}),pt(R.sprite,S.sprite)||F.push({command:\"setSprite\",args:[S.sprite]}),pt(R.glyphs,S.glyphs)||F.push({command:\"setGlyphs\",args:[S.glyphs]}),pt(R.transition,S.transition)||F.push({command:\"setTransition\",args:[S.transition]}),pt(R.light,S.light)||F.push({command:\"setLight\",args:[S.light]}),pt(R.terrain,S.terrain)||F.push({command:\"setTerrain\",args:[S.terrain]}),pt(R.sky,S.sky)||F.push({command:\"setSky\",args:[S.sky]}),pt(R.projection,S.projection)||F.push({command:\"setProjection\",args:[S.projection]});let W={},te=[];(function(pe,Fe,Ke,ct){let Lt;for(Lt in Fe=Fe||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Lt)&&(Object.prototype.hasOwnProperty.call(Fe,Lt)||ut(Lt,Ke,ct));for(Lt in Fe)Object.prototype.hasOwnProperty.call(Fe,Lt)&&(Object.prototype.hasOwnProperty.call(pe,Lt)?pt(pe[Lt],Fe[Lt])||(pe[Lt].type===\"geojson\"&&Fe[Lt].type===\"geojson\"&&Nt(pe,Fe,Lt)?Vt(Ke,{command:\"setGeoJSONSourceData\",args:[Lt,Fe[Lt].data]}):Wt(Lt,Fe,Ke,ct)):ot(Lt,Fe,Ke))})(R.sources,S.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{\"source\"in pe&&W[pe.source]?F.push({command:\"removeLayer\",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,Fe,Ke){Fe=Fe||[];let ct=(pe=pe||[]).map(sr),Lt=Fe.map(sr),Jt=pe.reduce(Tr,{}),cr=Fe.reduce(Tr,{}),mr=ct.slice(),Pr=Object.create(null),zr,ui,yi,vn,zi;for(let un=0,Tn=0;un<ct.length;un++)zr=ct[un],Object.prototype.hasOwnProperty.call(cr,zr)?Tn++:(Vt(Ke,{command:\"removeLayer\",args:[zr]}),mr.splice(mr.indexOf(zr,Tn),1));for(let un=0,Tn=0;un<Lt.length;un++)zr=Lt[Lt.length-1-un],mr[mr.length-1-un]!==zr&&(Object.prototype.hasOwnProperty.call(Jt,zr)?(Vt(Ke,{command:\"removeLayer\",args:[zr]}),mr.splice(mr.lastIndexOf(zr,mr.length-Tn),1)):Tn++,vn=mr[mr.length-un],Vt(Ke,{command:\"addLayer\",args:[cr[zr],vn]}),mr.splice(mr.length-un,0,zr),Pr[zr]=!0);for(let un=0;un<Lt.length;un++)if(zr=Lt[un],ui=Jt[zr],yi=cr[zr],!Pr[zr]&&!pt(ui,yi))if(pt(ui.source,yi.source)&&pt(ui[\"source-layer\"],yi[\"source-layer\"])&&pt(ui.type,yi.type)){for(zi in $t(ui.layout,yi.layout,Ke,zr,null,\"setLayoutProperty\"),$t(ui.paint,yi.paint,Ke,zr,null,\"setPaintProperty\"),pt(ui.filter,yi.filter)||Vt(Ke,{command:\"setFilter\",args:[zr,yi.filter]}),pt(ui.minzoom,yi.minzoom)&&pt(ui.maxzoom,yi.maxzoom)||Vt(Ke,{command:\"setLayerZoomRange\",args:[zr,yi.minzoom,yi.maxzoom]}),ui)Object.prototype.hasOwnProperty.call(ui,zi)&&zi!==\"layout\"&&zi!==\"paint\"&&zi!==\"filter\"&&zi!==\"metadata\"&&zi!==\"minzoom\"&&zi!==\"maxzoom\"&&(zi.indexOf(\"paint.\")===0?$t(ui[zi],yi[zi],Ke,zr,zi.slice(6),\"setPaintProperty\"):pt(ui[zi],yi[zi])||Vt(Ke,{command:\"setLayerProperty\",args:[zr,zi,yi[zi]]}));for(zi in yi)Object.prototype.hasOwnProperty.call(yi,zi)&&!Object.prototype.hasOwnProperty.call(ui,zi)&&zi!==\"layout\"&&zi!==\"paint\"&&zi!==\"filter\"&&zi!==\"metadata\"&&zi!==\"minzoom\"&&zi!==\"maxzoom\"&&(zi.indexOf(\"paint.\")===0?$t(ui[zi],yi[zi],Ke,zr,zi.slice(6),\"setPaintProperty\"):pt(ui[zi],yi[zi])||Vt(Ke,{command:\"setLayerProperty\",args:[zr,zi,yi[zi]]}))}else Vt(Ke,{command:\"removeLayer\",args:[zr]}),vn=mr[mr.lastIndexOf(zr)+1],Vt(Ke,{command:\"addLayer\",args:[yi,vn]})}(fe,S.layers,F)}catch(W){console.warn(\"Unable to compute style diff:\",W),F=[{command:\"setStyle\",args:[S]}]}return F},i.aD=function(R){let S=[],F=R.id;return F===void 0&&S.push({message:`layers.${F}: missing required property \"id\"`}),R.render===void 0&&S.push({message:`layers.${F}: missing required method \"render\"`}),R.renderingMode&&R.renderingMode!==\"2d\"&&R.renderingMode!==\"3d\"&&S.push({message:`layers.${F}: property \"renderingMode\" must be either \"2d\" or \"3d\"`}),S},i.aE=function R(S,F){if(Array.isArray(S)){if(!Array.isArray(F)||S.length!==F.length)return!1;for(let W=0;W<S.length;W++)if(!R(S[W],F[W]))return!1;return!0}if(typeof S==\"object\"&&S!==null&&F!==null){if(typeof F!=\"object\"||Object.keys(S).length!==Object.keys(F).length)return!1;for(let W in S)if(!R(S[W],F[W]))return!1;return!0}return S===F},i.aF=C,i.aG=M,i.aH=class extends Si{constructor(R,S){super(R,S),this.current=0}set(R){this.current!==R&&(this.current=R,this.gl.uniform1i(this.location,R))}},i.aI=ei,i.aJ=class extends Si{constructor(R,S){super(R,S),this.current=Un}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let S=1;S<16;S++)if(R[S]!==this.current[S]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},i.aK=Ln,i.aL=En,i.aM=nr,i.aN=class extends Si{constructor(R,S){super(R,S),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},i.aO=class extends Si{constructor(R,S){super(R,S),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},i.aP=function(R,S,F,W,te,fe,pe){var Fe=1/(S-F),Ke=1/(W-te),ct=1/(fe-pe);return R[0]=-2*Fe,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ke,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*ct,R[11]=0,R[12]=(S+F)*Fe,R[13]=(te+W)*Ke,R[14]=(pe+fe)*ct,R[15]=1,R},i.aQ=Zi,i.aR=class extends it{},i.aS=om,i.aT=class extends Ht{},i.aU=ta,i.aV=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},i.aW=kn,i.aX=wo,i.aY=se,i.aZ=class extends Pi{},i.a_=function(R,S){return R[0]===S[0]&&R[1]===S[1]&&R[2]===S[2]&&R[3]===S[3]&&R[4]===S[4]&&R[5]===S[5]&&R[6]===S[6]&&R[7]===S[7]&&R[8]===S[8]&&R[9]===S[9]&&R[10]===S[10]&&R[11]===S[11]&&R[12]===S[12]&&R[13]===S[13]&&R[14]===S[14]&&R[15]===S[15]},i.aa=function(R){let S={};if(R.replace(/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return S[W]=!pe||pe.toLowerCase(),\"\"}),S[\"max-age\"]){let F=parseInt(S[\"max-age\"],10);isNaN(F)?delete S[\"max-age\"]:S[\"max-age\"]=F}return S},i.ab=function(R,S){let F=[];for(let W in R)W in S||F.push(W);return F},i.ac=E,i.ad=function(R,S,F){var W=Math.sin(F),te=Math.cos(F),fe=S[0],pe=S[1],Fe=S[2],Ke=S[3],ct=S[4],Lt=S[5],Jt=S[6],cr=S[7];return S!==R&&(R[8]=S[8],R[9]=S[9],R[10]=S[10],R[11]=S[11],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15]),R[0]=fe*te+ct*W,R[1]=pe*te+Lt*W,R[2]=Fe*te+Jt*W,R[3]=Ke*te+cr*W,R[4]=ct*te-fe*W,R[5]=Lt*te-pe*W,R[6]=Jt*te-Fe*W,R[7]=cr*te-Ke*W,R},i.ae=function(R){var S=new xi(16);return S[0]=R[0],S[1]=R[1],S[2]=R[2],S[3]=R[3],S[4]=R[4],S[5]=R[5],S[6]=R[6],S[7]=R[7],S[8]=R[8],S[9]=R[9],S[10]=R[10],S[11]=R[11],S[12]=R[12],S[13]=R[13],S[14]=R[14],S[15]=R[15],S},i.af=Bn,i.ag=function(R,S){let F=0,W=0;if(R.kind===\"constant\")W=R.layoutSize;else if(R.kind!==\"source\"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,Fe=te?E(ko.interpolationFactor(te,S,fe,pe),0,1):0;R.kind===\"camera\"?W=Lo.number(R.minSize,R.maxSize,Fe):F=Fe}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:S,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind===\"source\"?W/v0:R.kind===\"composite\"?Lo.number(W/v0,te/v0,F):S},i.aj=hS,i.ak=function(R,S,F,W){let te=S.y-R.y,fe=S.x-R.x,pe=W.y-F.y,Fe=W.x-F.x,Ke=pe*fe-Fe*te;if(Ke===0)return null;let ct=(Fe*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ct*fe,R.y+ct*te)},i.al=GC,i.am=Sc,i.an=Ri,i.ao=function(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[S,F,W,te]},i.ap=tu,i.ar=fS,i.as=function(R,S){var F=S[0],W=S[1],te=S[2],fe=S[3],pe=S[4],Fe=S[5],Ke=S[6],ct=S[7],Lt=S[8],Jt=S[9],cr=S[10],mr=S[11],Pr=S[12],zr=S[13],ui=S[14],yi=S[15],vn=F*Fe-W*pe,zi=F*Ke-te*pe,un=F*ct-fe*pe,Tn=W*Ke-te*Fe,pa=W*ct-fe*Fe,ro=te*ct-fe*Ke,Vo=Lt*zr-Jt*Pr,Xa=Lt*ui-cr*Pr,sa=Lt*yi-mr*Pr,Mo=Jt*ui-cr*zr,fo=Jt*yi-mr*zr,lo=cr*yi-mr*ui,Xn=vn*lo-zi*fo+un*Mo+Tn*sa-pa*Xa+ro*Vo;return Xn?(R[0]=(Fe*lo-Ke*fo+ct*Mo)*(Xn=1/Xn),R[1]=(te*fo-W*lo-fe*Mo)*Xn,R[2]=(zr*ro-ui*pa+yi*Tn)*Xn,R[3]=(cr*pa-Jt*ro-mr*Tn)*Xn,R[4]=(Ke*sa-pe*lo-ct*Xa)*Xn,R[5]=(F*lo-te*sa+fe*Xa)*Xn,R[6]=(ui*un-Pr*ro-yi*zi)*Xn,R[7]=(Lt*ro-cr*un+mr*zi)*Xn,R[8]=(pe*fo-Fe*sa+ct*Vo)*Xn,R[9]=(W*sa-F*fo-fe*Vo)*Xn,R[10]=(Pr*pa-zr*un+yi*vn)*Xn,R[11]=(Jt*un-Lt*pa-mr*vn)*Xn,R[12]=(Fe*Xa-pe*Mo-Ke*Vo)*Xn,R[13]=(F*Mo-W*Xa+te*Vo)*Xn,R[14]=(zr*zi-Pr*Tn-ui*vn)*Xn,R[15]=(Lt*Tn-Jt*zi+cr*vn)*Xn,R):null},i.at=TS,i.au=Gw,i.av=AS,i.aw=function(){let R={},S=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F===\"version\"?S:W.type===\"array\"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Yn,i.ay=ie,i.az=function(R){R=R.slice();let S=Object.create(null);for(let F=0;F<R.length;F++)S[R[F].id]=R[F];for(let F=0;F<R.length;F++)\"ref\"in R[F]&&(R[F]=lt(R[F],S[R[F].ref]));return R},i.b=G,i.b0=function(R,S){return R[0]=S[0],R[1]=S[1],R[2]=S[2],R[3]=S[3],R[4]=S[4],R[5]=S[5],R[6]=S[6],R[7]=S[7],R[8]=S[8],R[9]=S[9],R[10]=S[10],R[11]=S[11],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15],R},i.b1=function(R,S,F){return R[0]=S[0]*F[0],R[1]=S[1]*F[1],R[2]=S[2]*F[2],R[3]=S[3]*F[3],R},i.b2=function(R,S){return R[0]*S[0]+R[1]*S[1]+R[2]*S[2]+R[3]*S[3]},i.b3=T,i.b4=qC,i.b5=Xw,i.b6=function(R,S,F,W,te){var fe,pe=1/Math.tan(S/2);return R[0]=pe/F,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=pe,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,te!=null&&te!==1/0?(R[10]=(te+W)*(fe=1/(W-te)),R[14]=2*te*W*fe):(R[10]=-1,R[14]=-2*W),R},i.b7=function(R,S,F){var W=Math.sin(F),te=Math.cos(F),fe=S[4],pe=S[5],Fe=S[6],Ke=S[7],ct=S[8],Lt=S[9],Jt=S[10],cr=S[11];return S!==R&&(R[0]=S[0],R[1]=S[1],R[2]=S[2],R[3]=S[3],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15]),R[4]=fe*te+ct*W,R[5]=pe*te+Lt*W,R[6]=Fe*te+Jt*W,R[7]=Ke*te+cr*W,R[8]=ct*te-fe*W,R[9]=Lt*te-pe*W,R[10]=Jt*te-Fe*W,R[11]=cr*te-Ke*W,R},i.b8=p,i.b9=k,i.bA=Sd,i.bB=function(R){return R.message===re},i.bC=ks,i.bD=ys,i.ba=function(R){return R*Math.PI/180},i.bb=function(R,S){let{x:F,y:W}=sb.fromLngLat(S);return!(R<0||R>25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,S){return R[0]=S[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=S[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=S[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Tt{},i.be=yS,i.bf=uO,i.bh=ge,i.bi=function(R,S){_e.REGISTERED_PROTOCOLS[R]=S},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,S){let F={};for(let te=0;te<R.length;te++){let fe=S&&S[R[te].id]||Xh(R[te]);S&&(S[R[te].id]=fe);let pe=F[fe];pe||(pe=F[fe]=[]),pe.push(R[te])}let W=[];for(let te in F)W.push(F[te]);return W},i.bl=Fi,i.bm=NC,i.bn=my,i.bo=Nw,i.bp=function(R){R.bucket.createArrays(),R.bucket.tilePixelRatio=ja/(512*R.bucket.overscaling),R.bucket.compareText={},R.bucket.iconsNeedLinear=!1;let S=R.bucket.layers[0],F=S.layout,W=S._unevaluatedLayout._values,te={layoutIconSize:W[\"icon-size\"].possiblyEvaluate(new rs(R.bucket.zoom+1),R.canonical),layoutTextSize:W[\"text-size\"].possiblyEvaluate(new rs(R.bucket.zoom+1),R.canonical),textMaxSize:W[\"text-size\"].possiblyEvaluate(new rs(18))};if(R.bucket.textSizeData.kind===\"composite\"){let{minZoom:ct,maxZoom:Lt}=R.bucket.textSizeData;te.compositeTextSizes=[W[\"text-size\"].possiblyEvaluate(new rs(ct),R.canonical),W[\"text-size\"].possiblyEvaluate(new rs(Lt),R.canonical)]}if(R.bucket.iconSizeData.kind===\"composite\"){let{minZoom:ct,maxZoom:Lt}=R.bucket.iconSizeData;te.compositeIconSizes=[W[\"icon-size\"].possiblyEvaluate(new rs(ct),R.canonical),W[\"icon-size\"].possiblyEvaluate(new rs(Lt),R.canonical)]}let fe=F.get(\"text-line-height\")*tu,pe=F.get(\"text-rotation-alignment\")!==\"viewport\"&&F.get(\"symbol-placement\")!==\"point\",Fe=F.get(\"text-keep-upright\"),Ke=F.get(\"text-size\");for(let ct of R.bucket.features){let Lt=F.get(\"text-font\").evaluate(ct,{},R.canonical).join(\",\"),Jt=Ke.evaluate(ct,{},R.canonical),cr=te.layoutTextSize.evaluate(ct,{},R.canonical),mr=te.layoutIconSize.evaluate(ct,{},R.canonical),Pr={horizontal:{},vertical:void 0},zr=ct.text,ui,yi=[0,0];if(zr){let un=zr.toString(),Tn=F.get(\"text-letter-spacing\").evaluate(ct,{},R.canonical)*tu,pa=bo(un)?Tn:0,ro=F.get(\"text-anchor\").evaluate(ct,{},R.canonical),Vo=KC(S,ct,R.canonical);if(!Vo){let fo=F.get(\"text-radial-offset\").evaluate(ct,{},R.canonical);yi=fo?wS(ro,[fo*tu,yy]):F.get(\"text-offset\").evaluate(ct,{},R.canonical).map(lo=>lo*tu)}let Xa=pe?\"center\":F.get(\"text-justify\").evaluate(ct,{},R.canonical),sa=F.get(\"symbol-placement\")===\"point\"?F.get(\"text-max-width\").evaluate(ct,{},R.canonical)*tu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(un)&&(Pr.vertical=Qx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,\"left\",pa,yi,i.ah.vertical,!0,cr,Jt))};if(!pe&&Vo){let fo=new Set;if(Xa===\"auto\")for(let Xn=0;Xn<Vo.values.length;Xn+=2)fo.add(TS(Vo.values[Xn]));else fo.add(Xa);let lo=!1;for(let Xn of fo)if(!Pr.horizontal[Xn])if(lo)Pr.horizontal[Xn]=Pr.horizontal[0];else{let Ro=Qx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,\"center\",Xn,pa,yi,i.ah.horizontal,!1,cr,Jt);Ro&&(Pr.horizontal[Xn]=Ro,lo=Ro.positionedLines.length===1)}Mo()}else{Xa===\"auto\"&&(Xa=TS(ro));let fo=Qx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,Xa,pa,yi,i.ah.horizontal,!1,cr,Jt);fo&&(Pr.horizontal[Xa]=fo),Mo(),Ka(un)&&pe&&Fe&&(Pr.vertical=Qx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,Xa,pa,yi,i.ah.vertical,!1,cr,Jt))}}let vn=!1;if(ct.icon&&ct.icon.name){let un=R.imageMap[ct.icon.name];un&&(ui=eb(R.imagePositions[ct.icon.name],F.get(\"icon-offset\").evaluate(ct,{},R.canonical),F.get(\"icon-anchor\").evaluate(ct,{},R.canonical)),vn=!!un.sdf,R.bucket.sdfIcons===void 0?R.bucket.sdfIcons=vn:R.bucket.sdfIcons!==vn&&A(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),(un.pixelRatio!==R.bucket.pixelRatio||F.get(\"icon-rotate\").constantOr(1)!==0)&&(R.bucket.iconsNeedLinear=!0))}let zi=$C(Pr.horizontal)||Pr.vertical;R.bucket.iconsInText=!!zi&&zi.iconsInText,(zi||ui)&&sO(R.bucket,ct,Pr,ui,R.imageMap,te,cr,mr,yi,vn,R.canonical)}R.showCollisionBoxes&&R.bucket.generateCollisionDebugBuffers()},i.bq=Jv,i.br=Ot,i.bs=so,i.bt=br,i.bu=lS,i.bv=class{constructor(R){this._marks={start:[R.url,\"start\"].join(\"#\"),end:[R.url,\"end\"].join(\"#\"),measure:R.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let R=performance.getEntriesByName(this._marks.measure);return R.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),R=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),R}},i.bw=function(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(b())try{return yield j(R,S,F,W,te)}catch(fe){}return function(fe,pe,Fe,Ke,ct){let Lt=fe.width,Jt=fe.height;N&&H||(N=new OffscreenCanvas(Lt,Jt),H=N.getContext(\"2d\",{willReadFrequently:!0})),N.width=Lt,N.height=Jt,H.drawImage(fe,0,0,Lt,Jt);let cr=H.getImageData(pe,Fe,Ke,ct);return H.clearRect(0,0,Lt,Jt),cr.data}(R,S,F,W,te)})},i.bx=BC,i.by=o,i.bz=s,i.c=oe,i.d=R=>a(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(R)],{type:\"image/png\"});try{return createImageBitmap(S)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((S,F)=>{let W=new Image;W.onload=()=>{S(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"));let te=new Blob([new Uint8Array(R)],{type:\"image/png\"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=Ce,i.h=(R,S)=>Se(L(R,{type:\"json\"}),S),i.i=O,i.j=me,i.k=Pe,i.l=(R,S)=>Se(L(R,{type:\"arrayBuffer\"}),S),i.m=Se,i.n=function(R){return new lS(R).readFields(qQ,[])},i.o=na,i.p=cS,i.q=ue,i.r=Xi,i.s=Ee,i.t=Yi,i.u=ki,i.v=ce,i.w=A,i.x=function([R,S,F]){return S+=90,S*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(S)*Math.sin(F),y:R*Math.sin(S)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r(\"worker\",[\"./shared\"],function(i){\"use strict\";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let tt of Ge){this._layerConfigs[tt.id]=tt;let xt=this._layers[tt.id]=i.aA(tt);xt._featureFilter=i.a7(xt.filter),this.keyCache[tt.id]&&delete this.keyCache[tt.id]}for(let tt of Je)delete this.keyCache[tt],delete this._layerConfigs[tt],delete this._layers[tt];this.familiesBySource={};let We=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let tt of We){let xt=tt.map(ar=>this._layers[ar.id]),Ie=xt[0];if(Ie.visibility===\"none\")continue;let xe=Ie.source||\"\",ke=this.familiesBySource[xe];ke||(ke=this.familiesBySource[xe]={});let vt=Ie.sourceLayer||\"_geojsonTileLayer\",ir=ke[vt];ir||(ir=ke[vt]=[]),ir.push(xt)}}}class o{constructor(Ge){let Je={},We=[];for(let xe in Ge){let ke=Ge[xe],vt=Je[xe]={};for(let ir in ke){let ar=ke[+ir];if(!ar||ar.bitmap.width===0||ar.bitmap.height===0)continue;let vr={x:0,y:0,w:ar.bitmap.width+2,h:ar.bitmap.height+2};We.push(vr),vt[ir]={rect:vr,metrics:ar.metrics}}}let{w:tt,h:xt}=i.p(We),Ie=new i.o({width:tt||1,height:xt||1});for(let xe in Ge){let ke=Ge[xe];for(let vt in ke){let ir=ke[+vt];if(!ir||ir.bitmap.width===0||ir.bitmap.height===0)continue;let ar=Je[xe][vt].rect;i.o.copy(ir.bitmap,Ie,{x:0,y:0},{x:ar.x+1,y:ar.y+1},ir.bitmap)}}this.image=Ie,this.positions=Je}}i.bl(\"GlyphAtlas\",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,We,tt){return i._(this,void 0,void 0,function*(){this.status=\"parsing\",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),Ie=new i.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];let xe={},ke={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:We},vt=Je.familiesBySource[this.source];for(let qn in vt){let Fn=Ge.layers[qn];if(!Fn)continue;Fn.version===1&&i.w(`Vector tile source \"${this.source}\" layer \"${qn}\" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ra=xt.encode(qn),la=[];for(let Ut=0;Ut<Fn.length;Ut++){let wt=Fn.feature(Ut),rr=Ie.getId(wt,qn);la.push({feature:wt,id:rr,index:Ut,sourceLayerIndex:ra})}for(let Ut of vt[qn]){let wt=Ut[0];wt.source!==this.source&&i.w(`layer.source = ${wt.source} does not equal this.source = ${this.source}`),wt.minzoom&&this.zoom<Math.floor(wt.minzoom)||wt.maxzoom&&this.zoom>=wt.maxzoom||wt.visibility!==\"none\"&&(l(Ut,this.zoom,We),(xe[wt.id]=wt.createBucket({index:Ie.bucketLayerIDs.length,layers:Ut,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ra,sourceID:this.source})).populate(la,ke,this.tileID.canonical),Ie.bucketLayerIDs.push(Ut.map(rr=>rr.id)))}}let ir=i.aF(ke.glyphDependencies,qn=>Object.keys(qn).map(Number));this.inFlightDependencies.forEach(qn=>qn==null?void 0:qn.abort()),this.inFlightDependencies=[];let ar=Promise.resolve({});if(Object.keys(ir).length){let qn=new AbortController;this.inFlightDependencies.push(qn),ar=tt.sendAsync({type:\"GG\",data:{stacks:ir,source:this.source,tileID:this.tileID,type:\"glyphs\"}},qn)}let vr=Object.keys(ke.iconDependencies),ii=Promise.resolve({});if(vr.length){let qn=new AbortController;this.inFlightDependencies.push(qn),ii=tt.sendAsync({type:\"GI\",data:{icons:vr,source:this.source,tileID:this.tileID,type:\"icons\"}},qn)}let pi=Object.keys(ke.patternDependencies),$r=Promise.resolve({});if(pi.length){let qn=new AbortController;this.inFlightDependencies.push(qn),$r=tt.sendAsync({type:\"GI\",data:{icons:pi,source:this.source,tileID:this.tileID,type:\"patterns\"}},qn)}let[di,ji,In]=yield Promise.all([ar,ii,$r]),wi=new o(di),On=new i.bo(ji,In);for(let qn in xe){let Fn=xe[qn];Fn instanceof i.a6?(l(Fn.layers,this.zoom,We),i.bp({bucket:Fn,glyphMap:di,glyphPositions:wi.positions,imageMap:ji,imagePositions:On.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fn.hasPattern&&(Fn instanceof i.bq||Fn instanceof i.br||Fn instanceof i.bs)&&(l(Fn.layers,this.zoom,We),Fn.addFeatures(ke,this.tileID.canonical,On.patternPositions))}return this.status=\"done\",{buckets:Object.values(xe).filter(qn=>!qn.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:wi.image,imageAtlas:On,glyphMap:this.returnDependencies?di:null,iconMap:this.returnDependencies?ji:null,glyphPositions:this.returnDependencies?wi.positions:null}})}}function l(dt,Ge,Je){let We=new i.z(Ge);for(let tt of dt)tt.recalculate(We,Je)}class u{constructor(Ge,Je,We){this.actor=Ge,this.layerIndex=Je,this.availableImages=We,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(We.data)),rawData:We.data,cacheControl:We.cacheControl,expires:We.expires}}catch(tt){let xt=new Uint8Array(We.data),Ie=`Unable to parse the tile at ${Ge.request.url}, `;throw Ie+=xt[0]===31&&xt[1]===139?\"please make sure the data is not gzipped and that you have configured the relevant header in the server\":`got error: ${tt.message}`,new Error(Ie)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),tt=new s(Ge);this.loading[Je]=tt;let xt=new AbortController;tt.abort=xt;try{let Ie=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!Ie)return null;let xe=Ie.rawData,ke={};Ie.expires&&(ke.expires=Ie.expires),Ie.cacheControl&&(ke.cacheControl=Ie.cacheControl);let vt={};if(We){let ar=We.finish();ar&&(vt.resourceTiming=JSON.parse(JSON.stringify(ar)))}tt.vectorTile=Ie.vectorTile;let ir=tt.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=tt,this.fetching[Je]={rawTileData:xe,cacheControl:ke,resourceTiming:vt};try{let ar=yield ir;return i.e({rawTileData:xe.slice(0)},ar,ke,vt)}finally{delete this.fetching[Je]}}catch(Ie){throw delete this.loading[Je],tt.status=\"done\",this.loaded[Je]=tt,Ie}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error(\"Should not be trying to reload a tile that was never loaded or has been removed\");let We=this.loaded[Je];if(We.showCollisionBoxes=Ge.showCollisionBoxes,We.status===\"parsing\"){let tt=yield We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:Ie,cacheControl:xe,resourceTiming:ke}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:Ie.slice(0)},tt,xe,ke)}else xt=tt;return xt}if(We.status===\"done\"&&We.vectorTile)return We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,We=Ge.uid;Je&&Je[We]&&Je[We].abort&&(Je[We].abort.abort(),delete Je[We])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:We,rawImageData:tt,redFactor:xt,greenFactor:Ie,blueFactor:xe,baseShift:ke}=Ge,vt=tt.width+2,ir=tt.height+2,ar=i.b(tt)?new i.R({width:vt,height:ir},yield i.bw(tt,-1,-1,vt,ir)):tt,vr=new i.bx(Je,ar,We,xt,Ie,xe,ke);return this.loaded=this.loaded||{},this.loaded[Je]=vr,vr})}removeTile(Ge){let Je=this.loaded,We=Ge.uid;Je&&Je[We]&&delete Je[We]}}function f(dt,Ge){if(dt.length!==0){h(dt[0],Ge);for(var Je=1;Je<dt.length;Je++)h(dt[Je],!Ge)}}function h(dt,Ge){for(var Je=0,We=0,tt=0,xt=dt.length,Ie=xt-1;tt<xt;Ie=tt++){var xe=(dt[tt][0]-dt[Ie][0])*(dt[Ie][1]+dt[tt][1]),ke=Je+xe;We+=Math.abs(Je)>=Math.abs(xe)?Je-ke+xe:xe-ke+Je,Je=ke}Je+We>=0!=!!Ge&&dt.reverse()}var d=i.by(function dt(Ge,Je){var We,tt=Ge&&Ge.type;if(tt===\"FeatureCollection\")for(We=0;We<Ge.features.length;We++)dt(Ge.features[We],Je);else if(tt===\"GeometryCollection\")for(We=0;We<Ge.geometries.length;We++)dt(Ge.geometries[We],Je);else if(tt===\"Feature\")dt(Ge.geometry,Je);else if(tt===\"Polygon\")f(Ge.coordinates,Je);else if(tt===\"MultiPolygon\")for(We=0;We<Ge.coordinates.length;We++)f(Ge.coordinates[We],Je);return Ge});let v=i.bt.VectorTileFeature.prototype.toGeoJSON;var _={exports:{}},b=i.bz,p=i.bt.VectorTileFeature,k=E;function E(dt,Ge){this.options=Ge||{},this.features=dt,this.length=dt.length}function T(dt,Ge){this.id=typeof dt.id==\"number\"?dt.id:void 0,this.type=dt.type,this.rawGeometry=dt.type===1?[dt.geometry]:dt.geometry,this.properties=dt.tags,this.extent=Ge||4096}E.prototype.feature=function(dt){return new T(this.features[dt],this.options.extent)},T.prototype.loadGeometry=function(){var dt=this.rawGeometry;this.geometry=[];for(var Ge=0;Ge<dt.length;Ge++){for(var Je=dt[Ge],We=[],tt=0;tt<Je.length;tt++)We.push(new b(Je[tt][0],Je[tt][1]));this.geometry.push(We)}return this.geometry},T.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var dt=this.geometry,Ge=1/0,Je=-1/0,We=1/0,tt=-1/0,xt=0;xt<dt.length;xt++)for(var Ie=dt[xt],xe=0;xe<Ie.length;xe++){var ke=Ie[xe];Ge=Math.min(Ge,ke.x),Je=Math.max(Je,ke.x),We=Math.min(We,ke.y),tt=Math.max(tt,ke.y)}return[Ge,We,Je,tt]},T.prototype.toGeoJSON=p.prototype.toGeoJSON;var L=i.bA,x=k;function C(dt){var Ge=new L;return function(Je,We){for(var tt in Je.layers)We.writeMessage(3,M,Je.layers[tt])}(dt,Ge),Ge.finish()}function M(dt,Ge){var Je;Ge.writeVarintField(15,dt.version||1),Ge.writeStringField(1,dt.name||\"\"),Ge.writeVarintField(5,dt.extent||4096);var We={keys:[],values:[],keycache:{},valuecache:{}};for(Je=0;Je<dt.length;Je++)We.feature=dt.feature(Je),Ge.writeMessage(2,g,We);var tt=We.keys;for(Je=0;Je<tt.length;Je++)Ge.writeStringField(3,tt[Je]);var xt=We.values;for(Je=0;Je<xt.length;Je++)Ge.writeMessage(4,U,xt[Je])}function g(dt,Ge){var Je=dt.feature;Je.id!==void 0&&Ge.writeVarintField(1,Je.id),Ge.writeMessage(2,P,dt),Ge.writeVarintField(3,Je.type),Ge.writeMessage(4,O,Je)}function P(dt,Ge){var Je=dt.feature,We=dt.keys,tt=dt.values,xt=dt.keycache,Ie=dt.valuecache;for(var xe in Je.properties){var ke=Je.properties[xe],vt=xt[xe];if(ke!==null){vt===void 0&&(We.push(xe),xt[xe]=vt=We.length-1),Ge.writeVarint(vt);var ir=typeof ke;ir!==\"string\"&&ir!==\"boolean\"&&ir!==\"number\"&&(ke=JSON.stringify(ke));var ar=ir+\":\"+ke,vr=Ie[ar];vr===void 0&&(tt.push(ke),Ie[ar]=vr=tt.length-1),Ge.writeVarint(vr)}}}function A(dt,Ge){return(Ge<<3)+(7&dt)}function z(dt){return dt<<1^dt>>31}function O(dt,Ge){for(var Je=dt.loadGeometry(),We=dt.type,tt=0,xt=0,Ie=Je.length,xe=0;xe<Ie;xe++){var ke=Je[xe],vt=1;We===1&&(vt=ke.length),Ge.writeVarint(A(1,vt));for(var ir=We===3?ke.length-1:ke.length,ar=0;ar<ir;ar++){ar===1&&We!==1&&Ge.writeVarint(A(2,ir-1));var vr=ke[ar].x-tt,ii=ke[ar].y-xt;Ge.writeVarint(z(vr)),Ge.writeVarint(z(ii)),tt+=vr,xt+=ii}We===3&&Ge.writeVarint(A(7,1))}}function U(dt,Ge){var Je=typeof dt;Je===\"string\"?Ge.writeStringField(1,dt):Je===\"boolean\"?Ge.writeBooleanField(7,dt):Je===\"number\"&&(dt%1!=0?Ge.writeDoubleField(3,dt):dt<0?Ge.writeSVarintField(6,dt):Ge.writeVarintField(5,dt))}_.exports=C,_.exports.fromVectorTileJs=C,_.exports.fromGeojsonVt=function(dt,Ge){Ge=Ge||{};var Je={};for(var We in dt)Je[We]=new x(dt[We].features,Ge),Je[We].name=We,Je[We].version=Ge.version,Je[We].extent=Ge.extent;return C({layers:Je})},_.exports.GeoJSONWrapper=x;var G=i.by(_.exports);let Z={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:dt=>dt},j=Math.fround||(N=new Float32Array(1),dt=>(N[0]=+dt,N[0]));var N;let H=3,re=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:We,maxZoom:tt}=this.options;Je&&console.time(\"total time\");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let Ie=[];for(let ke=0;ke<Ge.length;ke++){let vt=Ge[ke];if(!vt.geometry)continue;let[ir,ar]=vt.geometry.coordinates,vr=j(ge(ir)),ii=j(ie(ar));Ie.push(vr,ii,1/0,ke,-1,1),this.options.reduce&&Ie.push(0)}let xe=this.trees[tt+1]=this._createTree(Ie);Je&&console.timeEnd(xt);for(let ke=tt;ke>=We;ke--){let vt=+Date.now();xe=this.trees[ke]=this._createTree(this._cluster(xe,ke)),Je&&console.log(\"z%d: %d clusters in %dms\",ke,xe.numItems,+Date.now()-vt)}return Je&&console.timeEnd(\"total time\"),this}getClusters(Ge,Je){let We=((Ge[0]+180)%360+360)%360-180,tt=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)We=-180,xt=180;else if(We>xt){let ar=this.getClusters([We,tt,180,Ie],Je),vr=this.getClusters([-180,tt,xt,Ie],Je);return ar.concat(vr)}let xe=this.trees[this._limitZoom(Je)],ke=xe.range(ge(We),ie(Ie),ge(xt),ie(tt)),vt=xe.data,ir=[];for(let ar of ke){let vr=this.stride*ar;ir.push(vt[vr+re]>1?Ce(vt,vr,this.clusterProps):this.points[vt[vr+H]])}return ir}getChildren(Ge){let Je=this._getOriginId(Ge),We=this._getOriginZoom(Ge),tt=\"No cluster with the specified id.\",xt=this.trees[We];if(!xt)throw new Error(tt);let Ie=xt.data;if(Je*this.stride>=Ie.length)throw new Error(tt);let xe=this.options.radius/(this.options.extent*Math.pow(2,We-1)),ke=xt.within(Ie[Je*this.stride],Ie[Je*this.stride+1],xe),vt=[];for(let ir of ke){let ar=ir*this.stride;Ie[ar+4]===Ge&&vt.push(Ie[ar+re]>1?Ce(Ie,ar,this.clusterProps):this.points[Ie[ar+H]])}if(vt.length===0)throw new Error(tt);return vt}getLeaves(Ge,Je,We){let tt=[];return this._appendLeaves(tt,Ge,Je=Je||10,We=We||0,0),tt}getTile(Ge,Je,We){let tt=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:Ie,radius:xe}=this.options,ke=xe/Ie,vt=(We-ke)/xt,ir=(We+1+ke)/xt,ar={features:[]};return this._addTileFeatures(tt.range((Je-ke)/xt,vt,(Je+1+ke)/xt,ir),tt.data,Je,We,xt,ar),Je===0&&this._addTileFeatures(tt.range(1-ke/xt,vt,1,ir),tt.data,xt,We,xt,ar),Je===xt-1&&this._addTileFeatures(tt.range(0,vt,ke/xt,ir),tt.data,-1,We,xt,ar),ar.features.length?ar:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let We=this.getChildren(Ge);if(Je++,We.length!==1)break;Ge=We[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,We,tt,xt){let Ie=this.getChildren(Je);for(let xe of Ie){let ke=xe.properties;if(ke&&ke.cluster?xt+ke.point_count<=tt?xt+=ke.point_count:xt=this._appendLeaves(Ge,ke.cluster_id,We,tt,xt):xt<tt?xt++:Ge.push(xe),Ge.length===We)break}return xt}_createTree(Ge){let Je=new i.av(Ge.length/this.stride|0,this.options.nodeSize,Float32Array);for(let We=0;We<Ge.length;We+=this.stride)Je.add(Ge[We],Ge[We+1]);return Je.finish(),Je.data=Ge,Je}_addTileFeatures(Ge,Je,We,tt,xt,Ie){for(let xe of Ge){let ke=xe*this.stride,vt=Je[ke+re]>1,ir,ar,vr;if(vt)ir=Le(Je,ke,this.clusterProps),ar=Je[ke],vr=Je[ke+1];else{let $r=this.points[Je[ke+H]];ir=$r.properties;let[di,ji]=$r.geometry.coordinates;ar=ge(di),vr=ie(ji)}let ii={type:1,geometry:[[Math.round(this.options.extent*(ar*xt-We)),Math.round(this.options.extent*(vr*xt-tt))]],tags:ir},pi;pi=vt||this.options.generateId?Je[ke+H]:this.points[Je[ke+H]].id,pi!==void 0&&(ii.id=pi),Ie.features.push(ii)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:We,extent:tt,reduce:xt,minPoints:Ie}=this.options,xe=We/(tt*Math.pow(2,Je)),ke=Ge.data,vt=[],ir=this.stride;for(let ar=0;ar<ke.length;ar+=ir){if(ke[ar+2]<=Je)continue;ke[ar+2]=Je;let vr=ke[ar],ii=ke[ar+1],pi=Ge.within(ke[ar],ke[ar+1],xe),$r=ke[ar+re],di=$r;for(let ji of pi){let In=ji*ir;ke[In+2]>Je&&(di+=ke[In+re])}if(di>$r&&di>=Ie){let ji,In=vr*$r,wi=ii*$r,On=-1,qn=((ar/ir|0)<<5)+(Je+1)+this.points.length;for(let Fn of pi){let ra=Fn*ir;if(ke[ra+2]<=Je)continue;ke[ra+2]=Je;let la=ke[ra+re];In+=ke[ra]*la,wi+=ke[ra+1]*la,ke[ra+4]=qn,xt&&(ji||(ji=this._map(ke,ar,!0),On=this.clusterProps.length,this.clusterProps.push(ji)),xt(ji,this._map(ke,ra)))}ke[ar+4]=qn,vt.push(In/di,wi/di,1/0,qn,-1,di),xt&&vt.push(On)}else{for(let ji=0;ji<ir;ji++)vt.push(ke[ar+ji]);if(di>1)for(let ji of pi){let In=ji*ir;if(!(ke[In+2]<=Je)){ke[In+2]=Je;for(let wi=0;wi<ir;wi++)vt.push(ke[In+wi])}}}}return vt}_getOriginId(Ge){return Ge-this.points.length>>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,We){if(Ge[Je+re]>1){let Ie=this.clusterProps[Ge[Je+oe]];return We?Object.assign({},Ie):Ie}let tt=this.points[Ge[Je+H]].properties,xt=this.options.map(tt);return We&&xt===tt?Object.assign({},xt):xt}}function Ce(dt,Ge,Je){return{type:\"Feature\",id:dt[Ge+H],properties:Le(dt,Ge,Je),geometry:{type:\"Point\",coordinates:[(We=dt[Ge],360*(We-.5)),Se(dt[Ge+1])]}};var We}function Le(dt,Ge,Je){let We=dt[Ge+re],tt=We>=1e4?`${Math.round(We/1e3)}k`:We>=1e3?Math.round(We/100)/10+\"k\":We,xt=dt[Ge+oe],Ie=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(Ie,{cluster:!0,cluster_id:dt[Ge+H],point_count:We,point_count_abbreviated:tt})}function ge(dt){return dt/360+.5}function ie(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(dt){let Ge=(180-360*dt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Ee(dt,Ge,Je,We){let tt=We,xt=Ge+(Je-Ge>>1),Ie,xe=Je-Ge,ke=dt[Ge],vt=dt[Ge+1],ir=dt[Je],ar=dt[Je+1];for(let vr=Ge+3;vr<Je;vr+=3){let ii=Ae(dt[vr],dt[vr+1],ke,vt,ir,ar);if(ii>tt)Ie=vr,tt=ii;else if(ii===tt){let pi=Math.abs(vr-xt);pi<xe&&(Ie=vr,xe=pi)}}tt>We&&(Ie-Ge>3&&Ee(dt,Ge,Ie,We),dt[Ie+2]=tt,Je-Ie>3&&Ee(dt,Ie,Je,We))}function Ae(dt,Ge,Je,We,tt,xt){let Ie=tt-Je,xe=xt-We;if(Ie!==0||xe!==0){let ke=((dt-Je)*Ie+(Ge-We)*xe)/(Ie*Ie+xe*xe);ke>1?(Je=tt,We=xt):ke>0&&(Je+=Ie*ke,We+=xe*ke)}return Ie=dt-Je,xe=Ge-We,Ie*Ie+xe*xe}function Be(dt,Ge,Je,We){let tt={id:dt==null?null:dt,type:Ge,geometry:Je,tags:We,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge===\"Point\"||Ge===\"MultiPoint\"||Ge===\"LineString\")Pe(tt,Je);else if(Ge===\"Polygon\")Pe(tt,Je[0]);else if(Ge===\"MultiLineString\")for(let xt of Je)Pe(tt,xt);else if(Ge===\"MultiPolygon\")for(let xt of Je)Pe(tt,xt[0]);return tt}function Pe(dt,Ge){for(let Je=0;Je<Ge.length;Je+=3)dt.minX=Math.min(dt.minX,Ge[Je]),dt.minY=Math.min(dt.minY,Ge[Je+1]),dt.maxX=Math.max(dt.maxX,Ge[Je]),dt.maxY=Math.max(dt.maxY,Ge[Je+1])}function me(dt,Ge,Je,We){if(!Ge.geometry)return;let tt=Ge.geometry.coordinates;if(tt&&tt.length===0)return;let xt=Ge.geometry.type,Ie=Math.pow(Je.tolerance/((1<<Je.maxZoom)*Je.extent),2),xe=[],ke=Ge.id;if(Je.promoteId?ke=Ge.properties[Je.promoteId]:Je.generateId&&(ke=We||0),xt===\"Point\")De(tt,xe);else if(xt===\"MultiPoint\")for(let vt of tt)De(vt,xe);else if(xt===\"LineString\")ce(tt,xe,Ie,!1);else if(xt===\"MultiLineString\"){if(Je.lineMetrics){for(let vt of tt)xe=[],ce(vt,xe,Ie,!1),dt.push(Be(ke,\"LineString\",xe,Ge.properties));return}je(tt,xe,Ie,!1)}else if(xt===\"Polygon\")je(tt,xe,Ie,!0);else{if(xt!==\"MultiPolygon\"){if(xt===\"GeometryCollection\"){for(let vt of Ge.geometry.geometries)me(dt,{id:ke,geometry:vt,properties:Ge.properties},Je,We);return}throw new Error(\"Input data is not a valid GeoJSON object.\")}for(let vt of tt){let ir=[];je(vt,ir,Ie,!0),xe.push(ir)}}dt.push(Be(ke,xt,xe,Ge.properties))}function De(dt,Ge){Ge.push(lt(dt[0]),pt(dt[1]),0)}function ce(dt,Ge,Je,We){let tt,xt,Ie=0;for(let ke=0;ke<dt.length;ke++){let vt=lt(dt[ke][0]),ir=pt(dt[ke][1]);Ge.push(vt,ir,0),ke>0&&(Ie+=We?(tt*ir-vt*xt)/2:Math.sqrt(Math.pow(vt-tt,2)+Math.pow(ir-xt,2))),tt=vt,xt=ir}let xe=Ge.length-3;Ge[2]=1,Ee(Ge,0,xe,Je),Ge[xe+2]=1,Ge.size=Math.abs(Ie),Ge.start=0,Ge.end=Ge.size}function je(dt,Ge,Je,We){for(let tt=0;tt<dt.length;tt++){let xt=[];ce(dt[tt],xt,Je,We),Ge.push(xt)}}function lt(dt){return dt/360+.5}function pt(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Vt(dt,Ge,Je,We,tt,xt,Ie,xe){if(We/=Ge,xt>=(Je/=Ge)&&Ie<We)return dt;if(Ie<Je||xt>=We)return null;let ke=[];for(let vt of dt){let ir=vt.geometry,ar=vt.type,vr=tt===0?vt.minX:vt.minY,ii=tt===0?vt.maxX:vt.maxY;if(vr>=Je&&ii<We){ke.push(vt);continue}if(ii<Je||vr>=We)continue;let pi=[];if(ar===\"Point\"||ar===\"MultiPoint\")ot(ir,pi,Je,We,tt);else if(ar===\"LineString\")ut(ir,pi,Je,We,tt,!1,xe.lineMetrics);else if(ar===\"MultiLineString\")Nt(ir,pi,Je,We,tt,!1);else if(ar===\"Polygon\")Nt(ir,pi,Je,We,tt,!0);else if(ar===\"MultiPolygon\")for(let $r of ir){let di=[];Nt($r,di,Je,We,tt,!0),di.length&&pi.push(di)}if(pi.length){if(xe.lineMetrics&&ar===\"LineString\"){for(let $r of pi)ke.push(Be(vt.id,ar,$r,vt.tags));continue}ar!==\"LineString\"&&ar!==\"MultiLineString\"||(pi.length===1?(ar=\"LineString\",pi=pi[0]):ar=\"MultiLineString\"),ar!==\"Point\"&&ar!==\"MultiPoint\"||(ar=pi.length===3?\"Point\":\"MultiPoint\"),ke.push(Be(vt.id,ar,pi,vt.tags))}}return ke.length?ke:null}function ot(dt,Ge,Je,We,tt){for(let xt=0;xt<dt.length;xt+=3){let Ie=dt[xt+tt];Ie>=Je&&Ie<=We&&$t(Ge,dt[xt],dt[xt+1],dt[xt+2])}}function ut(dt,Ge,Je,We,tt,xt,Ie){let xe=Wt(dt),ke=tt===0?sr:Tr,vt,ir,ar=dt.start;for(let di=0;di<dt.length-3;di+=3){let ji=dt[di],In=dt[di+1],wi=dt[di+2],On=dt[di+3],qn=dt[di+4],Fn=tt===0?ji:In,ra=tt===0?On:qn,la=!1;Ie&&(vt=Math.sqrt(Math.pow(ji-On,2)+Math.pow(In-qn,2))),Fn<Je?ra>Je&&(ir=ke(xe,ji,In,On,qn,Je),Ie&&(xe.start=ar+vt*ir)):Fn>We?ra<We&&(ir=ke(xe,ji,In,On,qn,We),Ie&&(xe.start=ar+vt*ir)):$t(xe,ji,In,wi),ra<Je&&Fn>=Je&&(ir=ke(xe,ji,In,On,qn,Je),la=!0),ra>We&&Fn<=We&&(ir=ke(xe,ji,In,On,qn,We),la=!0),!xt&&la&&(Ie&&(xe.end=ar+vt*ir),Ge.push(xe),xe=Wt(dt)),Ie&&(ar+=vt)}let vr=dt.length-3,ii=dt[vr],pi=dt[vr+1],$r=tt===0?ii:pi;$r>=Je&&$r<=We&&$t(xe,ii,pi,dt[vr+2]),vr=xe.length-3,xt&&vr>=3&&(xe[vr]!==xe[0]||xe[vr+1]!==xe[1])&&$t(xe,xe[0],xe[1],xe[2]),xe.length&&Ge.push(xe)}function Wt(dt){let Ge=[];return Ge.size=dt.size,Ge.start=dt.start,Ge.end=dt.end,Ge}function Nt(dt,Ge,Je,We,tt,xt){for(let Ie of dt)ut(Ie,Ge,Je,We,tt,xt,!1)}function $t(dt,Ge,Je,We){dt.push(Ge,Je,We)}function sr(dt,Ge,Je,We,tt,xt){let Ie=(xt-Ge)/(We-Ge);return $t(dt,xt,Je+(tt-Je)*Ie,1),Ie}function Tr(dt,Ge,Je,We,tt,xt){let Ie=(xt-Je)/(tt-Je);return $t(dt,Ge+(We-Ge)*Ie,xt,1),Ie}function fr(dt,Ge){let Je=[];for(let We=0;We<dt.length;We++){let tt=dt[We],xt=tt.type,Ie;if(xt===\"Point\"||xt===\"MultiPoint\"||xt===\"LineString\")Ie=$e(tt.geometry,Ge);else if(xt===\"MultiLineString\"||xt===\"Polygon\"){Ie=[];for(let xe of tt.geometry)Ie.push($e(xe,Ge))}else if(xt===\"MultiPolygon\"){Ie=[];for(let xe of tt.geometry){let ke=[];for(let vt of xe)ke.push($e(vt,Ge));Ie.push(ke)}}Je.push(Be(tt.id,xt,Ie,tt.tags))}return Je}function $e(dt,Ge){let Je=[];Je.size=dt.size,dt.start!==void 0&&(Je.start=dt.start,Je.end=dt.end);for(let We=0;We<dt.length;We+=3)Je.push(dt[We]+Ge,dt[We+1],dt[We+2]);return Je}function St(dt,Ge){if(dt.transformed)return dt;let Je=1<<dt.z,We=dt.x,tt=dt.y;for(let xt of dt.features){let Ie=xt.geometry,xe=xt.type;if(xt.geometry=[],xe===1)for(let ke=0;ke<Ie.length;ke+=2)xt.geometry.push(Qt(Ie[ke],Ie[ke+1],Ge,Je,We,tt));else for(let ke=0;ke<Ie.length;ke++){let vt=[];for(let ir=0;ir<Ie[ke].length;ir+=2)vt.push(Qt(Ie[ke][ir],Ie[ke][ir+1],Ge,Je,We,tt));xt.geometry.push(vt)}}return dt.transformed=!0,dt}function Qt(dt,Ge,Je,We,tt,xt){return[Math.round(Je*(dt*We-tt)),Math.round(Je*(Ge*We-xt))]}function Gt(dt,Ge,Je,We,tt){let xt=Ge===tt.maxZoom?0:tt.tolerance/((1<<Ge)*tt.extent),Ie={features:[],numPoints:0,numSimplified:0,numFeatures:dt.length,source:null,x:Je,y:We,z:Ge,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let xe of dt)_t(Ie,xe,xt,tt);return Ie}function _t(dt,Ge,Je,We){let tt=Ge.geometry,xt=Ge.type,Ie=[];if(dt.minX=Math.min(dt.minX,Ge.minX),dt.minY=Math.min(dt.minY,Ge.minY),dt.maxX=Math.max(dt.maxX,Ge.maxX),dt.maxY=Math.max(dt.maxY,Ge.maxY),xt===\"Point\"||xt===\"MultiPoint\")for(let xe=0;xe<tt.length;xe+=3)Ie.push(tt[xe],tt[xe+1]),dt.numPoints++,dt.numSimplified++;else if(xt===\"LineString\")It(Ie,tt,dt,Je,!1,!1);else if(xt===\"MultiLineString\"||xt===\"Polygon\")for(let xe=0;xe<tt.length;xe++)It(Ie,tt[xe],dt,Je,xt===\"Polygon\",xe===0);else if(xt===\"MultiPolygon\")for(let xe=0;xe<tt.length;xe++){let ke=tt[xe];for(let vt=0;vt<ke.length;vt++)It(Ie,ke[vt],dt,Je,!0,vt===0)}if(Ie.length){let xe=Ge.tags||null;if(xt===\"LineString\"&&We.lineMetrics){xe={};for(let vt in Ge.tags)xe[vt]=Ge.tags[vt];xe.mapbox_clip_start=tt.start/tt.size,xe.mapbox_clip_end=tt.end/tt.size}let ke={geometry:Ie,type:xt===\"Polygon\"||xt===\"MultiPolygon\"?3:xt===\"LineString\"||xt===\"MultiLineString\"?2:1,tags:xe};Ge.id!==null&&(ke.id=Ge.id),dt.features.push(ke)}}function It(dt,Ge,Je,We,tt,xt){let Ie=We*We;if(We>0&&Ge.size<(tt?Ie:We))return void(Je.numPoints+=Ge.length/3);let xe=[];for(let ke=0;ke<Ge.length;ke+=3)(We===0||Ge[ke+2]>Ie)&&(Je.numSimplified++,xe.push(Ge[ke],Ge[ke+1])),Je.numPoints++;tt&&function(ke,vt){let ir=0;for(let ar=0,vr=ke.length,ii=vr-2;ar<vr;ii=ar,ar+=2)ir+=(ke[ar]-ke[ii])*(ke[ar+1]+ke[ii+1]);if(ir>0===vt)for(let ar=0,vr=ke.length;ar<vr/2;ar+=2){let ii=ke[ar],pi=ke[ar+1];ke[ar]=ke[vr-2-ar],ke[ar+1]=ke[vr-1-ar],ke[vr-2-ar]=ii,ke[vr-1-ar]=pi}}(xe,xt),dt.push(xe)}let mt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class er{constructor(Ge,Je){let We=(Je=this.options=function(xt,Ie){for(let xe in Ie)xt[xe]=Ie[xe];return xt}(Object.create(mt),Je)).debug;if(We&&console.time(\"preprocess data\"),Je.maxZoom<0||Je.maxZoom>24)throw new Error(\"maxZoom should be in the 0-24 range\");if(Je.promoteId&&Je.generateId)throw new Error(\"promoteId and generateId cannot be used together.\");let tt=function(xt,Ie){let xe=[];if(xt.type===\"FeatureCollection\")for(let ke=0;ke<xt.features.length;ke++)me(xe,xt.features[ke],Ie,ke);else me(xe,xt.type===\"Feature\"?xt:{geometry:xt},Ie);return xe}(Ge,Je);this.tiles={},this.tileCoords=[],We&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",Je.indexMaxZoom,Je.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),tt=function(xt,Ie){let xe=Ie.buffer/Ie.extent,ke=xt,vt=Vt(xt,1,-1-xe,xe,0,-1,2,Ie),ir=Vt(xt,1,1-xe,2+xe,0,-1,2,Ie);return(vt||ir)&&(ke=Vt(xt,1,-xe,1+xe,0,-1,2,Ie)||[],vt&&(ke=fr(vt,1).concat(ke)),ir&&(ke=ke.concat(fr(ir,-1)))),ke}(tt,Je),tt.length&&this.splitTile(tt,0,0,0),We&&(tt.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}splitTile(Ge,Je,We,tt,xt,Ie,xe){let ke=[Ge,Je,We,tt],vt=this.options,ir=vt.debug;for(;ke.length;){tt=ke.pop(),We=ke.pop(),Je=ke.pop(),Ge=ke.pop();let ar=1<<Je,vr=lr(Je,We,tt),ii=this.tiles[vr];if(!ii&&(ir>1&&console.time(\"creation\"),ii=this.tiles[vr]=Gt(Ge,Je,We,tt,vt),this.tileCoords.push({z:Je,x:We,y:tt}),ir)){ir>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",Je,We,tt,ii.numFeatures,ii.numPoints,ii.numSimplified),console.timeEnd(\"creation\"));let la=`z${Je}`;this.stats[la]=(this.stats[la]||0)+1,this.total++}if(ii.source=Ge,xt==null){if(Je===vt.indexMaxZoom||ii.numPoints<=vt.indexMaxPoints)continue}else{if(Je===vt.maxZoom||Je===xt)continue;if(xt!=null){let la=xt-Je;if(We!==Ie>>la||tt!==xe>>la)continue}}if(ii.source=null,Ge.length===0)continue;ir>1&&console.time(\"clipping\");let pi=.5*vt.buffer/vt.extent,$r=.5-pi,di=.5+pi,ji=1+pi,In=null,wi=null,On=null,qn=null,Fn=Vt(Ge,ar,We-pi,We+di,0,ii.minX,ii.maxX,vt),ra=Vt(Ge,ar,We+$r,We+ji,0,ii.minX,ii.maxX,vt);Ge=null,Fn&&(In=Vt(Fn,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),wi=Vt(Fn,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),Fn=null),ra&&(On=Vt(ra,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),qn=Vt(ra,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),ra=null),ir>1&&console.timeEnd(\"clipping\"),ke.push(In||[],Je+1,2*We,2*tt),ke.push(wi||[],Je+1,2*We,2*tt+1),ke.push(On||[],Je+1,2*We+1,2*tt),ke.push(qn||[],Je+1,2*We+1,2*tt+1)}}getTile(Ge,Je,We){Ge=+Ge,Je=+Je,We=+We;let tt=this.options,{extent:xt,debug:Ie}=tt;if(Ge<0||Ge>24)return null;let xe=1<<Ge,ke=lr(Ge,Je=Je+xe&xe-1,We);if(this.tiles[ke])return St(this.tiles[ke],xt);Ie>1&&console.log(\"drilling down to z%d-%d-%d\",Ge,Je,We);let vt,ir=Ge,ar=Je,vr=We;for(;!vt&&ir>0;)ir--,ar>>=1,vr>>=1,vt=this.tiles[lr(ir,ar,vr)];return vt&&vt.source?(Ie>1&&(console.log(\"found parent tile z%d-%d-%d\",ir,ar,vr),console.time(\"drilling down\")),this.splitTile(vt.source,ir,ar,vr,Ge,Je,We),Ie>1&&console.timeEnd(\"drilling down\"),this.tiles[ke]?St(this.tiles[ke],xt):null):null}}function lr(dt,Ge,Je){return 32*((1<<dt)*Je+Ge)+dt}function wr(dt,Ge){return Ge?dt.properties[Ge]:dt.id}function Lr(dt,Ge){if(dt==null)return!0;if(dt.type===\"Feature\")return wr(dt,Ge)!=null;if(dt.type===\"FeatureCollection\"){let Je=new Set;for(let We of dt.features){let tt=wr(We,Ge);if(tt==null||Je.has(tt))return!1;Je.add(tt)}return!0}return!1}function ti(dt,Ge){let Je=new Map;if(dt!=null)if(dt.type===\"Feature\")Je.set(wr(dt,Ge),dt);else for(let We of dt.features)Je.set(wr(We,Ge),We);return Je}class Br extends u{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=Ge.tileID.canonical;if(!this._geoJSONIndex)throw new Error(\"Unable to parse the data into a cluster or geojson\");let tt=this._geoJSONIndex.getTile(We.z,We.x,We.y);if(!tt)return null;let xt=new class{constructor(xe){this.layers={_geojsonTileLayer:this},this.name=\"_geojsonTileLayer\",this.extent=i.X,this.length=xe.length,this._features=xe}feature(xe){return new class{constructor(ke){this._feature=ke,this.extent=i.X,this.type=ke.type,this.properties=ke.tags,\"id\"in ke&&!isNaN(ke.id)&&(this.id=parseInt(ke.id,10))}loadGeometry(){if(this._feature.type===1){let ke=[];for(let vt of this._feature.geometry)ke.push([new i.P(vt[0],vt[1])]);return ke}{let ke=[];for(let vt of this._feature.geometry){let ir=[];for(let ar of vt)ir.push(new i.P(ar[0],ar[1]));ke.push(ir)}return ke}}toGeoJSON(ke,vt,ir){return v.call(this,ke,vt,ir)}}(this._features[xe])}}(tt.features),Ie=G(xt);return Ie.byteOffset===0&&Ie.byteLength===Ie.buffer.byteLength||(Ie=new Uint8Array(Ie)),{vectorTile:xt,rawData:Ie.buffer}})}loadData(Ge){return i._(this,void 0,void 0,function*(){var Je;(Je=this._pendingRequest)===null||Je===void 0||Je.abort();let We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Ge,this._pendingRequest),this._geoJSONIndex=Ge.cluster?new _e(function({superclusterOptions:Ie,clusterProperties:xe}){if(!xe||!Ie)return Ie;let ke={},vt={},ir={accumulated:null,zoom:0},ar={properties:null},vr=Object.keys(xe);for(let ii of vr){let[pi,$r]=xe[ii],di=i.bC($r),ji=i.bC(typeof pi==\"string\"?[pi,[\"accumulated\"],[\"get\",ii]]:pi);ke[ii]=di.value,vt[ii]=ji.value}return Ie.map=ii=>{ar.properties=ii;let pi={};for(let $r of vr)pi[$r]=ke[$r].evaluate(ir,ar);return pi},Ie.reduce=(ii,pi)=>{ar.properties=pi;for(let $r of vr)ir.accumulated=ii[$r],ii[$r]=vt[$r].evaluate(ir,ar)},Ie}(Ge)).load((yield this._pendingData).features):(tt=yield this._pendingData,new er(tt,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(We){let Ie=We.finish();Ie&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(Ie)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var tt})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof We!=\"object\")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(We,!0),Ge.filter){let tt=i.bC(Ge.filter,{type:\"boolean\",\"property-type\":\"data-driven\",overridable:!1,transition:!1});if(tt.result===\"error\")throw new Error(tt.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(\", \"));We={type:\"FeatureCollection\",features:We.features.filter(Ie=>tt.value.evaluate({zoom:0},Ie))}}return We})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:We}=Ge;if(Ge.request){let tt=yield i.h(Ge.request,Je);return this._dataUpdateable=Lr(tt.data,We)?ti(tt.data,We):void 0,tt.data}if(typeof Ge.data==\"string\")try{let tt=JSON.parse(Ge.data);return this._dataUpdateable=Lr(tt,We)?ti(tt,We):void 0,tt}catch(tt){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(tt,xt,Ie){var xe,ke,vt,ir;if(xt.removeAll&&tt.clear(),xt.remove)for(let ar of xt.remove)tt.delete(ar);if(xt.add)for(let ar of xt.add){let vr=wr(ar,Ie);vr!=null&&tt.set(vr,ar)}if(xt.update)for(let ar of xt.update){let vr=tt.get(ar.id);if(vr==null)continue;let ii=!ar.removeAllProperties&&(((xe=ar.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((ke=ar.addOrUpdateProperties)===null||ke===void 0?void 0:ke.length)>0);if((ar.newGeometry||ar.removeAllProperties||ii)&&(vr=Object.assign({},vr),tt.set(ar.id,vr),ii&&(vr.properties=Object.assign({},vr.properties))),ar.newGeometry&&(vr.geometry=ar.newGeometry),ar.removeAllProperties)vr.properties={};else if(((vt=ar.removeProperties)===null||vt===void 0?void 0:vt.length)>0)for(let pi of ar.removeProperties)Object.prototype.hasOwnProperty.call(vr.properties,pi)&&delete vr.properties[pi];if(((ir=ar.addOrUpdateProperties)===null||ir===void 0?void 0:ir.length)>0)for(let{key:pi,value:$r}of ar.addOrUpdateProperties)vr.properties[pi]=$r}}(this._dataUpdateable,Ge.dataDiff,We),{type:\"FeatureCollection\",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class Vr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,We)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name \"${Je}\" already registered.`);this.externalWorkerSourceTypes[Je]=We},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error(\"RTL text plugin already registered.\");i.bD.setMethods(Je)},this.actor.registerMessageHandler(\"LDT\",(Je,We)=>this._getDEMWorkerSource(Je,We.source).loadTile(We)),this.actor.registerMessageHandler(\"RDT\",(Je,We)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,We.source).removeTile(We)})),this.actor.registerMessageHandler(\"GCEZ\",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterExpansionZoom(We)})),this.actor.registerMessageHandler(\"GCC\",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterChildren(We)})),this.actor.registerMessageHandler(\"GCL\",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterLeaves(We)})),this.actor.registerMessageHandler(\"LD\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadData(We)),this.actor.registerMessageHandler(\"GD\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).getData()),this.actor.registerMessageHandler(\"LT\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadTile(We)),this.actor.registerMessageHandler(\"RT\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).reloadTile(We)),this.actor.registerMessageHandler(\"AT\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).abortTile(We)),this.actor.registerMessageHandler(\"RMT\",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).removeTile(We)),this.actor.registerMessageHandler(\"RS\",(Je,We)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][We.type]||!this.workerSources[Je][We.type][We.source])return;let tt=this.workerSources[Je][We.type][We.source];delete this.workerSources[Je][We.type][We.source],tt.removeSource!==void 0&&tt.removeSource(We)})),this.actor.registerMessageHandler(\"RM\",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler(\"SR\",(Je,We)=>i._(this,void 0,void 0,function*(){this.referrer=We})),this.actor.registerMessageHandler(\"SRPS\",(Je,We)=>this._syncRTLPluginState(Je,We)),this.actor.registerMessageHandler(\"IS\",(Je,We)=>i._(this,void 0,void 0,function*(){this.self.importScripts(We)})),this.actor.registerMessageHandler(\"SI\",(Je,We)=>this._setImages(Je,We)),this.actor.registerMessageHandler(\"UL\",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(We.layers,We.removedIds)})),this.actor.registerMessageHandler(\"SL\",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(We)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let We in this.workerSources[Ge]){let tt=this.workerSources[Ge][We];for(let xt in tt)tt[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!==\"loading\")return i.bD.setState(Je),Je;let We=Je.pluginURL;if(this.self.importScripts(We),i.bD.isParsed()){let tt={pluginStatus:\"loaded\",pluginURL:We};return i.bD.setState(tt),tt}throw i.bD.setState({pluginStatus:\"error\",pluginURL:\"\"}),new Error(`RTL Text Plugin failed to import scripts from ${We}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,We){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][We]){let tt={sendAsync:(xt,Ie)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,Ie))};switch(Je){case\"vector\":this.workerSources[Ge][Je][We]=new u(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case\"geojson\":this.workerSources[Ge][Je][We]=new Br(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][We]=new this.externalWorkerSourceTypes[Je](tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][We]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new Vr(self)),Vr}),r(\"index\",[\"exports\",\"./shared\"],function(i,a){\"use strict\";var o=\"4.7.1\";let s,l,u={now:typeof performance!=\"undefined\"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener(\"abort\",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement(\"canvas\"),B=w.getContext(\"2d\",{willReadFrequently:!0});if(!B)throw new Error(\"failed to create canvas 2d context\");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement(\"a\")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!=\"undefined\"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia(\"(prefers-reduced-motion: reduce)\")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B<w.length;B++)if(w[B]in c.docStyle)return w[B];return w[0]}static create(w,B,Q){let ee=window.document.createElement(w);return B!==void 0&&(ee.className=B),Q&&Q.appendChild(ee),ee}static createNS(w,B){return window.document.createElementNS(w,B)}static disableDrag(){c.docStyle&&c.selectProp&&(c.userSelect=c.docStyle[c.selectProp],c.docStyle[c.selectProp]=\"none\")}static enableDrag(){c.docStyle&&c.selectProp&&(c.docStyle[c.selectProp]=c.userSelect)}static setTransform(w,B){w.style[c.transformProp]=B}static addEventListener(w,B,Q,ee={}){w.addEventListener(B,Q,\"passive\"in ee?ee:ee.capture)}static removeEventListener(w,B,Q,ee={}){w.removeEventListener(B,Q,\"passive\"in ee?ee:ee.capture)}static suppressClickInternal(w){w.preventDefault(),w.stopPropagation(),window.removeEventListener(\"click\",c.suppressClickInternal,!0)}static suppressClick(){window.addEventListener(\"click\",c.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener(\"click\",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le<B.length;le++)Q.push(c.getPoint(w,ee,B[le]));return Q}static mouseButton(w){return w.button}static remove(w){w.parentNode&&w.parentNode.removeChild(w)}}c.docStyle=typeof window!=\"undefined\"&&window.document&&window.document.documentElement.style,c.selectProp=c.testProp([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]),c.transformProp=c.testProp([\"transform\",\"WebkitTransform\"]);let f={supported:!1,testSupport:function(ue){!v&&d&&(_?b(ue):h=ue)}},h,d,v=!1,_=!1;function b(ue){let w=ue.createTexture();ue.bindTexture(ue.TEXTURE_2D,w);try{if(ue.texImage2D(ue.TEXTURE_2D,0,ue.RGBA,ue.RGBA,ue.UNSIGNED_BYTE,d),ue.isContextLost())return;f.supported=!0}catch(B){}ue.deleteTexture(w),v=!0}var p;typeof document!=\"undefined\"&&(d=document.createElement(\"img\"),d.onload=()=>{h&&b(h),h=null,_=!0},d.onerror=()=>{v=!0,h=null},d.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\"),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=st=>{let Tt=Q++;return ee[Tt]=st,Tt},ue.removeThrottleControl=st=>{delete ee[st],Oe()},ue.getImage=(st,Tt,Yt=!0)=>new Promise((Kt,xr)=>{f.supported&&(st.headers||(st.headers={}),st.headers.accept=\"image/webp,*/*\"),a.e(st,{type:\"image\"}),w.push({abortController:Tt,requestParameters:st,supportImageRefresh:Yt,state:\"queued\",onError:Ir=>{xr(Ir)},onSuccess:Ir=>{Kt(Ir)}}),Oe()});let le=st=>a._(this,void 0,void 0,function*(){st.state=\"running\";let{requestParameters:Tt,supportImageRefresh:Yt,onError:Kt,onSuccess:xr,abortController:Ir}=st,ve=Yt===!1&&!a.i(self)&&!a.g(Tt.url)&&(!Tt.headers||Object.keys(Tt.headers).reduce((qe,et)=>qe&&et===\"accept\",!0));B++;let be=ve?Ze(Tt,Ir):a.m(Tt,Ir);try{let qe=yield be;delete st.abortController,st.state=\"completed\",qe.data instanceof HTMLImageElement||a.b(qe.data)?xr(qe):qe.data&&xr({data:yield(Re=qe.data,typeof createImageBitmap==\"function\"?a.d(Re):a.f(Re)),cacheControl:qe.cacheControl,expires:qe.expires})}catch(qe){delete st.abortController,Kt(qe)}finally{B--,Oe()}var Re}),Oe=()=>{let st=(()=>{for(let Tt of Object.keys(ee))if(ee[Tt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tt=B;Tt<st&&w.length>0;Tt++){let Yt=w.shift();Yt.abortController.signal.aborted?Tt--:le(Yt)}},Ze=(st,Tt)=>new Promise((Yt,Kt)=>{let xr=new Image,Ir=st.url,ve=st.credentials;ve&&ve===\"include\"?xr.crossOrigin=\"use-credentials\":(ve&&ve===\"same-origin\"||!a.s(Ir))&&(xr.crossOrigin=\"anonymous\"),Tt.signal.addEventListener(\"abort\",()=>{xr.src=\"\",Kt(a.c())}),xr.fetchPriority=\"high\",xr.onload=()=>{xr.onerror=xr.onload=null,Yt({data:xr})},xr.onerror=()=>{xr.onerror=xr.onload=null,Tt.signal.aborted||Kt(new Error(\"Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.\"))},xr.src=Ir})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function E(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var T,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};T=new a.A(3),a.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue==\"string\")w.push({id:\"default\",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(ue,w,B){let Q=ue.split(\"?\");return Q[0]+=`${w}${B}`,Q.join(\"?\")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,Oe=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Ze}=this,{gl:st}=Ze;if(this.useMipmap=!!(B&&B.useMipmap),st.bindTexture(st.TEXTURE_2D,this.texture),Ze.pixelStoreUnpackFlipY.set(!1),Ze.pixelStoreUnpack.set(1),Ze.pixelStoreUnpackPremultiplyAlpha.set(this.format===st.RGBA&&(!B||B.premultiply!==!1)),Oe)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?st.texImage2D(st.TEXTURE_2D,0,this.format,this.format,st.UNSIGNED_BYTE,w):st.texImage2D(st.TEXTURE_2D,0,this.format,ee,le,0,this.format,st.UNSIGNED_BYTE,w.data);else{let{x:Tt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?st.texSubImage2D(st.TEXTURE_2D,0,Tt,Yt,st.RGBA,st.UNSIGNED_BYTE,w):st.texSubImage2D(st.TEXTURE_2D,0,Tt,Yt,ee,le,st.RGBA,st.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&st.generateMipmap(st.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class A extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"stretchX\" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"stretchY\" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image \"${w}\" has invalid \"content\" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]<Q||ee[1]<ee[0]||B<ee[1])return!1;Q=ee[1]}return!0}_validateContent(w,B){if(!w)return!0;if(w.length!==4)return!1;let Q=B.spriteData,ee=Q&&Q.width||B.data.width,le=Q&&Q.height||B.data.height;return!(w[0]<0||ee<w[0]||w[1]<0||le<w[1]||w[2]<0||ee<w[2]||w[3]<0||le<w[3]||w[2]<w[0]||w[3]<w[1])}updateImage(w,B,Q=!0){let ee=this.getImage(w);if(Q&&(ee.data.width!==B.data.width||ee.data.height!==B.data.height))throw new Error(`size mismatch between old image (${ee.data.width}x${ee.data.height}) and new image (${B.data.width}x${B.data.height}).`);B.version=ee.version+1,this.images[w]=B,this.updatedImages[w]=!0}removeImage(w){let B=this.images[w];delete this.images[w],delete this.patterns[w],B.userImage&&B.userImage.onRemove&&B.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(w){return new Promise((B,Q)=>{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k(\"styleimagemissing\",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image \"${Q}\" could not be loaded. Please make sure you have added the image with map.addImage() or a \"sprite\" property in your style. You can provide missing images by listening for the \"styleimagemissing\" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:Oe}=this.patterns[le],Ze=Oe.x+1,st=Oe.y+1,Tt=this.getImage(le).data,Yt=Tt.width,Kt=Tt.height;a.R.copy(Tt,ee,{x:0,y:0},{x:Ze,y:st},{width:Yt,height:Kt}),a.R.copy(Tt,ee,{x:0,y:Kt-1},{x:Ze,y:st-1},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:0,y:0},{x:Ze,y:st+Kt},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:Yt-1,y:0},{x:Ze-1,y:st},{width:1,height:Kt}),a.R.copy(Tt,ee,{x:0,y:0},{x:Ze+Yt,y:st},{width:1,height:Kt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: \"${B}\" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function O(ue,w,B,Q,ee,le,Oe,Ze,st){for(let Tt=w;Tt<w+Q;Tt++)U(ue,B*le+Tt,le,ee,Oe,Ze,st);for(let Tt=B;Tt<B+ee;Tt++)U(ue,Tt*le+w,1,Q,Oe,Ze,st)}function U(ue,w,B,Q,ee,le,Oe){le[0]=0,Oe[0]=-z,Oe[1]=z,ee[0]=ue[w];for(let Ze=1,st=0,Tt=0;Ze<Q;Ze++){ee[Ze]=ue[w+Ze*B];let Yt=Ze*Ze;do{let Kt=le[st];Tt=(ee[Ze]-ee[Kt]+Yt-Kt*Kt)/(Ze-Kt)/2}while(Tt<=Oe[st]&&--st>-1);st++,le[st]=Ze,Oe[st]=Tt,Oe[st+1]=z}for(let Ze=0,st=0;Ze<Q;Ze++){for(;Oe[st+1]<Ze;)st++;let Tt=le[st],Yt=Ze-Tt;ue[w+Ze*B]=ee[Tt]+Yt*Yt}}class G{constructor(w,B){this.requestManager=w,this.localIdeographFontFamily=B,this.entries={}}setURL(w){this.url=w}getGlyphs(w){return a._(this,void 0,void 0,function*(){let B=[];for(let le in w)for(let Oe of w[le])B.push(this._getAndCacheGlyphsPromise(le,Oe));let Q=yield Promise.all(B),ee={};for(let{stack:le,id:Oe,glyph:Ze}of Q)ee[le]||(ee[le]={}),ee[le][Oe]=Ze&&{id:Ze.id,bitmap:Ze.bitmap.clone(),metrics:Ze.metrics};return ee})}_getAndCacheGlyphsPromise(w,B){return a._(this,void 0,void 0,function*(){let Q=this.entries[w];Q||(Q=this.entries[w]={glyphs:{},requests:{},ranges:{}});let ee=Q.glyphs[B];if(ee!==void 0)return{stack:w,id:B,glyph:ee};if(ee=this._tinySDF(Q,w,B),ee)return Q.glyphs[B]=ee,{stack:w,id:B,glyph:ee};let le=Math.floor(B/256);if(256*le>65535)throw new Error(\"glyphs > 65535 not supported\");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error(\"glyphsUrl is not set\");if(!Q.requests[le]){let Ze=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Ze}let Oe=yield Q.requests[le];for(let Ze in Oe)this._doesCharSupportLocalGlyph(+Ze)||(Q.glyphs[+Ze]=Oe[+Ze]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Oe[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp(\"\\\\p{Ideo}|\\\\p{sc=Hang}|\\\\p{sc=Hira}|\\\\p{sc=Kana}\",\"u\").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Ze=\"400\";/bold/i.test(B)?Ze=\"900\":/medium/i.test(B)?Ze=\"500\":/light/i.test(B)&&(Ze=\"200\"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Ze})}let Oe=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Oe.width||60,height:Oe.height||60},Oe.data),metrics:{width:Oe.glyphWidth/2||24,height:Oe.glyphHeight/2||24,left:Oe.glyphLeft/2+.5||0,top:Oe.glyphTop/2-27.5||-8,advance:Oe.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Oe=Q.transformRequest(B.replace(\"{fontstack}\",ue).replace(\"{range}\",`${ee}-${le}`),\"Glyphs\"),Ze=yield a.l(Oe,new AbortController);if(!Ze||!Ze.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let st={};for(let Tt of a.n(Ze.data))st[Tt.id]=Tt;return st})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee=\"sans-serif\",fontWeight:le=\"normal\",fontStyle:Oe=\"normal\"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Ze=this.size=ue+4*w,st=this._createCanvas(Ze),Tt=this.ctx=st.getContext(\"2d\",{willReadFrequently:!0});Tt.font=`${Oe} ${le} ${ue}px ${ee}`,Tt.textBaseline=\"alphabetic\",Tt.textAlign=\"left\",Tt.fillStyle=\"black\",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(ue){let w=document.createElement(\"canvas\");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),Oe=Math.ceil(B),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),st=Math.min(this.size-this.buffer,Oe+Math.ceil(Q)),Tt=Ze+2*this.buffer,Yt=st+2*this.buffer,Kt=Math.max(Tt*Yt,0),xr=new Uint8ClampedArray(Kt),Ir={data:xr,width:Tt,height:Yt,glyphWidth:Ze,glyphHeight:st,glyphTop:Oe,glyphLeft:0,glyphAdvance:w};if(Ze===0||st===0)return Ir;let{ctx:ve,buffer:be,gridInner:Re,gridOuter:qe}=this;ve.clearRect(be,be,Ze,st),ve.fillText(ue,be,be+Oe);let et=ve.getImageData(be,be,Ze,st);qe.fill(z,0,Kt),Re.fill(0,0,Kt);for(let Xe=0;Xe<st;Xe++)for(let it=0;it<Ze;it++){let Ft=et.data[4*(Xe*Ze+it)+3]/255;if(Ft===0)continue;let Ht=(Xe+be)*Tt+it+be;if(Ft===1)qe[Ht]=0,Re[Ht]=z;else{let tr=.5-Ft;qe[Ht]=tr>0?tr*tr:0,Re[Ht]=tr<0?tr*tr:0}}O(qe,0,0,Tt,Yt,Tt,this.f,this.v,this.z),O(Re,be,be,Ze,st,Tt,this.f,this.v,this.z);for(let Xe=0;Xe<Kt;Xe++){let it=Math.sqrt(qe[Xe])-Math.sqrt(Re[Xe]);xr[Xe]=Math.round(255-255*(it/this.radius+this.cutoff))}return Ir}};class Z{constructor(){this.specification=a.v.light.position}possiblyEvaluate(w,B){return a.x(w.expression.evaluate(B))}interpolate(w,B,Q){return{x:a.y.number(w.x,B.x,Q),y:a.y.number(w.y,B.y,Q),z:a.y.number(w.z,B.z,Q)}}}let j;class N extends a.E{constructor(w){super(),j=j||new a.q({anchor:new a.D(a.v.light.anchor),position:new Z,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(j),this.setLight(w),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(w,B={}){if(!this._validate(a.r,w,B))for(let Q in w){let ee=w[Q];Q.endsWith(\"-transition\")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q){return(!Q||Q.validate!==!1)&&a.t(this,w.call(a.u,{value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let H=new a.q({\"sky-color\":new a.D(a.v.sky[\"sky-color\"]),\"horizon-color\":new a.D(a.v.sky[\"horizon-color\"]),\"fog-color\":new a.D(a.v.sky[\"fog-color\"]),\"fog-ground-blend\":new a.D(a.v.sky[\"fog-ground-blend\"]),\"horizon-fog-blend\":new a.D(a.v.sky[\"horizon-fog-blend\"]),\"sky-horizon-blend\":new a.D(a.v.sky[\"sky-horizon-blend\"]),\"atmosphere-blend\":new a.D(a.v.sky[\"atmosphere-blend\"])});class re extends a.E{constructor(w){super(),this._transitionable=new a.T(H),this.setSky(w),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(w,B={}){if(!this._validate(a.B,w,B)){w||(w={\"sky-color\":\"transparent\",\"horizon-color\":\"transparent\",\"fog-color\":\"transparent\",\"fog-ground-blend\":1,\"atmosphere-blend\":0});for(let Q in w){let ee=w[Q];Q.endsWith(\"-transition\")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}}getSky(){return this._transitionable.serialize()}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q={}){return(Q==null?void 0:Q.validate)!==!1&&a.t(this,w.call(a.u,a.e({value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(w){return w<60?0:w<70?(w-60)/10:1}}class oe{constructor(w,B){this.width=w,this.height=B,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(w,B){let Q=w.join(\",\")+String(B);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(w,B)),this.dashEntry[Q]}getDashRanges(w,B,Q){let ee=[],le=w.length%2==1?-w[w.length-1]*Q:0,Oe=w[0]*Q,Ze=!0;ee.push({left:le,right:Oe,isDash:Ze,zeroLength:w[0]===0});let st=w[0];for(let Tt=1;Tt<w.length;Tt++){Ze=!Ze;let Yt=w[Tt];le=st*Q,st+=Yt,Oe=st*Q,ee.push({left:le,right:Oe,isDash:Ze,zeroLength:Yt===0})}return ee}addRoundDash(w,B,Q){let ee=B/2;for(let le=-Q;le<=Q;le++){let Oe=this.width*(this.nextRow+Q+le),Ze=0,st=w[Ze];for(let Tt=0;Tt<this.width;Tt++){Tt/st.right>1&&(st=w[++Ze]);let Yt=Math.abs(Tt-st.left),Kt=Math.abs(Tt-st.right),xr=Math.min(Yt,Kt),Ir,ve=le/Q*(ee+1);if(st.isDash){let be=ee-Math.abs(ve);Ir=Math.sqrt(xr*xr+be*be)}else Ir=ee-Math.sqrt(xr*xr+ve*ve);this.data[Oe+Tt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let Ze=w.length-1;Ze>=0;--Ze){let st=w[Ze],Tt=w[Ze+1];st.zeroLength?w.splice(Ze,1):Tt&&Tt.isDash===st.isDash&&(Tt.left=st.left,w.splice(Ze,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,Oe=w[le];for(let Ze=0;Ze<this.width;Ze++){Ze/Oe.right>1&&(Oe=w[++le]);let st=Math.abs(Ze-Oe.left),Tt=Math.abs(Ze-Oe.right),Yt=Math.min(st,Tt);this.data[ee+Ze]=Math.max(0,Math.min(255,(Oe.isDash?Yt:-Yt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w(\"LineAtlas out of space\"),null;let le=0;for(let Ze=0;Ze<w.length;Ze++)le+=w[Ze];if(le!==0){let Ze=this.width/le,st=this.getDashRanges(w,this.width,Ze);B?this.addRoundDash(st,Ze,Q):this.addRegularDash(st)}let Oe={y:(this.nextRow+Q+.5)/this.height,height:2*Q/this.height,width:le};return this.nextRow+=ee,this.dirty=!0,Oe}bind(w){let B=w.gl;this.texture?(B.bindTexture(B.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,B.texSubImage2D(B.TEXTURE_2D,0,0,0,this.width,this.height,B.ALPHA,B.UNSIGNED_BYTE,this.data))):(this.texture=B.createTexture(),B.bindTexture(B.TEXTURE_2D,this.texture),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.LINEAR),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.LINEAR),B.texImage2D(B.TEXTURE_2D,0,B.ALPHA,this.width,this.height,0,B.ALPHA,B.UNSIGNED_BYTE,this.data))}}let _e=\"maplibre_preloaded_worker_pool\";class Ce{constructor(){this.active={}}acquire(w){if(!this.workers)for(this.workers=[];this.workers.length<Ce.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[w]=!0,this.workers.slice()}release(w){delete this.active[w],this.numActive()===0&&(this.workers.forEach(B=>{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Le=Math.floor(u.hardwareConcurrency/2),ge,ie;function Se(){return ge||(ge=new Ce),ge}Ce.workerCount=a.C(globalThis)?Math.max(Math.min(Le,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee<Q.length;ee++){let le=new a.F(Q[ee],B);le.name=`Worker ${ee}`,this.actors.push(le)}if(!this.actors.length)throw new Error(\"No actors found\")}broadcast(w,B){let Q=[];for(let ee of this.actors)Q.push(ee.sendAsync({type:w,data:B}));return Promise.all(Q)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(w=!0){this.actors.forEach(B=>{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Ae(){return ie||(ie=new Ee(Se(),a.G),ie.registerMessageHandler(\"GR\",(ue,w,B)=>a.m(w,B))),ie}function Be(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Pe(ue,w,B,Q,ee,le){let Oe=function(Kt,xr,Ir){if(Kt)for(let ve of Kt){let be=xr[ve];if(be&&be.source===Ir&&be.type===\"fill-extrusion\")return!0}else for(let ve in xr){let be=xr[ve];if(be.source===Ir&&be.type===\"fill-extrusion\")return!0}return!1}(ee&&ee.layers,w,ue.id),Ze=le.maxPitchScaleFactor(),st=ue.tilesIn(Q,Ze,Oe);st.sort(me);let Tt=[];for(let Kt of st)Tt.push({wrappedTileID:Kt.tileID.wrapped().key,queryResults:Kt.tile.queryRenderedFeatures(w,B,ue._state,Kt.queryGeometry,Kt.cameraQueryGeometry,Kt.scale,ee,le,Ze,Be(ue.transform,Kt.tileID))});let Yt=function(Kt){let xr={},Ir={};for(let ve of Kt){let be=ve.queryResults,Re=ve.wrappedTileID,qe=Ir[Re]=Ir[Re]||{};for(let et in be){let Xe=be[et],it=qe[et]=qe[et]||{},Ft=xr[et]=xr[et]||[];for(let Ht of Xe)it[Ht.featureIndex]||(it[Ht.featureIndex]=!0,Ft.push(Ht))}}return xr}(Tt);for(let Kt in Yt)Yt[Kt].forEach(xr=>{let Ir=xr.feature,ve=ue.getFeatureState(Ir.layer[\"source-layer\"],Ir.id);Ir.source=Ir.layer.source,Ir.layer[\"source-layer\"]&&(Ir.sourceLayer=Ir.layer[\"source-layer\"]),Ir.state=ve});return Yt}function me(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function De(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,\"Source\"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\",\"bounds\",\"scheme\",\"tileSize\",\"encoding\"]);return\"vector_layers\"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&(\"lng\"in w||\"lon\"in w)&&\"lat\"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class je{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),Oe=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x<le&&w.y>=ee&&w.y<Oe}}class lt extends a.E{constructor(w,B,Q,ee){if(super(),this.id=w,this.dispatcher=Q,this.type=\"vector\",this.minzoom=0,this.maxzoom=22,this.scheme=\"xyz\",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.M(B,[\"url\",\"scheme\",\"tileSize\",\"promoteId\"])),this._options=a.e({type:\"vector\"},B),this._collectResourceTiming=B.collectResourceTiming,this.tileSize!==512)throw new Error(\"vector tile sources must have a tileSize of 512\");this.setEventedParent(ee)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=new AbortController;try{let w=yield De(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),w&&(a.e(this,w),w.bounds&&(this.tileBounds=new je(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}onAdd(w){this.map=w,this.load()}setSourceProperty(w){this._tileJSONRequest&&this._tileJSONRequest.abort(),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,\"Tile\"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee=\"RT\";if(w.actor&&w.state!==\"expired\"){if(w.state===\"loading\")return new Promise((le,Oe)=>{w.reloadPromise={resolve:le,reject:Oe}})}else w.actor=this.dispatcher.getActor(),ee=\"LT\";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:\"AT\",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:\"RMT\",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class pt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type=\"raster\",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme=\"xyz\",this.tileSize=512,this._loaded=!1,this._options=a.e({type:\"raster\"},B),a.e(this,a.M(B,[\"url\",\"scheme\",\"tileSize\"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this._tileJSONRequest=new AbortController;try{let w=yield De(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new je(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,\"Tile\"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state=\"unloaded\");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,Oe=Q.data;w.texture=this.map.painter.getTileTexture(Oe.width),w.texture?w.texture.update(Oe,{useMipmap:!0}):(w.texture=new g(ee,Oe,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state=\"loaded\"}}catch(Q){if(delete w.abortController,w.aborted)w.state=\"unloaded\";else if(Q)throw w.state=\"errored\",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Vt extends pt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type=\"raster-dem\",this.maxzoom=22,this._options=a.e({type:\"raster-dem\"},B),this.encoding=B.encoding||\"mapbox\",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,\"Tile\");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state=\"unloaded\");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let Oe=a.b(le)&&a.U()?le:yield this.readImageNow(le),Ze={type:this.type,uid:w.uid,source:this.id,rawImageData:Oe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state===\"expired\"){w.actor=this.dispatcher.getActor();let st=yield w.actor.sendAsync({type:\"LDT\",data:Ze});w.dem=st,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state=\"loaded\"}}}catch(ee){if(delete w.abortController,w.aborted)w.state=\"unloaded\";else if(ee)throw w.state=\"errored\",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!=\"undefined\"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,Oe=(B.x+1+Q)%Q,Ze=B.x+1===Q?w.wrap+1:w.wrap,st={};return st[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},st[new a.S(w.overscaledZ,Ze,B.z,Oe,B.y).key]={backfilled:!1},B.y>0&&(st[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},st[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},st[new a.S(w.overscaledZ,Ze,B.z,Oe,B.y-1).key]={backfilled:!1}),B.y+1<Q&&(st[new a.S(w.overscaledZ,le,B.z,ee,B.y+1).key]={backfilled:!1},st[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y+1).key]={backfilled:!1},st[new a.S(w.overscaledZ,Ze,B.z,Oe,B.y+1).key]={backfilled:!1}),st}unloadTile(w){return a._(this,void 0,void 0,function*(){w.demTexture&&this.map.painter.saveTileTexture(w.demTexture),w.fbo&&(w.fbo.destroy(),delete w.fbo),w.dem&&delete w.dem,delete w.neighboringTiles,w.state=\"unloaded\",w.actor&&(yield w.actor.sendAsync({type:\"RDT\",data:{type:this.type,uid:w.uid,source:this.id}}))})}}class ot extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.type=\"geojson\",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Q.getActor(),this.setEventedParent(ee),this._data=B.data,this._options=a.e({},B),this._collectResourceTiming=B.collectResourceTiming,B.maxzoom!==void 0&&(this.maxzoom=B.maxzoom),B.type&&(this.type=B.type),B.attribution&&(this.attribution=B.attribution),this.promoteId=B.promoteId;let le=a.X/this.tileSize;B.clusterMaxZoom!==void 0&&this.maxzoom<=B.clusterMaxZoom&&a.w(`The maxzoom value \"${this.maxzoom}\" is expected to be greater than the clusterMaxZoom value \"${B.clusterMaxZoom}\".`),this.workerOptions=a.e({source:this.id,cluster:B.cluster||!1,geojsonVtOptions:{buffer:(B.buffer!==void 0?B.buffer:128)*le,tolerance:(B.tolerance!==void 0?B.tolerance:.375)*le,extent:a.X,maxZoom:this.maxzoom,lineMetrics:B.lineMetrics||!1,generateId:B.generateId||!1},superclusterOptions:{maxZoom:B.clusterMaxZoom!==void 0?B.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,B.clusterMinPoints||2),extent:a.X,radius:(B.clusterRadius||50)*le,log:!1,generateId:B.generateId||!1},clusterProperties:B.clusterProperties,filter:B.filter},B.workerOptions),typeof this.promoteId==\"string\"&&(this.workerOptions.promoteId=this.promoteId)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(w){this.map=w,this.load()}setData(w){return this._data=w,this._updateWorkerData(),this}updateData(w){return this._updateWorkerData(w),this}getData(){return a._(this,void 0,void 0,function*(){let w=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:\"GD\",data:w})})}setClusterOptions(w){return this.workerOptions.cluster=w.cluster,w&&(w.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=w.clusterRadius),w.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=w.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(w){return this.actor.sendAsync({type:\"GCEZ\",data:{type:this.type,clusterId:w,source:this.id}})}getClusterChildren(w){return this.actor.sendAsync({type:\"GCC\",data:{type:this.type,clusterId:w,source:this.id}})}getClusterLeaves(w,B,Q){return this.actor.sendAsync({type:\"GCL\",data:{type:this.type,source:this.id,clusterId:w,limit:B,offset:Q}})}_updateWorkerData(w){return a._(this,void 0,void 0,function*(){let B=a.e({type:this.type},this.workerOptions);w?B.dataDiff=w:typeof this._data==\"string\"?(B.request=this.map._requestManager.transformRequest(u.resolveURL(this._data),\"Source\"),B.request.collectResourceTiming=this._collectResourceTiming):B.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.k(\"dataloading\",{dataType:\"source\"}));try{let Q=yield this.actor.sendAsync({type:\"LD\",data:B});if(this._pendingLoads--,this._removed||Q.abandoned)return void this.fire(new a.k(\"dataabort\",{dataType:\"source\"}));let ee=null;Q.resourceTiming&&Q.resourceTiming[this.id]&&(ee=Q.resourceTiming[this.id].slice(0));let le={dataType:\"source\"};this._collectResourceTiming&&ee&&ee.length>0&&a.e(le,{resourceTiming:ee}),this.fire(new a.k(\"data\",Object.assign(Object.assign({},le),{sourceDataType:\"metadata\"}))),this.fire(new a.k(\"data\",Object.assign(Object.assign({},le),{sourceDataType:\"content\"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k(\"dataabort\",{dataType:\"source\"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?\"RT\":\"LT\";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B===\"RT\")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:\"RMT\",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:\"RS\",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ut=a.Y([{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]);class Wt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type=\"image\",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k(\"dataloading\",{dataType:\"source\"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,\"Image\"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"metadata\"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,Oe=1/0,Ze=-1/0,st=-1/0;for(let xr of ee)le=Math.min(le,xr.x),Oe=Math.min(Oe,xr.y),Ze=Math.max(Ze,xr.x),st=Math.max(st,xr.y);let Tt=Math.max(Ze-le,st-Oe),Yt=Math.max(0,Math.floor(-Math.log(Tt)/Math.LN2)),Kt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+Ze)/2*Kt),Math.floor((Oe+st)/2*Kt))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"content\"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!==\"loaded\"&&(le.state=\"loaded\",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state=\"errored\"})}serialize(){return{type:\"image\",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Nt extends Wt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type=\"video\",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,\"Source\").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener(\"playing\",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;w<B.start(0)||w>B.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!==\"loaded\"&&(le.state=\"loaded\",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}serialize(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class $t extends Wt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(Oe=>typeof Oe!=\"number\"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'\"coordinates\" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property \"coordinates\"'))),B.animate&&typeof B.animate!=\"boolean\"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional \"animate\" property must be a boolean value'))),B.canvas?typeof B.canvas==\"string\"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,null,'\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property \"canvas\"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error(\"Canvas dimensions cannot be less than or equal to zero.\"))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Oe=this.tiles[le];Oe.state!==\"loaded\"&&(Oe.state=\"loaded\",Oe.texture=this.texture,ee=!0)}ee&&this.fire(new a.k(\"data\",{dataType:\"source\",sourceDataType:\"idle\",sourceId:this.id}))}serialize(){return{type:\"canvas\",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let sr={},Tr=ue=>{switch(ue){case\"geojson\":return ot;case\"image\":return Wt;case\"raster\":return pt;case\"raster-dem\":return Vt;case\"vector\":return lt;case\"video\":return Nt;case\"canvas\":return $t}return sr[ue]},fr=\"RTLPluginLoaded\";class $e extends a.E{constructor(){super(...arguments),this.status=\"unavailable\",this.url=null,this.dispatcher=Ae()}_syncState(w){return this.status=w,this.dispatcher.broadcast(\"SRPS\",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status=\"error\",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status=\"unavailable\",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error(\"setRTLTextPlugin cannot be called multiple times.\");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status===\"unavailable\"){if(!Q)return this._requestImport();this.status=\"deferred\",this._syncState(this.status)}else if(this.status===\"requested\")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState(\"loading\"),this.status=\"loaded\",this.fire(new a.k(fr))})}lazyLoad(){this.status===\"unavailable\"?this.status=\"requested\":this.status===\"deferred\"&&this._requestImport()}}let St=null;function Qt(){return St||(St=new $e),St}class Gt{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state=\"loading\"}registerFadeDuration(w){let B=w+this.timeAdded;B<this.fadeEndTime||(this.fadeEndTime=B)}wasRequested(){return this.state===\"errored\"||this.state===\"loaded\"||this.state===\"reloading\"}clearTextures(w){this.demTexture&&w.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(w,B,Q){if(this.hasData()&&this.unloadVectorData(),this.state=\"loaded\",w){w.featureIndex&&(this.latestFeatureIndex=w.featureIndex,w.rawTileData?(this.latestRawTileData=w.rawTileData,this.latestFeatureIndex.rawTileData=w.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=w.collisionBoxArray,this.buckets=function(ee,le){let Oe={};if(!le)return Oe;for(let Ze of ee){let st=Ze.layerIds.map(Tt=>le.getLayer(Tt)).filter(Boolean);if(st.length!==0){Ze.layers=st,Ze.stateDependentLayerIds&&(Ze.stateDependentLayers=Ze.stateDependentLayerIds.map(Tt=>st.filter(Yt=>Yt.id===Tt)[0]));for(let Tt of st)Oe[Tt.id]=Ze}}return Oe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,Qt().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state=\"unloaded\"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Oe,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:st,params:Ze,queryPadding:this.queryPadding*Tt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:\"\",Oe=ee._geojsonTileLayer||ee[le];if(!Oe)return;let Ze=a.a7(B&&B.filter),{z:st,x:Tt,y:Yt}=this.tileID.canonical,Kt={z:st,x:Tt,y:Yt};for(let xr=0;xr<Oe.length;xr++){let Ir=Oe.feature(xr);if(Ze.needGeometry){let Re=a.a8(Ir,!0);if(!Ze.filter(new a.z(this.tileID.overscaledZ),Re,this.tileID.canonical))continue}else if(!Ze.filter(new a.z(this.tileID.overscaledZ),Ir))continue;let ve=Q.getId(Ir,le),be=new a.a9(Ir,st,Tt,Yt,ve);be.tile=Kt,w.push(be)}}hasData(){return this.state===\"loaded\"||this.state===\"reloading\"||this.state===\"expired\"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(w){let B=this.expirationTime;if(w.cacheControl){let Q=a.aa(w.cacheControl);Q[\"max-age\"]&&(this.expirationTime=Date.now()+1e3*Q[\"max-age\"])}else w.expires&&(this.expirationTime=new Date(w.expires).getTime());if(this.expirationTime){let Q=Date.now(),ee=!1;if(this.expirationTime>Q)ee=!1;else if(B)if(this.expirationTime<B)ee=!0;else{let le=this.expirationTime-B;le?this.expirationTime=Q+Math.max(le,3e4):ee=!0}else ee=!0;ee?(this.expiredRequestCount++,this.state=\"expired\"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(w,B){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(w).length===0)return;let Q=this.latestFeatureIndex.loadVTLayers();for(let ee in this.buckets){if(!B.style.hasLayer(ee))continue;let le=this.buckets[ee],Oe=le.layers[0].sourceLayer||\"_geojsonTileLayer\",Ze=Q[Oe],st=w[Oe];if(!Ze||!st||Object.keys(st).length===0)continue;le.update(st,Ze,this.imageAtlas&&this.imageAtlas.patternPositions||{});let Tt=B&&B.style&&B.style.getLayer(ee);Tt&&(this.queryPadding=Math.max(this.queryPadding,Tt.queryRadius(le)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<u.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(w){this.symbolFadeHoldUntil=u.now()+w}setDependencies(w,B){let Q={};for(let ee of B)Q[ee]=!0;this.dependencies[w]=Q}hasDependency(w,B){for(let Q of w){let ee=this.dependencies[Q];if(ee){for(let le of B)if(ee[le])return!0}}return!1}}class _t{constructor(w,B){this.max=w,this.onRemove=B,this.reset()}reset(){for(let w in this.data)for(let B of this.data[w])B.timeout&&clearTimeout(B.timeout),this.onRemove(B.value);return this.data={},this.order=[],this}add(w,B,Q){let ee=w.wrapped().key;this.data[ee]===void 0&&(this.data[ee]=[]);let le={value:B,timeout:void 0};if(Q!==void 0&&(le.timeout=setTimeout(()=>{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let Oe=this._getAndRemoveByKey(this.order[0]);Oe&&this.onRemove(Oe)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class It{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let Oe in le)delete ee[Oe]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let Oe in this.stateChanges[ee])this.state[ee][Oe]||(this.state[ee][Oe]={}),a.e(this.state[ee][Oe],this.stateChanges[ee][Oe]),le[Oe]=this.state[ee][Oe];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Oe in this.state[ee])le[Oe]={},this.state[ee][Oe]={};else for(let Oe in this.deletedStates[ee]){if(this.deletedStates[ee][Oe]===null)this.state[ee][Oe]={};else for(let Ze of Object.keys(this.deletedStates[ee][Oe]))delete this.state[ee][Oe][Ze];le[Oe]=this.state[ee][Oe]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class mt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on(\"data\",ee=>this._dataHandler(ee)),this.on(\"dataloading\",()=>{this._sourceErrored=!1}),this.on(\"error\",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,Oe,Ze)=>{let st=new(Tr(le.type))(ee,le,Oe,Ze);if(st.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${st.id}`);return st})(w,B,Q,this),this._tiles={},this._cache=new _t(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new It,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!==\"loaded\"&&B.state!==\"errored\")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state=\"errored\",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k(\"dataabort\",{tile:w,coord:w.tileID,dataType:\"source\"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(er).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,Oe=ee.tileID,Ze=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),st=new a.P(Oe.canonical.x,Oe.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Oe.overscaledZ||st.y-Ze.y||st.x-Ze.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(er).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!==\"errored\"&&this._reloadTile(w,\"reloading\")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!==\"loading\"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q===\"expired\"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type===\"raster-dem\"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k(\"data\",{dataType:\"source\",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee<B.length;ee++){let le=B[ee];if(w.neighboringTiles&&w.neighboringTiles[le]){let Oe=this.getTileByID(le);Q(w,Oe),Q(Oe,w)}}function Q(ee,le){ee.needsHillshadePrepare=!0,ee.needsTerrainPrepare=!0;let Oe=le.tileID.canonical.x-ee.tileID.canonical.x,Ze=le.tileID.canonical.y-ee.tileID.canonical.y,st=Math.pow(2,ee.tileID.canonical.z),Tt=le.tileID.key;Oe===0&&Ze===0||Math.abs(Ze)>1||(Math.abs(Oe)>1&&(Math.abs(Oe+st)===1?Oe+=st:Math.abs(Oe-st)===1&&(Oe-=st)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Oe,Ze),ee.neighboringTiles&&ee.neighboringTiles[Tt]&&(ee.neighboringTiles[Tt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let Oe=this._tiles[le];if(ee[le]||!Oe.hasData()||Oe.tileID.overscaledZ<=B||Oe.tileID.overscaledZ>Q)continue;let Ze=Oe.tileID;for(;Oe&&Oe.tileID.overscaledZ>B+1;){let Tt=Oe.tileID.scaledTo(Oe.tileID.overscaledZ-1);Oe=this._tiles[Tt.key],Oe&&Oe.hasData()&&(Ze=Tt)}let st=Ze;for(;st.overscaledZ>B;)if(st=st.scaledTo(st.overscaledZ-1),w[st.key]){ee[Ze.key]=Ze;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize==\"number\"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,Oe){let Ze={},st={},Tt=Object.keys(w),Yt=u.now();for(let Kt of Tt){let xr=w[Kt],Ir=this._tiles[Kt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ve=this.findLoadedParent(xr,B),be=this.findLoadedSibling(xr),Re=ve||be||null;Re&&(this._addTile(Re.tileID),Ze[Re.tileID.key]=Re.tileID),st[Kt]=xr}this._retainLoadedChildren(st,ee,Q,w);for(let Kt in Ze)w[Kt]||(this._coveredTiles[Kt]=!0,w[Kt]=Ze[Kt]);if(Oe){let Kt={},xr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Kt[Ir.key]=Ir:xr[Ir.key]=Ir;for(let Ir in xr){let ve=xr[Ir].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&(Kt[ve[0].key]=w[ve[0].key]=ve[0],Kt[ve[1].key]=w[ve[1].key]=ve[1],Kt[ve[2].key]=w[ve[2].key]=ve[2],Kt[ve[3].key]=w[ve[3].key]=ve[3],delete xr[Ir])}for(let Ir in xr){let ve=xr[Ir],be=this.findLoadedParent(ve,this._source.minzoom),Re=this.findLoadedSibling(ve),qe=be||Re||null;if(qe){Kt[qe.tileID.key]=w[qe.tileID.key]=qe.tileID;for(let et in Kt)Kt[et].isChildOf(qe.tileID)&&delete Kt[et]}}for(let Ir in this._tiles)Kt[Ir]||(this._coveredTiles[Ir]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Yt=>new a.S(Yt.canonical.z,Yt.wrap,Yt.canonical.z,Yt.canonical.x,Yt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Yt=>this._source.hasTile(Yt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-mt.maxOverzooming,this._source.minzoom),Oe=Math.max(ee+mt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Kt of Q)if(Kt.canonical.z>this._source.minzoom){let xr=Kt.scaledTo(Kt.canonical.z-1);Yt[xr.key]=xr;let Ir=Kt.scaledTo(Math.max(this._source.minzoom,Math.min(Kt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let Ze=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Ze&&this.fire(new a.k(\"data\",{sourceDataType:\"idle\",dataType:\"source\",sourceId:this.id}));let st=this._updateRetainedTiles(Q,ee);lr(this._source.type)&&this._updateCoveredAndRetainedTiles(st,le,Oe,ee,Q,B);for(let Yt in st)this._tiles[Yt].clearFadeHold();let Tt=a.ab(this._tiles,st);for(let Yt of Tt){let Kt=this._tiles[Yt];Kt.hasSymbolBuckets&&!Kt.holdingForFade()?Kt.setHoldDuration(this.map._fadeDuration):Kt.hasSymbolBuckets&&!Kt.symbolFadeFinished()||this._removeTile(Yt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},Oe=Math.max(B-mt.maxOverzooming,this._source.minzoom),Ze=Math.max(B+mt.maxUnderzooming,this._source.minzoom),st={};for(let Tt of w){let Yt=this._addTile(Tt);ee[Tt.key]=Tt,Yt.hasData()||B<this._source.maxzoom&&(st[Tt.key]=Tt)}this._retainLoadedChildren(st,B,Ze,ee);for(let Tt of w){let Yt=this._tiles[Tt.key];if(Yt.hasData())continue;if(B+1>this._source.maxzoom){let xr=Tt.children(this._source.maxzoom)[0],Ir=this.getTile(xr);if(Ir&&Ir.hasData()){ee[xr.key]=xr;continue}}else{let xr=Tt.children(this._source.maxzoom);if(ee[xr[0].key]&&ee[xr[1].key]&&ee[xr[2].key]&&ee[xr[3].key])continue}let Kt=Yt.wasRequested();for(let xr=Tt.overscaledZ-1;xr>=Oe;--xr){let Ir=Tt.scaledTo(xr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Kt&&(Yt=this._addTile(Ir)),Yt){let ve=Yt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Kt)&&(ee[Ir.key]=Ir),Kt=Yt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Gt(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k(\"dataloading\",{tile:B,coord:B.tileID,dataType:\"source\"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,\"expired\"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!==\"reloading\"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType===\"source\"&&B===\"metadata\"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType===\"source\"&&B===\"content\"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let Oe=Q?le.getCameraQueryGeometry(w):w,Ze=w.map(ve=>le.pointCoordinate(ve,this.terrain)),st=Oe.map(ve=>le.pointCoordinate(ve,this.terrain)),Tt=this.getIds(),Yt=1/0,Kt=1/0,xr=-1/0,Ir=-1/0;for(let ve of st)Yt=Math.min(Yt,ve.x),Kt=Math.min(Kt,ve.y),xr=Math.max(xr,ve.x),Ir=Math.max(Ir,ve.y);for(let ve=0;ve<Tt.length;ve++){let be=this._tiles[Tt[ve]];if(be.holdingForFade())continue;let Re=be.tileID,qe=Math.pow(2,le.zoom-be.tileID.overscaledZ),et=B*be.queryPadding*a.X/be.tileSize/qe,Xe=[Re.getTilePoint(new a.Z(Yt,Kt)),Re.getTilePoint(new a.Z(xr,Ir))];if(Xe[0].x-et<a.X&&Xe[0].y-et<a.X&&Xe[1].x+et>=0&&Xe[1].y+et>=0){let it=Ze.map(Ht=>Re.getTilePoint(Ht)),Ft=st.map(Ht=>Re.getTilePoint(Ht));ee.push({tile:be,tileID:Re,queryGeometry:it,cameraQueryGeometry:Ft,scale:qe})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(lr(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||\"_geojsonTileLayer\",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||\"_geojsonTileLayer\",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||\"_geojsonTileLayer\",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,\"reloading\");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function er(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function lr(ue){return ue===\"raster\"||ue===\"image\"||ue===\"video\"}mt.maxOverzooming=10,mt.maxUnderzooming=3;class wr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q<this.points.length;Q++)this._distances[Q]=this._distances[Q-1]+this.points[Q].dist(this.points[Q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(B||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(w){if(this.points.length===1)return this.points[0];w=a.ac(w,0,1);let B=1,Q=this._distances[B],ee=w*this.paddedLength+this.padding;for(;Q<ee&&B<this._distances.length;)Q=this._distances[++B];let le=B-1,Oe=this._distances[le],Ze=Q-Oe,st=Ze>0?(ee-Oe)/Ze:0;return this.points[le].mult(1-st).add(this.points[B].mult(st))}}function Lr(ue,w){let B=!0;return ue===\"always\"||ue!==\"never\"&&w!==\"never\"||(B=!1),B}class ti{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let Oe=0;Oe<this.xCellCount*this.yCellCount;Oe++)ee.push([]),le.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=w,this.height=B,this.xScale=this.xCellCount/w,this.yScale=this.yCellCount/B,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(w,B,Q,ee,le){this._forEachCell(B,Q,ee,le,this._insertBoxCell,this.boxUid++),this.boxKeys.push(w),this.bboxes.push(B),this.bboxes.push(Q),this.bboxes.push(ee),this.bboxes.push(le)}insertCircle(w,B,Q,ee){this._forEachCell(B-ee,Q-ee,B+ee,Q+ee,this._insertCircleCell,this.circleUid++),this.circleKeys.push(w),this.circles.push(B),this.circles.push(Q),this.circles.push(ee)}_insertBoxCell(w,B,Q,ee,le,Oe){this.boxCells[le].push(Oe)}_insertCircleCell(w,B,Q,ee,le,Oe){this.circleCells[le].push(Oe)}_query(w,B,Q,ee,le,Oe,Ze){if(Q<0||w>this.width||ee<0||B>this.height)return[];let st=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Tt=0;Tt<this.boxKeys.length;Tt++)st.push({key:this.boxKeys[Tt],x1:this.bboxes[4*Tt],y1:this.bboxes[4*Tt+1],x2:this.bboxes[4*Tt+2],y2:this.bboxes[4*Tt+3]});for(let Tt=0;Tt<this.circleKeys.length;Tt++){let Yt=this.circles[3*Tt],Kt=this.circles[3*Tt+1],xr=this.circles[3*Tt+2];st.push({key:this.circleKeys[Tt],x1:Yt-xr,y1:Kt-xr,x2:Yt+xr,y2:Kt+xr})}}else this._forEachCell(w,B,Q,ee,this._queryCell,st,{hitTest:le,overlapMode:Oe,seenUids:{box:{},circle:{}}},Ze);return st}query(w,B,Q,ee){return this._query(w,B,Q,ee,!1,null)}hitTest(w,B,Q,ee,le,Oe){return this._query(w,B,Q,ee,!0,le,Oe).length>0}hitTestCircle(w,B,Q,ee,le){let Oe=w-Q,Ze=w+Q,st=B-Q,Tt=B+Q;if(Ze<0||Oe>this.width||Tt<0||st>this.height)return!1;let Yt=[];return this._forEachCell(Oe,st,Ze,Tt,this._queryCellCircle,Yt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Yt.length>0}_queryCell(w,B,Q,ee,le,Oe,Ze,st){let{seenUids:Tt,hitTest:Yt,overlapMode:Kt}=Ze,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Tt.box[be]){Tt.box[be]=!0;let Re=4*be,qe=this.boxKeys[be];if(w<=ve[Re+2]&&B<=ve[Re+3]&&Q>=ve[Re+0]&&ee>=ve[Re+1]&&(!st||st(qe))&&(!Yt||!Lr(Kt,qe.overlapMode))&&(Oe.push({key:qe,x1:ve[Re],y1:ve[Re+1],x2:ve[Re+2],y2:ve[Re+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Tt.circle[be]){Tt.circle[be]=!0;let Re=3*be,qe=this.circleKeys[be];if(this._circleAndRectCollide(ve[Re],ve[Re+1],ve[Re+2],w,B,Q,ee)&&(!st||st(qe))&&(!Yt||!Lr(Kt,qe.overlapMode))){let et=ve[Re],Xe=ve[Re+1],it=ve[Re+2];if(Oe.push({key:qe,x1:et-it,y1:Xe-it,x2:et+it,y2:Xe+it}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Oe,Ze,st){let{circle:Tt,seenUids:Yt,overlapMode:Kt}=Ze,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Yt.box[be]){Yt.box[be]=!0;let Re=4*be,qe=this.boxKeys[be];if(this._circleAndRectCollide(Tt.x,Tt.y,Tt.radius,ve[Re+0],ve[Re+1],ve[Re+2],ve[Re+3])&&(!st||st(qe))&&!Lr(Kt,qe.overlapMode))return Oe.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Yt.circle[be]){Yt.circle[be]=!0;let Re=3*be,qe=this.circleKeys[be];if(this._circlesCollide(ve[Re],ve[Re+1],ve[Re+2],Tt.x,Tt.y,Tt.radius)&&(!st||st(qe))&&!Lr(Kt,qe.overlapMode))return Oe.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Oe,Ze,st){let Tt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Kt=this._convertToXCellCoord(Q),xr=this._convertToYCellCoord(ee);for(let Ir=Tt;Ir<=Kt;Ir++)for(let ve=Yt;ve<=xr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Ir,Oe,Ze,st))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,Oe){let Ze=ee-w,st=le-B,Tt=Q+Oe;return Tt*Tt>Ze*Ze+st*st}_circleAndRectCollide(w,B,Q,ee,le,Oe,Ze){let st=(Oe-ee)/2,Tt=Math.abs(w-(ee+st));if(Tt>st+Q)return!1;let Yt=(Ze-le)/2,Kt=Math.abs(B-(le+Yt));if(Kt>Yt+Q)return!1;if(Tt<=st||Kt<=Yt)return!0;let xr=Tt-st,Ir=Kt-Yt;return xr*xr+Ir*Ir<=Q*Q}}function Br(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function Vr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function dt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],$r(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function We(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve){let be=Q?ue.textSizeData:ue.iconSizeData,Re=a.ag(be,B.transform.zoom),qe=[256/B.width*2+1,256/B.height*2+1],et=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;et.clear();let Xe=ue.lineVertexArray,it=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,Ft=B.transform.width/B.transform.height,Ht=!1;for(let tr=0;tr<it.length;tr++){let dr=it.get(tr);if(dr.hidden||dr.writingMode===a.ah.vertical&&!Ht){pi(dr.numGlyphs,et);continue}Ht=!1;let Sr=dt(dr.anchorX,dr.anchorY,w,ve);if(!Je(Sr.point,qe)){pi(dr.numGlyphs,et);continue}let Or=Ge(B.transform.cameraToCenterDistance,Sr.signedDistanceFromCamera),Wr=a.ai(be,Re,dr),ni=Oe?Wr/Or:Wr*Or,Pi={getElevation:ve,labelPlaneMatrix:ee,lineVertexArray:Xe,pitchWithMap:Oe,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:Tt,tileAnchorPoint:new a.P(dr.anchorX,dr.anchorY),unwrappedTileID:Yt,width:Kt,height:xr,translation:Ir},cn=Ie(Pi,dr,ni,!1,Ze,w,le,ue.glyphOffsetArray,et,Ft,st);Ht=cn.useVertical,(cn.notEnoughRoom||Ht||cn.needsFlipping&&Ie(Pi,dr,ni,!0,Ze,w,le,ue.glyphOffsetArray,et,Ft,st).notEnoughRoom)&&pi(dr.numGlyphs,et)}Q?ue.text.dynamicLayoutVertexBuffer.updateData(et):ue.icon.dynamicLayoutVertexBuffer.updateData(et)}function tt(ue,w,B,Q,ee,le,Oe,Ze){let st=le.glyphStartIndex+le.numGlyphs,Tt=le.lineStartIndex,Yt=le.lineStartIndex+le.lineLength,Kt=w.getoffsetX(le.glyphStartIndex),xr=w.getoffsetX(st-1),Ir=vr(ue*Kt,B,Q,ee,le.segment,Tt,Yt,Ze,Oe);if(!Ir)return null;let ve=vr(ue*xr,B,Q,ee,le.segment,Tt,Yt,Ze,Oe);return ve?Ze.projectionCache.anyProjectionOccluded?null:{first:Ir,last:ve}:null}function xt(ue,w,B,Q){return ue===a.ah.horizontal&&Math.abs(B.y-w.y)>Math.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.y<B.y:w.x>B.x)?{needsFlipping:!0}:null}function Ie(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt){let Kt=B/24,xr=w.lineOffsetX*Kt,Ir=w.lineOffsetY*Kt,ve;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,Re=w.lineStartIndex,qe=w.lineStartIndex+w.lineLength,et=tt(Kt,Ze,xr,Ir,Q,w,Yt,ue);if(!et)return{notEnoughRoom:!0};let Xe=dt(et.first.point.x,et.first.point.y,Oe,ue.getElevation).point,it=dt(et.last.point.x,et.last.point.y,Oe,ue.getElevation).point;if(ee&&!Q){let Ft=xt(w.writingMode,Xe,it,Tt);if(Ft)return Ft}ve=[et.first];for(let Ft=w.glyphStartIndex+1;Ft<be-1;Ft++)ve.push(vr(Kt*Ze.getoffsetX(Ft),xr,Ir,Q,w.segment,Re,qe,ue,Yt));ve.push(et.last)}else{if(ee&&!Q){let Re=dt(ue.tileAnchorPoint.x,ue.tileAnchorPoint.y,le,ue.getElevation).point,qe=w.lineStartIndex+w.segment+1,et=new a.P(ue.lineVertexArray.getx(qe),ue.lineVertexArray.gety(qe)),Xe=dt(et.x,et.y,le,ue.getElevation),it=Xe.signedDistanceFromCamera>0?Xe.point:function(Ht,tr,dr,Sr,Or,Wr){return xe(Ht,tr,dr,1,Or,Wr)}(ue.tileAnchorPoint,et,Re,0,le,ue),Ft=xt(w.writingMode,Re,it,Tt);if(Ft)return Ft}let be=vr(Kt*Ze.getoffsetX(w.glyphStartIndex),xr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Yt);if(!be||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[be]}for(let be of ve)a.aj(st,be.point,be.angle);return{}}function xe(ue,w,B,Q,ee,le){let Oe=ue.add(ue.sub(w)._unit()),Ze=ee!==void 0?dt(Oe.x,Oe.y,ee,le.getElevation).point:vt(Oe.x,Oe.y,le).point,st=B.sub(Ze);return B.add(st._mult(Q/st.mag()))}function ke(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=vt(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Oe=ue-B.direction;return function(Ze,st,Tt,Yt,Kt){return xe(Ze,st,Tt,Yt,void 0,Kt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Oe),w.lineVertexArray.gety(Oe)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function vt(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=dt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function ir(ue,w,B){return ue._unit()._perp()._mult(w*B)}function ar(ue,w,B,Q,ee,le,Oe,Ze,st){if(Ze.projectionCache.offsets[ue])return Ze.projectionCache.offsets[ue];let Tt=B.add(w);if(ue+st.direction<Q||ue+st.direction>=ee)return Ze.projectionCache.offsets[ue]=Tt,Tt;let Yt=ke(ue+st.direction,Ze,st),Kt=ir(Yt.sub(B),Oe,st.direction),xr=B.add(Kt),Ir=Yt.add(Kt);return Ze.projectionCache.offsets[ue]=a.ak(le,Tt,xr,Ir)||Tt,Ze.projectionCache.offsets[ue]}function vr(ue,w,B,Q,ee,le,Oe,Ze,st){let Tt=Q?ue-w:ue+w,Yt=Tt>0?1:-1,Kt=0;Q&&(Yt*=-1,Kt=Math.PI),Yt<0&&(Kt+=Math.PI);let xr,Ir=Yt>0?le+ee:le+ee+1;Ze.projectionCache.cachedAnchorPoint?xr=Ze.projectionCache.cachedAnchorPoint:(xr=vt(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,Ze).point,Ze.projectionCache.cachedAnchorPoint=xr);let ve,be,Re=xr,qe=xr,et=0,Xe=0,it=Math.abs(Tt),Ft=[],Ht;for(;et+Xe<=it;){if(Ir+=Yt,Ir<le||Ir>=Oe)return null;et+=Xe,qe=Re,be=ve;let Sr={absOffsetX:it,direction:Yt,distanceFromAnchor:et,previousVertex:qe};if(Re=ke(Ir,Ze,Sr),B===0)Ft.push(qe),Ht=Re.sub(qe);else{let Or,Wr=Re.sub(qe);Or=Wr.mag()===0?ir(ke(Ir+Yt,Ze,Sr).sub(Re),B,Yt):ir(Wr,B,Yt),be||(be=qe.add(Or)),ve=ar(Ir,Or,Re,le,Oe,be,B,Ze,Sr),Ft.push(be),Ht=ve.sub(be)}Xe=Ht.mag()}let tr=Ht._mult((it-et)/Xe)._add(be||qe),dr=Kt+Math.atan2(Re.y-qe.y,Re.x-qe.x);return Ft.push(tr),{point:tr,angle:st?dr:0,path:Ft}}let ii=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function pi(ue,w){for(let B=0;B<ue;B++){let Q=w.length;w.resize(Q+4),w.float32.set(ii,3*Q)}}function $r(ue,w,B){let Q=w[0],ee=w[1];return ue[0]=B[0]*Q+B[4]*ee+B[12],ue[1]=B[1]*Q+B[5]*ee+B[13],ue[3]=B[3]*Q+B[7]*ee+B[15],ue}let di=100;class ji{constructor(w,B,Q=new ti(w.width+200,w.height+200,25),ee=new ti(w.width+200,w.height+200,25)){this.transform=w,this.mapProjection=B,this.grid=Q,this.ignoredGrid=ee,this.pitchFactor=Math.cos(w._pitch)*w.cameraToCenterDistance,this.screenRightBoundary=w.width+di,this.screenBottomBoundary=w.height+di,this.gridRightBoundary=w.width+200,this.gridBottomBoundary=w.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt){let xr=w.anchorPointX+st[0],Ir=w.anchorPointY+st[1],ve=this.projectAndGetPerspectiveRatio(ee,xr,Ir,le,Yt),be=Q*ve.perspectiveRatio,Re;if(Oe||Ze)Re=this._projectCollisionBox(w,be,ee,le,Oe,Ze,st,ve,Yt,Kt);else{let Ft=ve.point.x+(Kt?Kt.x*be:0),Ht=ve.point.y+(Kt?Kt.y*be:0);Re={allPointsOccluded:!1,box:[Ft+w.x1*be,Ht+w.y1*be,Ft+w.x2*be,Ht+w.y2*be]}}let[qe,et,Xe,it]=Re.box;return this.mapProjection.useSpecialProjectionForSymbols&&(Oe?Re.allPointsOccluded:this.mapProjection.isOccluded(xr,Ir,le))||ve.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(qe,et,Xe,it)||B!==\"always\"&&this.grid.hitTest(qe,et,Xe,it,B,Tt)?{box:[qe,et,Xe,it],placeable:!1,offscreen:!1}:{box:[qe,et,Xe,it],placeable:!0,offscreen:this.isOffscreen(qe,et,Xe,it)}}placeCollisionCircles(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve,be,Re){let qe=[],et=new a.P(B.anchorX,B.anchorY),Xe=this.getPerspectiveRatio(Oe,et.x,et.y,Ze,Re),it=(Kt?le/Xe:le*Xe)/a.ap,Ft={getElevation:Re,labelPlaneMatrix:st,lineVertexArray:Q,pitchWithMap:Kt,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:et,unwrappedTileID:Ze,width:this.transform.width,height:this.transform.height,translation:be},Ht=tt(it,ee,B.lineOffsetX*it,B.lineOffsetY*it,!1,B,!1,Ft),tr=!1,dr=!1,Sr=!0;if(Ht){let Or=.5*Ir*Xe+ve,Wr=new a.P(-100,-100),ni=new a.P(this.screenRightBoundary,this.screenBottomBoundary),Pi=new wr,cn=Ht.first,ln=Ht.last,Cn=[];for(let fa=cn.path.length-1;fa>=1;fa--)Cn.push(cn.path[fa]);for(let fa=1;fa<ln.path.length;fa++)Cn.push(ln.path[fa]);let Kn=2.5*Or;if(Tt){let fa=this.projectPathToScreenSpace(Cn,Ft,Tt);Cn=fa.some($a=>$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(Cn.length>0){let fa=Cn[0].clone(),$a=Cn[0].clone();for(let Co=1;Co<Cn.length;Co++)fa.x=Math.min(fa.x,Cn[Co].x),fa.y=Math.min(fa.y,Cn[Co].y),$a.x=Math.max($a.x,Cn[Co].x),$a.y=Math.max($a.y,Cn[Co].y);Aa=fa.x>=Wr.x&&$a.x<=ni.x&&fa.y>=Wr.y&&$a.y<=ni.y?[Cn]:$a.x<Wr.x||fa.x>ni.x||$a.y<Wr.y||fa.y>ni.y?[]:a.al([Cn],Wr.x,Wr.y,ni.x,ni.y)}for(let fa of Aa){Pi.reset(fa,.25*Or);let $a=0;$a=Pi.length<=.5*Or?1:Math.ceil(Pi.paddedLength/Kn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Pi.lerp(Qa),Bo=mo.x+di,Ps=mo.y+di;qe.push(Bo,Ps,Or,0);let Ts=Bo-Or,wo=Ps-Or,To=Bo+Or,hl=Ps+Or;if(Sr=Sr&&this.isOffscreen(Ts,wo,To,hl),dr=dr||this.isInsideGrid(Ts,wo,To,hl),w!==\"always\"&&this.grid.hitTestCircle(Bo,Ps,Or,w,xr)&&(tr=!0,!Yt))return{circles:[],offscreen:!1,collisionDetected:tr}}}}return{circles:!Yt&&tr||!dr||Xe<this.perspectiveRatioCutoff?[]:qe,offscreen:Sr,collisionDetected:tr}}projectPathToScreenSpace(w,B,Q){return w.map(ee=>dt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,Oe=-1/0;for(let Yt of w){let Kt=new a.P(Yt.x+di,Yt.y+di);Q=Math.min(Q,Kt.x),ee=Math.min(ee,Kt.y),le=Math.max(le,Kt.x),Oe=Math.max(Oe,Kt.y),B.push(Kt)}let Ze=this.grid.query(Q,ee,le,Oe).concat(this.ignoredGrid.query(Q,ee,le,Oe)),st={},Tt={};for(let Yt of Ze){let Kt=Yt.key;if(st[Kt.bucketInstanceId]===void 0&&(st[Kt.bucketInstanceId]={}),st[Kt.bucketInstanceId][Kt.featureIndex])continue;let xr=[new a.P(Yt.x1,Yt.y1),new a.P(Yt.x2,Yt.y1),new a.P(Yt.x2,Yt.y2),new a.P(Yt.x1,Yt.y2)];a.am(B,xr)&&(st[Kt.bucketInstanceId][Kt.featureIndex]=!0,Tt[Kt.bucketInstanceId]===void 0&&(Tt[Kt.bucketInstanceId]=[]),Tt[Kt.bucketInstanceId].push(Kt.featureIndex))}return Tt}insertCollisionBox(w,B,Q,ee,le,Oe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Oe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Oe){let Ze=Q?this.ignoredGrid:this.grid,st={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Oe,overlapMode:B};for(let Tt=0;Tt<w.length;Tt+=4)Ze.insertCircle(st,w[Tt],w[Tt+1],w[Tt+2])}projectAndGetPerspectiveRatio(w,B,Q,ee,le){let Oe;le?(Oe=[B,Q,le(B,Q),1],a.af(Oe,Oe,w)):(Oe=[B,Q,0,1],$r(Oe,Oe,w));let Ze=Oe[3];return{point:new a.P((Oe[0]/Ze+1)/2*this.transform.width+di,(-Oe[1]/Ze+1)/2*this.transform.height+di),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Ze*.5,isOccluded:!1,signedDistanceFromCamera:Ze}}getPerspectiveRatio(w,B,Q,ee,le){let Oe=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(B,Q,ee,le):dt(B,Q,w,le);return .5+this.transform.cameraToCenterDistance/Oe.signedDistanceFromCamera*.5}isOffscreen(w,B,Q,ee){return Q<di||w>=this.screenRightBoundary||ee<di||B>this.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w<this.gridRightBoundary&&ee>=0&&B<this.gridBottomBoundary}getViewportMatrix(){let w=a.an([]);return a.J(w,w,[-100,-100,0]),w}_projectCollisionBox(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt){let Kt=new a.P(1,0),xr=new a.P(0,1),Ir=new a.P(w.anchorPointX+Ze[0],w.anchorPointY+Ze[1]);if(Oe&&!le){let Sr=this.projectAndGetPerspectiveRatio(Q,Ir.x+1,Ir.y,ee,Tt).point.sub(st.point).unit(),Or=Math.atan(Sr.y/Sr.x)+(Sr.x<0?Math.PI:0),Wr=Math.sin(Or),ni=Math.cos(Or);Kt=new a.P(ni,Wr),xr=new a.P(-Wr,ni)}else if(!Oe&&le){let Sr=-this.transform.angle,Or=Math.sin(Sr),Wr=Math.cos(Sr);Kt=new a.P(Wr,Or),xr=new a.P(-Or,Wr)}let ve=st.point,be=B;if(le){ve=Ir;let Sr=this.transform.zoom-Math.floor(this.transform.zoom);be=Math.pow(2,-Sr),be*=this.mapProjection.getPitchedTextCorrection(this.transform,Ir,ee),Yt||(be*=a.ac(.5+st.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Yt&&(ve=ve.add(Kt.mult(Yt.x*be)).add(xr.mult(Yt.y*be)));let Re=w.x1*be,qe=w.x2*be,et=(Re+qe)/2,Xe=w.y1*be,it=w.y2*be,Ft=(Xe+it)/2,Ht=[{offsetX:Re,offsetY:Xe},{offsetX:et,offsetY:Xe},{offsetX:qe,offsetY:Xe},{offsetX:qe,offsetY:Ft},{offsetX:qe,offsetY:it},{offsetX:et,offsetY:it},{offsetX:Re,offsetY:it},{offsetX:Re,offsetY:Ft}],tr=[];for(let{offsetX:Sr,offsetY:Or}of Ht)tr.push(new a.P(ve.x+Kt.x*Sr+xr.x*Or,ve.y+Kt.y*Sr+xr.y*Or));let dr=!1;if(le){let Sr=tr.map(Or=>this.projectAndGetPerspectiveRatio(Q,Or.x,Or.y,ee,Tt));dr=Sr.some(Or=>!Or.isOccluded),tr=Sr.map(Or=>Or.point)}else dr=!0;return{box:a.ao(tr),allPointsOccluded:!dr}}}function In(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class wi{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class On{constructor(w,B,Q,ee,le){this.text=new wi(w?w.text:null,B,Q,le),this.icon=new wi(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Fn{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ra{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class la{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Ut(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Oe}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(Oe-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,Oe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new ji(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new la(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Oe,Oe&&(Oe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),Oe=Q.latestFeatureIndex;if(!le||!Oe||B.id!==le.layerIds[0])return;let Ze=Q.collisionBoxArray,st=le.layers[0].layout,Tt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Kt=Q.tileSize/a.X,xr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(xr),ve=st.get(\"text-pitch-alignment\")===\"map\",be=st.get(\"text-rotation-alignment\")===\"map\",Re=In(Q,1,this.transform.zoom),qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get(\"text-translate\"),Tt.get(\"text-translate-anchor\")),et=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get(\"icon-translate\"),Tt.get(\"icon-translate-anchor\")),Xe=Br(Ir,ve,be,this.transform,Re),it=null;if(ve){let Ht=Vr(Ir,ve,be,this.transform,Re);it=a.L([],this.transform.labelPlaneMatrix,Ht)}this.retainedQueryData[le.bucketInstanceId]=new ra(le.bucketInstanceId,Oe,le.sourceLayerIndex,le.index,Q.tileID);let Ft={bucket:le,layout:st,translationText:qe,translationIcon:et,posMatrix:Ir,unwrappedTileID:xr,textLabelPlaneMatrix:Xe,labelToScreenMatrix:it,scale:Yt,textPixelRatio:Kt,holdingForFade:Q.holdingForFade(),collisionBoxArray:Ze,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Ht of le.sortKeyRanges){let{sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr}=Ht;w.push({sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr,parameters:Ft})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:Ft})}attemptAnchorPlacement(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve,be,Re,qe,et,Xe){let it=a.aq[w.textAnchor],Ft=[w.textOffset0,w.textOffset1],Ht=Ut(it,Q,ee,Ft,le),tr=this.collisionIndex.placeCollisionBox(B,xr,st,Tt,Yt,Ze,Oe,Re,Kt.predicate,Xe,Ht);if((!et||this.collisionIndex.placeCollisionBox(et,xr,st,Tt,Yt,Ze,Oe,qe,Kt.predicate,Xe,Ht).placeable)&&tr.placeable){let dr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID].text&&(dr=this.prevPlacement.variableOffsets[Ir.crossTileID].anchor),Ir.crossTileID===0)throw new Error(\"symbolInstance.crossTileID can't be 0\");return this.variableOffsets[Ir.crossTileID]={textOffset:Ft,width:Q,height:ee,anchor:it,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ve,it,Ir,be),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,be,Ir),this.placedOrientations[Ir.crossTileID]=be),{shift:Ht,placedGlyphBoxes:tr}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Oe,translationIcon:Ze,posMatrix:st,unwrappedTileID:Tt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Kt,textPixelRatio:xr,holdingForFade:Ir,collisionBoxArray:ve,partiallyEvaluatedTextSize:be,collisionGroup:Re}=w.parameters,qe=le.get(\"text-optional\"),et=le.get(\"icon-optional\"),Xe=a.ar(le,\"text-overlap\",\"text-allow-overlap\"),it=Xe===\"always\",Ft=a.ar(le,\"icon-overlap\",\"icon-allow-overlap\"),Ht=Ft===\"always\",tr=le.get(\"text-rotation-alignment\")===\"map\",dr=le.get(\"text-pitch-alignment\")===\"map\",Sr=le.get(\"icon-text-fit\")!==\"none\",Or=le.get(\"symbol-z-order\")===\"viewport-y\",Wr=it&&(Ht||!ee.hasIconData()||et),ni=Ht&&(it||!ee.hasTextData()||qe);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Pi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(ln,Cn,Kn)=>{var Aa,fa;if(B[ln.crossTileID])return;if(Ir)return void(this.placements[ln.crossTileID]=new qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Cn.textFeatureIndex?hl=Cn.textFeatureIndex:ln.useRuntimeCollisionCircles&&(hl=ln.featureIndex),Cn.verticalTextFeatureIndex&&(Ul=Cn.verticalTextFeatureIndex);let au=Cn.textBox;if(au){let Tl=Te=>{let Ne=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let He=this.prevPlacement.placedOrientations[ln.crossTileID];He&&(this.placedOrientations[ln.crossTileID]=He,Ne=He,this.markUsedOrientation(ee,Ne,ln))}return Ne},Al=(Te,Ne)=>{if(ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Cn.verticalTextBox){for(let He of ee.writingModes)if(He===a.ah.vertical?(Bo=Ne(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=ln.textAnchorOffsetStartIndex,se=ln.textAnchorOffsetEndIndex;if(se===X){let Te=(Ne,He)=>{let Ye=this.collisionIndex.placeCollisionBox(Ne,Xe,xr,st,Tt,dr,tr,Oe,Re.predicate,Pi);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,He,ln),this.placedOrientations[ln.crossTileID]=He),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let Ne=Cn.verticalTextBox;return ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Ne?Te(Ne,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[ln.crossTileID])===null||fa===void 0?void 0:fa.anchor],Ne=(Ye,kt,nt)=>{let jt=Ye.x2-Ye.x1,gr=Ye.y2-Ye.y1,yr=ln.textBoxScale,Hr=Sr&&Ft===\"never\"?kt:null,qr=null,_i=Xe===\"never\"?1:2,bi=\"never\";Te&&_i++;for(let Zr=0;Zr<_i;Zr++){for(let ai=X;ai<se;ai++){let gi=ee.textAnchorOffsets.get(ai);if(Te&&gi.textAnchor!==Te)continue;let Ii=this.attemptAnchorPlacement(gi,Ye,jt,gr,yr,tr,dr,xr,st,Tt,Re,bi,ln,ee,nt,Oe,Ze,Hr,Pi);if(Ii&&(qr=Ii.placedGlyphBoxes,qr&&qr.placeable))return $a=!0,mo=Ii.shift,qr}Te?Te=null:bi=Xe}return Q&&!qr&&(qr={box:this.collisionIndex.placeCollisionBox(au,\"always\",xr,st,Tt,dr,tr,Oe,Re.predicate,Pi,new a.P(0,0)).box,offscreen:!1,placeable:!1}),qr};Al(()=>Ne(au,Cn.iconBox,a.ah.horizontal),()=>{let Ye=Cn.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&ln.numVerticalGlyphVertices>0&&Ye?Ne(Ye,Cn.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let He=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[ln.crossTileID];Ye&&(this.variableOffsets[ln.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,ln,He))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,ln.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(ln.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,be,Tl),X=le.get(\"text-padding\");wo=this.collisionIndex.placeCollisionCircles(Xe,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,st,Tt,Yt,Kt,Q,dr,Re.predicate,ln.collisionCircleDiameter,X,Oe,Pi),wo.circles.length&&wo.collisionDetected&&!Q&&a.w(\"Collisions detected, but collision boxes are not shown\"),$a=it||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Cn.iconFeatureIndex&&(Lu=Cn.iconFeatureIndex),Cn.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,Ft,xr,st,Tt,dr,tr,Ze,Re.predicate,Pi,Sr&&mo?mo:void 0);Ps&&Ps.placeable&&Cn.verticalIconBox?(To=Tl(Cn.verticalIconBox),Co=To.placeable):(To=Tl(Cn.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=qe||ln.numHorizontalGlyphVertices===0&&ln.numVerticalGlyphVertices===0,eu=et||ln.numIconVertices===0;Js||eu?eu?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,Xe,le.get(\"text-ignore-placement\"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,Re.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,Ft,le.get(\"icon-ignore-placement\"),ee.bucketInstanceId,Lu,Re.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,Xe,le.get(\"text-ignore-placement\"),ee.bucketInstanceId,hl,Re.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Kn,Cn,Ts,To,wo),ln.crossTileID===0)throw new Error(\"symbolInstance.crossTileID can't be 0\");if(ee.bucketInstanceId===0)throw new Error(\"bucket.bucketInstanceId can't be 0\");this.placements[ln.crossTileID]=new qn($a||Wr,Co||ni,Qa||ee.justReloaded),B[ln.crossTileID]=!0};if(Or){if(w.symbolInstanceStart!==0)throw new Error(\"bucket.bucketInstanceId should be 0\");let ln=ee.getSortedSymbolIndexes(this.transform.angle);for(let Cn=ln.length-1;Cn>=0;--Cn){let Kn=ln[Cn];cn(ee.symbolInstances.get(Kn),ee.collisionArrays[Kn],Kn)}}else for(let ln=w.symbolInstanceStart;ln<w.symbolInstanceEnd;ln++)cn(ee.symbolInstances.get(ln),ee.collisionArrays[ln],ln);if(Q&&ee.bucketInstanceId in this.collisionCircleArrays){let ln=this.collisionCircleArrays[ee.bucketInstanceId];a.as(ln.invProjMatrix,st),ln.viewportMatrix=this.collisionIndex.getViewportMatrix()}ee.justReloaded=!1}storeCollisionData(w,B,Q,ee,le,Oe){if(Q.textBox||Q.iconBox){let Ze,st;this.collisionBoxArrays.has(w)?Ze=this.collisionBoxArrays.get(w):(Ze=new Map,this.collisionBoxArrays.set(w,Ze)),Ze.has(B)?st=Ze.get(B):(st={text:null,icon:null},Ze.set(B,st)),Q.textBox&&(st.text=ee.box),Q.iconBox&&(st.icon=le.box)}if(Oe){let Ze=this.collisionCircleArrays[w];Ze===void 0&&(Ze=this.collisionCircleArrays[w]=new Fn);for(let st=0;st<Oe.circles.length;st+=4)Ze.circles.push(Oe.circles[st+0]),Ze.circles.push(Oe.circles[st+1]),Ze.circles.push(Oe.circles[st+2]),Ze.circles.push(Oe.collisionDetected?1:0)}}markUsedJustification(w,B,Q,ee){let le;le=ee===a.ah.vertical?Q.verticalPlacedTextSymbolIndex:{left:Q.leftJustifiedTextSymbolIndex,center:Q.centerJustifiedTextSymbolIndex,right:Q.rightJustifiedTextSymbolIndex}[a.at(B)];let Oe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex,Q.verticalPlacedTextSymbolIndex];for(let Ze of Oe)Ze>=0&&(w.text.placedSymbolArray.get(Ze).crossTileID=le>=0&&Ze!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,Oe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Ze of Oe)w.text.placedSymbolArray.get(Ze).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},Oe=B?B.variableOffsets:{},Ze=B?B.placedOrientations:{};for(let st in this.placements){let Tt=this.placements[st],Yt=le[st];Yt?(this.opacities[st]=new On(Yt,ee,Tt.text,Tt.icon),Q=Q||Tt.text!==Yt.text.placed||Tt.icon!==Yt.icon.placed):(this.opacities[st]=new On(null,ee,Tt.text,Tt.icon,Tt.skipFade),Q=Q||Tt.text||Tt.icon)}for(let st in le){let Tt=le[st];if(!this.opacities[st]){let Yt=new On(Tt,ee,!1,!1);Yt.isHidden()||(this.opacities[st]=Yt,Q=Q||Tt.text.placed||Tt.icon.placed)}}for(let st in Oe)this.variableOffsets[st]||!this.opacities[st]||this.opacities[st].isHidden()||(this.variableOffsets[st]=Oe[st]);for(let st in Ze)this.placedOrientations[st]||!this.opacities[st]||this.opacities[st].isHidden()||(this.placedOrientations[st]=Ze[st]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error(\"Last placement time for previous placement is not defined\");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!=\"number\"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],Oe=le.layout,Ze=new On(null,0,!1,!1,!0),st=Oe.get(\"text-allow-overlap\"),Tt=Oe.get(\"icon-allow-overlap\"),Yt=le._unevaluatedLayout.hasValue(\"text-variable-anchor\")||le._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"),Kt=Oe.get(\"text-rotation-alignment\")===\"map\",xr=Oe.get(\"text-pitch-alignment\")===\"map\",Ir=Oe.get(\"icon-text-fit\")!==\"none\",ve=new On(null,0,st&&(Tt||!w.hasIconData()||Oe.get(\"icon-optional\")),Tt&&(st||!w.hasTextData()||Oe.get(\"text-optional\")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(qe,et,Xe)=>{for(let it=0;it<et/4;it++)qe.opacityVertexArray.emplaceBack(Xe);qe.hasVisibleVertices=qe.hasVisibleVertices||Xe!==fn},Re=this.collisionBoxArrays.get(w.bucketInstanceId);for(let qe=0;qe<w.symbolInstances.length;qe++){let et=w.symbolInstances.get(qe),{numHorizontalGlyphVertices:Xe,numVerticalGlyphVertices:it,crossTileID:Ft}=et,Ht=this.opacities[Ft];Q[Ft]?Ht=Ze:Ht||(Ht=ve,this.opacities[Ft]=Ht),Q[Ft]=!0;let tr=et.numIconVertices>0,dr=this.placedOrientations[et.crossTileID],Sr=dr===a.ah.vertical,Or=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(Xe>0||it>0){let ni=tn(Ht.text);be(w.text,Xe,Sr?fn:ni),be(w.text,it,Or?fn:ni);let Pi=Ht.text.isHidden();[et.rightJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.leftJustifiedTextSymbolIndex].forEach(Cn=>{Cn>=0&&(w.text.placedSymbolArray.get(Cn).hidden=Pi||Sr?1:0)}),et.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(et.verticalPlacedTextSymbolIndex).hidden=Pi||Or?1:0);let cn=this.variableOffsets[et.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,et,dr);let ln=this.placedOrientations[et.crossTileID];ln&&(this.markUsedJustification(w,\"left\",et,ln),this.markUsedOrientation(w,ln,et))}if(tr){let ni=tn(Ht.icon),Pi=!(Ir&&et.verticalPlacedIconSymbolIndex&&Sr);et.placedIconSymbolIndex>=0&&(be(w.icon,et.numIconVertices,Pi?ni:fn),w.icon.placedSymbolArray.get(et.placedIconSymbolIndex).hidden=Ht.icon.isHidden()),et.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,et.numVerticalIconVertices,Pi?fn:ni),w.icon.placedSymbolArray.get(et.verticalPlacedIconSymbolIndex).hidden=Ht.icon.isHidden())}let Wr=Re&&Re.has(qe)?Re.get(qe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ni=w.collisionArrays[qe];if(ni){let Pi=new a.P(0,0);if(ni.textBox||ni.verticalTextBox){let cn=!0;if(Yt){let ln=this.variableOffsets[Ft];ln?(Pi=Ut(ln.anchor,ln.width,ln.height,ln.textOffset,ln.textBoxScale),Kt&&Pi._rotate(xr?this.transform.angle:-this.transform.angle)):cn=!1}if(ni.textBox||ni.verticalTextBox){let ln;ni.textBox&&(ln=Sr),ni.verticalTextBox&&(ln=Or),rr(w.textCollisionBox.collisionVertexArray,Ht.text.placed,!cn||ln,Wr.text,Pi.x,Pi.y)}}if(ni.iconBox||ni.verticalIconBox){let cn=!!(!Or&&ni.verticalIconBox),ln;ni.iconBox&&(ln=cn),ni.verticalIconBox&&(ln=!cn),rr(w.iconCollisionBox.collisionVertexArray,Ht.icon.placed,ln,Wr.icon,Ir?Pi.x:0,Ir?Pi.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let qe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=qe.invProjMatrix,w.placementViewportMatrix=qe.viewportMatrix,w.collisionCircleArray=qe.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(w,B){let Q=this.zoomAtLastRecencyCheck===B?1-this.zoomAdjustment(B):1;return this.zoomAtLastRecencyCheck=B,this.commitTime+this.fadeDuration*Q>w}setStale(){this.stale=!0}}function rr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Oe=Q[0]-di,Ze=Q[1]-di,st=Q[2]-di,Tt=Q[3]-di;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Oe,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,st,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,st,Tt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Oe,Tt)}let nr=Math.pow(2,25),Er=Math.pow(2,24),Xr=Math.pow(2,17),ri=Math.pow(2,16),Qr=Math.pow(2,9),Oi=Math.pow(2,8),$i=Math.pow(2,1);function tn(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*nr+w*Er+B*Xr+w*ri+B*Qr+w*Oi+B*$i+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error(\"Not implemented.\")},translatePosition:(ue,w,B,Q)=>function(ee,le,Oe,Ze,st=!1){if(!Oe[0]&&!Oe[1])return[0,0];let Tt=st?Ze===\"map\"?ee.angle:0:Ze===\"viewport\"?-ee.angle:0;if(Tt){let Yt=Math.sin(Tt),Kt=Math.cos(Tt);Oe=[Oe[0]*Kt-Oe[1]*Yt,Oe[0]*Yt+Oe[1]*Kt]}return[st?Oe[0]:In(le,Oe[0],ee.zoom),st?Oe[1]:In(le,Oe[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Sn{constructor(w){this._sortAcrossTiles=w.layout.get(\"symbol-z-order\")!==\"viewport-y\"&&!w.layout.get(\"symbol-sort-key\").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let Oe=this._bucketParts;for(;this._currentTileIndex<w.length;)if(B.getBucketParts(Oe,ee,w[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,le())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Oe.sort((Ze,st)=>Ze.sortKey-st.sortKey));this._currentPartIndex<Oe.length;)if(B.placeLayerBucketPart(Oe[this._currentPartIndex],this._seenCrossTileIDs,Q),this._currentPartIndex++,le())return!0;return!1}}class Ba{constructor(w,B,Q,ee,le,Oe,Ze,st){this.placement=new wt(w,yn(),B,Oe,Ze,st),this._currentPlacementIndex=Q.length-1,this._forceFullPlacement=ee,this._showCollisionBoxes=le,this._done=!1}isDone(){return this._done}continuePlacement(w,B,Q){let ee=u.now(),le=()=>!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Oe=B[w[this._currentPlacementIndex]],Ze=this.placement.collisionIndex.transform.zoom;if(Oe.type===\"symbol\"&&(!Oe.minzoom||Oe.minzoom<=Ze)&&(!Oe.maxzoom||Oe.maxzoom>Ze)){if(this._inProgressLayer||(this._inProgressLayer=new Sn(Oe)),this._inProgressLayer.continuePlacement(Q[Oe.source],this.placement,this._showCollisionBoxes,Oe,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le<B.length;le++){let Oe=B.get(le),Ze=Oe.key,st=ee.get(Ze);st?st.push(Oe):ee.set(Ze,[Oe])}for(let[le,Oe]of ee){let Ze={positions:Oe.map(st=>({x:Math.floor(st.anchorX*ua),y:Math.floor(st.anchorY*ua)})),crossTileIDs:Oe.map(st=>st.crossTileID)};if(Ze.positions.length>128){let st=new a.av(Ze.positions.length,16,Uint16Array);for(let{x:Tt,y:Yt}of Ze.positions)st.add(Tt,Yt);st.finish(),delete Ze.positions,Ze.index=st}this._symbolsByKey[le]=Ze}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Oe,y:Ze,z:st}=B.canonical,Tt=ua/Math.pow(2,st-le),Yt=(Ze*a.X+w.anchorY)*Tt,Kt=ee*a.X*ua;return{x:Math.floor((Oe*a.X+w.anchorX)*Tt-Q*a.X*ua),y:Math.floor(Yt-Kt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.z<B.canonical.z?1:Math.pow(2,this.tileID.canonical.z-B.canonical.z);for(let le=0;le<w.length;le++){let Oe=w.get(le);if(Oe.crossTileID)continue;let Ze=this._symbolsByKey[Oe.key];if(!Ze)continue;let st=this.getScaledCoordinates(Oe,B);if(Ze.index){let Tt=Ze.index.range(st.x-ee,st.y-ee,st.x+ee,st.y+ee).sort();for(let Yt of Tt){let Kt=Ze.crossTileIDs[Yt];if(!Q[Kt]){Q[Kt]=!0,Oe.crossTileID=Kt;break}}}else if(Ze.positions)for(let Tt=0;Tt<Ze.positions.length;Tt++){let Yt=Ze.positions[Tt],Kt=Ze.crossTileIDs[Tt];if(Math.abs(Yt.x-st.x)<=ee&&Math.abs(Yt.y-st.y)<=ee&&!Q[Kt]){Q[Kt]=!0,Oe.crossTileID=Kt;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:w})=>w)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let Oe in ee){let Ze=ee[Oe];Ze.tileID=Ze.tileID.unwrapTo(Ze.tileID.wrap+B),le[Ze.tileID.key]=Ze}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;le<B.symbolInstances.length;le++)B.symbolInstances.get(le).crossTileID=0;this.usedCrossTileIDs[w.overscaledZ]||(this.usedCrossTileIDs[w.overscaledZ]={});let ee=this.usedCrossTileIDs[w.overscaledZ];for(let le in this.indexes){let Oe=this.indexes[le];if(Number(le)>w.overscaledZ)for(let Ze in Oe){let st=Oe[Ze];st.tileID.isChildOf(w)&&st.findMatches(B.symbolInstances,w,ee)}else{let Ze=Oe[w.scaledTo(Number(le)).key];Ze&&Ze.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le<B.symbolInstances.length;le++){let Oe=B.symbolInstances.get(le);Oe.crossTileID||(Oe.crossTileID=Q.generate(),ee[Oe.crossTileID]=!0)}return this.indexes[w.overscaledZ]===void 0&&(this.indexes[w.overscaledZ]={}),this.indexes[w.overscaledZ][w.key]=new ma(w,B.symbolInstances,B.bucketInstanceId),!0}removeBucketCrossTileIDs(w,B){for(let Q of B.getCrossTileIDsLists())for(let ee of Q)delete this.usedCrossTileIDs[w][ee]}removeStaleBuckets(w){let B=!1;for(let Q in this.indexes){let ee=this.indexes[Q];for(let le in ee)w[ee[le].bucketInstanceId]||(this.removeBucketCrossTileIDs(Q,ee[le]),delete ee[le],B=!0)}return B}}class Xo{constructor(){this.layerIndexes={},this.crossTileIDs=new Wa,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(w,B,Q){let ee=this.layerIndexes[w.id];ee===void 0&&(ee=this.layerIndexes[w.id]=new Fa);let le=!1,Oe={};ee.handleWrapJump(Q);for(let Ze of B){let st=Ze.getBucket(w);st&&w.id===st.layerIds[0]&&(st.bucketInstanceId||(st.bucketInstanceId=++this.maxBucketInstanceId),ee.addBucket(Ze.tileID,st,this.crossTileIDs)&&(le=!0),Oe[st.bucketInstanceId]=!0)}return ee.removeStaleBuckets(Oe)&&(le=!0),le}pruneUnusedLayers(w){let B={};w.forEach(Q=>{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!==\"source.canvas\")),Wn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!==\"vector\"&&ee!==\"geojson\"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Se(),w._getMapId()),this.dispatcher.registerMessageHandler(\"GG\",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler(\"GI\",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new A,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Xo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast(\"SR\",a.ay()),Qt().on(fr,this._rtlPluginLoaded),this.on(\"data\",Q=>{if(Q.dataType!==\"source\"||Q.sourceDataType!==\"metadata\")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let Oe in this._layers){let Ze=this._layers[Oe];Ze.source===le.id&&this._validateLayer(Ze)}})}loadURL(w,B={},Q){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),B.validate=typeof B.validate!=\"boolean\"||B.validate;let ee=this.map._requestManager.transformRequest(w,\"Style\");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(Oe=>{this._loadStyleRequest=null,this._load(Oe.data,B,Q)}).catch(Oe=>{this._loadStyleRequest=null,Oe&&!le.signal.aborted&&this.fire(new a.j(Oe))})}loadJSON(w,B={},Q){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k(\"dataloading\",{dataType:\"style\"})),this._load(Wn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Oe in le.sources)this.addSource(Oe,le.sources[Oe],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k(\"data\",{dataType:\"style\"})),this.fire(new a.k(\"style.load\"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast(\"SL\",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,Oe,Ze,st){return a._(this,void 0,void 0,function*(){let Tt=C(le),Yt=Ze>1?\"@2x\":\"\",Kt={},xr={};for(let{id:Ir,url:ve}of Tt){let be=Oe.transformRequest(M(ve,Yt,\".json\"),\"SpriteJSON\");Kt[Ir]=a.h(be,st);let Re=Oe.transformRequest(M(ve,Yt,\".png\"),\"SpriteImage\");xr[Ir]=p.getImage(Re,st)}return yield Promise.all([...Object.values(Kt),...Object.values(xr)]),function(Ir,ve){return a._(this,void 0,void 0,function*(){let be={};for(let Re in Ir){be[Re]={};let qe=u.getImageCanvasContext((yield ve[Re]).data),et=(yield Ir[Re]).data;for(let Xe in et){let{width:it,height:Ft,x:Ht,y:tr,sdf:dr,pixelRatio:Sr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn}=et[Xe];be[Re][Xe]={data:null,pixelRatio:Sr,sdf:dr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn,spriteData:{width:it,height:Ft,x:Ht,y:tr,context:qe}}}}return be})}(Kt,xr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Oe in le){this._spritesImagesIds[Oe]=[];let Ze=this._spritesImagesIds[Oe]?this._spritesImagesIds[Oe].filter(st=>!(st in le)):[];for(let st of Ze)this.imageManager.removeImage(st),this._changedImages[st]=!0;for(let st in le[Oe]){let Tt=Oe===\"default\"?st:`${Oe}:${st}`;this._spritesImagesIds[Oe].push(Tt),Tt in this.imageManager.images?this.imageManager.updateImage(Tt,le[Oe][st],!1):this.imageManager.addImage(Tt,le[Oe][st]),B&&(this._changedImages[Tt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type===\"geojson\"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer \"${Q}\" does not exist on source \"${ee.id}\" as specified by style layer \"${w.id}\".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let Oe=B?a.aB(Q[le]):Q[le];ee.push(Oe)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!==\"custom\"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error(\"Style is not done loading.\")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let Oe in this._updatedSources){let Ze=this._updatedSources[Oe];if(Ze===\"reload\")this._reloadSource(Oe);else{if(Ze!==\"clear\")throw new Error(`Invalid action ${Ze}`);this._clearSource(Oe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Oe in this._updatedPaintProps)this._layers[Oe].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k(\"data\",{sourceDataType:\"visibility\",dataType:\"source\",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k(\"data\",{dataType:\"style\"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies([\"icons\",\"patterns\"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies([\"glyphs\"],[\"\"]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast(\"UL\",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Oe=this._getOperationsToPerform(le);if(Oe.unimplemented.length>0)throw new Error(`Unimplemented: ${Oe.unimplemented.join(\", \")}.`);if(Oe.operations.length===0)return!1;for(let Ze of Oe.operations)Ze();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case\"setCenter\":case\"setZoom\":case\"setBearing\":case\"setPitch\":continue;case\"addLayer\":B.push(()=>this.addLayer.apply(this,ee.args));break;case\"removeLayer\":B.push(()=>this.removeLayer.apply(this,ee.args));break;case\"setPaintProperty\":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case\"setLayoutProperty\":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case\"setFilter\":B.push(()=>this.setFilter.apply(this,ee.args));break;case\"addSource\":B.push(()=>this.addSource.apply(this,ee.args));break;case\"removeSource\":B.push(()=>this.removeSource.apply(this,ee.args));break;case\"setLayerZoomRange\":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case\"setLight\":B.push(()=>this.setLight.apply(this,ee.args));break;case\"setGeoJSONSourceData\":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case\"setGlyphs\":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case\"setSprite\":B.push(()=>this.setSprite.apply(this,ee.args));break;case\"setSky\":B.push(()=>this.setSky.apply(this,ee.args));break;case\"setTerrain\":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case\"setTransition\":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named \"${w}\" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named \"${w}\" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source \"${w}\" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(\", \")}.`);if([\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new mt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(\"There is no source with this ID\");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source \"${w}\" cannot be removed while layer \"${Q}\" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k(\"data\",{sourceDataType:\"metadata\",dataType:\"source\",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!==\"geojson\")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer \"${ee}\" already exists on this map.`)));let le;if(w.type===\"custom\"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if(\"source\"in w&&typeof w.source==\"object\"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let Oe=B?this._order.indexOf(B):this._order.length;if(B&&Oe===-1)this.fire(new a.j(new Error(`Cannot add layer \"${ee}\" before non-existing layer \"${B}\".`)));else{if(this._order.splice(Oe,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!==\"custom\"){let Ze=this._removedLayers[ee];delete this._removedLayers[ee],Ze.type!==le.type?this._updatedSources[le.source]=\"clear\":(this._updatedSources[le.source]=\"reload\",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer \"${w}\" before non-existing layer \"${B}\".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer \"${w}\".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer \"${w}\".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer \"${w}\".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer \"${w}\".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer \"${w}\".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer \"${w}\".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let Oe=le.getSource().type;Oe===\"geojson\"&&ee?this.fire(new a.j(new Error(\"GeoJSON sources cannot have a sourceLayer parameter.\"))):Oe!==\"vector\"||ee?(w.id===void 0&&this.fire(new a.j(new Error(\"The feature id parameter must be provided.\"))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,Oe=le===\"vector\"?w.sourceLayer:void 0;le!==\"vector\"||Oe?B&&typeof w.id!=\"string\"&&typeof w.id!=\"number\"?this.fire(new a.j(new Error(\"A feature id is required to remove its specific state property.\"))):ee.removeFeatureState(Oe,w.id,B):this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!==\"vector\"||Q?(w.id===void 0&&this.fire(new a.j(new Error(\"The feature id parameter must be provided.\"))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error(\"The sourceLayer parameter must be provided for vector source types.\")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!==\"raster\"&&(this._updatedSources[w.source]=\"reload\",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=Oe=>this._layers[Oe].type===\"fill-extrusion\",Q={},ee=[];for(let Oe=this._order.length-1;Oe>=0;Oe--){let Ze=this._order[Oe];if(B(Ze)){Q[Ze]=Oe;for(let st of w){let Tt=st[Ze];if(Tt)for(let Yt of Tt)ee.push(Yt)}}}ee.sort((Oe,Ze)=>Ze.intersectionZ-Oe.intersectionZ);let le=[];for(let Oe=this._order.length-1;Oe>=0;Oe--){let Ze=this._order[Oe];if(B(Ze))for(let st=ee.length-1;st>=0;st--){let Tt=ee[st].feature;if(Q[Tt.layer.id]<Oe)break;le.push(Tt),ee.pop()}else for(let st of w){let Tt=st[Ze];if(Tt)for(let Yt of Tt)le.push(Yt.feature)}}return le}queryRenderedFeatures(w,B,Q){B&&B.filter&&this._validate(a.u.filter,\"queryRenderedFeatures.filter\",B.filter,null,B);let ee={};if(B&&B.layers){if(!Array.isArray(B.layers))return this.fire(new a.j(new Error(\"parameters.layers must be an Array.\"))),[];for(let Ze of B.layers){let st=this._layers[Ze];if(!st)return this.fire(new a.j(new Error(`The layer '${Ze}' does not exist in the map's style and cannot be queried for features.`))),[];ee[st.source]=!0}}let le=[];B.availableImages=this._availableImages;let Oe=this._serializedAllLayers();for(let Ze in this.sourceCaches)B.layers&&!ee[Ze]||le.push(Pe(this.sourceCaches[Ze],this._layers,Oe,w,B,Q));return this.placement&&le.push(function(Ze,st,Tt,Yt,Kt,xr,Ir){let ve={},be=xr.queryRenderedSymbols(Yt),Re=[];for(let qe of Object.keys(be).map(Number))Re.push(Ir[qe]);Re.sort(me);for(let qe of Re){let et=qe.featureIndex.lookupSymbolFeatures(be[qe.bucketInstanceId],st,qe.bucketIndex,qe.sourceLayerIndex,Kt.filter,Kt.layers,Kt.availableImages,Ze);for(let Xe in et){let it=ve[Xe]=ve[Xe]||[],Ft=et[Xe];Ft.sort((Ht,tr)=>{let dr=qe.featureSortOrder;if(dr){let Sr=dr.indexOf(Ht.featureIndex);return dr.indexOf(tr.featureIndex)-Sr}return tr.featureIndex-Ht.featureIndex});for(let Ht of Ft)it.push(Ht)}}for(let qe in ve)ve[qe].forEach(et=>{let Xe=et.feature,it=Tt[Ze[qe].source].getFeatureState(Xe.layer[\"source-layer\"],Xe.id);Xe.source=Xe.layer.source,Xe.layer[\"source-layer\"]&&(Xe.sourceLayer=Xe.layer[\"source-layer\"]),Xe.state=it});return ve}(this._layers,Oe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,\"querySourceFeatures.filter\",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let Oe=ee.getRenderableIds().map(Tt=>ee.getTileByID(Tt)),Ze=[],st={};for(let Tt=0;Tt<Oe.length;Tt++){let Yt=Oe[Tt],Kt=Yt.tileID.canonical.key;st[Kt]||(st[Kt]=!0,Yt.querySourceFeatures(Ze,le))}return Ze}(Q,B):[]}getLight(){return this.light.getLight()}setLight(w,B={}){this._checkLoaded();let Q=this.light.getLight(),ee=!1;for(let Oe in w)if(!a.aE(w[Oe],Q[Oe])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(w,B),this.light.updateTransitions(le)}getSky(){var w;return(w=this.stylesheet)===null||w===void 0?void 0:w.sky}setSky(w,B={}){let Q=this.getSky(),ee=!1;if(!w&&!Q)return;if(w&&!Q)ee=!0;else if(!w&&Q)ee=!0;else for(let Oe in w)if(!a.aE(w[Oe],Q[Oe])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=w,this.sky.setSky(w,B),this.sky.updateTransitions(le)}_validate(w,B,Q,ee,le={}){return(!le||le.validate!==!1)&&da(this,w.call(a.u,a.e({key:B,style:this.serialize(),value:Q,styleSpec:a.v},ee)))}_remove(w=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Qt().off(fr,this._rtlPluginLoaded);for(let B in this._layers)this._layers[B].setEventedParent(null);for(let B in this.sourceCaches){let Q=this.sourceCaches[B];Q.setEventedParent(null),Q.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),w&&this.dispatcher.broadcast(\"RM\",void 0),this.dispatcher.remove(w)}_clearSource(w){this.sourceCaches[w].clearTiles()}_reloadSource(w){this.sourceCaches[w].resume(),this.sourceCaches[w].reload()}_updateSources(w){for(let B in this.sourceCaches)this.sourceCaches[B].update(w,this.map.terrain)}_generateCollisionBoxes(){for(let w in this.sourceCaches)this._reloadSource(w)}_updatePlacement(w,B,Q,ee,le=!1){let Oe=!1,Ze=!1,st={};for(let Tt of this._order){let Yt=this._layers[Tt];if(Yt.type!==\"symbol\")continue;if(!st[Yt.source]){let xr=this.sourceCaches[Yt.source];st[Yt.source]=xr.getRenderableIds(!0).map(Ir=>xr.getTileByID(Ir)).sort((Ir,ve)=>ve.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ve.tileID)?-1:1))}let Kt=this.crossTileSymbolIndex.addLayer(Yt,st[Yt.source],w.center.lng);Oe=Oe||Kt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,st),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Ze=!0),Oe&&this.pauseablePlacement.placement.setStale()),Ze||Oe)for(let Tt of this._order){let Yt=this._layers[Tt];Yt.type===\"symbol\"&&this.placement.updateLayerOpacities(Yt,st[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[\"\"]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,\"glyphs\",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],Oe=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,\"sprite\",Oe,null,Q)||(this.stylesheet.sprite=Oe,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast(\"SI\",this._availableImages),this.fire(new a.k(\"data\",{dataType:\"style\"}))}else this.fire(new a.j(new Error(`Sprite \"${w}\" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,\"sprite\",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:\"a_pos\",type:\"Int16\",components:2}]);let jn={prelude:Mt(`#ifdef GL_ES\n",
       "precision mediump float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "`,`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#else\n",
       "#if !defined(lowp)\n",
       "#define lowp\n",
       "#endif\n",
       "#if !defined(mediump)\n",
       "#define mediump\n",
       "#endif\n",
       "#if !defined(highp)\n",
       "#define highp\n",
       "#endif\n",
       "#endif\n",
       "vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n",
       ");}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n",
       "#ifdef TERRAIN3D\n",
       "uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n",
       "#endif\n",
       "const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n",
       "#ifdef TERRAIN3D\n",
       "highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n",
       "#else\n",
       "return 1.0;\n",
       "#endif\n",
       "}float calculate_visibility(vec4 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n",
       "#else\n",
       "return 1.0;\n",
       "#endif\n",
       "}float ele(vec2 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n",
       "#else\n",
       "return 0.0;\n",
       "#endif\n",
       "}float get_elevation(vec2 pos) {\n",
       "#ifdef TERRAIN3D\n",
       "vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n",
       "#else\n",
       "return 0.0;\n",
       "#endif\n",
       "}`),background:Mt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),backgroundPattern:Mt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);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);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);}\"),circle:Mt(`varying vec3 v_data;varying float v_visibility;\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",
       "void 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",
       "vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\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",
       "void 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",
       "vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Mt(\"void main() {gl_FragColor=vec4(1.0);}\",\"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}\"),heatmap:Mt(`uniform highp float u_intensity;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n",
       "#pragma mapbox: define highp float weight\n",
       "#pragma mapbox: define mediump float radius\n",
       "const highp float ZERO=1.0/255.0/16.0;\n",
       "#define GAUSS_COEF 0.3989422804014327\n",
       "void main(void) {\n",
       "#pragma mapbox: initialize highp float weight\n",
       "#pragma mapbox: initialize mediump float radius\n",
       "vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Mt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(0.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}\"),collisionBox:Mt(\"varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}\",\"attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}\"),collisionCircle:Mt(\"varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}\",\"attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}\"),debug:Mt(\"uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}\",\"attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}\"),fill:Mt(`#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_FragColor=color*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec2 a_pos;uniform mat4 u_matrix;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Mt(`varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n",
       "#pragma mapbox: define highp vec4 outline_color\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 outline_color\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Mt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Mt(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Mt(`varying vec4 v_color;void main() {gl_FragColor=v_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n",
       "#ifdef TERRAIN3D\n",
       "attribute vec2 a_centroid;\n",
       "#endif\n",
       "varying vec4 v_color;\n",
       "#pragma mapbox: define highp float base\n",
       "#pragma mapbox: define highp float height\n",
       "#pragma mapbox: define highp vec4 color\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp float base\n",
       "#pragma mapbox: initialize highp float height\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "vec3 normal=a_normal_ed.xyz;\n",
       "#ifdef TERRAIN3D\n",
       "float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n",
       "#else\n",
       "float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n",
       "#endif\n",
       "base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Mt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n",
       "#ifdef TERRAIN3D\n",
       "attribute vec2 a_centroid;\n",
       "#endif\n",
       "varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n",
       "#pragma mapbox: define lowp float base\n",
       "#pragma mapbox: define lowp float height\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float base\n",
       "#pragma mapbox: initialize lowp float height\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n",
       "#ifdef TERRAIN3D\n",
       "float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n",
       "#else\n",
       "float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n",
       "#endif\n",
       "base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n",
       "? a_pos\n",
       ": vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Mt(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}\"),hillshade:Mt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n",
       "#define PI 3.141592653589793\n",
       "void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}\"),line:Mt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n",
       "#pragma mapbox: define highp vec4 color\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize highp vec4 color\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_width2=vec2(outset,inset);}`),lineGradient:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_width2=vec2(outset,inset);}`),linePattern:Mt(`#ifdef GL_ES\n",
       "precision highp float;\n",
       "#endif\n",
       "uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "#pragma mapbox: define lowp float blur\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "#pragma mapbox: initialize lowp float blur\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\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",
       "#pragma mapbox: define lowp float floorwidth\n",
       "#pragma mapbox: define lowp vec4 pattern_from\n",
       "#pragma mapbox: define lowp vec4 pattern_to\n",
       "#pragma mapbox: define lowp float pixel_ratio_from\n",
       "#pragma mapbox: define lowp float pixel_ratio_to\n",
       "void 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",
       "#pragma mapbox: initialize lowp float floorwidth\n",
       "#pragma mapbox: initialize mediump vec4 pattern_from\n",
       "#pragma mapbox: initialize mediump vec4 pattern_to\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_from\n",
       "#pragma mapbox: initialize lowp float pixel_ratio_to\n",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\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",
       "void 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",
       "float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`\n",
       "#define scale 0.015873016\n",
       "#define LINE_DISTANCE_SCALE 2.0\n",
       "attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\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",
       "void 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",
       "float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n",
       "#ifdef TERRAIN3D\n",
       "v_gamma_scale=1.0;\n",
       "#else\n",
       "float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n",
       "#endif\n",
       "v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Mt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,\"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}\"),symbolIcon:Mt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n",
       "#pragma mapbox: define lowp float opacity\n",
       "void main() {\n",
       "#pragma mapbox: initialize lowp float opacity\n",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Mt(`#define SDF_PX 8.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\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",
       "void 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",
       "float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\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",
       "void 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",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Mt(`#define SDF_PX 8.0\n",
       "#define SDF 1.0\n",
       "#define ICON 0.0\n",
       "uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\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",
       "void 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",
       "float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n",
       "#ifdef OVERDRAW_INSPECTOR\n",
       "gl_FragColor=vec4(1.0);\n",
       "#endif\n",
       "}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\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",
       "void 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",
       "vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;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;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Mt(\"uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}\"),terrainDepth:Mt(\"varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}\"),terrainCoords:Mt(\"precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}\",\"attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}\"),sky:Mt(\"uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}\",\"attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}\")};function Mt(ue,w){let B=/#pragma mapbox: ([\\w]+) ([\\w]+) ([\\w]+) ([\\w]+)/g,Q=w.match(/attribute ([\\w]+) ([\\w]+)/g),ee=ue.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),le=w.match(/uniform ([\\w]+) ([\\w]+)([\\s]*)([\\w]*)/g),Oe=le?le.concat(ee):ee,Ze={};return{fragmentSource:ue=ue.replace(B,(st,Tt,Yt,Kt,xr)=>(Ze[xr]=!0,Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "varying ${Yt} ${Kt} ${xr};\n",
       "#else\n",
       "uniform ${Yt} ${Kt} u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifdef HAS_UNIFORM_u_${xr}\n",
       "    ${Yt} ${Kt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`)),vertexSource:w=w.replace(B,(st,Tt,Yt,Kt,xr)=>{let Ir=Kt===\"float\"?\"vec2\":\"vec4\",ve=xr.match(/color/)?\"color\":Ir;return Ze[xr]?Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "uniform lowp float u_${xr}_t;\n",
       "attribute ${Yt} ${Ir} a_${xr};\n",
       "varying ${Yt} ${Kt} ${xr};\n",
       "#else\n",
       "uniform ${Yt} ${Kt} u_${xr};\n",
       "#endif\n",
       "`:ve===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${xr} = a_${xr};\n",
       "#else\n",
       "    ${Yt} ${Kt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t);\n",
       "#else\n",
       "    ${Yt} ${Kt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:Tt===\"define\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "uniform lowp float u_${xr}_t;\n",
       "attribute ${Yt} ${Ir} a_${xr};\n",
       "#else\n",
       "uniform ${Yt} ${Kt} u_${xr};\n",
       "#endif\n",
       "`:ve===\"vec4\"?`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${Yt} ${Kt} ${xr} = a_${xr};\n",
       "#else\n",
       "    ${Yt} ${Kt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`:`\n",
       "#ifndef HAS_UNIFORM_u_${xr}\n",
       "    ${Yt} ${Kt} ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t);\n",
       "#else\n",
       "    ${Yt} ${Kt} ${xr} = u_${xr};\n",
       "#endif\n",
       "`}),staticAttributes:Q,staticUniforms:Oe}}class kr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,Oe,Ze,st,Tt){this.context=w;let Yt=this.boundPaintVertexBuffers.length!==ee.length;for(let Kt=0;!Yt&&Kt<ee.length;Kt++)this.boundPaintVertexBuffers[Kt]!==ee[Kt]&&(Yt=!0);!this.vao||this.boundProgram!==B||this.boundLayoutVertexBuffer!==Q||Yt||this.boundIndexBuffer!==le||this.boundVertexOffset!==Oe||this.boundDynamicVertexBuffer!==Ze||this.boundDynamicVertexBuffer2!==st||this.boundDynamicVertexBuffer3!==Tt?this.freshBind(B,Q,ee,le,Oe,Ze,st,Tt):(w.bindVertexArray.set(this.vao),Ze&&Ze.bind(),le&&le.dynamicDraw&&le.bind(),st&&st.bind(),Tt&&Tt.bind())}freshBind(w,B,Q,ee,le,Oe,Ze,st){let Tt=w.numAttributes,Yt=this.context,Kt=Yt.gl;this.vao&&this.destroy(),this.vao=Yt.createVertexArray(),Yt.bindVertexArray.set(this.vao),this.boundProgram=w,this.boundLayoutVertexBuffer=B,this.boundPaintVertexBuffers=Q,this.boundIndexBuffer=ee,this.boundVertexOffset=le,this.boundDynamicVertexBuffer=Oe,this.boundDynamicVertexBuffer2=Ze,this.boundDynamicVertexBuffer3=st,B.enableAttributes(Kt,w);for(let xr of Q)xr.enableAttributes(Kt,w);Oe&&Oe.enableAttributes(Kt,w),Ze&&Ze.enableAttributes(Kt,w),st&&st.enableAttributes(Kt,w),B.bind(),B.setVertexAttribPointers(Kt,w,le);for(let xr of Q)xr.bind(),xr.setVertexAttribPointers(Kt,w,le);Oe&&(Oe.bind(),Oe.setVertexAttribPointers(Kt,w,le)),ee&&ee.bind(),Ze&&(Ze.bind(),Ze.setVertexAttribPointers(Kt,w,le)),st&&(st.bind(),st.setVertexAttribPointers(Kt,w,le)),Yt.currentNumAttributes=Tt}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let Jr=(ue,w,B,Q,ee)=>({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get(\"fog-color\"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get(\"fog-ground-blend\"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get(\"horizon-color\"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get(\"horizon-fog-blend\"):1});function vi(ue){let w=[];for(let B=0;B<ue.length;B++){if(ue[B]===null)continue;let Q=ue[B].split(\" \");w.push(Q.pop())}return w}class hn{constructor(w,B,Q,ee,le,Oe){let Ze=w.gl;this.program=Ze.createProgram();let st=vi(B.staticAttributes),Tt=Q?Q.getBinderAttributes():[],Yt=st.concat(Tt),Kt=jn.prelude.staticUniforms?vi(jn.prelude.staticUniforms):[],xr=B.staticUniforms?vi(B.staticUniforms):[],Ir=Q?Q.getBinderUniforms():[],ve=Kt.concat(xr).concat(Ir),be=[];for(let Ht of ve)be.indexOf(Ht)<0&&be.push(Ht);let Re=Q?Q.defines():[];le&&Re.push(\"#define OVERDRAW_INSPECTOR;\"),Oe&&Re.push(\"#define TERRAIN3D;\");let qe=Re.concat(jn.prelude.fragmentSource,B.fragmentSource).join(`\n",
       "`),et=Re.concat(jn.prelude.vertexSource,B.vertexSource).join(`\n",
       "`),Xe=Ze.createShader(Ze.FRAGMENT_SHADER);if(Ze.isContextLost())return void(this.failedToCreate=!0);if(Ze.shaderSource(Xe,qe),Ze.compileShader(Xe),!Ze.getShaderParameter(Xe,Ze.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ze.getShaderInfoLog(Xe)}`);Ze.attachShader(this.program,Xe);let it=Ze.createShader(Ze.VERTEX_SHADER);if(Ze.isContextLost())return void(this.failedToCreate=!0);if(Ze.shaderSource(it,et),Ze.compileShader(it),!Ze.getShaderParameter(it,Ze.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ze.getShaderInfoLog(it)}`);Ze.attachShader(this.program,it),this.attributes={};let Ft={};this.numAttributes=Yt.length;for(let Ht=0;Ht<this.numAttributes;Ht++)Yt[Ht]&&(Ze.bindAttribLocation(this.program,Ht,Yt[Ht]),this.attributes[Yt[Ht]]=Ht);if(Ze.linkProgram(this.program),!Ze.getProgramParameter(this.program,Ze.LINK_STATUS))throw new Error(`Program failed to link: ${Ze.getProgramInfoLog(this.program)}`);Ze.deleteShader(it),Ze.deleteShader(Xe);for(let Ht=0;Ht<be.length;Ht++){let tr=be[Ht];if(tr&&!Ft[tr]){let dr=Ze.getUniformLocation(this.program,tr);dr&&(Ft[tr]=dr)}}this.fixedUniforms=ee(w,Ft),this.terrainUniforms=((Ht,tr)=>({u_depth:new a.aH(Ht,tr.u_depth),u_terrain:new a.aH(Ht,tr.u_terrain),u_terrain_dim:new a.aI(Ht,tr.u_terrain_dim),u_terrain_matrix:new a.aJ(Ht,tr.u_terrain_matrix),u_terrain_unpack:new a.aK(Ht,tr.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Ht,tr.u_terrain_exaggeration)}))(w,Ft),this.binderUniforms=Q?Q.getUniforms(w,Ft):[]}draw(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve,be,Re,qe,et){let Xe=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Oe),st){w.activeTexture.set(Xe.TEXTURE2),Xe.bindTexture(Xe.TEXTURE_2D,st.depthTexture),w.activeTexture.set(Xe.TEXTURE3),Xe.bindTexture(Xe.TEXTURE_2D,st.texture);for(let Ft in this.terrainUniforms)this.terrainUniforms[Ft].set(st[Ft])}for(let Ft in this.fixedUniforms)this.fixedUniforms[Ft].set(Ze[Ft]);be&&be.setUniforms(w,this.binderUniforms,Ir,{zoom:ve});let it=0;switch(B){case Xe.LINES:it=2;break;case Xe.TRIANGLES:it=3;break;case Xe.LINE_STRIP:it=1}for(let Ft of xr.get()){let Ht=Ft.vaos||(Ft.vaos={});(Ht[Tt]||(Ht[Tt]=new kr)).bind(w,this,Yt,be?be.getPaintVertexBuffers():[],Kt,Ft.vertexOffset,Re,qe,et),Xe.drawElements(B,Ft.primitiveLength*it,Xe.UNSIGNED_SHORT,Ft.primitiveOffset*it*2)}}}function An(ue,w,B){let Q=1/In(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Oe=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Ze=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[Oe>>16,Ze>>16],u_pixel_coord_lower:[65535&Oe,65535&Ze]}}let Mn=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get(\"position\"),Oe=[le.x,le.y,le.z],Ze=function(){var Tt=new a.A(9);return a.A!=Float32Array&&(Tt[1]=0,Tt[2]=0,Tt[3]=0,Tt[5]=0,Tt[6]=0,Tt[7]=0),Tt[0]=1,Tt[4]=1,Tt[8]=1,Tt}();ee.properties.get(\"anchor\")===\"viewport\"&&function(Tt,Yt){var Kt=Math.sin(Yt),xr=Math.cos(Yt);Tt[0]=xr,Tt[1]=Kt,Tt[2]=0,Tt[3]=-Kt,Tt[4]=xr,Tt[5]=0,Tt[6]=0,Tt[7]=0,Tt[8]=1}(Ze,-w.transform.angle),function(Tt,Yt,Kt){var xr=Yt[0],Ir=Yt[1],ve=Yt[2];Tt[0]=xr*Kt[0]+Ir*Kt[3]+ve*Kt[6],Tt[1]=xr*Kt[1]+Ir*Kt[4]+ve*Kt[7],Tt[2]=xr*Kt[2]+Ir*Kt[5]+ve*Kt[8]}(Oe,Oe,Ze);let st=ee.properties.get(\"color\");return{u_matrix:ue,u_lightpos:Oe,u_lightintensity:ee.properties.get(\"intensity\"),u_lightcolor:[st.r,st.g,st.b],u_vertical_gradient:+B,u_opacity:Q}},Li=(ue,w,B,Q,ee,le,Oe)=>a.e(Mn(ue,w,B,Q),An(le,w,Oe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Oe.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),An(B,w,Q)),$n=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,Oe;if(Q.paint.get(\"circle-pitch-alignment\")===\"map\"){let Ze=In(B,1,ee.zoom);le=!0,Oe=[Ze,Ze]}else le=!1,Oe=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get(\"circle-pitch-scale\")===\"map\"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get(\"circle-translate\"),Q.paint.get(\"circle-translate-anchor\")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:Oe}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:In(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get(\"heatmap-opacity\")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/In(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,Oe=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/In(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[Oe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let Oe=ue.lineAtlas,Ze=il(w,ue.transform),st=B.layout.get(\"line-cap\")===\"round\",Tt=Oe.getDash(Q.from,st),Yt=Oe.getDash(Q.to,st),Kt=Tt.width*ee.fromScale,xr=Yt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Ze/Kt,-Tt.height/2],u_patternscale_b:[Ze/xr,-Yt.height/2],u_sdfgamma:Oe.width/(256*Math.min(Kt,xr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Tt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function il(ue,w){return 1/In(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get(\"line-translate\"),B.paint.get(\"line-translate-anchor\"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get(\"raster-opacity\"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get(\"raster-brightness-min\"),u_brightness_high:ee.paint.get(\"raster-brightness-max\"),u_saturation_factor:(Oe=ee.paint.get(\"raster-saturation\"),Oe>0?1-1/(1.001-Oe):-Oe),u_contrast_factor:(le=ee.paint.get(\"raster-contrast\"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get(\"raster-hue-rotate\"))};var le,Oe};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir)=>{let ve=Oe.transform;return{u_is_size_zoom_constant:+(ue===\"constant\"||ue===\"source\"),u_is_size_feature_constant:+(ue===\"constant\"||ue===\"camera\"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:Oe.options.fadeDuration?Oe.symbolFadeChange:1,u_matrix:Ze,u_label_plane_matrix:st,u_coord_matrix:Tt,u_is_text:+Kt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:xr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},Io=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve)=>{let be=Oe.transform;return a.e(zs(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,ve),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:Oe.pixelRatio,u_is_halo:+Ir})},ls=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir)=>a.e(Io(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,!0,Kt,!0,Ir),{u_texsize_icon:xr,u_texture_icon:1}),Yl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(Oe,Ze,st,Tt){let Yt=st.imageManager.getPattern(Oe.from.toString()),Kt=st.imageManager.getPattern(Oe.to.toString()),{width:xr,height:Ir}=st.imageManager.getPixelSize(),ve=Math.pow(2,Tt.tileID.overscaledZ),be=Tt.tileSize*Math.pow(2,st.transform.tileZoom)/ve,Re=be*(Tt.tileID.canonical.x+Tt.tileID.wrap*ve),qe=be*Tt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Kt.tl,u_pattern_br_b:Kt.br,u_texsize:[xr,Ir],u_mix:Ze.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Kt.displaySize,u_scale_a:Ze.fromScale,u_scale_b:Ze.toScale,u_tile_units_to_pixels:1/In(Tt,1,st.transform.tileZoom),u_pixel_coord_upper:[Re>>16,qe>>16],u_pixel_coord_lower:[65535&Re,65535&qe]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error(\"Attempted to update data while not in dynamic mode.\");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\",Int32:\"INT\",Uint32:\"UNSIGNED_INT\",Float32:\"FLOAT\"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q<this.attributes.length;Q++){let ee=B.attributes[this.attributes[Q].name];ee!==void 0&&w.enableVertexAttribArray(ee)}}setVertexAttribPointers(w,B,Q){for(let ee=0;ee<this.attributes.length;ee++){let le=this.attributes[ee],Oe=B.attributes[le.name];Oe!==void 0&&w.vertexAttribPointer(Oe,le.components,w[Rn[le.type]],!1,this.itemSize,le.offset+this.itemSize*(Q||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Vu=new WeakMap;function Ol(ue){var w;if(Vu.has(ue))return Vu.get(ue);{let B=(w=ue.getParameter(ue.VERSION))===null||w===void 0?void 0:w.startsWith(\"WebGL 2.0\");return Vu.set(ue,B),B}}class xo{constructor(w){this.gl=w.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(w){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Kl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.clearColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class Ns extends xo{getDefault(){return 1}set(w){(w!==this.current||this.dirty)&&(this.gl.clearDepth(w),this.current=w,this.dirty=!1)}}class Hl extends xo{getDefault(){return 0}set(w){(w!==this.current||this.dirty)&&(this.gl.clearStencil(w),this.current=w,this.dirty=!1)}}class ac extends xo{getDefault(){return[!0,!0,!0,!0]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.colorMask(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class aa extends xo{getDefault(){return!0}set(w){(w!==this.current||this.dirty)&&(this.gl.depthMask(w),this.current=w,this.dirty=!1)}}class Oo extends xo{getDefault(){return 255}set(w){(w!==this.current||this.dirty)&&(this.gl.stencilMask(w),this.current=w,this.dirty=!1)}}class qo extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(w){let B=this.current;(w.func!==B.func||w.ref!==B.ref||w.mask!==B.mask||this.dirty)&&(this.gl.stencilFunc(w.func,w.ref,w.mask),this.current=w,this.dirty=!1)}}class ql extends xo{getDefault(){let w=this.gl;return[w.KEEP,w.KEEP,w.KEEP]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||this.dirty)&&(this.gl.stencilOp(w[0],w[1],w[2]),this.current=w,this.dirty=!1)}}class Pc extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.STENCIL_TEST):B.disable(B.STENCIL_TEST),this.current=w,this.dirty=!1}}class Do extends xo{getDefault(){return[0,1]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.depthRange(w[0],w[1]),this.current=w,this.dirty=!1)}}class rf extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.DEPTH_TEST):B.disable(B.DEPTH_TEST),this.current=w,this.dirty=!1}}class Vf extends xo{getDefault(){return this.gl.LESS}set(w){(w!==this.current||this.dirty)&&(this.gl.depthFunc(w),this.current=w,this.dirty=!1)}}class pl extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.BLEND):B.disable(B.BLEND),this.current=w,this.dirty=!1}}class Zc extends xo{getDefault(){let w=this.gl;return[w.ONE,w.ZERO]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.blendFunc(w[0],w[1]),this.current=w,this.dirty=!1)}}class Jl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.blendColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class Os extends xo{getDefault(){return this.gl.FUNC_ADD}set(w){(w!==this.current||this.dirty)&&(this.gl.blendEquation(w),this.current=w,this.dirty=!1)}}class yu extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.CULL_FACE):B.disable(B.CULL_FACE),this.current=w,this.dirty=!1}}class oc extends xo{getDefault(){return this.gl.BACK}set(w){(w!==this.current||this.dirty)&&(this.gl.cullFace(w),this.current=w,this.dirty=!1)}}class Cf extends xo{getDefault(){return this.gl.CCW}set(w){(w!==this.current||this.dirty)&&(this.gl.frontFace(w),this.current=w,this.dirty=!1)}}class sc extends xo{getDefault(){return null}set(w){(w!==this.current||this.dirty)&&(this.gl.useProgram(w),this.current=w,this.dirty=!1)}}class jh extends xo{getDefault(){return this.gl.TEXTURE0}set(w){(w!==this.current||this.dirty)&&(this.gl.activeTexture(w),this.current=w,this.dirty=!1)}}class Lf extends xo{getDefault(){let w=this.gl;return[0,0,w.drawingBufferWidth,w.drawingBufferHeight]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.viewport(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class cs extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindFramebuffer(B.FRAMEBUFFER,w),this.current=w,this.dirty=!1}}class nf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindRenderbuffer(B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Gf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindTexture(B.TEXTURE_2D,w),this.current=w,this.dirty=!1}}class $l extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindBuffer(B.ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class fl extends xo{getDefault(){return null}set(w){let B=this.gl;B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class lc extends xo{getDefault(){return null}set(w){var B;if(w===this.current&&!this.dirty)return;let Q=this.gl;Ol(Q)?Q.bindVertexArray(w):(B=Q.getExtension(\"OES_vertex_array_object\"))===null||B===void 0||B.bindVertexArrayOES(w),this.current=w,this.dirty=!1}}class Fu extends xo{getDefault(){return 4}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_ALIGNMENT,w),this.current=w,this.dirty=!1}}class Es extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w),this.current=w,this.dirty=!1}}class Hs extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,w),this.current=w,this.dirty=!1}}class Go extends xo{constructor(w,B){super(w),this.context=w,this.parent=B}getDefault(){return null}}class ps extends Go{setDirty(){this.dirty=!0}set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,w,0),this.current=w,this.dirty=!1}}class uc extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class xl extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_STENCIL_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Gu{constructor(w,B,Q,ee,le){this.context=w,this.width=B,this.height=Q;let Oe=w.gl,Ze=this.framebuffer=Oe.createFramebuffer();if(this.colorAttachment=new ps(w,Ze),ee)this.depthAttachment=le?new xl(w,Ze):new uc(w,Ze);else if(le)throw new Error(\"Stencil cannot be set without depth\");if(Oe.checkFramebufferStatus(Oe.FRAMEBUFFER)!==Oe.FRAMEBUFFER_COMPLETE)throw new Error(\"Framebuffer is not complete\")}destroy(){let w=this.context.gl,B=this.colorAttachment.get();if(B&&w.deleteTexture(B),this.depthAttachment){let Q=this.depthAttachment.get();Q&&w.deleteRenderbuffer(Q)}w.deleteFramebuffer(this.framebuffer)}}class qs{constructor(w,B,Q){this.blendFunction=w,this.blendColor=B,this.mask=Q}}qs.Replace=[1,0],qs.disabled=new qs(qs.Replace,a.aM.transparent,[!1,!1,!1,!1]),qs.unblended=new qs(qs.Replace,a.aM.transparent,[!0,!0,!0,!0]),qs.alphaBlended=new qs([1,771],a.aM.transparent,[!0,!0,!0,!0]);class od{constructor(w){var B,Q;if(this.gl=w,this.clearColor=new Kl(this),this.clearDepth=new Ns(this),this.clearStencil=new Hl(this),this.colorMask=new ac(this),this.depthMask=new aa(this),this.stencilMask=new Oo(this),this.stencilFunc=new qo(this),this.stencilOp=new ql(this),this.stencilTest=new Pc(this),this.depthRange=new Do(this),this.depthTest=new rf(this),this.depthFunc=new Vf(this),this.blend=new pl(this),this.blendFunc=new Zc(this),this.blendColor=new Jl(this),this.blendEquation=new Os(this),this.cullFace=new yu(this),this.cullFaceSide=new oc(this),this.frontFace=new Cf(this),this.program=new sc(this),this.activeTexture=new jh(this),this.viewport=new Lf(this),this.bindFramebuffer=new cs(this),this.bindRenderbuffer=new nf(this),this.bindTexture=new Gf(this),this.bindVertexBuffer=new $l(this),this.bindElementBuffer=new fl(this),this.bindVertexArray=new lc(this),this.pixelStoreUnpack=new Fu(this),this.pixelStoreUnpackPremultiplyAlpha=new Es(this),this.pixelStoreUnpackFlipY=new Hs(this),this.extTextureFilterAnisotropic=w.getExtension(\"EXT_texture_filter_anisotropic\")||w.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||w.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=w.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=w.getParameter(w.MAX_TEXTURE_SIZE),Ol(w)){this.HALF_FLOAT=w.HALF_FLOAT;let ee=w.getExtension(\"EXT_color_buffer_half_float\");this.RGBA16F=(B=w.RGBA16F)!==null&&B!==void 0?B:ee==null?void 0:ee.RGBA16F_EXT,this.RGB16F=(Q=w.RGB16F)!==null&&Q!==void 0?Q:ee==null?void 0:ee.RGB16F_EXT,w.getExtension(\"EXT_color_buffer_float\")}else{w.getExtension(\"EXT_color_buffer_half_float\"),w.getExtension(\"OES_texture_half_float_linear\");let ee=w.getExtension(\"OES_texture_half_float\");this.HALF_FLOAT=ee==null?void 0:ee.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(w,B){return new bs(this,w,B)}createVertexBuffer(w,B,Q){return new _a(this,w,B,Q)}createRenderbuffer(w,B,Q){let ee=this.gl,le=ee.createRenderbuffer();return this.bindRenderbuffer.set(le),ee.renderbufferStorage(ee.RENDERBUFFER,w,B,Q),this.bindRenderbuffer.set(null),le}createFramebuffer(w,B,Q,ee){return new Gu(this,w,B,Q,ee)}clear({color:w,depth:B,stencil:Q}){let ee=this.gl,le=0;w&&(le|=ee.COLOR_BUFFER_BIT,this.clearColor.set(w),this.colorMask.set([!0,!0,!0,!0])),B!==void 0&&(le|=ee.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(B),this.depthMask.set(!0)),Q!==void 0&&(le|=ee.STENCIL_BUFFER_BIT,this.clearStencil.set(Q),this.stencilMask.set(255)),ee.clear(le)}setCullFace(w){w.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(w.mode),this.frontFace.set(w.frontFace))}setDepthMode(w){w.func!==this.gl.ALWAYS||w.mask?(this.depthTest.set(!0),this.depthFunc.set(w.func),this.depthMask.set(w.mask),this.depthRange.set(w.range)):this.depthTest.set(!1)}setStencilMode(w){w.test.func!==this.gl.ALWAYS||w.mask?(this.stencilTest.set(!0),this.stencilMask.set(w.mask),this.stencilOp.set([w.fail,w.depthFail,w.pass]),this.stencilFunc.set({func:w.test.func,ref:w.ref,mask:w.test.mask})):this.stencilTest.set(!1)}setColorMode(w){a.aE(w.blendFunction,qs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(w.blendFunction),this.blendColor.set(w.blendColor)),this.colorMask.set(w.mask)}createVertexArray(){var w;return Ol(this.gl)?this.gl.createVertexArray():(w=this.gl.getExtension(\"OES_vertex_array_object\"))===null||w===void 0?void 0:w.createVertexArrayOES()}deleteVertexArray(w){var B;return Ol(this.gl)?this.gl.deleteVertexArray(w):(B=this.gl.getExtension(\"OES_vertex_array_object\"))===null||B===void 0?void 0:B.deleteVertexArrayOES(w)}unbindVAO(){this.bindVertexArray.set(null)}}class Po{constructor(w,B,Q){this.func=w,this.mask=B,this.range=Q}}Po.ReadOnly=!1,Po.ReadWrite=!0,Po.disabled=new Po(519,Po.ReadOnly,[0,1]);let sd=7680;class Ko{constructor(w,B,Q,ee,le,Oe){this.test=w,this.ref=B,this.mask=Q,this.fail=ee,this.depthFail=le,this.pass=Oe}}Ko.disabled=new Ko({func:519,mask:0},0,0,sd,sd,sd);class Pa{constructor(w,B,Q){this.enable=w,this.mode=B,this.frontFace=Q}}let af;function Hu(ue,w,B,Q,ee){let le=ue.context,Oe=le.gl,Ze=ue.useProgram(\"collisionBox\"),st=[],Tt=0,Yt=0;for(let qe=0;qe<Q.length;qe++){let et=Q[qe],Xe=w.getTile(et).getBucket(B);if(!Xe)continue;let it=ee?Xe.textCollisionBox:Xe.iconCollisionBox,Ft=Xe.collisionCircleArray;if(Ft.length>0){let Ht=a.H();a.aQ(Ht,Xe.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(Ht,Ht,Xe.placementViewportMatrix),st.push({circleArray:Ft,circleOffset:Yt,transform:et.posMatrix,invTransform:Ht,coord:et}),Tt+=Ft.length/4,Yt=Tt}it&&Ze.draw(le,Oe.LINES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:et.posMatrix,u_pixel_extrude_scale:[1/(Kt=ue.transform).width,1/Kt.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et),B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,null,ue.transform.zoom,null,null,it.collisionVertexBuffer)}var Kt;if(!ee||!st.length)return;let xr=ue.useProgram(\"collisionCircle\"),Ir=new a.aR;Ir.resize(4*Tt),Ir._trim();let ve=0;for(let qe of st)for(let et=0;et<qe.circleArray.length/4;et++){let Xe=4*et,it=qe.circleArray[Xe+0],Ft=qe.circleArray[Xe+1],Ht=qe.circleArray[Xe+2],tr=qe.circleArray[Xe+3];Ir.emplace(ve++,it,Ft,Ht,tr,0),Ir.emplace(ve++,it,Ft,Ht,tr,1),Ir.emplace(ve++,it,Ft,Ht,tr,2),Ir.emplace(ve++,it,Ft,Ht,tr,3)}(!af||af.length<2*Tt)&&(af=function(qe){let et=2*qe,Xe=new a.aT;Xe.resize(et),Xe._trim();for(let it=0;it<et;it++){let Ft=6*it;Xe.uint16[Ft+0]=4*it+0,Xe.uint16[Ft+1]=4*it+1,Xe.uint16[Ft+2]=4*it+2,Xe.uint16[Ft+3]=4*it+2,Xe.uint16[Ft+4]=4*it+3,Xe.uint16[Ft+5]=4*it+0}return Xe}(Tt));let be=le.createIndexBuffer(af,!0),Re=le.createVertexBuffer(Ir,a.aS.members,!0);for(let qe of st){let et=No(qe.transform,qe.invTransform,ue.transform);xr.draw(le,Oe.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,et,ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(qe.coord),B.id,Re,be,a.a0.simpleSegment(0,2*qe.circleOffset,qe.circleArray.length,qe.circleArray.length/2),null,ue.transform.zoom,null,null,null)}Re.destroy(),be.destroy()}Pa.disabled=new Pa(!1,1029,2305),Pa.backCCW=new Pa(!0,1029,2305);let bl=a.an(new Float32Array(16));function Hf(ue,w,B,Q,ee,le){let{horizontalAlign:Oe,verticalAlign:Ze}=a.au(ue);return new a.P((-(Oe-.5)*w/ee+Q[0])*le,(-(Ze-.5)*B/ee+Q[1])*le)}function Ic(ue,w,B,Q,ee,le){let Oe=w.tileAnchorPoint.add(new a.P(w.translation[0],w.translation[1]));if(w.pitchWithMap){let Ze=Q.mult(le);B||(Ze=Ze.rotate(-ee));let st=Oe.add(Ze);return dt(st.x,st.y,w.labelPlaneMatrix,w.getElevation).point}if(B){let Ze=vt(w.tileAnchorPoint.x+1,w.tileAnchorPoint.y,w).point.sub(ue),st=Math.atan(Ze.y/Ze.x)+(Ze.x<0?Math.PI:0);return ue.add(Q.rotate(st))}return ue.add(Q)}function yf(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir){let ve=ue.text.placedSymbolArray,be=ue.text.dynamicLayoutVertexArray,Re=ue.icon.dynamicLayoutVertexArray,qe={};be.clear();for(let et=0;et<ve.length;et++){let Xe=ve.get(et),it=Xe.hidden||!Xe.crossTileID||ue.allowVerticalPlacement&&!Xe.placedOrientation?null:Q[Xe.crossTileID];if(it){let Ft=new a.P(Xe.anchorX,Xe.anchorY),Ht={getElevation:Ir,width:ee.width,height:ee.height,labelPlaneMatrix:le,lineVertexArray:null,pitchWithMap:B,projection:Yt,projectionCache:null,tileAnchorPoint:Ft,translation:Kt,unwrappedTileID:xr},tr=B?dt(Ft.x,Ft.y,Oe,Ir):vt(Ft.x,Ft.y,Ht),dr=Ge(ee.cameraToCenterDistance,tr.signedDistanceFromCamera),Sr=a.ai(ue.textSizeData,st,Xe)*dr/a.ap;B&&(Sr*=ue.tilePixelRatio/Ze);let{width:Or,height:Wr,anchor:ni,textOffset:Pi,textBoxScale:cn}=it,ln=Hf(ni,Or,Wr,Pi,cn,Sr),Cn=Yt.getPitchedTextCorrection(ee,Ft.add(new a.P(Kt[0],Kt[1])),xr),Kn=Ic(tr.point,Ht,w,ln,ee.angle,Cn),Aa=ue.allowVerticalPlacement&&Xe.placedOrientation===a.ah.vertical?Math.PI/2:0;for(let fa=0;fa<Xe.numGlyphs;fa++)a.aj(be,Kn,Aa);Tt&&Xe.associatedIconIndex>=0&&(qe[Xe.associatedIconIndex]={shiftedAnchor:Kn,angle:Aa})}else pi(Xe.numGlyphs,be)}if(Tt){Re.clear();let et=ue.icon.placedSymbolArray;for(let Xe=0;Xe<et.length;Xe++){let it=et.get(Xe);if(it.hidden)pi(it.numGlyphs,Re);else{let Ft=qe[Xe];if(Ft)for(let Ht=0;Ht<it.numGlyphs;Ht++)a.aj(Re,Ft.shiftedAnchor,Ft.angle);else pi(it.numGlyphs,Re)}}ue.icon.dynamicLayoutVertexBuffer.updateData(Re)}ue.text.dynamicLayoutVertexBuffer.updateData(be)}function Bl(ue,w,B){return B.iconsInText&&w?\"symbolTextAndIcon\":ue?\"symbolSDF\":\"symbolIcon\"}function Ah(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt){let xr=ue.context,Ir=xr.gl,ve=ue.transform,be=yn(),Re=Ze===\"map\",qe=st===\"map\",et=Ze!==\"viewport\"&&B.layout.get(\"symbol-placement\")!==\"point\",Xe=Re&&!qe&&!et,it=!qe&&et,Ft=!B.layout.get(\"symbol-sort-key\").isConstant(),Ht=!1,tr=ue.depthModeForSublayer(0,Po.ReadOnly),dr=B._unevaluatedLayout.hasValue(\"text-variable-anchor\")||B._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"),Sr=[],Or=be.getCircleRadiusCorrection(ve);for(let Wr of Q){let ni=w.getTile(Wr),Pi=ni.getBucket(B);if(!Pi)continue;let cn=ee?Pi.text:Pi.icon;if(!cn||!cn.segments.get().length||!cn.hasVisibleVertices)continue;let ln=cn.programConfigurations.get(B.id),Cn=ee||Pi.sdfIcons,Kn=ee?Pi.textSizeData:Pi.iconSizeData,Aa=qe||ve.pitch!==0,fa=ue.useProgram(Bl(Cn,ee,Pi),ln),$a=a.ag(Kn,ve.zoom),Co=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Wr),Qa,mo,Bo,Ps,Ts=[0,0],wo=null;if(ee)mo=ni.glyphAtlasTexture,Bo=Ir.LINEAR,Qa=ni.glyphAtlasTexture.size,Pi.iconsInText&&(Ts=ni.imageAtlasTexture.size,wo=ni.imageAtlasTexture,Ps=Aa||ue.options.rotating||ue.options.zooming||Kn.kind===\"composite\"||Kn.kind===\"camera\"?Ir.LINEAR:Ir.NEAREST);else{let Ye=B.layout.get(\"icon-size\").constantOr(0)!==1||Pi.iconsNeedLinear;mo=ni.imageAtlasTexture,Bo=Cn||ue.options.rotating||ue.options.zooming||Ye||Aa?Ir.LINEAR:Ir.NEAREST,Qa=ni.imageAtlasTexture.size}let To=In(ni,1,ue.transform.zoom),hl=it?Wr.posMatrix:bl,Ul=Br(hl,qe,Re,ue.transform,To),Lu=Vr(hl,qe,Re,ue.transform,To),au=Vr(Wr.posMatrix,qe,Re,ue.transform,To),Js=be.translatePosition(ue.transform,ni,le,Oe),eu=dr&&Pi.hasTextData(),dc=B.layout.get(\"icon-text-fit\")!==\"none\"&&eu&&Pi.hasIconData();if(et){let Ye=ue.style.map.terrain?(nt,jt)=>ue.style.map.terrain.getElevation(Wr,nt,jt):null,kt=B.layout.get(\"text-rotation-alignment\")===\"map\";We(Pi,Wr.posMatrix,ue,ee,Ul,au,qe,Tt,kt,be,Wr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Wr.posMatrix,Al=ee&&dr||dc,X=et||Al?bl:Ul,se=Lu,Te=Cn&&B.paint.get(ee?\"text-halo-width\":\"icon-halo-width\").constantOr(1)!==0,Ne;Ne=Cn?Pi.iconsInText?ls(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,Qa,Ts,Or):Io(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,ee,Qa,!0,Or):zs(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,ee,Qa,Or);let He={program:fa,buffers:cn,uniformValues:Ne,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Cn,hasHalo:Te};if(Ft&&Pi.canOverlap){Ht=!0;let Ye=cn.segments.get();for(let kt of Ye)Sr.push({segments:new a.a0([kt]),sortKey:kt.sortKey,state:He,terrainData:Co})}else Sr.push({segments:cn.segments,sortKey:0,state:He,terrainData:Co})}Ht&&Sr.sort((Wr,ni)=>Wr.sortKey-ni.sortKey);for(let Wr of Sr){let ni=Wr.state;if(xr.activeTexture.set(Ir.TEXTURE0),ni.atlasTexture.bind(ni.atlasInterpolation,Ir.CLAMP_TO_EDGE),ni.atlasTextureIcon&&(xr.activeTexture.set(Ir.TEXTURE1),ni.atlasTextureIcon&&ni.atlasTextureIcon.bind(ni.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),ni.isSDF){let Pi=ni.uniformValues;ni.hasHalo&&(Pi.u_is_halo=1,Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,Pi,Wr.terrainData)),Pi.u_is_halo=0}Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,ni.uniformValues,Wr.terrainData)}}function Qf(ue,w,B,Q,ee,le,Oe,Ze,st,Tt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,Oe,Ze,Pa.disabled,st,Tt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,Oe=Ko.disabled,Ze=new qs([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),st=w.getBucket(B);if(!st)return;let Tt=Q.key,Yt=B.heatmapFbos.get(Tt);Yt||(Yt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Tt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Kt=st.programConfigurations.get(B.id),xr=ue.useProgram(\"heatmap\",Kt),Ir=ue.style.map.terrain.getTerrainData(Q);xr.draw(ee,le.TRIANGLES,Po.disabled,Oe,Ze,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get(\"heatmap-intensity\")),Ir,B.id,st.layoutVertexBuffer,st.indexBuffer,st.segments,B.paint,ue.transform.zoom,Kt)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),Oe=B.key,Ze=w.heatmapFbos.get(Oe);Ze&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ze.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram(\"heatmapTexture\").draw(Q,ee.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Ze.destroy(),w.heatmapFbos.delete(Oe))}function eh(ue,w,B){var Q,ee;let le=ue.gl,Oe=le.createTexture();le.bindTexture(le.TEXTURE_2D,Oe),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Ze=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,st=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,st,w,B,0,le.RGBA,Ze,null);let Tt=ue.createFramebuffer(w,B,!1,!1);return Tt.colorAttachment.set(Oe),Tt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Oe=le[B.to.toString()],Ze=le[B.from.toString()];if(!Oe&&Ze&&(Oe=Ze),!Ze&&Oe&&(Ze=Oe),!Oe||!Ze){let st=ee.getPaintProperty(w);Oe=le[st],Ze=le[st]}Oe&&Ze&&ue.setConstantPatternPositions(Oe,Ze)}function jf(ue,w,B,Q,ee,le,Oe){let Ze=ue.context.gl,st=\"fill-pattern\",Tt=B.paint.get(st),Yt=Tt&&Tt.constantOr(1),Kt=B.getCrossfadeParameters(),xr,Ir,ve,be,Re;Oe?(Ir=Yt&&!B.getPaintProperty(\"fill-outline-color\")?\"fillOutlinePattern\":\"fillOutline\",xr=Ze.LINES):(Ir=Yt?\"fillPattern\":\"fill\",xr=Ze.TRIANGLES);let qe=Tt.constantOr(null);for(let et of Q){let Xe=w.getTile(et);if(Yt&&!Xe.patternsLoaded())continue;let it=Xe.getBucket(B);if(!it)continue;let Ft=it.programConfigurations.get(B.id),Ht=ue.useProgram(Ir,Ft),tr=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et);Yt&&(ue.context.activeTexture.set(Ze.TEXTURE0),Xe.imageAtlasTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),Ft.updatePaintBuffers(Kt)),ju(Ft,st,qe,Xe,B);let dr=tr?et:null,Sr=ue.translatePosMatrix(dr?dr.posMatrix:et.posMatrix,Xe,B.paint.get(\"fill-translate\"),B.paint.get(\"fill-translate-anchor\"));if(Oe){be=it.indexBuffer2,Re=it.segments2;let Or=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];ve=Ir===\"fillOutlinePattern\"&&Yt?Ma(Sr,ue,Kt,Xe,Or):$n(Sr,Or)}else be=it.indexBuffer,Re=it.segments,ve=Yt?ya(Sr,ue,Kt,Xe):_n(Sr);Ht.draw(ue.context,xr,ee,ue.stencilModeForClipping(et),le,Pa.disabled,ve,tr,B.id,it.layoutVertexBuffer,be,Re,B.paint,ue.transform.zoom,Ft)}}function cc(ue,w,B,Q,ee,le,Oe){let Ze=ue.context,st=Ze.gl,Tt=\"fill-extrusion-pattern\",Yt=B.paint.get(Tt),Kt=Yt.constantOr(1),xr=B.getCrossfadeParameters(),Ir=B.paint.get(\"fill-extrusion-opacity\"),ve=Yt.constantOr(null);for(let be of Q){let Re=w.getTile(be),qe=Re.getBucket(B);if(!qe)continue;let et=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(be),Xe=qe.programConfigurations.get(B.id),it=ue.useProgram(Kt?\"fillExtrusionPattern\":\"fillExtrusion\",Xe);Kt&&(ue.context.activeTexture.set(st.TEXTURE0),Re.imageAtlasTexture.bind(st.LINEAR,st.CLAMP_TO_EDGE),Xe.updatePaintBuffers(xr)),ju(Xe,Tt,ve,Re,B);let Ft=ue.translatePosMatrix(be.posMatrix,Re,B.paint.get(\"fill-extrusion-translate\"),B.paint.get(\"fill-extrusion-translate-anchor\")),Ht=B.paint.get(\"fill-extrusion-vertical-gradient\"),tr=Kt?Li(Ft,ue,Ht,Ir,be,xr,Re):Mn(Ft,ue,Ht,Ir);it.draw(Ze,Ze.gl.TRIANGLES,ee,le,Oe,Pa.backCCW,tr,et,B.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,B.paint,ue.transform.zoom,Xe,ue.style.map.terrain&&qe.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,Oe){let Ze=ue.context,st=Ze.gl,Tt=B.fbo;if(!Tt)return;let Yt=ue.useProgram(\"hillshade\"),Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Ze.activeTexture.set(st.TEXTURE0),st.bindTexture(st.TEXTURE_2D,Tt.colorAttachment.get()),Yt.draw(Ze,st.TRIANGLES,ee,le,Oe,Pa.disabled,((xr,Ir,ve,be)=>{let Re=ve.paint.get(\"hillshade-shadow-color\"),qe=ve.paint.get(\"hillshade-highlight-color\"),et=ve.paint.get(\"hillshade-accent-color\"),Xe=ve.paint.get(\"hillshade-illumination-direction\")*(Math.PI/180);ve.paint.get(\"hillshade-illumination-anchor\")===\"viewport\"&&(Xe-=xr.transform.angle);let it=!xr.options.moving;return{u_matrix:be?be.posMatrix:xr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),it),u_image:0,u_latrange:Fs(0,Ir.tileID),u_light:[ve.paint.get(\"hillshade-exaggeration\"),Xe],u_shadow:Re,u_highlight:qe,u_accent:et}})(ue,B,Q,Kt?w:null),Kt,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let Oe=ue.context,Ze=Oe.gl,st=w.dem;if(st&&st.data){let Tt=st.dim,Yt=st.stride,Kt=st.getPixels();if(Oe.activeTexture.set(Ze.TEXTURE1),Oe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Kt,{premultiply:!1}),Ir.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE)}else w.demTexture=new g(Oe,Kt,Ze.RGBA,{premultiply:!1}),w.demTexture.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE);Oe.activeTexture.set(Ze.TEXTURE0);let xr=w.fbo;if(!xr){let Ir=new g(Oe,{width:Tt,height:Tt,data:null},Ze.RGBA);Ir.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),xr=w.fbo=Oe.createFramebuffer(Tt,Tt,!0,!1),xr.colorAttachment.set(Ir.texture)}Oe.bindFramebuffer.set(xr.framebuffer),Oe.viewport.set([0,0,Tt,Tt]),ue.useProgram(\"hillshadePrepare\").draw(Oe,Ze.TRIANGLES,Q,ee,le,Pa.disabled,((Ir,ve)=>{let be=ve.stride,Re=a.H();return a.aP(Re,0,a.X,-a.X,0,0,1),a.J(Re,Re,[0,-a.X,0]),{u_matrix:Re,u_image:1,u_dimension:[be,be],u_zoom:Ir.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,st),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let Oe=Q.paint.get(\"raster-fade-duration\");if(!le&&Oe>0){let Ze=u.now(),st=(Ze-ue.timeAdded)/Oe,Tt=w?(Ze-w.timeAdded)/Oe:-1,Yt=B.getSource(),Kt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),xr=!w||Math.abs(w.tileID.overscaledZ-Kt)>Math.abs(ue.tileID.overscaledZ-Kt),Ir=xr&&ue.refreshedUponExpiration?1:a.ac(xr?st:1-Tt,0,1);return ue.refreshedUponExpiration&&st>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),Wf=new a.aM(0,0,1,1),Wh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Sh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let Oe=ue.context,Ze=Oe.gl;Ze.enable(Ze.SCISSOR_TEST),Ze.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),Oe.clear({color:le}),Ze.disable(Ze.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,Oe=ue.useProgram(\"debug\"),Ze=Po.disabled,st=Ko.disabled,Tt=ue.colorModeForRenderPass(),Yt=\"$debug\",Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let xr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((xr&&xr.byteLength||0)/1024),ve=w.getTile(B).tileSize,be=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Re=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Re+=` => ${B.overscaledZ}`),function(qe,et){qe.initDebugOverlayCanvas();let Xe=qe.debugOverlayCanvas,it=qe.context.gl,Ft=qe.debugOverlayCanvas.getContext(\"2d\");Ft.clearRect(0,0,Xe.width,Xe.height),Ft.shadowColor=\"white\",Ft.shadowBlur=2,Ft.lineWidth=1.5,Ft.strokeStyle=\"white\",Ft.textBaseline=\"top\",Ft.font=\"bold 36px Open Sans, sans-serif\",Ft.fillText(et,5,5),Ft.strokeText(et,5,5),qe.debugOverlayTexture.update(Xe),qe.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(ue,`${Re} ${Ir}kB`),Oe.draw(Q,ee.TRIANGLES,Ze,st,qs.alphaBlended,Pa.disabled,po(le,a.aM.transparent,be),null,Yt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),Oe.draw(Q,ee.LINE_STRIP,Ze,st,Tt,Pa.disabled,po(le,a.aM.red),Kt,Yt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),Oe=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Ze=ue.useProgram(\"terrain\"),st=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Tt of B){let Yt=ue.renderToTexture.getTexture(Tt),Kt=w.getTerrainData(Tt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let xr=ue.transform.calculatePosMatrix(Tt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Tt.tileID.toUnwrapped()),be=Jr(xr,Ir,ve,ue.style.sky,ue.transform.pitch);Ze.draw(Q,ee.TRIANGLES,Oe,Ko.disabled,le,Pa.backCCW,be,Kt,\"terrain\",st.vertexBuffer,st.indexBuffer,st.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new od(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=mt.maxUnderzooming+mt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,ut.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Oe=new a.aZ;Oe.emplaceBack(0),Oe.emplaceBack(1),Oe.emplaceBack(3),Oe.emplaceBack(2),Oe.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Oe);let Ze=new a.aY;Ze.emplaceBack(0,1,2),Ze.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Ze);let st=this.context.gl;this.stencilClearMode=new Ko({func:st.ALWAYS,mask:0},0,255,st.ZERO,st.ZERO,st.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram(\"clippingMask\").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,qs.disabled,Pa.disabled,Lo(Q),null,\"$clipping\",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(qs.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram(\"clippingMask\");this._tileClippingMaskIDs={};for(let Oe of B){let Ze=this._tileClippingMaskIDs[Oe.key]=this.nextStencilID++,st=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Oe);le.draw(Q,ee.TRIANGLES,Po.disabled,new Ko({func:ee.ALWAYS,mask:0},Ze,255,ee.KEEP,ee.KEEP,ee.REPLACE),qs.disabled,Pa.disabled,Lo(Oe.posMatrix),st,\"$clipping\",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Ko({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Ko({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((Oe,Ze)=>Ze.overscaledZ-Oe.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let Oe={};for(let Ze=0;Ze<le;Ze++)Oe[Ze+ee]=new Ko({func:B.GEQUAL,mask:255},Ze+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=le,[Oe,Q]}return[{[ee]:Ko.disabled},Q]}colorModeForRenderPass(){let w=this.context.gl;return this._showOverdrawInspector?new qs([w.CONSTANT_COLOR,w.ONE],new a.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass===\"opaque\"?qs.unblended:qs.alphaBlended}depthModeForSublayer(w,B,Q){if(!this.opaquePassEnabledForLayer())return Po.disabled;let ee=1-((1+this.currentLayer)*this.numSublayers+w)*this.depthEpsilon;return new Po(Q||this.context.gl.LEQUAL,B,[ee,ee])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(w,B){this.style=w,this.options=B,this.lineAtlas=w.lineAtlas,this.imageManager=w.imageManager,this.glyphManager=w.glyphManager,this.symbolFadeChange=w.placement.symbolFadeChange(u.now()),this.imageManager.beginFrame();let Q=this.style._order,ee=this.style.sourceCaches,le={},Oe={},Ze={};for(let st in ee){let Tt=ee[st];Tt.used&&Tt.prepare(this.context),le[st]=Tt.getVisibleCoordinates(),Oe[st]=le[st].slice().reverse(),Ze[st]=Tt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let st=0;st<Q.length;st++)if(this.style._layers[Q[st]].is3D()){this.opaquePassCutoff=st;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass=\"offscreen\";for(let st of Q){let Tt=this.style._layers[st];if(!Tt.hasOffscreenPass()||Tt.isHidden(this.transform.zoom))continue;let Yt=Oe[Tt.source];(Tt.type===\"custom\"||Yt.length)&&this.renderLayer(this,ee[Tt.source],Tt,Yt)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:B.showOverdrawInspector?a.aM.black:a.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(st,Tt){let Yt=st.context,Kt=Yt.gl,xr=((qe,et,Xe)=>({u_sky_color:qe.properties.get(\"sky-color\"),u_horizon_color:qe.properties.get(\"horizon-color\"),u_horizon:(et.height/2+et.getHorizon())*Xe,u_sky_horizon_blend:qe.properties.get(\"sky-horizon-blend\")*et.height/2*Xe}))(Tt,st.style.map.transform,st.pixelRatio),Ir=new Po(Kt.LEQUAL,Po.ReadWrite,[0,1]),ve=Ko.disabled,be=st.colorModeForRenderPass(),Re=st.useProgram(\"sky\");if(!Tt.mesh){let qe=new a.aX;qe.emplaceBack(-1,-1),qe.emplaceBack(1,-1),qe.emplaceBack(1,1),qe.emplaceBack(-1,1);let et=new a.aY;et.emplaceBack(0,1,2),et.emplaceBack(0,2,3),Tt.mesh=new Eu(Yt.createVertexBuffer(qe,vo.members),Yt.createIndexBuffer(et),a.a0.simpleSegment(0,0,qe.length,et.length))}Re.draw(Yt,Kt.TRIANGLES,Ir,ve,be,Pa.disabled,xr,void 0,\"sky\",Tt.mesh.vertexBuffer,Tt.mesh.indexBuffer,Tt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass=\"opaque\",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let st=this.style._layers[Q[this.currentLayer]],Tt=ee[st.source],Yt=le[st.source];this._renderTileClippingMasks(st,Yt),this.renderLayer(this,Tt,st,Yt)}for(this.renderPass=\"translucent\",this.currentLayer=0;this.currentLayer<Q.length;this.currentLayer++){let st=this.style._layers[Q[this.currentLayer]],Tt=ee[st.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(st))continue;let Yt=(st.type===\"symbol\"?Ze:Oe)[st.source];this._renderTileClippingMasks(st,le[st.source]),this.renderLayer(this,Tt,st,Yt)}if(this.options.showTileBoundaries){let st=function(Tt,Yt){let Kt=null,xr=Object.values(Tt._layers).flatMap(Re=>Re.source&&!Re.isHidden(Yt)?[Tt.sourceCaches[Re.source]]:[]),Ir=xr.filter(Re=>Re.getSource().type===\"vector\"),ve=xr.filter(Re=>Re.getSource().type!==\"vector\"),be=Re=>{(!Kt||Kt.getSource().maxzoom<Re.getSource().maxzoom)&&(Kt=Re)};return Ir.forEach(Re=>be(Re)),Kt||ve.forEach(Re=>be(Re)),Kt}(this.style,this.transform.zoom);st&&function(Tt,Yt,Kt){for(let xr=0;xr<Kt.length;xr++)ih(Tt,Yt,Kt[xr])}(this,st,st.getVisibleCoordinates())}this.options.showPadding&&function(st){let Tt=st.transform.padding;sf(st,st.transform.height-(Tt.top||0),3,Rc),sf(st,Tt.bottom||0,3,gs),Sh(st,Tt.left||0,3,Wf),Sh(st,st.transform.width-(Tt.right||0),3,Wh);let Yt=st.transform.centerPoint;(function(Kt,xr,Ir,ve){Mu(Kt,xr-1,Ir-10,2,20,ve),Mu(Kt,xr-10,Ir-1,20,2,ve)})(st,Yt.x,st.transform.height-Yt.y,rh)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(w){if(!this.style||!this.style.map||!this.style.map.terrain)return;let B=this.terrainFacilitator.matrix,Q=this.transform.modelViewProjectionMatrix,ee=this.terrainFacilitator.dirty;ee||(ee=w?!a.a_(B,Q):!a.a$(B,Q)),ee||(ee=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,Oe){let Ze=le.context,st=Ze.gl,Tt=qs.unblended,Yt=new Po(st.LEQUAL,Po.ReadWrite,[0,1]),Kt=Oe.getTerrainMesh(),xr=Oe.sourceCache.getRenderableTiles(),Ir=le.useProgram(\"terrainDepth\");Ze.bindFramebuffer.set(Oe.getFramebuffer(\"depth\").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1});for(let ve of xr){let be=Oe.getTerrainData(ve.tileID),Re={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:Oe.getMeshFrameDelta(le.transform.zoom)};Ir.draw(Ze,st.TRIANGLES,Yt,Ko.disabled,Tt,Pa.backCCW,Re,be,\"terrain\",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Oe){let Ze=le.context,st=Ze.gl,Tt=qs.unblended,Yt=new Po(st.LEQUAL,Po.ReadWrite,[0,1]),Kt=Oe.getTerrainMesh(),xr=Oe.getCoordsTexture(),Ir=Oe.sourceCache.getRenderableTiles(),ve=le.useProgram(\"terrainCoords\");Ze.bindFramebuffer.set(Oe.getFramebuffer(\"coords\").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1}),Oe.coordsIndex=[];for(let be of Ir){let Re=Oe.getTerrainData(be.tileID);Ze.activeTexture.set(st.TEXTURE0),st.bindTexture(st.TEXTURE_2D,xr.texture);let qe={u_matrix:le.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-Oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:Oe.getMeshFrameDelta(le.transform.zoom)};ve.draw(Ze,st.TRIANGLES,Yt,Ko.disabled,Tt,Pa.backCCW,qe,Re,\"terrain\",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments),Oe.coordsIndex.push(be.tileID.key)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type===\"background\"||Q.type===\"custom\"||(ee||[]).length))switch(this.id=Q.id,Q.type){case\"symbol\":(function(le,Oe,Ze,st,Tt){if(le.renderPass!==\"translucent\")return;let Yt=Ko.disabled,Kt=le.colorModeForRenderPass();(Ze._unevaluatedLayout.hasValue(\"text-variable-anchor\")||Ze._unevaluatedLayout.hasValue(\"text-variable-anchor-offset\"))&&function(xr,Ir,ve,be,Re,qe,et,Xe,it){let Ft=Ir.transform,Ht=yn(),tr=Re===\"map\",dr=qe===\"map\";for(let Sr of xr){let Or=be.getTile(Sr),Wr=Or.getBucket(ve);if(!Wr||!Wr.text||!Wr.text.segments.get().length)continue;let ni=a.ag(Wr.textSizeData,Ft.zoom),Pi=In(Or,1,Ir.transform.zoom),cn=Br(Sr.posMatrix,dr,tr,Ir.transform,Pi),ln=ve.layout.get(\"icon-text-fit\")!==\"none\"&&Wr.hasIconData();if(ni){let Cn=Math.pow(2,Ft.zoom-Or.tileID.overscaledZ),Kn=Ir.style.map.terrain?(fa,$a)=>Ir.style.map.terrain.getElevation(Sr,fa,$a):null,Aa=Ht.translatePosition(Ft,Or,et,Xe);yf(Wr,tr,dr,it,Ft,cn,Sr.posMatrix,Cn,ni,ln,Ht,Aa,Sr.toUnwrapped(),Kn)}}}(st,le,Ze,Oe,Ze.layout.get(\"text-rotation-alignment\"),Ze.layout.get(\"text-pitch-alignment\"),Ze.paint.get(\"text-translate\"),Ze.paint.get(\"text-translate-anchor\"),Tt),Ze.paint.get(\"icon-opacity\").constantOr(1)!==0&&Ah(le,Oe,Ze,st,!1,Ze.paint.get(\"icon-translate\"),Ze.paint.get(\"icon-translate-anchor\"),Ze.layout.get(\"icon-rotation-alignment\"),Ze.layout.get(\"icon-pitch-alignment\"),Ze.layout.get(\"icon-keep-upright\"),Yt,Kt),Ze.paint.get(\"text-opacity\").constantOr(1)!==0&&Ah(le,Oe,Ze,st,!0,Ze.paint.get(\"text-translate\"),Ze.paint.get(\"text-translate-anchor\"),Ze.layout.get(\"text-rotation-alignment\"),Ze.layout.get(\"text-pitch-alignment\"),Ze.layout.get(\"text-keep-upright\"),Yt,Kt),Oe.map.showCollisionBoxes&&(Hu(le,Oe,Ze,st,!0),Hu(le,Oe,Ze,st,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case\"circle\":(function(le,Oe,Ze,st){if(le.renderPass!==\"translucent\")return;let Tt=Ze.paint.get(\"circle-opacity\"),Yt=Ze.paint.get(\"circle-stroke-width\"),Kt=Ze.paint.get(\"circle-stroke-opacity\"),xr=!Ze.layout.get(\"circle-sort-key\").isConstant();if(Tt.constantOr(1)===0&&(Yt.constantOr(1)===0||Kt.constantOr(1)===0))return;let Ir=le.context,ve=Ir.gl,be=le.depthModeForSublayer(0,Po.ReadOnly),Re=Ko.disabled,qe=le.colorModeForRenderPass(),et=[];for(let Xe=0;Xe<st.length;Xe++){let it=st[Xe],Ft=Oe.getTile(it),Ht=Ft.getBucket(Ze);if(!Ht)continue;let tr=Ht.programConfigurations.get(Ze.id),dr=le.useProgram(\"circle\",tr),Sr=Ht.layoutVertexBuffer,Or=Ht.indexBuffer,Wr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(it),ni={programConfiguration:tr,program:dr,layoutVertexBuffer:Sr,indexBuffer:Or,uniformValues:_o(le,it,Ft,Ze),terrainData:Wr};if(xr){let Pi=Ht.segments.get();for(let cn of Pi)et.push({segments:new a.a0([cn]),sortKey:cn.sortKey,state:ni})}else et.push({segments:Ht.segments,sortKey:0,state:ni})}xr&&et.sort((Xe,it)=>Xe.sortKey-it.sortKey);for(let Xe of et){let{programConfiguration:it,program:Ft,layoutVertexBuffer:Ht,indexBuffer:tr,uniformValues:dr,terrainData:Sr}=Xe.state;Ft.draw(Ir,ve.TRIANGLES,be,Re,qe,Pa.disabled,dr,Sr,Ze.id,Ht,tr,Xe.segments,Ze.paint,le.transform.zoom,it)}})(w,B,Q,ee);break;case\"heatmap\":(function(le,Oe,Ze,st){if(Ze.paint.get(\"heatmap-opacity\")===0)return;let Tt=le.context;if(le.style.map.terrain){for(let Yt of st){let Kt=Oe.getTile(Yt);Oe.hasRenderableParent(Yt)||(le.renderPass===\"offscreen\"?_f(le,Kt,Ze,Yt):le.renderPass===\"translucent\"&&Yc(le,Ze,Yt))}Tt.viewport.set([0,0,le.width,le.height])}else le.renderPass===\"offscreen\"?function(Yt,Kt,xr,Ir){let ve=Yt.context,be=ve.gl,Re=Ko.disabled,qe=new qs([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(et,Xe,it){let Ft=et.gl;et.activeTexture.set(Ft.TEXTURE1),et.viewport.set([0,0,Xe.width/4,Xe.height/4]);let Ht=it.heatmapFbos.get(a.aU);Ht?(Ft.bindTexture(Ft.TEXTURE_2D,Ht.colorAttachment.get()),et.bindFramebuffer.set(Ht.framebuffer)):(Ht=eh(et,Xe.width/4,Xe.height/4),it.heatmapFbos.set(a.aU,Ht))})(ve,Yt,xr),ve.clear({color:a.aM.transparent});for(let et=0;et<Ir.length;et++){let Xe=Ir[et];if(Kt.hasRenderableParent(Xe))continue;let it=Kt.getTile(Xe),Ft=it.getBucket(xr);if(!Ft)continue;let Ht=Ft.programConfigurations.get(xr.id),tr=Yt.useProgram(\"heatmap\",Ht),{zoom:dr}=Yt.transform;tr.draw(ve,be.TRIANGLES,Po.disabled,Re,qe,Pa.disabled,ko(Xe.posMatrix,it,dr,xr.paint.get(\"heatmap-intensity\")),null,xr.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,xr.paint,Yt.transform.zoom,Ht)}ve.viewport.set([0,0,Yt.width,Yt.height])}(le,Oe,Ze,st):le.renderPass===\"translucent\"&&function(Yt,Kt){let xr=Yt.context,Ir=xr.gl;xr.setColorMode(Yt.colorModeForRenderPass());let ve=Kt.heatmapFbos.get(a.aU);ve&&(xr.activeTexture.set(Ir.TEXTURE0),Ir.bindTexture(Ir.TEXTURE_2D,ve.colorAttachment.get()),xr.activeTexture.set(Ir.TEXTURE1),th(xr,Kt).bind(Ir.LINEAR,Ir.CLAMP_TO_EDGE),Yt.useProgram(\"heatmapTexture\").draw(xr,Ir.TRIANGLES,Po.disabled,Ko.disabled,Yt.colorModeForRenderPass(),Pa.disabled,Ds(Yt,Kt,0,1),null,Kt.id,Yt.viewportBuffer,Yt.quadTriangleIndexBuffer,Yt.viewportSegments,Kt.paint,Yt.transform.zoom))}(le,Ze)})(w,B,Q,ee);break;case\"line\":(function(le,Oe,Ze,st){if(le.renderPass!==\"translucent\")return;let Tt=Ze.paint.get(\"line-opacity\"),Yt=Ze.paint.get(\"line-width\");if(Tt.constantOr(1)===0||Yt.constantOr(1)===0)return;let Kt=le.depthModeForSublayer(0,Po.ReadOnly),xr=le.colorModeForRenderPass(),Ir=Ze.paint.get(\"line-dasharray\"),ve=Ze.paint.get(\"line-pattern\"),be=ve.constantOr(1),Re=Ze.paint.get(\"line-gradient\"),qe=Ze.getCrossfadeParameters(),et=be?\"linePattern\":Ir?\"lineSDF\":Re?\"lineGradient\":\"line\",Xe=le.context,it=Xe.gl,Ft=!0;for(let Ht of st){let tr=Oe.getTile(Ht);if(be&&!tr.patternsLoaded())continue;let dr=tr.getBucket(Ze);if(!dr)continue;let Sr=dr.programConfigurations.get(Ze.id),Or=le.context.program.get(),Wr=le.useProgram(et,Sr),ni=Ft||Wr.program!==Or,Pi=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Ht),cn=ve.constantOr(null);if(cn&&tr.imageAtlas){let Kn=tr.imageAtlas,Aa=Kn.patternPositions[cn.to.toString()],fa=Kn.patternPositions[cn.from.toString()];Aa&&fa&&Sr.setConstantPatternPositions(Aa,fa)}let ln=Pi?Ht:null,Cn=be?zl(le,tr,Ze,qe,ln):Ir?us(le,tr,Ze,Ir,qe,ln):Re?ul(le,tr,Ze,dr.lineClipsArray.length,ln):ll(le,tr,Ze,ln);if(be)Xe.activeTexture.set(it.TEXTURE0),tr.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),Sr.updatePaintBuffers(qe);else if(Ir&&(ni||le.lineAtlas.dirty))Xe.activeTexture.set(it.TEXTURE0),le.lineAtlas.bind(Xe);else if(Re){let Kn=dr.gradients[Ze.id],Aa=Kn.texture;if(Ze.gradientVersion!==Kn.version){let fa=256;if(Ze.stepInterpolant){let $a=Oe.getSource().maxzoom,Co=Ht.canonical.z===$a?Math.ceil(1<<le.transform.maxZoom-Ht.canonical.z):1;fa=a.ac(a.aV(dr.maxLineLength/a.X*1024*Co),256,Xe.maxTextureSize)}Kn.gradient=a.aW({expression:Ze.gradientExpression(),evaluationKey:\"lineProgress\",resolution:fa,image:Kn.gradient||void 0,clips:dr.lineClipsArray}),Kn.texture?Kn.texture.update(Kn.gradient):Kn.texture=new g(Xe,Kn.gradient,it.RGBA),Kn.version=Ze.gradientVersion,Aa=Kn.texture}Xe.activeTexture.set(it.TEXTURE0),Aa.bind(Ze.stepInterpolant?it.NEAREST:it.LINEAR,it.CLAMP_TO_EDGE)}Wr.draw(Xe,it.TRIANGLES,Kt,le.stencilModeForClipping(Ht),xr,Pa.disabled,Cn,Pi,Ze.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,Ze.paint,le.transform.zoom,Sr,dr.layoutVertexBuffer2),Ft=!1}})(w,B,Q,ee);break;case\"fill\":(function(le,Oe,Ze,st){let Tt=Ze.paint.get(\"fill-color\"),Yt=Ze.paint.get(\"fill-opacity\");if(Yt.constantOr(1)===0)return;let Kt=le.colorModeForRenderPass(),xr=Ze.paint.get(\"fill-pattern\"),Ir=le.opaquePassEnabledForLayer()&&!xr.constantOr(1)&&Tt.constantOr(a.aM.transparent).a===1&&Yt.constantOr(0)===1?\"opaque\":\"translucent\";if(le.renderPass===Ir){let ve=le.depthModeForSublayer(1,le.renderPass===\"opaque\"?Po.ReadWrite:Po.ReadOnly);jf(le,Oe,Ze,st,ve,Kt,!1)}if(le.renderPass===\"translucent\"&&Ze.paint.get(\"fill-antialias\")){let ve=le.depthModeForSublayer(Ze.getPaintProperty(\"fill-outline-color\")?2:0,Po.ReadOnly);jf(le,Oe,Ze,st,ve,Kt,!0)}})(w,B,Q,ee);break;case\"fill-extrusion\":(function(le,Oe,Ze,st){let Tt=Ze.paint.get(\"fill-extrusion-opacity\");if(Tt!==0&&le.renderPass===\"translucent\"){let Yt=new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D);if(Tt!==1||Ze.paint.get(\"fill-extrusion-pattern\").constantOr(1))cc(le,Oe,Ze,st,Yt,Ko.disabled,qs.disabled),cc(le,Oe,Ze,st,Yt,le.stencilModeFor3D(),le.colorModeForRenderPass());else{let Kt=le.colorModeForRenderPass();cc(le,Oe,Ze,st,Yt,Ko.disabled,Kt)}}})(w,B,Q,ee);break;case\"hillshade\":(function(le,Oe,Ze,st){if(le.renderPass!==\"offscreen\"&&le.renderPass!==\"translucent\")return;let Tt=le.context,Yt=le.depthModeForSublayer(0,Po.ReadOnly),Kt=le.colorModeForRenderPass(),[xr,Ir]=le.renderPass===\"translucent\"?le.stencilConfigForOverlap(st):[{},st];for(let ve of Ir){let be=Oe.getTile(ve);be.needsHillshadePrepare!==void 0&&be.needsHillshadePrepare&&le.renderPass===\"offscreen\"?Nl(le,be,Ze,Yt,Ko.disabled,Kt):le.renderPass===\"translucent\"&&of(le,ve,be,Ze,Yt,xr[ve.overscaledZ],Kt)}Tt.viewport.set([0,0,le.width,le.height])})(w,B,Q,ee);break;case\"raster\":(function(le,Oe,Ze,st){if(le.renderPass!==\"translucent\"||Ze.paint.get(\"raster-opacity\")===0||!st.length)return;let Tt=le.context,Yt=Tt.gl,Kt=Oe.getSource(),xr=le.useProgram(\"raster\"),Ir=le.colorModeForRenderPass(),[ve,be]=Kt instanceof Wt?[{},st]:le.stencilConfigForOverlap(st),Re=be[be.length-1].overscaledZ,qe=!le.options.moving;for(let et of be){let Xe=le.depthModeForSublayer(et.overscaledZ-Re,Ze.paint.get(\"raster-opacity\")===1?Po.ReadWrite:Po.ReadOnly,Yt.LESS),it=Oe.getTile(et);it.registerFadeDuration(Ze.paint.get(\"raster-fade-duration\"));let Ft=Oe.findLoadedParent(et,0),Ht=Oe.findLoadedSibling(et),tr=Kc(it,Ft||Ht||null,Oe,Ze,le.transform,le.style.map.terrain),dr,Sr,Or=Ze.paint.get(\"raster-resampling\")===\"nearest\"?Yt.NEAREST:Yt.LINEAR;Tt.activeTexture.set(Yt.TEXTURE0),it.texture.bind(Or,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),Tt.activeTexture.set(Yt.TEXTURE1),Ft?(Ft.texture.bind(Or,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),dr=Math.pow(2,Ft.tileID.overscaledZ-it.tileID.overscaledZ),Sr=[it.tileID.canonical.x*dr%1,it.tileID.canonical.y*dr%1]):it.texture.bind(Or,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),it.texture.useMipmap&&Tt.extTextureFilterAnisotropic&&le.transform.pitch>20&&Yt.texParameterf(Yt.TEXTURE_2D,Tt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tt.extTextureFilterAnisotropicMax);let Wr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(et),ni=Wr?et:null,Pi=ni?ni.posMatrix:le.transform.calculatePosMatrix(et.toUnwrapped(),qe),cn=cl(Pi,Sr||[0,0],dr||1,tr,Ze);Kt instanceof Wt?xr.draw(Tt,Yt.TRIANGLES,Xe,Ko.disabled,Ir,Pa.disabled,cn,Wr,Ze.id,Kt.boundsBuffer,le.quadTriangleIndexBuffer,Kt.boundsSegments):xr.draw(Tt,Yt.TRIANGLES,Xe,ve[et.overscaledZ],Ir,Pa.disabled,cn,Wr,Ze.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case\"background\":(function(le,Oe,Ze,st){let Tt=Ze.paint.get(\"background-color\"),Yt=Ze.paint.get(\"background-opacity\");if(Yt===0)return;let Kt=le.context,xr=Kt.gl,Ir=le.transform,ve=Ir.tileSize,be=Ze.paint.get(\"background-pattern\");if(le.isPatternMissing(be))return;let Re=!be&&Tt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?\"opaque\":\"translucent\";if(le.renderPass!==Re)return;let qe=Ko.disabled,et=le.depthModeForSublayer(0,Re===\"opaque\"?Po.ReadWrite:Po.ReadOnly),Xe=le.colorModeForRenderPass(),it=le.useProgram(be?\"backgroundPattern\":\"background\"),Ft=st||Ir.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});be&&(Kt.activeTexture.set(xr.TEXTURE0),le.imageManager.bind(le.context));let Ht=Ze.getCrossfadeParameters();for(let tr of Ft){let dr=st?tr.posMatrix:le.transform.calculatePosMatrix(tr.toUnwrapped()),Sr=be?Su(dr,Yt,le,be,{tileID:tr,tileSize:ve},Ht):Yl(dr,Yt,Tt),Or=le.style.map.terrain&&le.style.map.terrain.getTerrainData(tr);it.draw(Kt,xr.TRIANGLES,et,qe,Xe,Pa.disabled,Sr,Or,Ze.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case\"custom\":(function(le,Oe,Ze){let st=le.context,Tt=Ze.implementation;if(le.renderPass===\"offscreen\"){let Yt=Tt.prerender;Yt&&(le.setCustomLayerDefaults(),st.setColorMode(le.colorModeForRenderPass()),Yt.call(Tt,st.gl,le.transform.customLayerMatrix()),st.setDirty(),le.setBaseState())}else if(le.renderPass===\"translucent\"){le.setCustomLayerDefaults(),st.setColorMode(le.colorModeForRenderPass()),st.setStencilMode(Ko.disabled);let Yt=Tt.renderingMode===\"3d\"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);st.setDepthMode(Yt),Tt.render(st.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),st.setDirty(),le.setBaseState(),st.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Oe=le?ee===\"map\"?this.transform.angle:0:ee===\"viewport\"?-this.transform.angle:0;if(Oe){let Tt=Math.sin(Oe),Yt=Math.cos(Oe);Q=[Q[0]*Yt-Q[1]*Tt,Q[0]*Tt+Q[1]*Yt]}let Ze=[le?Q[0]:In(B,Q[0],this.transform.zoom),le?Q[1]:In(B,Q[1],this.transform.zoom),0],st=new Float32Array(16);return a.J(st,w,Ze),st}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:\"\")+(this._showOverdrawInspector?\"/overdraw\":\"\")+(this.style.map.terrain?\"/terrain\":\"\");return this.cache[Q]||(this.cache[Q]=new hn(this.context,jn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement(\"canvas\"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Ze=>{let st=1/(Ze=a.af([],Ze,w))[3]/B*ee;return a.b1(Ze,Ze,[st,st,1/Ze[3],st])}),Oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Ze=>{let st=function(xr,Ir){var ve=Ir[0],be=Ir[1],Re=Ir[2],qe=ve*ve+be*be+Re*Re;return qe>0&&(qe=1/Math.sqrt(qe)),xr[0]=Ir[0]*qe,xr[1]=Ir[1]*qe,xr[2]=Ir[2]*qe,xr}([],function(xr,Ir,ve){var be=Ir[0],Re=Ir[1],qe=Ir[2],et=ve[0],Xe=ve[1],it=ve[2];return xr[0]=Re*it-qe*Xe,xr[1]=qe*et-be*it,xr[2]=be*Xe-Re*et,xr}([],L([],le[Ze[0]],le[Ze[1]]),L([],le[Ze[2]],le[Ze[1]]))),Tt=-((Yt=st)[0]*(Kt=le[Ze[1]])[0]+Yt[1]*Kt[1]+Yt[2]*Kt[2]);var Yt,Kt;return st.concat(Tt)});return new ks(le,Oe)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=E(this.min),ee=E(this.max);for(let le=0;le<B.length;le++)Q[le]=B[le]?this.min[le]:this.center[le],ee[le]=B[le]?this.center[le]:this.max[le];return ee[2]=this.max[2],new bc(Q,ee)}distanceX(w){return Math.max(Math.min(this.max[0],w[0]),this.min[0])-w[0]}distanceY(w){return Math.max(Math.min(this.max[1],w[1]),this.min[1])-w[1]}intersects(w){let B=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]],Q=!0;for(let ee=0;ee<w.planes.length;ee++){let le=w.planes[ee],Oe=0;for(let Ze=0;Ze<B.length;Ze++)a.b2(le,B[Ze])>=0&&Oe++;if(Oe===0)return 0;Oe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Oe=-Number.MAX_VALUE;for(let Ze=0;Ze<w.points.length;Ze++){let st=w.points[Ze][ee]-this.min[ee];le=Math.min(le,st),Oe=Math.max(Oe,st)}if(Oe<0||le>this.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error(\"Invalid value for edge-insets, top, bottom, left and right must all be numbers\");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var Oe=ee[0],Ze=ee[1],st=ee[2],Tt=ee[3],Yt=Math.sin(le),Kt=Math.cos(le);Q[0]=Oe*Kt+st*Yt,Q[1]=Ze*Kt+Tt*Yt,Q[2]=Oe*-Yt+st*Kt,Q[3]=Ze*-Yt+Tt*Kt}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),Oe=this.pointCoordinate(new a.P(0,this.height)),Ze=Math.floor(Math.min(Q.x,ee.x,le.x,Oe.x)),st=Math.floor(Math.max(Q.x,ee.x,le.x,Oe.x)),Tt=1;for(let Yt=Ze-Tt;Yt<=st+Tt;Yt++)Yt!==0&&B.push(new a.b4(Yt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&ee<w.minzoom)return[];w.maxzoom!==void 0&&ee>w.maxzoom&&(ee=w.maxzoom);let Oe=this.pointCoordinate(this.getCameraPoint()),Ze=a.Z.fromLngLat(this.center),st=Math.pow(2,ee),Tt=[st*Oe.x,st*Oe.y,0],Yt=[st*Ze.x,st*Ze.y,0],Kt=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),xr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(xr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=Xe=>({aabb:new bc([Xe*st,0,0],[(Xe+1)*st,st,0]),zoom:0,x:0,y:0,wrap:Xe,fullyVisible:!1}),be=[],Re=[],qe=ee,et=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Xe=1;Xe<=3;Xe++)be.push(ve(-Xe)),be.push(ve(Xe));for(be.push(ve(0));be.length>0;){let Xe=be.pop(),it=Xe.x,Ft=Xe.y,Ht=Xe.fullyVisible;if(!Ht){let Wr=Xe.aabb.intersects(Kt);if(Wr===0)continue;Ht=Wr===2}let tr=w.terrain?Tt:Yt,dr=Xe.aabb.distanceX(tr),Sr=Xe.aabb.distanceY(tr),Or=Math.max(Math.abs(dr),Math.abs(Sr));if(Xe.zoom===qe||Or>Ir+(1<<qe-Xe.zoom)-2&&Xe.zoom>=xr){let Wr=qe-Xe.zoom,ni=Tt[0]-.5-(it<<Wr),Pi=Tt[1]-.5-(Ft<<Wr);Re.push({tileID:new a.S(Xe.zoom===qe?et:Xe.zoom,Xe.wrap,Xe.zoom,it,Ft),distanceSq:x([Yt[0]-.5-it,Yt[1]-.5-Ft]),tileDistanceToCamera:Math.sqrt(ni*ni+Pi*Pi)})}else for(let Wr=0;Wr<4;Wr++){let ni=(it<<1)+Wr%2,Pi=(Ft<<1)+(Wr>>1),cn=Xe.zoom+1,ln=Xe.aabb.quadrant(Wr);if(w.terrain){let Cn=new a.S(cn,Xe.wrap,cn,ni,Pi),Kn=w.terrain.getMinMaxElevation(Cn),Aa=(B=Kn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Kn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;ln=new bc([ln.min[0],ln.min[1],Aa],[ln.max[0],ln.max[1],fa])}be.push({aabb:ln,zoom:cn,x:ni,y:Pi,wrap:Xe.wrap,fullyVisible:Ht})}}return Re.sort((Xe,it)=>Xe.distanceSq-it.distanceSq).map(Xe=>Xe.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let Oe=Q+B-le,Ze=Math.cos(this._pitch)*this.cameraToCenterDistance/Oe/a.b5(1,ee.lat),st=this.scaleZoom(Ze/this.tileSize);this._elevation=le,this._center=ee,this.zoom=st}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Oe=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let xr=B.pointCoordinate(w);if(xr!=null)return xr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],Oe=ee[3],Ze=Q[1]/le,st=ee[1]/Oe,Tt=Q[2]/le,Yt=ee[2]/Oe,Kt=Tt===Yt?0:(0-Tt)/(Yt-Tt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Oe,Kt)/this.worldSize,a.y.number(Ze,st,Kt)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let Xe=179.9999999999;ee=[-Xe,Xe]}let le=this.tileSize*this.zoomScale(Q.zoom),Oe=0,Ze=le,st=0,Tt=le,Yt=0,Kt=0,{x:xr,y:Ir}=this.size;if(this.latRange){let Xe=this.latRange;Oe=a.Q(Xe[1])*le,Ze=a.Q(Xe[0])*le,Ze-Oe<Ir&&(Yt=Ir/(Ze-Oe))}ee&&(st=a.b3(a.O(ee[0])*le,0,le),Tt=a.b3(a.O(ee[1])*le,0,le),Tt<st&&(Tt+=le),Tt-st<xr&&(Kt=xr/(Tt-st)));let{x:ve,y:be}=this.project.call({worldSize:le},w),Re,qe,et=Math.max(Kt||0,Yt||0);if(et){let Xe=new a.P(Kt?(Tt+st)/2:ve,Yt?(Ze+Oe)/2:be);return Q.center=this.unproject.call({worldSize:le},Xe).wrap(),Q.zoom+=this.scaleZoom(et),Q}if(this.latRange){let Xe=Ir/2;be-Xe<Oe&&(qe=Oe+Xe),be+Xe>Ze&&(qe=Ze-Xe)}if(ee){let Xe=(st+Tt)/2,it=ve;this._renderWorldCopies&&(it=a.b3(ve,Xe-le/2,Xe+le/2));let Ft=xr/2;it-Ft<st&&(Re=st+Ft),it+Ft>Tt&&(Re=Tt-Ft)}if(Re!==void 0||qe!==void 0){let Xe=new a.P(Re!=null?Re:ve,qe!=null?qe:be);Q.center=this.unproject.call({worldSize:le},Xe).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Oe=Math.min(this.elevation,this.minElevationForCurrentTile),Ze=le-Oe*this._pixelPerMeter/Math.cos(this._pitch),st=Oe<0?Ze:le,Tt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Kt=Math.sin(Yt)*st/Math.sin(a.ac(Math.PI-Tt-Yt,.01,Math.PI-.01)),xr=this.getHorizon(),Ir=2*Math.atan(xr/this.cameraToCenterDistance)*(.5+w.y/(2*xr)),ve=Math.sin(Ir)*st/Math.sin(a.ac(Math.PI-Tt-Ir,.01,Math.PI-.01)),be=Math.min(Kt,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+st),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let Re=this.width%2/2,qe=this.height%2/2,et=Math.cos(this.angle),Xe=Math.sin(this.angle),it=B-Math.round(B)+et*Re+Xe*qe,Ft=Q-Math.round(Q)+et*qe+Xe*Re,Ht=new Float64Array(ee);if(a.J(Ht,Ht,[it>.5?it-1:it,Ft>.5?Ft-1:Ft,0]),this.alignedModelViewProjectionMatrix=Ht,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,Oe=B.y;for(let Ze of w)Q=Math.min(Q,Ze.x),ee=Math.min(ee,Ze.y),le=Math.max(le,Ze.x),Oe=Math.max(Oe,Ze.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Oe),new a.P(Q,Oe),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,Oe=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(Oe,w),Q=!1)};return(...Ze)=>(Q=!0,le=this,B=Ze,ee||Oe(),ee)}class Mh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace(\"#\",\"\");if(this._hashName){let Q;return B.split(\"&\").map(ee=>ee.split(\"=\")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||\"\").split(\"/\")}return B.split(\"/\")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join(\"/\"),ee=Q;ee.split(\"&\").length>0&&(ee=ee.split(\"&\")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,\"\");le.startsWith(\"#&\")?le=le.slice(0,1)+le.slice(2):le===\"#\"&&(le=\"\");let Oe=window.location.href.replace(/(#.+)?$/,le);Oe=Oe.replace(\"&&\",\"&\"),window.history.replaceState(window.history.state,null,Oe)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this}remove(){return removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),Oe=Math.round(B.lng*le)/le,Ze=Math.round(B.lat*le)/le,st=this._map.getBearing(),Tt=this._map.getPitch(),Yt=\"\";if(Yt+=w?`/${Oe}/${Ze}/${Q}`:`${Q}/${Ze}/${Oe}`,(st||Tt)&&(Yt+=\"/\"+Math.round(10*st)/10),Tt&&(Yt+=`/${Math.round(Tt)}`),this._hashName){let Kt=this._hashName,xr=!1,Ir=window.location.hash.slice(1).split(\"&\").map(ve=>{let be=ve.split(\"=\")[0];return be===Kt?(xr=!0,`${be}=${Yt}`):ve}).filter(ve=>ve);return xr||Ir.push(`${Kt}=${Yt}`),`#${Ir.join(\"&\")}`}return`#${Yt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,Ou(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,Ou(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),Ou(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,Ou(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Ou(ue,w){(!ue.duration||ue.duration<w.duration)&&(ue.duration=w.duration,ue.easing=w.easing)}function bf(ue,w,B){let{maxSpeed:Q,linearity:ee,deceleration:le}=B,Oe=a.ac(ue*ee/(w/1e3),-Q,Q),Ze=Math.abs(Oe)/(le*ee);return{easing:B.easing,duration:1e3*Ze,amount:Oe*(Ze/2)}}class jl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q,ee={}){let le=c.mousePos(B.getCanvas(),Q),Oe=B.unproject(le);super(w,a.e({point:le,lngLat:Oe,originalEvent:Q},ee)),this._defaultPrevented=!1,this.target=B}}class lf extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){let ee=w===\"touchend\"?Q.changedTouches:Q.touches,le=c.touchPos(B.getCanvasContainer(),ee),Oe=le.map(st=>B.unproject(st)),Ze=le.reduce((st,Tt,Yt,Kt)=>st.add(Tt.div(Kt.length)),new a.P(0,0));super(w,{points:le,point:Ze,lngLats:Oe,lngLat:B.unproject(Ze),originalEvent:Q}),this._defaultPrevented=!1}}class Xh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Xh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl(\"contextmenu\",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens(\"contextmenu\")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)<this._clickTolerance)return;let ee=this._startPos;this._lastPos=Q,this._box||(this._box=c.create(\"div\",\"maplibregl-boxzoom\",this._container),this._container.classList.add(\"maplibregl-crosshair\"),this._fireEvent(\"boxzoomstart\",w));let le=Math.min(ee.x,Q.x),Oe=Math.max(ee.x,Q.x),Ze=Math.min(ee.y,Q.y),st=Math.max(ee.y,Q.y);c.setTransform(this._box,`translate(${le}px,${Ze}px)`),this._box.style.width=Oe-le+\"px\",this._box.style.height=st-Ze+\"px\"}mouseupWindow(w,B){if(!this._active||w.button!==0)return;let Q=this._startPos,ee=B;if(this.reset(),c.suppressClick(),Q.x!==ee.x||Q.y!==ee.y)return this._map.fire(new a.k(\"boxzoomend\",{originalEvent:w})),{cameraAnimation:le=>le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent(\"boxzoomcancel\",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent(\"boxzoomcancel\",w))}reset(){this._active=!1,this._container.classList.remove(\"maplibregl-crosshair\"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Xf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Q<ue.length;Q++)B[ue[Q].identifier]=w[Q];return B}class Us{constructor(w){this.reset(),this.numTouches=w.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(w,B,Q){(this.centroid||Q.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let Oe of ee)le._add(Oe);return le.div(ee.length)}(B),this.touches=Xf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Xf(Q,B);for(let le in this.touches){let Oe=ee[le];(!Oe||Oe.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,Oe=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Oe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),Oe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Oe.zoom+1,around:Oe.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Oe.zoom-1,around:Oe.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=ee,this._move(Q,ee))}dragEnd(w){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(w)&&(this._moved&&c.suppressClick(),this.reset(w))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let Rf={0:1,2:2};class Xu{constructor(w){this._correctEvent=w.checkCorrectEvent}startMove(w){let B=c.mouseButton(w);this._eventButton=B}endMove(w){delete this._eventButton}isValidStartEvent(w){return this._correctEvent(w)}isValidMoveEvent(w){return!function(B,Q){let ee=Rf[Q];return B.buttons===void 0||(B.buttons&ee)!==ee}(w,this._eventButton)}isValidEndEvent(w){return c.mouseButton(w)===this._eventButton}}class uf{constructor(){this._firstTouch=void 0}_isOneFingerTouch(w){return w.targetTouches.length===1}_isSameTouchEvent(w){return w.targetTouches[0].identifier===this._firstTouch}startMove(w){this._firstTouch=w.targetTouches[0].identifier}endMove(w){delete this._firstTouch}isValidStartEvent(w){return this._isOneFingerTouch(w)}isValidMoveEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}isValidEndEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}}let Zf=ue=>{ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked(\"touch_pan\",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Xf(Q,B),le=new a.P(0,0),Oe=new a.P(0,0),Ze=0;for(let Tt in ee){let Yt=ee[Tt],Kt=this._touches[Tt];Kt&&(le._add(Yt),Oe._add(Yt.sub(Kt)),Ze++,ee[Tt]=Yt)}if(this._touches=ee,this._shouldBePrevented(Ze)||!Oe.mag())return;let st=Oe.div(Ze);return this._sum._add(st),this._sum.mag()<this._clickTolerance?void 0:{around:le.div(Ze),panDelta:st}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Oc{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(w,B,Q){this._firstTwoTouches||Q.length<2||(this._firstTwoTouches=[Q[0].identifier,Q[1].identifier],this._start([B[0],B[1]]))}touchmove(w,B,Q){if(!this._firstTwoTouches)return;w.preventDefault();let[ee,le]=this._firstTwoTouches,Oe=Tc(Q,B,ee),Ze=Tc(Q,B,le);if(!Oe||!Ze)return;let st=this._aroundCenter?null:Oe.add(Ze).div(2);return this._move([Oe,Ze],st,w)}touchend(w,B,Q){if(!this._firstTwoTouches)return;let[ee,le]=this._firstTwoTouches,Oe=Tc(Q,B,ee),Ze=Tc(Q,B,le);Oe&&Ze||(this._active&&c.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(w){this._enabled=!0,this._aroundCenter=!!w&&w.around===\"center\"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Tc(ue,w,B){for(let Q=0;Q<ue.length;Q++)if(ue[Q].identifier===B)return w[Q]}function wl(ue,w){return Math.log(ue/w)/Math.LN2}class vu extends Oc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(w){this._startDistance=this._distance=w[0].dist(w[1])}_move(w,B){let Q=this._distance;if(this._distance=w[0].dist(w[1]),this._active||!(Math.abs(wl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:wl(this._distance,Q),pinchAround:B}}}function qc(ue,w){return 180*ue.angleWith(w)/Math.PI}class cf extends Oc{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(w){this._startVector=this._vector=w[0].sub(w[1]),this._minDiameter=w[0].dist(w[1])}_move(w,B,Q){let ee=this._vector;if(this._vector=w[0].sub(w[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:qc(this._vector,ee),pinchAround:B}}_isBelowThreshold(w){this._minDiameter=Math.min(this._minDiameter,w.mag());let B=25/(Math.PI*this._minDiameter)*360,Q=qc(w,this._startVector);return Math.abs(Q)<B}}function fc(ue){return Math.abs(ue.y)>Math.abs(ue.x)}class Bc extends Oc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let Oe=w.y>0==B.y>0;return fc(w)&&fc(B)&&Oe}}let At={panStep:100,bearingStep:15,pitchStep:10};class Xt{constructor(w){this._tr=new du(w);let B=At;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,Oe=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),Oe=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Oe=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Ze=>{let st=this._tr;Ze.easeTo({duration:300,easeId:\"keyboardHandler\",easing:Cr,zoom:B?Math.round(st.zoom)+B*(w.shiftKey?2:1):st.zoom,bearing:st.bearing+Q*this._bearingStep,pitch:st.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Oe*this._panStep],center:st.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Cr(ue){return ue*(2-ue)}let Ar=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type=\"wheel\",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around===\"center\")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked(\"wheel_zoom\",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%Ar==0?this._type=\"wheel\":B!==0&&Math.abs(B)<4?this._type=\"trackpad\":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let st=this._type===\"wheel\"&&Math.abs(this._delta)>Ar?this._wheelZoomRate:this._defaultZoomRate,Tt=2/(1+Math.exp(-Math.abs(this._delta*st)));this._delta<0&&Tt!==0&&(Tt=1/Tt);let Yt=typeof this._targetZoom==\"number\"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Yt*Tt))),this._type===\"wheel\"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom==\"number\"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,Oe=!1,Ze=u.now()-this._lastWheelEventTime;if(this._type===\"wheel\"&&Q&&ee&&Ze){let st=Math.min(Ze/200,1),Tt=ee(st);le=a.y.number(Q,B,Tt),st<1?this._frameId||(this._frameId=!0):Oe=!0}else le=B,Oe=!0;return this._active=!0,Oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Oe,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Oe=.27/Math.sqrt(le*le+1e-4)*.01,Ze=Math.sqrt(.0729-Oe*Oe);B=a.b8(Oe,Ze,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ki{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Xi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,Oe=this._tapPoint.dist(ee)<30;le&&Oe?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add(\"maplibregl-touch-drag-pan\")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove(\"maplibregl-touch-drag-pan\")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Nn{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add(\"maplibregl-touch-zoom-rotate\")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove(\"maplibregl-touch-zoom-rotate\")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Qi{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf(\"Mac\")!==-1?\"metaKey\":\"ctrlKey\",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add(\"maplibregl-cooperative-gestures\"),this._container=c.create(\"div\",\"maplibregl-cooperative-gesture-screen\",w);let B=this._map._getUIString(\"CooperativeGesturesHandler.WindowsHelpText\");this._bypassKey===\"metaKey\"&&(B=this._map._getUIString(\"CooperativeGesturesHandler.MacHelpText\"));let Q=this._map._getUIString(\"CooperativeGesturesHandler.MobileHelpText\"),ee=document.createElement(\"div\");ee.className=\"maplibregl-desktop-message\",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement(\"div\");le.className=\"maplibregl-mobile-message\",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute(\"aria-hidden\",\"true\")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove(\"maplibregl-cooperative-gestures\")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k(\"cooperativegestureprevented\",{gestureType:w,originalEvent:B})),this._container.classList.add(\"maplibregl-show\"),setTimeout(()=>{this._container.classList.remove(\"maplibregl-show\")},100))}}let on=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function Qn(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type===\"blur\")return void this.stop(!0);this._updatingCamera=!0;let Oe=ee.type===\"renderFrame\"?void 0:ee,Ze={needsRenderFrame:!1},st={},Tt={},Yt=ee.touches,Kt=Yt?this._getMapTouches(Yt):void 0,xr=Kt?c.touchPos(this._map.getCanvas(),Kt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:Re,allowed:qe}of this._handlers){if(!Re.isEnabled())continue;let et;this._blockedByActive(Tt,qe,be)?Re.reset():Re[le||ee.type]&&(et=Re[le||ee.type](ee,xr,Kt),this.mergeHandlerResult(Ze,st,et,be,Oe),et&&et.needsRenderFrame&&this._triggerRenderFrame()),(et||Re.isActive())&&(Tt[be]=Re)}let Ir={};for(let be in this._previousActiveHandlers)Tt[be]||(Ir[be]=Oe);this._previousActiveHandlers=Tt,(Object.keys(Ir).length||Qn(Ze))&&(this._changes.push([Ze,st,Ir]),this._triggerRenderFrame()),(Object.keys(Tt).length||Qn(Ze))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Ze;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,\"touchstart\",{passive:!0}],[Q,\"touchmove\",{passive:!1}],[Q,\"touchend\",void 0],[Q,\"touchcancel\",void 0],[Q,\"mousedown\",void 0],[Q,\"mousemove\",void 0],[Q,\"mouseup\",void 0],[document,\"mousemove\",{capture:!0}],[document,\"mouseup\",void 0],[Q,\"mouseover\",void 0],[Q,\"mouseout\",void 0],[Q,\"dblclick\",void 0],[Q,\"click\",void 0],[Q,\"keydown\",{capture:!1}],[Q,\"keyup\",void 0],[Q,\"wheel\",{passive:!1}],[Q,\"contextmenu\",void 0],[window,\"blur\",void 0]];for(let[ee,le,Oe]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Oe)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add(\"mapEvent\",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add(\"boxZoom\",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new Qi(B,w.cooperativeGestures);this._add(\"cooperativeGestures\",le),w.cooperativeGestures&&le.enable();let Oe=new zc(B),Ze=new Xi(B);B.doubleClickZoom=new ki(Ze,Oe),this._add(\"tapZoom\",Oe),this._add(\"clickZoom\",Ze),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let st=new dn;this._add(\"tapDragZoom\",st);let Tt=B.touchPitch=new Bc(B);this._add(\"touchPitch\",Tt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=Wl(w),Kt=ah(w);B.dragRotate=new Nn(w,Yt,Kt),this._add(\"mouseRotate\",Yt,[\"mousePitch\"]),this._add(\"mousePitch\",Kt,[\"mouseRotate\"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let xr=(({enable:et,clickTolerance:Xe})=>{let it=new Xu({checkCorrectEvent:Ft=>c.mouseButton(Ft)===0&&!Ft.ctrlKey});return new Wu({clickTolerance:Xe,move:(Ft,Ht)=>({around:Ht,panDelta:Ht.sub(Ft)}),activateOnStart:!0,moveStateManager:it,enable:et,assignEvents:Zf})})(w),Ir=new Zu(w,B);B.dragPan=new wn(Q,xr,Ir),this._add(\"mousePan\",xr),this._add(\"touchPan\",Ir,[\"touchZoom\",\"touchRotate\"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,be=new vu;B.touchZoomRotate=new Yi(Q,be,ve,st),this._add(\"touchRotate\",ve,[\"touchPan\",\"touchZoom\"]),this._add(\"touchZoom\",be,[\"touchPan\",\"touchRotate\"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Re=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add(\"scrollZoom\",Re,[\"mousePan\"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let qe=B.keyboard=new Xt(B);this._add(\"keyboard\",qe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add(\"blockableMapEvent\",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!on(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let Oe={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Oe),Q.panDelta!==void 0&&(B.drag=Oe),Q.pitchDelta!==void 0&&(B.pitch=Oe),Q.bearingDelta!==void 0&&(B.rotate=Oe)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Oe]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,Oe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Oe=ee.terrain;if(!(Qn(w)||Oe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Ze,zoomDelta:st,bearingDelta:Tt,pitchDelta:Yt,around:Kt,pinchAround:xr}=w;xr!==void 0&&(Kt=xr),ee._stop(!0),Kt=Kt||ee.transform.centerPoint;let Ir=le.pointLocation(Ze?Kt.sub(Ze):Kt);Tt&&(le.bearing+=Tt),Yt&&(le.pitch+=Yt),st&&(le.zoom+=st),Oe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Ze)):le.setLocationAtPoint(Ir,Kt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Kt)):le.setLocationAtPoint(Ir,Kt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=on(this._eventsInProgress),le=on(w),Oe={};for(let Kt in w){let{originalEvent:xr}=w[Kt];this._eventsInProgress[Kt]||(Oe[`${Kt}start`]=xr),this._eventsInProgress[Kt]=w[Kt]}!ee&&le&&this._fireEvent(\"movestart\",le.originalEvent);for(let Kt in Oe)this._fireEvent(Kt,Oe[Kt]);le&&this._fireEvent(\"move\",le.originalEvent);for(let Kt in w){let{originalEvent:xr}=w[Kt];this._fireEvent(Kt,xr)}let Ze={},st;for(let Kt in this._eventsInProgress){let{handlerName:xr,originalEvent:Ir}=this._eventsInProgress[Kt];this._handlersById[xr].isActive()||(delete this._eventsInProgress[Kt],st=B[xr]||Ir,Ze[`${Kt}end`]=st)}for(let Kt in Ze)this._fireEvent(Kt,Ze[Kt]);let Tt=on(this._eventsInProgress),Yt=(ee||le)&&!Tt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Kt=this._map._getTransformForUpdate();Kt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Kt)}if(Q&&Yt){this._updatingCamera=!0;let Kt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),xr=Ir=>Ir!==0&&-this._bearingSnap<Ir&&Ir<this._bearingSnap;!Kt||!Kt.essential&&u.prefersReducedMotion?(this._map.fire(new a.k(\"moveend\",{originalEvent:st})),xr(this._map.getBearing())&&this._map.resetNorth()):(xr(Kt.bearing||this._map.getBearing())&&(Kt.bearing=0),Kt.freezeElevation=!0,this._map.easeTo(Kt,{originalEvent:st})),this._updatingCamera=!1}}_fireEvent(w,B){this._map.fire(new a.k(w,B?{originalEvent:B}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(w=>{delete this._frameId,this.handleEvent(new Fi(\"renderFrame\",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on(\"moveend\",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(w,B):this}getPitch(){return this.transform.pitch}setPitch(w,B){return this.jumpTo({pitch:w},B),this}cameraForBounds(w,B){w=ce.convert(w).adjustAntiMeridian();let Q=B&&B.bearing||0;return this._cameraForBoxAndBearing(w.getNorthWest(),w.getSouthEast(),Q,B)}_cameraForBoxAndBearing(w,B,Q,ee){let le={top:0,bottom:0,right:0,left:0};if(typeof(ee=a.e({padding:le,offset:[0,0],maxZoom:this.transform.maxZoom},ee)).padding==\"number\"){let Wr=ee.padding;ee.padding={top:Wr,bottom:Wr,right:Wr,left:Wr}}ee.padding=a.e(le,ee.padding);let Oe=this.transform,Ze=Oe.padding,st=new ce(w,B),Tt=Oe.project(st.getNorthWest()),Yt=Oe.project(st.getNorthEast()),Kt=Oe.project(st.getSouthEast()),xr=Oe.project(st.getSouthWest()),Ir=a.ba(-Q),ve=Tt.rotate(Ir),be=Yt.rotate(Ir),Re=Kt.rotate(Ir),qe=xr.rotate(Ir),et=new a.P(Math.max(ve.x,be.x,qe.x,Re.x),Math.max(ve.y,be.y,qe.y,Re.y)),Xe=new a.P(Math.min(ve.x,be.x,qe.x,Re.x),Math.min(ve.y,be.y,qe.y,Re.y)),it=et.sub(Xe),Ft=(Oe.width-(Ze.left+Ze.right+ee.padding.left+ee.padding.right))/it.x,Ht=(Oe.height-(Ze.top+Ze.bottom+ee.padding.top+ee.padding.bottom))/it.y;if(Ht<0||Ft<0)return void a.w(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\");let tr=Math.min(Oe.scaleZoom(Oe.scale*Math.min(Ft,Ht)),ee.maxZoom),dr=a.P.convert(ee.offset),Sr=new a.P((ee.padding.left-ee.padding.right)/2,(ee.padding.top-ee.padding.bottom)/2).rotate(a.ba(Q)),Or=dr.add(Sr).mult(Oe.scale/Oe.zoomScale(tr));return{center:Oe.unproject(Tt.add(Kt).div(2).sub(Or)),zoom:tr,bearing:Q}}fitBounds(w,B,Q){return this._fitInternal(this.cameraForBounds(w,B),B,Q)}fitScreenCoordinates(w,B,Q,ee,le){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.P.convert(w)),this.transform.pointLocation(a.P.convert(B)),Q,ee),ee,le)}_fitInternal(w,B,Q){return w?(delete(B=a.e(w,B)).padding,B.linear?this.easeTo(B,Q):this.flyTo(B,Q)):this}jumpTo(w,B){this.stop();let Q=this._getTransformForUpdate(),ee=!1,le=!1,Oe=!1;return\"zoom\"in w&&Q.zoom!==+w.zoom&&(ee=!0,Q.zoom=+w.zoom),w.center!==void 0&&(Q.center=a.N.convert(w.center)),\"bearing\"in w&&Q.bearing!==+w.bearing&&(le=!0,Q.bearing=+w.bearing),\"pitch\"in w&&Q.pitch!==+w.pitch&&(Oe=!0,Q.pitch=+w.pitch),w.padding==null||Q.isPaddingEqual(w.padding)||(Q.padding=w.padding),this._applyUpdatedTransform(Q),this.fire(new a.k(\"movestart\",B)).fire(new a.k(\"move\",B)),ee&&this.fire(new a.k(\"zoomstart\",B)).fire(new a.k(\"zoom\",B)).fire(new a.k(\"zoomend\",B)),le&&this.fire(new a.k(\"rotatestart\",B)).fire(new a.k(\"rotate\",B)).fire(new a.k(\"rotateend\",B)),Oe&&this.fire(new a.k(\"pitchstart\",B)).fire(new a.k(\"pitch\",B)).fire(new a.k(\"pitchend\",B)),this.fire(new a.k(\"moveend\",B))}calculateCameraOptionsFromTo(w,B,Q,ee=0){let le=a.Z.fromLngLat(w,B),Oe=a.Z.fromLngLat(Q,ee),Ze=Oe.x-le.x,st=Oe.y-le.y,Tt=Oe.z-le.z,Yt=Math.hypot(Ze,st,Tt);if(Yt===0)throw new Error(\"Can't calculate camera options with same From and To\");let Kt=Math.hypot(Ze,st),xr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Yt/this.transform.tileSize),Ir=180*Math.atan2(Ze,-st)/Math.PI,ve=180*Math.acos(Kt/Yt)/Math.PI;return ve=Tt<0?90-ve:90+ve,{center:Oe.toLngLat(),zoom:xr,pitch:ve,bearing:Ir}}easeTo(w,B){var Q;this._stop(!1,w.easeId),((w=a.e({offset:[0,0],duration:500,easing:a.b9},w)).animate===!1||!w.essential&&u.prefersReducedMotion)&&(w.duration=0);let ee=this._getTransformForUpdate(),le=ee.zoom,Oe=ee.bearing,Ze=ee.pitch,st=ee.padding,Tt=\"bearing\"in w?this._normalizeBearing(w.bearing,Oe):Oe,Yt=\"pitch\"in w?+w.pitch:Ze,Kt=\"padding\"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Ir=ee.centerPoint.add(xr),ve=ee.pointLocation(Ir),{center:be,zoom:Re}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let qe=ee.project(ve),et=ee.project(be).sub(qe),Xe=ee.zoomScale(Re-le),it,Ft;w.around&&(it=a.N.convert(w.around),Ft=ee.locationPoint(it));let Ht={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Re!==le,this._rotating=this._rotating||Oe!==Tt,this._pitching=this._pitching||Yt!==Ze,this._padding=!ee.isPaddingEqual(Kt),this._easeId=w.easeId,this._prepareEase(B,w.noMoveStart,Ht),this.terrain&&this._prepareElevation(be),this._ease(tr=>{if(this._zooming&&(ee.zoom=a.y.number(le,Re,tr)),this._rotating&&(ee.bearing=a.y.number(Oe,Tt,tr)),this._pitching&&(ee.pitch=a.y.number(Ze,Yt,tr)),this._padding&&(ee.interpolatePadding(st,Kt,tr),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(tr),it)ee.setLocationAtPoint(it,Ft);else{let dr=ee.zoomScale(ee.zoom-le),Sr=Re>le?Math.min(2,Xe):Math.max(.5,Xe),Or=Math.pow(Sr,1-tr),Wr=ee.unproject(qe.add(et.mult(tr*Or)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?Wr.wrap():Wr,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},tr=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,tr)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k(\"movestart\",w)),this._zooming&&!Q.zooming&&this.fire(new a.k(\"zoomstart\",w)),this._rotating&&!Q.rotating&&this.fire(new a.k(\"rotatestart\",w)),this._pitching&&!Q.pitching&&this.fire(new a.k(\"pitchstart\",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitude<Q){let ee=this.calculateCameraOptionsFromTo(B.lngLat,Q,w.center,w.elevation);return{pitch:ee.pitch,zoom:ee.zoom}}return{}}_applyUpdatedTransform(w){let B=[];if(this.terrain&&B.push(ee=>this._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:Oe,zoom:Ze,pitch:st,bearing:Tt,elevation:Yt}=ee(le);Oe&&(le.center=Oe),Ze!==void 0&&(le.zoom=Ze),st!==void 0&&(le.pitch=st),Tt!==void 0&&(le.bearing=Tt),Yt!==void 0&&(le.elevation=Yt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k(\"move\",w)),this._zooming&&this.fire(new a.k(\"zoom\",w)),this._rotating&&this.fire(new a.k(\"rotate\",w)),this._pitching&&this.fire(new a.k(\"pitch\",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k(\"zoomend\",w)),ee&&this.fire(new a.k(\"rotateend\",w)),le&&this.fire(new a.k(\"pitchend\",w)),this.fire(new a.k(\"moveend\",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Cn=a.M(w,[\"center\",\"zoom\",\"bearing\",\"pitch\",\"around\"]);return this.jumpTo(Cn,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,Oe=ee.bearing,Ze=ee.pitch,st=ee.padding,Tt=\"bearing\"in w?this._normalizeBearing(w.bearing,Oe):Oe,Yt=\"pitch\"in w?+w.pitch:Ze,Kt=\"padding\"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Ir=ee.centerPoint.add(xr),ve=ee.pointLocation(Ir),{center:be,zoom:Re}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let qe=ee.zoomScale(Re-le),et=ee.project(ve),Xe=ee.project(be).sub(et),it=w.curve,Ft=Math.max(ee.width,ee.height),Ht=Ft/qe,tr=Xe.mag();if(\"minZoom\"in w){let Cn=a.ac(Math.min(w.minZoom,le,Re),ee.minZoom,ee.maxZoom),Kn=Ft/ee.zoomScale(Cn-le);it=Math.sqrt(Kn/tr*2)}let dr=it*it;function Sr(Cn){let Kn=(Ht*Ht-Ft*Ft+(Cn?-1:1)*dr*dr*tr*tr)/(2*(Cn?Ht:Ft)*dr*tr);return Math.log(Math.sqrt(Kn*Kn+1)-Kn)}function Or(Cn){return(Math.exp(Cn)-Math.exp(-Cn))/2}function Wr(Cn){return(Math.exp(Cn)+Math.exp(-Cn))/2}let ni=Sr(!1),Pi=function(Cn){return Wr(ni)/Wr(ni+it*Cn)},cn=function(Cn){return Ft*((Wr(ni)*(Or(Kn=ni+it*Cn)/Wr(Kn))-Or(ni))/dr)/tr;var Kn},ln=(Sr(!0)-ni)/it;if(Math.abs(tr)<1e-6||!isFinite(ln)){if(Math.abs(Ft-Ht)<1e-6)return this.easeTo(w,B);let Cn=Ht<Ft?-1:1;ln=Math.abs(Math.log(Ht/Ft))/it,cn=()=>0,Pi=Kn=>Math.exp(Cn*it*Kn)}return w.duration=\"duration\"in w?+w.duration:1e3*ln/(\"screenSpeed\"in w?+w.screenSpeed/it:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Oe!==Tt,this._pitching=Yt!==Ze,this._padding=!ee.isPaddingEqual(Kt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(Cn=>{let Kn=Cn*ln,Aa=1/Pi(Kn);ee.zoom=Cn===1?Re:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(Oe,Tt,Cn)),this._pitching&&(ee.pitch=a.y.number(Ze,Yt,Cn)),this._padding&&(ee.interpolatePadding(st,Kt,Cn),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Cn);let fa=Cn===1?be:ee.unproject(et.add(Xe.mult(cn(Kn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Ir),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)<Q&&(w-=360),Math.abs(w+360-B)<Q&&(w+=360),w}_normalizeCenter(w,B){if(!B.renderWorldCopies||B.lngRange)return;let Q=w.lng-B.center.lng;w.lng+=Q>180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'<a href=\"https://maplibre.org/\" target=\"_blank\">MapLibre</a>'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains(\"maplibregl-compact\")&&(this._container.classList.contains(\"maplibregl-compact-show\")?(this._container.setAttribute(\"open\",\"\"),this._container.classList.remove(\"maplibregl-compact-show\")):(this._container.classList.add(\"maplibregl-compact-show\"),this._container.removeAttribute(\"open\")))},this._updateData=B=>{!B||B.sourceDataType!==\"metadata\"&&B.sourceDataType!==\"visibility\"&&B.dataType!==\"style\"&&B.type!==\"terrain\"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute(\"open\",\"\"):this._container.classList.contains(\"maplibregl-compact\")||this._container.classList.contains(\"maplibregl-attrib-empty\")||(this._container.setAttribute(\"open\",\"\"),this._container.classList.add(\"maplibregl-compact\",\"maplibregl-compact-show\")):(this._container.setAttribute(\"open\",\"\"),this._container.classList.contains(\"maplibregl-compact\")&&this._container.classList.remove(\"maplibregl-compact\",\"maplibregl-compact-show\"))},this._updateCompactMinimize=()=>{this._container.classList.contains(\"maplibregl-compact\")&&this._container.classList.contains(\"maplibregl-compact-show\")&&this._container.classList.remove(\"maplibregl-compact-show\")},this.options=w}getDefaultPosition(){return\"bottom-right\"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create(\"details\",\"maplibregl-ctrl maplibregl-ctrl-attrib\"),this._compactButton=c.create(\"summary\",\"maplibregl-ctrl-attrib-button\",this._container),this._compactButton.addEventListener(\"click\",this._toggleAttribution),this._setElementTitle(this._compactButton,\"ToggleAttribution\"),this._innerContainer=c.create(\"div\",\"maplibregl-ctrl-attrib-inner\",this._container),this._updateAttributions(),this._updateCompact(),this._map.on(\"styledata\",this._updateData),this._map.on(\"sourcedata\",this._updateData),this._map.on(\"terrain\",this._updateData),this._map.on(\"resize\",this._updateCompact),this._map.on(\"drag\",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off(\"styledata\",this._updateData),this._map.off(\"sourcedata\",this._updateData),this._map.off(\"terrain\",this._updateData),this._map.off(\"resize\",this._updateCompact),this._map.off(\"drag\",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute(\"aria-label\",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!=\"string\"?\"\":ee)):typeof this.options.customAttribution==\"string\"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let Oe=le.getSource();Oe.attribution&&w.indexOf(Oe.attribution)<0&&w.push(Oe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Oe=le+1;Oe<w.length;Oe++)if(w[Oe].indexOf(ee)>=0)return!1;return!0});let Q=w.join(\" | \");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove(\"maplibregl-attrib-empty\")):this._container.classList.add(\"maplibregl-attrib-empty\"),this._updateCompact(),this._editLink=null)}}class Yn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add(\"maplibregl-compact\"):Q.classList.remove(\"maplibregl-compact\")}},this.options=w}getDefaultPosition(){return\"bottom-left\"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create(\"div\",\"maplibregl-ctrl\");let B=c.create(\"a\",\"maplibregl-ctrl-logo\");return B.target=\"_blank\",B.rel=\"noopener nofollow\",B.href=\"https://maplibre.org/\",B.setAttribute(\"aria-label\",this._map._getUIString(\"LogoControl.Title\")),B.setAttribute(\"rel\",\"noopener nofollow\"),this._container.appendChild(B),this._container.style.display=\"block\",this._map.on(\"resize\",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off(\"resize\",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error(\"Attempting to run(), but is already running.\");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:\"a_pos3d\",type:\"Int16\",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Gt(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Oe=ee.canonical.z-w.canonical.z,Ze=ee.canonical.x-(ee.canonical.x>>Oe<<Oe),st=ee.canonical.y-(ee.canonical.y>>Oe<<Oe),Tt=a.X>>Oe;a.aP(le.posMatrix,0,Tt,0,Tt,0,1),a.J(le.posMatrix,le.posMatrix,[-Ze*Tt,-st*Tt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Oe=w.canonical.z-ee.canonical.z,Ze=w.canonical.x-(w.canonical.x>>Oe<<Oe),st=w.canonical.y-(w.canonical.y>>Oe<<Oe),Tt=a.X>>Oe;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Ze*Tt,st*Tt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Oe,1/2**Oe,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee<Q.minzoom)return null;this._sourceTileCache[w.key]||(this._sourceTileCache[w.key]=w.scaledTo(ee).key);let le=this.sourceCache.getTileByID(this._sourceTileCache[w.key]);if((!le||!le.dem)&&B)for(;ee>=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Zo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration==\"number\"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B<ee&&Q>=0&&Q<ee))return 0;let Oe=this.getTerrainData(w),Ze=(le=Oe.tile)===null||le===void 0?void 0:le.dem;if(!Ze)return 0;let st=function(ve,be,Re){var qe=be[0],et=be[1];return ve[0]=Re[0]*qe+Re[4]*et+Re[12],ve[1]=Re[1]*qe+Re[5]*et+Re[13],ve}([],[B/ee*a.X,Q/ee*a.X],Oe.u_terrain_matrix),Tt=[st[0]*Ze.dim,st[1]*Ze.dim],Yt=Math.floor(Tt[0]),Kt=Math.floor(Tt[1]),xr=Tt[0]-Yt,Ir=Tt[1]-Kt;return Ze.get(Yt,Kt)*(1-xr)*(1-Ir)+Ze.get(Yt+1,Kt)*xr*(1-Ir)+Ze.get(Yt,Kt+1)*(1-xr)*Ir+Ze.get(Yt+1,Kt+1)*xr*Ir}getElevationForLngLatZoom(w,B){if(!a.bb(B,w.wrap()))return 0;let{tileID:Q,mercatorX:ee,mercatorY:le}=this._getOverscaledTileIDFromLngLatZoom(w,B);return this.getElevation(Q,ee%a.X,le%a.X,a.X)}getElevation(w,B,Q,ee=a.X){return this.getDEMElevation(w,B,Q,ee)*this.exaggeration}getTerrainData(w){if(!this._emptyDemTexture){let ee=this.painter.context,le=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new g(ee,le,ee.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new g(ee,new a.R({width:1,height:1}),ee.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.an([])}let B=this.sourceCache.getSourceTile(w,!0);if(B&&B.dem&&(!B.demTexture||B.needsTerrainPrepare)){let ee=this.painter.context;B.demTexture=this.painter.getTileTexture(B.dem.stride),B.demTexture?B.demTexture.update(B.dem.getPixels(),{premultiply:!1}):B.demTexture=new g(ee,B.dem.getPixels(),ee.gl.RGBA,{premultiply:!1}),B.demTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),B.needsTerrainPrepare=!1}let Q=B&&B+B.tileID.key+w.key;if(Q&&!this._demMatrixCache[Q]){let ee=this.sourceCache.sourceCache._source.maxzoom,le=w.canonical.z-B.tileID.canonical.z;w.overscaledZ>w.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w(\"cannot calculate elevation if elevation maxzoom > source.maxzoom\"));let Oe=w.canonical.x-(w.canonical.x>>le<<le),Ze=w.canonical.y-(w.canonical.y>>le<<le),st=a.bc(new Float64Array(16),[1/(a.X<<le),1/(a.X<<le),0]);a.J(st,st,[Oe*a.X,Ze*a.X,0]),this._demMatrixCache[w.key]={matrix:st,coord:w}}return{u_depth:2,u_terrain:3,u_terrain_dim:B&&B.dem&&B.dem.dim||1,u_terrain_matrix:Q?this._demMatrixCache[w.key].matrix:this._emptyDemMatrix,u_terrain_unpack:B&&B.dem&&B.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(B&&B.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:B}}getFramebuffer(w){let B=this.painter,Q=B.width/devicePixelRatio,ee=B.height/devicePixelRatio;return!this._fbo||this._fbo.width===Q&&this._fbo.height===ee||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=B.context.createFramebuffer(Q,ee,!0,!1),this._fbo.depthAttachment.set(B.context.createRenderbuffer(B.context.gl.DEPTH_COMPONENT16,Q,ee))),this._fbo.colorAttachment.set(w===\"coords\"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let w=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let B=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let le=0,Oe=0;le<this._coordsTextureSize;le++)for(let Ze=0;Ze<this._coordsTextureSize;Ze++,Oe+=4)B[Oe+0]=255&Ze,B[Oe+1]=255&le,B[Oe+2]=Ze>>8<<4|le>>8,B[Oe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),Oe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer(\"coords\").framebuffer),ee.readPixels(le,Ze-Oe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let st=B[0]+(B[2]>>4<<8),Tt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Kt=Yt&&this.sourceCache.getTileByID(Yt);if(!Kt)return null;let xr=this._coordsTextureSize,Ir=(1<<Kt.tileID.canonical.z)*xr;return new a.Z((Kt.tileID.canonical.x*xr+st)/Ir+Kt.tileID.wrap,(Kt.tileID.canonical.y*xr+Tt)/Ir,this.getElevation(Kt.tileID,st,Tt,xr))}depthAtPoint(w){let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl;return Q.bindFramebuffer.set(this.getFramebuffer(\"depth\").framebuffer),ee.readPixels(w.x,this.painter.height/devicePixelRatio-w.y-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null),(B[0]/16777216+B[1]/65536+B[2]/256+B[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let w=this.painter.context,B=new a.bd,Q=new a.aY,ee=this.meshSize,le=a.X/ee,Oe=ee*ee;for(let Kt=0;Kt<=ee;Kt++)for(let xr=0;xr<=ee;xr++)B.emplaceBack(xr*le,Kt*le,0);for(let Kt=0;Kt<Oe;Kt+=ee+1)for(let xr=0;xr<ee;xr++)Q.emplaceBack(xr+Kt,ee+xr+Kt+1,ee+xr+Kt+2),Q.emplaceBack(xr+Kt,ee+xr+Kt+2,xr+Kt+1);let Ze=B.length,st=Ze+2*(ee+1);for(let Kt of[0,1])for(let xr=0;xr<=ee;xr++)for(let Ir of[0,1])B.emplaceBack(xr*le,Kt*a.X,Ir);for(let Kt=0;Kt<2*ee;Kt+=2)Q.emplaceBack(st+Kt,st+Kt+1,st+Kt+3),Q.emplaceBack(st+Kt,st+Kt+3,st+Kt+2),Q.emplaceBack(Ze+Kt,Ze+Kt+3,Ze+Kt+1),Q.emplaceBack(Ze+Kt,Ze+Kt+2,Ze+Kt+3);let Tt=B.length,Yt=Tt+2*(ee+1);for(let Kt of[0,1])for(let xr=0;xr<=ee;xr++)for(let Ir of[0,1])B.emplaceBack(Kt*a.X,xr*le,Ir);for(let Kt=0;Kt<2*ee;Kt+=2)Q.emplaceBack(Tt+Kt,Tt+Kt+1,Tt+Kt+3),Q.emplaceBack(Tt+Kt,Tt+Kt+3,Tt+Kt+2),Q.emplaceBack(Yt+Kt,Yt+Kt+3,Yt+Kt+1),Q.emplaceBack(Yt+Kt,Yt+Kt+2,Yt+Kt+3);return this._mesh=new Eu(w.createVertexBuffer(B,Ka.members),w.createIndexBuffer(Q),a.a0.simpleSegment(0,0,B.length,Q.length)),this._mesh}getMeshFrameDelta(w){return 2*Math.PI*a.be/Math.pow(2,w)/5}getMinTileElevationForLngLatZoom(w,B){var Q;let{tileID:ee}=this._getOverscaledTileIDFromLngLatZoom(w,B);return(Q=this.getMinMaxElevation(ee).minElevation)!==null&&Q!==void 0?Q:0}getMinMaxElevation(w){let B=this.getTerrainData(w).tile,Q={minElevation:null,maxElevation:null};return B&&B.dem&&(Q.minElevation=B.dem.min*this.exaggeration,Q.maxElevation=B.dem.max*this.exaggeration),Q}_getOverscaledTileIDFromLngLatZoom(w,B){let Q=a.Z.fromLngLat(w.wrap()),ee=(1<<B)*a.X,le=Q.x*ee,Oe=Q.y*ee,Ze=Math.floor(le/a.X),st=Math.floor(Oe/a.X);return{tileID:new a.S(B,0,B,Ze,st),mercatorX:le,mercatorY:Oe}}}class Ss{constructor(w,B,Q){this._context=w,this._size=B,this._tileSize=Q,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let w of this._objects)w.texture.destroy(),w.fbo.destroy()}_createObject(w){let B=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Q=new g(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Q.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),B.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),B.colorAttachment.set(Q.texture),{id:w,fbo:B,texture:Q,stamp:-1,inUse:!1}}getObjectForId(w){return this._objects[w]}useObject(w){w.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(B=>w.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error(\"No free RenderPool available, call freeAllObjects() required!\");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(w=>!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let Oe=this.terrain.sourceCache.getTerrainCoords(le);for(let Ze in Oe)this._coordsDescendingInv[Q][Ze]||(this._coordsDescendingInv[Q][Ze]=[]),this._coordsDescendingInv[Q][Ze].push(Oe[Ze])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Oe in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Oe]=this._coordsDescendingInv[le][Oe].map(Ze=>Ze.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Oe=this._stacks[le]||[];for(let Ze of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Ze),Ze.rtt[le]){let Tt=this.pool.getObjectForId(Ze.rtt[le].id);if(Tt.stamp===Ze.rtt[le].stamp){this.pool.useObject(Tt);continue}}let st=this.pool.getOrCreateFreeObject();this.pool.useObject(st),this.pool.stampObject(st),Ze.rtt[le]={id:st.id,stamp:st.stamp},Q.context.bindFramebuffer.set(st.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Tt=0;Tt<Oe.length;Tt++){let Yt=Q.style._layers[Oe[Tt]],Kt=Yt.source?this._coordsDescendingInv[Yt.source][Ze.tileID.key]:[Ze.tileID];Q.context.viewport.set([0,0,st.fbo.width,st.fbo.height]),Q._renderTileClippingMasks(Yt,Kt),Q.renderLayer(Q,Q.style.sourceCaches[Yt.source],Yt,Kt),Yt.source&&(Ze.rttCoords[Yt.source]=this._coordsDescendingInvStr[Yt.source][Ze.tileID.key])}}return js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),as[B]}return!1}}let Ho={\"AttributionControl.ToggleAttribution\":\"Toggle attribution\",\"AttributionControl.MapFeedback\":\"Map feedback\",\"FullscreenControl.Enter\":\"Enter fullscreen\",\"FullscreenControl.Exit\":\"Exit fullscreen\",\"GeolocateControl.FindMyLocation\":\"Find my location\",\"GeolocateControl.LocationNotAvailable\":\"Location not available\",\"LogoControl.Title\":\"MapLibre logo\",\"Map.Title\":\"Map\",\"Marker.Title\":\"Map marker\",\"NavigationControl.ResetBearing\":\"Reset bearing to north\",\"NavigationControl.ZoomIn\":\"Zoom in\",\"NavigationControl.ZoomOut\":\"Zoom out\",\"Popup.Close\":\"Close popup\",\"ScaleControl.Feet\":\"ft\",\"ScaleControl.Meters\":\"m\",\"ScaleControl.Kilometers\":\"km\",\"ScaleControl.Miles\":\"mi\",\"ScaleControl.NauticalMiles\":\"nm\",\"TerrainControl.Enable\":\"Enable terrain\",\"TerrainControl.Disable\":\"Disable terrain\",\"CooperativeGesturesHandler.WindowsHelpText\":\"Use Ctrl + scroll to zoom the map\",\"CooperativeGesturesHandler.MacHelpText\":\"Use \\u2318 + scroll to zoom the map\",\"CooperativeGesturesHandler.MobileHelpText\":\"Use two fingers to move the map\"},ml=o,Ws={hash:!1,interactive:!0,bearingSnap:7,attributionControl:La,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:\"sans-serif\",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ls=ue=>{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=Oe=>{this.startMouse(a.e({},Oe,{ctrlKey:!0,preventDefault:()=>Oe.preventDefault()}),c.mousePos(this.element,Oe)),c.addEventListener(window,\"mousemove\",this.mousemove),c.addEventListener(window,\"mouseup\",this.mouseup)},this.mousemove=Oe=>{this.moveMouse(Oe,c.mousePos(this.element,Oe))},this.mouseup=Oe=>{this.mouseRotate.dragEnd(Oe),this.mousePitch&&this.mousePitch.dragEnd(Oe),this.offTemp()},this.touchstart=Oe=>{Oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,Oe.targetTouches)[0],this.startTouch(Oe,this._startPos),c.addEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.addEventListener(window,\"touchend\",this.touchend))},this.touchmove=Oe=>{Oe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,Oe.targetTouches)[0],this.moveTouch(Oe,this._lastPos))},this.touchend=Oe=>{Oe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Oe,clickTolerance:Ze,bearingDegreesPerPixelMoved:st=.8})=>{let Tt=new uf;return new Wu({clickTolerance:Ze,move:(Yt,Kt)=>({bearingDelta:(Kt.x-Yt.x)*st}),moveStateManager:Tt,enable:Oe,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Oe,clickTolerance:Ze,pitchDegreesPerPixelMoved:st=-.5})=>{let Tt=new uf;return new Wu({clickTolerance:Ze,move:(Yt,Kt)=>({pitchDelta:(Kt.y-Yt.y)*st}),moveStateManager:Tt,enable:Oe,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,\"mousedown\",this.mousedown),c.addEventListener(B,\"touchstart\",this.touchstart,{passive:!1}),c.addEventListener(B,\"touchcancel\",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,\"mousedown\",this.mousedown),c.removeEventListener(w,\"touchstart\",this.touchstart,{passive:!1}),c.removeEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.removeEventListener(window,\"touchend\",this.touchend),c.removeEventListener(w,\"touchcancel\",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,\"mousemove\",this.mousemove),c.removeEventListener(window,\"mouseup\",this.mouseup),c.removeEventListener(window,\"touchmove\",this.touchmove,{passive:!1}),c.removeEventListener(window,\"touchend\",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),Oe=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)<Oe?ue=ee:B.locationPoint(le).distSqr(w)<Oe&&(ue=le)}for(;Math.abs(ue.lng-B.center.lng)>180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let Ql={center:\"translate(-50%,-50%)\",top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"};function Cu(ue,w,B){let Q=ue.classList;for(let ee in Ql)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!==\"Space\"&&Q!==\"Enter\"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)===\"terrain\"||(B==null?void 0:B.type)===\"render\"&&!ee)&&this._map.once(\"render\",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le=\"\";this._rotationAlignment===\"viewport\"||this._rotationAlignment===\"auto\"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment===\"map\"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Oe=\"\";this._pitchAlignment===\"viewport\"||this._pitchAlignment===\"auto\"?Oe=\"rotateX(0deg)\":this._pitchAlignment===\"map\"&&(Oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!==\"moveend\"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Ql[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Oe} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type===\"moveend\")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents=\"none\",this._state===\"pending\"&&(this._state=\"active\",this.fire(new a.k(\"dragstart\"))),this.fire(new a.k(\"drag\")))},this._onUp=()=>{this._element.style.pointerEvents=\"auto\",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),this._state===\"active\"&&this.fire(new a.k(\"dragend\")),this._state=\"inactive\"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state=\"pending\",this._map.on(\"mousemove\",this._onMove),this._map.on(\"touchmove\",this._onMove),this._map.once(\"mouseup\",this._onUp),this._map.once(\"touchend\",this._onUp))},this._anchor=w&&w.anchor||\"center\",this._color=w&&w.color||\"#3FB1CE\",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state=\"inactive\",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||\"auto\",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!==\"auto\"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create(\"div\");let B=c.createNS(\"http://www.w3.org/2000/svg\",\"svg\"),Q=41,ee=27;B.setAttributeNS(null,\"display\",\"block\"),B.setAttributeNS(null,\"height\",`${Q}px`),B.setAttributeNS(null,\"width\",`${ee}px`),B.setAttributeNS(null,\"viewBox\",`0 0 ${ee} ${Q}`);let le=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");le.setAttributeNS(null,\"stroke\",\"none\"),le.setAttributeNS(null,\"stroke-width\",\"1\"),le.setAttributeNS(null,\"fill\",\"none\"),le.setAttributeNS(null,\"fill-rule\",\"evenodd\");let Oe=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Oe.setAttributeNS(null,\"fill-rule\",\"nonzero\");let Ze=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ze.setAttributeNS(null,\"transform\",\"translate(3.0, 29.0)\"),Ze.setAttributeNS(null,\"fill\",\"#000000\");let st=[{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"10.5\",ry:\"5.25002273\"},{rx:\"9.5\",ry:\"4.77275007\"},{rx:\"8.5\",ry:\"4.29549936\"},{rx:\"7.5\",ry:\"3.81822308\"},{rx:\"6.5\",ry:\"3.34094679\"},{rx:\"5.5\",ry:\"2.86367051\"},{rx:\"4.5\",ry:\"2.38636864\"}];for(let qe of st){let et=c.createNS(\"http://www.w3.org/2000/svg\",\"ellipse\");et.setAttributeNS(null,\"opacity\",\"0.04\"),et.setAttributeNS(null,\"cx\",\"10.5\"),et.setAttributeNS(null,\"cy\",\"5.80029008\"),et.setAttributeNS(null,\"rx\",qe.rx),et.setAttributeNS(null,\"ry\",qe.ry),Ze.appendChild(et)}let Tt=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Tt.setAttributeNS(null,\"fill\",this._color);let Yt=c.createNS(\"http://www.w3.org/2000/svg\",\"path\");Yt.setAttributeNS(null,\"d\",\"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\"),Tt.appendChild(Yt);let Kt=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Kt.setAttributeNS(null,\"opacity\",\"0.25\"),Kt.setAttributeNS(null,\"fill\",\"#000000\");let xr=c.createNS(\"http://www.w3.org/2000/svg\",\"path\");xr.setAttributeNS(null,\"d\",\"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\"),Kt.appendChild(xr);let Ir=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");Ir.setAttributeNS(null,\"transform\",\"translate(6.0, 7.0)\"),Ir.setAttributeNS(null,\"fill\",\"#FFFFFF\");let ve=c.createNS(\"http://www.w3.org/2000/svg\",\"g\");ve.setAttributeNS(null,\"transform\",\"translate(8.0, 8.0)\");let be=c.createNS(\"http://www.w3.org/2000/svg\",\"circle\");be.setAttributeNS(null,\"fill\",\"#000000\"),be.setAttributeNS(null,\"opacity\",\"0.25\"),be.setAttributeNS(null,\"cx\",\"5.5\"),be.setAttributeNS(null,\"cy\",\"5.5\"),be.setAttributeNS(null,\"r\",\"5.4999962\");let Re=c.createNS(\"http://www.w3.org/2000/svg\",\"circle\");Re.setAttributeNS(null,\"fill\",\"#FFFFFF\"),Re.setAttributeNS(null,\"cx\",\"5.5\"),Re.setAttributeNS(null,\"cy\",\"5.5\"),Re.setAttributeNS(null,\"r\",\"5.4999962\"),ve.appendChild(be),ve.appendChild(Re),Oe.appendChild(Ze),Oe.appendChild(Tt),Oe.appendChild(Kt),Oe.appendChild(Ir),Oe.appendChild(ve),B.appendChild(Oe),B.setAttributeNS(null,\"height\",Q*this._scale+\"px\"),B.setAttributeNS(null,\"width\",ee*this._scale+\"px\"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add(\"maplibregl-marker\"),this._element.addEventListener(\"dragstart\",B=>{B.preventDefault()}),this._element.addEventListener(\"mousedown\",B=>{B.preventDefault()}),Cu(this._element,this._anchor,\"marker\"),w&&w.className)for(let B of w.className.split(\" \"))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute(\"aria-label\",w._getUIString(\"Marker.Title\")),w.getCanvasContainer().appendChild(this._element),w.on(\"move\",this._update),w.on(\"moveend\",this._update),w.on(\"terrain\",this._update),this.setDraggable(this._draggable),this._update(),this._map.on(\"click\",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map.off(\"terrain\",this._update),this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler),this._map.off(\"mouseup\",this._onUp),this._map.off(\"touchend\",this._onUp),this._map.off(\"mousemove\",this._onMove),this._map.off(\"touchmove\",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener(\"keypress\",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute(\"tabindex\")),w){if(!(\"offset\"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],\"top-left\":[0,0],\"top-right\":[0,0],bottom:[0,-38.1],\"bottom-left\":[ee,-1*(38.1-13.5+ee)],\"bottom-right\":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute(\"tabindex\"),this._originalTabIndex||this._element.setAttribute(\"tabindex\",\"0\"),this._element.addEventListener(\"keypress\",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),Oe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Oe)-le<.006)return void(this._element.style.opacity=this._opacity);let Ze=-this._offset.y/ee.transform._pixelPerMeter,st=Math.sin(ee.getPitch()*Math.PI/180)*Ze,Tt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,Oe+st)-Tt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Yt&&this._popup.remove(),this._element.style.opacity=Yt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on(\"mousedown\",this._addDragHandler),this._map.on(\"touchstart\",this._addDragHandler)):(this._map.off(\"mousedown\",this._addDragHandler),this._map.off(\"touchstart\",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||\"auto\",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!==\"auto\"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity=\"1\",this._opacityWhenCovered=\"0.2\"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:\"metric\"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),Oe=ue.unproject([Q,ee]),Ze=le.distanceTo(Oe);if(B&&B.unit===\"imperial\"){let st=3.2808*Ze;st>5280?Ua(w,Q,st/5280,ue._getUIString(\"ScaleControl.Miles\")):Ua(w,Q,st,ue._getUIString(\"ScaleControl.Feet\"))}else B&&B.unit===\"nautical\"?Ua(w,Q,Ze/1852,ue._getUIString(\"ScaleControl.NauticalMiles\")):Ze>=1e3?Ua(w,Q,Ze/1e3,ue._getUIString(\"ScaleControl.Kilometers\")):Ua(w,Q,Ze,ue._getUIString(\"ScaleControl.Meters\"))}function Ua(ue,w,B,Q){let ee=function(le){let Oe=Math.pow(10,`${Math.floor(le)}`.length-1),Ze=le/Oe;return Ze=Ze>=10?10:Ze>=5?5:Ze>=3?3:Ze>=2?2:Ze>=1?1:function(st){let Tt=Math.pow(10,Math.ceil(-Math.log(st)/Math.LN10));return Math.round(st*Tt)/Tt}(Ze),Oe*Ze}(B);ue.style.width=w*(ee/B)+\"px\",ue.innerHTML=`${ee}&nbsp;${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:\"\",maxWidth:\"240px\",subpixelPositioning:!1},Vc=[\"a[href]\",\"[tabindex]:not([tabindex='-1'])\",\"[contenteditable]:not([contenteditable='false'])\",\"button:not([disabled])\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].join(\", \");function hc(ue){if(ue){if(typeof ue==\"number\"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),\"top-left\":new a.P(w,w),\"top-right\":new a.P(-w,w),bottom:new a.P(0,-ue),\"bottom-left\":new a.P(w,-w),\"bottom-right\":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,\"top-left\":w,\"top-right\":w,bottom:w,\"bottom-left\":w,\"bottom-right\":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),\"top-left\":a.P.convert(ue[\"top-left\"]||[0,0]),\"top-right\":a.P.convert(ue[\"top-right\"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),\"bottom-left\":a.P.convert(ue[\"bottom-left\"]||[0,0]),\"bottom-right\":a.P.convert(ue[\"bottom-right\"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=ku,i.CanvasSource=$t,i.CooperativeGesturesHandler=Qi,i.DoubleClickZoomHandler=ki,i.DragPanHandler=wn,i.DragRotateHandler=Nn,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w(\"Full screen control 'container' must be a DOM element.\")),\"onfullscreenchange\"in document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in document&&(this._fullscreenchange=\"MSFullscreenChange\")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create(\"button\",\"maplibregl-ctrl-fullscreen\",this._controlContainer);c.create(\"span\",\"maplibregl-ctrl-icon\",ue).setAttribute(\"aria-hidden\",\"true\"),ue.type=\"button\",this._updateTitle(),this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute(\"aria-label\",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?\"FullscreenControl.Exit\":\"FullscreenControl.Enter\")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-shrink\"),this._fullscreenButton.classList.toggle(\"maplibregl-ctrl-fullscreen\"),this._updateTitle(),this._fullscreen?(this.fire(new a.k(\"fullscreenstart\")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k(\"fullscreenend\")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle(\"maplibregl-pseudo-fullscreen\"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=ot,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k(\"outofmaxbounds\",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"BACKGROUND\":case\"BACKGROUND_ERROR\":this._watchState=\"BACKGROUND\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!==\"OFF\"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!==\"ACTIVE_LOCK\"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove(\"maplibregl-user-location-dot-stale\"),this.fire(new a.k(\"geolocate\",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),Oe=ce.fromLngLat(B,Q);this._map.fitBounds(Oe,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.disabled=!0;let B=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!==\"OFF\"&&this.options.showUserLocation&&this._dotElement.classList.add(\"maplibregl-user-location-dot-stale\"),this.fire(new a.k(\"error\",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener(\"contextmenu\",w=>w.preventDefault()),this._geolocateButton=c.create(\"button\",\"maplibregl-ctrl-geolocate\",this._container),c.create(\"span\",\"maplibregl-ctrl-icon\",this._geolocateButton).setAttribute(\"aria-hidden\",\"true\"),this._geolocateButton.type=\"button\",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w(\"Geolocation support is not available so the GeolocateControl will be disabled.\");let B=this._map._getUIString(\"GeolocateControl.LocationNotAvailable\");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B)}else{let B=this._map._getUIString(\"GeolocateControl.FindMyLocation\");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute(\"aria-label\",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this._watchState=\"OFF\"),this.options.showUserLocation&&(this._dotElement=c.create(\"div\",\"maplibregl-user-location-dot\"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create(\"div\",\"maplibregl-user-location-accuracy-circle\"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:\"map\"}),this.options.trackUserLocation&&(this._watchState=\"OFF\"),this._map.on(\"zoom\",this._onZoom)),this._geolocateButton.addEventListener(\"click\",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on(\"movestart\",B=>{B.geolocateSource||this._watchState!==\"ACTIVE_LOCK\"||B.originalEvent&&B.originalEvent.type===\"resize\"||(this._watchState=\"BACKGROUND\",this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this.fire(new a.k(\"trackuserlocationend\")),this.fire(new a.k(\"userlocationlostfocus\")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:\"geolocation\"})).state!==\"denied\"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off(\"zoom\",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitude<w.getWest()||B.longitude>w.getEast()||B.latitude<w.getSouth()||B.latitude>w.getNorth())}_setErrorState(){switch(this._watchState){case\"WAITING_ACTIVE\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\");break;case\"ACTIVE_LOCK\":this._watchState=\"ACTIVE_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");break;case\"BACKGROUND\":this._watchState=\"BACKGROUND_ERROR\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-background-error\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\");break;case\"ACTIVE_ERROR\":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w(\"Geolocate control triggered before added to a map\"),!1;if(this.options.trackUserLocation){switch(this._watchState){case\"OFF\":this._watchState=\"WAITING_ACTIVE\",this.fire(new a.k(\"trackuserlocationstart\"));break;case\"WAITING_ACTIVE\":case\"ACTIVE_LOCK\":case\"ACTIVE_ERROR\":case\"BACKGROUND_ERROR\":pu--,Uc=!1,this._watchState=\"OFF\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-active-error\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background-error\"),this.fire(new a.k(\"trackuserlocationend\"));break;case\"BACKGROUND\":this._watchState=\"ACTIVE_LOCK\",this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-background\"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k(\"trackuserlocationstart\")),this.fire(new a.k(\"userlocationfocus\"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case\"WAITING_ACTIVE\":this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"ACTIVE_LOCK\":this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-active\");break;case\"OFF\":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState===\"OFF\"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"true\"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove(\"maplibregl-ctrl-geolocate-waiting\"),this._geolocateButton.setAttribute(\"aria-pressed\",\"false\"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Mh,i.ImageSource=Wt,i.KeyboardHandler=Xt,i.LngLatBounds=ce,i.LogoControl=Yn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error(\"maxZoom must be greater than or equal to minZoom\");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error(\"maxPitch must be greater than or equal to minPitch\");if(w.minPitch!=null&&w.minPitch<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error(\"maxPitch must be less than or equal to 85\");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k(\"webglcontextlost\",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k(\"webglcontextrestored\",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container==\"string\"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error(\"Invalid type: 'container' must be a String or HTMLElement.\");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on(\"move\",()=>this._update(!1)).on(\"moveend\",()=>this._update(!1)).on(\"zoom\",()=>this._update(!0)).on(\"terrain\",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once(\"idle\",()=>{this._idleTriggered=!0}),typeof window!=\"undefined\"){addEventListener(\"online\",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Mh(typeof w.hash==\"string\"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl==\"boolean\"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Yn,w.logoPosition),this.on(\"style.load\",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on(\"data\",B=>{this._update(B.dataType===\"style\"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on(\"dataloading\",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on(\"dataabort\",B=>{this.fire(new a.k(\"sourcedataabort\",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():\"top-right\"),!ue||!ue.onAdd)return this.fire(new a.j(new Error(\"Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.\")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf(\"bottom\")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error(\"Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.\")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Ze=this.painter.context.gl;this._maxCanvasSize=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];let st=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,st),this.painter.resize(Q,ee,st)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Oe=!this._moving;return Oe&&(this.stop(),this.fire(new a.k(\"movestart\",ue)).fire(new a.k(\"move\",ue))),this.fire(new a.k(\"resize\",ue)),Oe&&this.fire(new a.k(\"moveend\",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,Oe=w*ee;return Math.min(le>B?B/le:1,Oe>Q?Q/Oe:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()<ue&&this.setZoom(ue),this;throw new Error(\"minZoom must be between -2 and the current maxZoom, inclusive\")}getMinZoom(){return this.transform.minZoom}setMaxZoom(ue){if((ue=ue==null?22:ue)>=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error(\"maxZoom must be greater than the current minZoom\")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error(\"minPitch must be greater than or equal to 0\");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()<ue&&this.setPitch(ue),this;throw new Error(\"minPitch must be between 0 and the current maxPitch, inclusive\")}getMinPitch(){return this.transform.minPitch}setMaxPitch(ue){if((ue=ue==null?60:ue)>85)throw new Error(\"maxPitch must be less than or equal to 85\");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error(\"maxPitch must be greater than the current minPitch\")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue===\"mouseenter\"||ue===\"mouseover\"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Oe=w.filter(st=>this.getLayer(st)),Ze=Oe.length!==0?this.queryRenderedFeatures(le.point,{layers:Oe}):[];Ze.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Ze}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue===\"mouseleave\"||ue===\"mouseout\"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Oe=>{let Ze=w.filter(st=>this.getLayer(st));(Ze.length!==0?this.queryRenderedFeatures(Oe.point,{layers:Ze}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,Oe.originalEvent)))},mouseout:Oe=>{Q&&(Q=!1,B.call(this,new jl(ue,this,Oe.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Ze=>this.getLayer(Ze)),Oe=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Oe.length&&(ee.features=Oe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;ee<Q.length;ee++){let le=Q[ee];if(le.listener===B&&le.layers.length===w.length&&le.layers.every(Oe=>w.includes(Oe))){for(let Oe in le.delegates)this.off(Oe,le.delegates[Oe]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w==\"string\"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w==\"string\"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let Oe=ee.delegates[le];ee.delegates[le]=(...Ze)=>{this._removeDelegatedListener(ue,Q,B),Oe(...Ze)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w==\"string\"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]==\"number\")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Oe=a.P.convert(ee[1]);B=[le,new a.P(Oe.x,le.y),Oe,new a.P(le.x,Oe.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once(\"style.load\",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue==\"string\"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue==\"string\"){let B=this._requestManager.transformRequest(ue,\"Style\");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue==\"object\"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}.  Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w(\"There is no style added to the map.\")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off(\"data\",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type===\"hillshade\"&&Q.source===ue.source&&a.w(\"You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.\")}this.terrain=new Zo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType===\"style\"?this.terrain.sourceCache.freeRtt():B.dataType===\"source\"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on(\"data\",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k(\"terrain\",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!==\"loaded\"&&ee.state!==\"errored\")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error(\"Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));{let{width:Yt,height:Kt,data:xr}=w,Ir=w;return this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},new Uint8Array(xr)),pixelRatio:Q,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,ue),this}}{let{width:Yt,height:Kt,data:xr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},xr),pixelRatio:Q,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error(\"The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.\")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:Oe}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error(\"Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`\")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error(\"The width and height of the updated image must be that same as the previous version of the image\")));let Ze=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Oe,Ze),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error(\"Missing required image id\"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,\"Image\"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add(\"maplibregl-map\");let w=this._canvasContainer=c.create(\"div\",\"maplibregl-canvas-container\",ue);this._interactive&&w.classList.add(\"maplibregl-interactive\"),this._canvas=c.create(\"canvas\",\"maplibregl-canvas\",w),this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",this._interactive?\"0\":\"-1\"),this._canvas.setAttribute(\"aria-label\",this._getUIString(\"Map.Title\")),this._canvas.setAttribute(\"role\",\"region\");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create(\"div\",\"maplibregl-control-container\",ue),le=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(Oe=>{le[Oe]=c.create(\"div\",`maplibregl-ctrl-${Oe} `,ee)}),this._container.addEventListener(\"scroll\",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener(\"webglcontextcreationerror\",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext(\"webgl2\",ue)||this._canvas.getContext(\"webgl\",ue);if(!B){let Q=\"Failed to initialize WebGL\";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let Oe=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=Oe.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Ze),this.style.update(Oe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k(\"render\")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k(\"load\"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k(\"idle\")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!=\"undefined\"&&removeEventListener(\"online\",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension(\"WEBGL_lose_context\");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.removeEventListener(\"webglcontextlost\",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove(\"maplibregl-map\"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k(\"remove\"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Xh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute(\"aria-disabled\",B.toString()),this._zoomOutButton.setAttribute(\"aria-disabled\",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute(\"aria-label\",Q)},this.options=a.e({},va,ue),this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._container.addEventListener(\"contextmenu\",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton(\"maplibregl-ctrl-zoom-in\",w=>this._map.zoomIn({},{originalEvent:w})),c.create(\"span\",\"maplibregl-ctrl-icon\",this._zoomInButton).setAttribute(\"aria-hidden\",\"true\"),this._zoomOutButton=this._createButton(\"maplibregl-ctrl-zoom-out\",w=>this._map.zoomOut({},{originalEvent:w})),c.create(\"span\",\"maplibregl-ctrl-icon\",this._zoomOutButton).setAttribute(\"aria-hidden\",\"true\")),this.options.showCompass&&(this._compass=this._createButton(\"maplibregl-ctrl-compass\",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create(\"span\",\"maplibregl-ctrl-icon\",this._compass),this._compassIcon.setAttribute(\"aria-hidden\",\"true\"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,\"ZoomIn\"),this._setButtonTitle(this._zoomOutButton,\"ZoomOut\"),this._map.on(\"zoom\",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,\"ResetBearing\"),this.options.visualizePitch&&this._map.on(\"pitch\",this._rotateCompassArrow),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off(\"zoom\",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off(\"pitch\",this._rotateCompassArrow),this._map.off(\"rotate\",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create(\"button\",ue,this._container);return B.type=\"button\",B.addEventListener(\"click\",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"move\",this._onClose),this._map.off(\"click\",this._onClose),this._map.off(\"remove\",this.remove),this._map.off(\"mousemove\",this._onMouseMove),this._map.off(\"mouseup\",this._onMouseUp),this._map.off(\"drag\",this._onDrag),this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\"),delete this._map,this.fire(new a.k(\"close\"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create(\"div\",\"maplibregl-popup\",this._map.getContainer()),this._tip=c.create(\"div\",\"maplibregl-popup-tip\",this._container),this._container.appendChild(this._content),this.options.className)for(let Ze of this.options.className.split(\" \"))this._container.classList.add(Ze);this._closeButton&&this._closeButton.setAttribute(\"aria-label\",this._map._getUIString(\"Popup.Close\")),this._trackPointer&&this._container.classList.add(\"maplibregl-popup-track-pointer\")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Ze=this._container.offsetWidth,st=this._container.offsetHeight,Tt;Tt=Q.y+le.bottom.y<st?[\"top\"]:Q.y>this._map.transform.height-st?[\"bottom\"]:[],Q.x<Ze/2?Tt.push(\"left\"):Q.x>this._map.transform.width-Ze/2&&Tt.push(\"right\"),ee=Tt.length===0?\"bottom\":Tt.join(\"-\")}let Oe=Q.add(le[ee]);this.options.subpixelPositioning||(Oe=Oe.round()),c.setTransform(this._container,`${Ql[ee]} translate(${Oe.x}px,${Oe.y}px)`),Cu(this._container,ee,\"popup\")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on(\"click\",this._onClose),this.options.closeOnMove&&this._map.on(\"move\",this._onClose),this._map.on(\"remove\",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"mouseup\",this._onMouseUp),this._container&&this._container.classList.add(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")):this._map.on(\"move\",this._update),this.fire(new a.k(\"open\")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on(\"move\",this._update),this._map.off(\"mousemove\",this._onMouseMove),this._container&&this._container.classList.remove(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.remove(\"maplibregl-track-pointer\")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off(\"move\",this._update),this._map.on(\"mousemove\",this._onMouseMove),this._map.on(\"drag\",this._onDrag),this._container&&this._container.classList.add(\"maplibregl-popup-track-pointer\"),this._map._canvasContainer.classList.add(\"maplibregl-track-pointer\")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement(\"body\"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create(\"div\",\"maplibregl-popup-content\",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create(\"button\",\"maplibregl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"&#215;\",this._closeButton.addEventListener(\"click\",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Vt,i.RasterTileSource=pt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return\"bottom-left\"}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-scale\",ue.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off(\"move\",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain\"),this._terrainButton.classList.remove(\"maplibregl-ctrl-terrain-enabled\"),this._map.terrain?(this._terrainButton.classList.add(\"maplibregl-ctrl-terrain-enabled\"),this._terrainButton.title=this._map._getUIString(\"TerrainControl.Disable\")):(this._terrainButton.classList.add(\"maplibregl-ctrl-terrain\"),this._terrainButton.title=this._map._getUIString(\"TerrainControl.Enable\"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create(\"div\",\"maplibregl-ctrl maplibregl-ctrl-group\"),this._terrainButton=c.create(\"button\",\"maplibregl-ctrl-terrain\",this._container),c.create(\"span\",\"maplibregl-ctrl-icon\",this._terrainButton).setAttribute(\"aria-hidden\",\"true\"),this._terrainButton.type=\"button\",this._terrainButton.addEventListener(\"click\",this._toggleTerrain),this._updateTerrainIcon(),this._map.on(\"terrain\",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off(\"terrain\",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=lt,i.VideoSource=Nt,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(Tr(ue))throw new Error(`A source type called \"${ue}\" already exists.`);((B,Q)=>{sr[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=ge;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),ge=null):console.warn(\"Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()\"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return Qt().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return Ce.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return Ae().broadcast(\"IS\",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return Qt().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){Ce.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var yje=ye((Bbr,mje)=>{\"use strict\";var vw=Dr(),FXt=Zl().sanitizeHTML,zXt=IJ(),vje=Px();function pje(e,t){this.subplot=e,this.uid=e.uid+\"-\"+t,this.index=t,this.idSource=\"source-\"+this.uid,this.idLayer=vje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var sg=pje.prototype;sg.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):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=v7(t)};sg.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType===\"image\"&&e.sourcetype===\"image\"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};sg.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};sg.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup[\"layout-\"+this.index]};sg.lookupBelow=function(){return this.subplot.belowLookup[\"layout-\"+this.index]};sg.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};sg.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!v7(e)){var r=OXt(e);t.addSource(this.idSource,r)}};sg.findFollowingMapLayerId=function(e){if(e===\"traces\")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n==\"string\"&&n.indexOf(vje.traceLayerPrefix)===0){e=n;break}}return e};sg.updateLayer=function(e){var t=this.subplot,r=gje(e),n=this.lookupBelow(),i=this.findFollowingMapLayerId(n);this.removeLayer(),v7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,\"source-layer\":e.sourcelayer||\"\",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};sg.updateStyle=function(e){if(v7(e)){var t=gje(e);this.subplot.setOptions(this.idLayer,\"setLayoutProperty\",t.layout),this.subplot.setOptions(this.idLayer,\"setPaintProperty\",t.paint)}};sg.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};sg.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function v7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!=\"string\"||t[r].length===0)return!1;return!0}return vw.isPlainObject(t)||typeof t==\"string\"&&t.length>0}function gje(e){var t={},r={};switch(e.type){case\"circle\":vw.extendFlat(r,{\"circle-radius\":e.circle.radius,\"circle-color\":e.color,\"circle-opacity\":e.opacity});break;case\"line\":vw.extendFlat(r,{\"line-width\":e.line.width,\"line-color\":e.color,\"line-opacity\":e.opacity,\"line-dasharray\":e.line.dash});break;case\"fill\":vw.extendFlat(r,{\"fill-color\":e.color,\"fill-outline-color\":e.fill.outlinecolor,\"fill-opacity\":e.opacity});break;case\"symbol\":var n=e.symbol,i=zXt(n.textposition,n.iconsize);vw.extendFlat(t,{\"icon-image\":n.icon+\"-15\",\"icon-size\":n.iconsize/10,\"text-field\":n.text,\"text-size\":n.textfont.size,\"text-anchor\":i.anchor,\"text-offset\":i.offset,\"symbol-placement\":n.placement}),vw.extendFlat(r,{\"icon-color\":e.color,\"text-color\":n.textfont.color,\"text-opacity\":e.opacity});break;case\"raster\":vw.extendFlat(r,{\"raster-fade-duration\":0,\"raster-opacity\":e.opacity});break}return{layout:t,paint:r}}function OXt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t===\"geojson\"?i=\"data\":t===\"vector\"?i=typeof r==\"string\"?\"url\":\"tiles\":t===\"raster\"?(i=\"tiles\",n.tileSize=256):t===\"image\"&&(i=\"url\",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=FXt(e.sourceattribution)),n}mje.exports=function(t,r,n){var i=new pje(t,r);return i.update(n),i}});var Mje=ye((Nbr,Sje)=>{\"use strict\";var qJ=dje(),BJ=Dr(),bje=hx(),_je=qa(),qXt=ho(),BXt=yv(),p7=vf(),wje=Cg(),NXt=wje.drawMode,UXt=wje.selectMode,VXt=Of().prepSelect,GXt=Of().clearOutline,HXt=Of().clearSelectionsCache,jXt=Of().selectOnClick,pw=Px(),WXt=yje();function Tje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+\"-\"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hh=Tje.prototype;Hh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Hh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=Aje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new qJ.Map({container:i.div,style:o.style,center:NJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new qJ.AttributionControl({compact:!0})),c={};u.on(\"styleimagemissing\",function(h){var d=h.id;if(!c[d]&&d.includes(\"-15\")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin=\"Anonymous\",v.src=\"https://unpkg.com/maki@2.1.0/icons/\"+d+\".svg\"}}),u.setTransformRequest(function(h){return h=h.replace(\"https://fonts.openmaptiles.org/Open Sans Extrabold\",\"https://fonts.openmaptiles.org/Open Sans Extra Bold\"),h=h.replace(\"https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold\",\"https://fonts.openmaptiles.org/Open Sans Extra Bold\"),h=h.replace(\"https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular\",\"https://fonts.openmaptiles.org/Klokantech Noto Sans Regular\"),{url:h}}),u._canvas.style.left=\"0px\",u._canvas.style.top=\"0px\",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once(\"load\",h)})),f=f.concat(bje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=Aje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once(\"styledata\",u)}))),s=s.concat(bje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below==\"string\"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===\"\"&&(s=!0),o[\"trace-\"+l.uid]=a||\"\"}for(i=0;i<n.length;i++){var c=n[i];typeof c.below==\"string\"?a=c.below:s?a=\"traces\":a=\"\",o[\"layout-\"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf(\"trace-\")===0?(d=h.split(\"trace-\")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf(\"layout-\")===0&&(d=h.split(\"layout-\")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var xje={choroplethmap:0,densitymap:1,scattermap:2};Hh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return xje[f[0].trace.type]-xje[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Hh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(NJ(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.map?t.scrollZoom.enable():t.scrollZoom.disable()};Hh.resolveOnRender=function(e){var t=this.map;t.on(\"render\",function r(){t.loaded()&&(t.off(\"render\",r),setTimeout(e,10))})};Hh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(pw.mapOnErrorMsg))}t.once(\"error\",r),t.once(\"style.error\",r),t.once(\"source.error\",r),t.once(\"tile.error\",r),t.once(\"layer.error\",r)};Hh.createFramework=function(e){var t=this,r=t.div=document.createElement(\"div\");r.id=t.uid,r.style.position=\"absolute\",t.container.appendChild(r),t.xaxis={_id:\"x\",c2p:function(n){return t.project(n).x}},t.yaxis={_id:\"y\",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},qXt.setConvert(t.mockAxis,e)};Hh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on(\"moveend\",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];_je.call(\"_storeDirectGUIEdit\",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type===\"mouseup\"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),i.on(\"wheel\",function(){r.wheeling=!0}),i.on(\"mousemove\",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&p7.hover(n,s,r.id)},p7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){p7.loneUnhover(t._hoverlayer)}i.on(\"dragstart\",function(){r.dragging=!0,a()}),i.on(\"zoomstart\",a),i.on(\"mouseout\",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit(\"plotly_relayouting\",r.getViewEditsWithDerived(s))}i.on(\"drag\",o),i.on(\"zoom\",o),i.on(\"dblclick\",function(){var s=n._fullLayout[r.id];_je.call(\"_storeDirectGUIEdit\",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(NJ(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit(\"plotly_doubleclick\",null),n.emit(\"plotly_relayout\",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){HXt(r.dragOptions),GXt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf(\"select\")>-1&&jXt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf(\"event\")>-1&&p7.click(n,l.originalEvent)}}};Hh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=BJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off(\"click\",t.onClickInPanHandler),UXt(a)||NXt(a)?(r.dragPan.disable(),r.on(\"zoomstart\",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){VXt(l,u,c,t.dragOptions,a)},BXt.init(t.dragOptions)):(r.dragPan.enable(),r.off(\"zoomstart\",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener(\"touchstart\",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on(\"click\",t.onClickInPanHandler))};Hh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+\"px\",n.height=r.h*(t.y[1]-t.y[0])+\"px\",n.left=r.l+t.x[0]*r.w+\"px\",n.top=r.t+(1-t.y[1])*r.h+\"px\",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push(WXt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Hh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Hh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Hh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Hh.getMapLayers=function(){return this.map.getStyle().layers};Hh.addLayer=function(e,t){var r=this.map;if(typeof t==\"string\"){if(t===\"\"){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}BJ.warn([\"Trying to add layer with *below* value\",t,\"referencing a layer that does not exist\",\"or that does not yet exist.\"].join(\" \"))}r.addLayer(e)};Hh.project=function(e){return this.map.project(new qJ.LngLat(e[0],e[1]))};Hh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Hh.getViewEdits=function(e){for(var t=this.id,r=[\"center\",\"zoom\",\"bearing\",\"pitch\"],n={},i=0;i<r.length;i++){var a=r[i];n[t+\".\"+a]=e[a]}return n};Hh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+\"._derived\"]=e._derived,r};function Aje(e){var t={};return BJ.isPlainObject(e)?(t.id=e.id,t.style=e):typeof e==\"string\"?(t.id=e,pw.stylesMap[e]?t.style=pw.stylesMap[e]:t.style=e):(t.id=pw.styleValueDflt,t.style=XXt(pw.styleValueDflt)),t.transition={duration:0,delay:0},t}function XXt(e){return pw.styleUrlPrefix+e+\"-\"+pw.styleUrlSuffix}function NJ(e){return[e.lon,e.lat]}Sje.exports=Tje});var Cje=ye((Ubr,kje)=>{\"use strict\";var UJ=Dr(),ZXt=O_(),YXt=Zd(),Eje=Qk();kje.exports=function(t,r,n){ZXt(t,r,n,{type:\"map\",attributes:Eje,handleDefaults:KXt,partition:\"y\"})};function KXt(e,t,r){r(\"style\"),r(\"center.lon\"),r(\"center.lat\"),r(\"zoom\"),r(\"bearing\"),r(\"pitch\");var n=r(\"bounds.west\"),i=r(\"bounds.east\"),a=r(\"bounds.south\"),o=r(\"bounds.north\");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,YXt(e,t,{name:\"layers\",handleItemDefaults:JXt}),t._input=e}function JXt(e,t){function r(l,u){return UJ.coerce(e,t,Eje.layers,l,u)}var n=r(\"visible\");if(n){var i=r(\"sourcetype\"),a=i===\"raster\"||i===\"image\";r(\"source\"),r(\"sourceattribution\"),i===\"vector\"&&r(\"sourcelayer\"),i===\"image\"&&r(\"coordinates\");var o;a&&(o=\"raster\");var s=r(\"type\",o);a&&s!==\"raster\"&&(s=t.type=\"raster\",UJ.log(\"Source types *raster* and *image* must drawn *raster* layer type.\")),r(\"below\"),r(\"color\"),r(\"opacity\"),r(\"minzoom\"),r(\"maxzoom\"),s===\"circle\"&&r(\"circle.radius\"),s===\"line\"&&(r(\"line.width\"),r(\"line.dash\")),s===\"fill\"&&r(\"fill.outlinecolor\"),s===\"symbol\"&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),UJ.coerceFont(r,\"symbol.textfont\",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r(\"symbol.textposition\"),r(\"symbol.placement\"))}}});var m7=ye(u0=>{\"use strict\";var g7=Dr(),Lje=g7.strTranslate,$Xt=g7.strScale,QXt=Id().getSubplotCalcData,eZt=Wp(),tZt=Oa(),Pje=So(),rZt=Zl(),iZt=Mje(),Ix=\"map\";u0.name=Ix;u0.attr=\"subplot\";u0.idRoot=Ix;u0.idRegex=u0.attrRegex=g7.counterRegex(Ix);u0.attributes={subplot:{valType:\"subplotid\",dflt:\"map\",editType:\"calc\"}};u0.layoutAttributes=Qk();u0.supplyLayoutDefaults=Cje();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Ix],a=0;a<i.length;a++){var o=i[a],s=QXt(n,Ix,o),l=r[o],u=l._subplot;u||(u=new iZt(t,o),r[o]._subplot=u),u.viewInitial||(u.viewInitial={center:g7.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),u.plot(s,r,t._promises)}};u0.clean=function(e,t,r,n){for(var i=n._subplots[Ix]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};u0.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage(\"png\"),u=t._glimages.append(\"svg:image\");u.attr({xmlns:eZt.svg,\"xlink:href\":l,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:\"none\"});var c=tZt.select(a._subplot.div),f=c.select(\".maplibregl-ctrl-attrib\").text().replace(\"Improve this map\",\"\"),h=t._glimages.append(\"g\"),d=h.append(\"text\");d.text(f).classed(\"static-attribution\",!0).attr({\"font-size\":12,\"font-family\":\"Arial\",color:\"rgba(0, 0, 0, 0.75)\",\"text-anchor\":\"end\",\"data-unformatted\":f});var v=Pje.bBox(d.node()),_=n.w*(o.x[1]-o.x[0]);if(v.width>_/2){var b=f.split(\"|\").join(\"<br>\");d.text(b).attr(\"data-unformatted\",b).call(rZt.convertToTspans,e),v=Pje.bBox(d.node())}d.attr(\"transform\",Lje(-3,-v.height+8)),h.insert(\"rect\",\".static-attribution\").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:\"rgba(255, 255, 255, 0.75)\"});var p=1;v.width+6>_&&(p=_/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr(\"transform\",Lje(k[0],k[1])+$Xt(p))}};u0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var Rje=ye((Gbr,Ije)=>{\"use strict\";Ije.exports={attributes:l7(),supplyDefaults:jHe(),colorbar:$d(),formatLabels:PJ(),calc:_F(),plot:aje(),hoverPoints:d7().hoverPoints,eventData:uje(),selectPoints:fje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:\"trace\",name:\"scattermap\",basePlotModule:m7(),categories:[\"map\",\"gl\",\"symbols\",\"showLegend\",\"scatter-like\"],meta:{}}});var Fje=ye((Hbr,Dje)=>{\"use strict\";Dje.exports=Rje()});var VJ=ye((jbr,zje)=>{\"use strict\";var x1=a5(),nZt=Tu(),{hovertemplateAttrs:aZt,templatefallbackAttrs:oZt}=Ll(),sZt=Gl(),Rx=Ao().extendFlat;zje.exports=Rx({locations:{valType:\"data_array\",editType:\"calc\"},z:{valType:\"data_array\",editType:\"calc\"},geojson:{valType:\"any\",editType:\"calc\"},featureidkey:Rx({},x1.featureidkey,{}),below:{valType:\"string\",editType:\"plot\"},text:x1.text,hovertext:x1.hovertext,marker:{line:{color:Rx({},x1.marker.line.color,{editType:\"plot\"}),width:Rx({},x1.marker.line.width,{editType:\"plot\"}),editType:\"calc\"},opacity:Rx({},x1.marker.opacity,{editType:\"plot\"}),editType:\"calc\"},selected:{marker:{opacity:Rx({},x1.selected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:Rx({},x1.unselected.marker.opacity,{editType:\"plot\"}),editType:\"plot\"},editType:\"plot\"},hoverinfo:x1.hoverinfo,hovertemplate:aZt({},{keys:[\"properties\"]}),hovertemplatefallback:oZt(),showlegend:Rx({},sZt.showlegend,{dflt:!1})},nZt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var qje=ye((Wbr,Oje)=>{\"use strict\";var iC=Dr(),lZt=td(),uZt=VJ();Oje.exports=function(t,r,n,i){function a(c,f){return iC.coerce(t,r,uZt,c,f)}var o=a(\"locations\"),s=a(\"z\"),l=a(\"geojson\");if(!iC.isArrayOrTypedArray(o)||!o.length||!iC.isArrayOrTypedArray(s)||!s.length||!(typeof l==\"string\"&&l!==\"\"||iC.isPlainObject(l))){r.visible=!1;return}a(\"featureidkey\"),r._length=Math.min(o.length,s.length),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\");var u=a(\"marker.line.width\");u&&a(\"marker.line.color\"),a(\"marker.opacity\"),lZt(t,r,i,a,{prefix:\"\",cLetter:\"z\"}),iC.coerceSelectionMarkerOpacity(r,a)}});var GJ=ye((Xbr,Uje)=>{\"use strict\";var cZt=Eo(),b1=Dr(),fZt=tc(),hZt=So(),dZt=cx().makeBlank,Bje=hx();function vZt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:\"none\"},paint:{}},i={layout:{visibility:\"none\"},paint:{}},a=t._opts={fill:n,line:i,geojson:dZt()};if(!r)return a;var o=Bje.extractTraceFeature(e);if(!o)return a;var s=fZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;b1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return cZt(E)?+b1.constrain(E,0,1):0});var f;b1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;b1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var v=e[d],_=v.fOut;if(_){var b=_.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=Bje.feature2polygons(_)}}var p=c?{type:\"identity\",property:\"mo\"}:l.opacity;return b1.extendFlat(n.paint,{\"fill-color\":{type:\"identity\",property:\"fc\"},\"fill-opacity\":p}),b1.extendFlat(i.paint,{\"line-color\":f?{type:\"identity\",property:\"mlc\"}:u.color,\"line-width\":h?{type:\"identity\",property:\"mlw\"}:u.width,\"line-opacity\":p}),n.layout.visibility=\"visible\",i.layout.visibility=\"visible\",a.geojson={type:\"FeatureCollection\",features:o},Nje(e),a}function Nje(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=hZt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:\"identity\",property:\"mo2\"}}else n=b1.isArrayOrTypedArray(t.marker.opacity)?{type:\"identity\",property:\"mo\"}:t.marker.opacity;return b1.extendFlat(r.fill.paint,{\"fill-opacity\":n}),b1.extendFlat(r.line.paint,{\"line-opacity\":n}),r}Uje.exports={convert:vZt,convertOnSelect:Nje}});var Wje=ye((Zbr,jje)=>{\"use strict\";var Gje=GJ().convert,pZt=GJ().convertOnSelect,Vje=Px().traceLayerPrefix;function Hje(e,t){this.type=\"choroplethmap\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"fill\",Vje+t+\"-fill\"],[\"line\",Vje+t+\"-line\"]],this.below=null}var D5=Hje.prototype;D5.update=function(e){this._update(Gje(e)),e[0].trace._glTrace=this};D5.updateOnSelect=function(e){this._update(pZt(e))};D5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,\"setLayoutProperty\",l.layout),l.layout.visibility===\"visible\"&&t.setOptions(s,\"setPaintProperty\",l.paint)}};D5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};D5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};D5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};jje.exports=function(t,r){var n=r[0].trace,i=new Hje(t,n.uid),a=i.sourceId,o=Gje(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var Zje=ye((Ybr,Xje)=>{\"use strict\";Xje.exports={attributes:VJ(),supplyDefaults:qje(),colorbar:D_(),calc:NF(),plot:Wje(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i==\"string\"&&i.indexOf(\"water\")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i==\"string\"&&i.indexOf(\"plotly-\")===-1)return i}}},moduleType:\"trace\",name:\"choroplethmap\",basePlotModule:m7(),categories:[\"map\",\"gl\",\"noOpacity\",\"showLegend\"],meta:{hr_name:\"choropleth_map\"}}});var Kje=ye((Kbr,Yje)=>{\"use strict\";Yje.exports=Zje()});var jJ=ye((Jbr,$je)=>{\"use strict\";var gZt=Tu(),{hovertemplateAttrs:mZt,templatefallbackAttrs:yZt}=Ll(),Jje=Gl(),y7=l7(),HJ=Ao().extendFlat;$je.exports=HJ({lon:y7.lon,lat:y7.lat,z:{valType:\"data_array\",editType:\"calc\"},radius:{valType:\"number\",editType:\"plot\",arrayOk:!0,min:1,dflt:30},below:{valType:\"string\",editType:\"plot\"},text:y7.text,hovertext:y7.hovertext,hoverinfo:HJ({},Jje.hoverinfo,{flags:[\"lon\",\"lat\",\"z\",\"text\",\"name\"]}),hovertemplate:mZt(),hovertemplatefallback:yZt(),showlegend:HJ({},Jje.showlegend,{dflt:!1})},gZt(\"\",{cLetter:\"z\",editTypeOverride:\"calc\"}))});var eWe=ye(($br,Qje)=>{\"use strict\";var _Zt=Dr(),xZt=td(),bZt=jJ();Qje.exports=function(t,r,n,i){function a(u,c){return _Zt.coerce(t,r,bZt,u,c)}var o=a(\"lon\")||[],s=a(\"lat\")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"z\"),a(\"radius\"),a(\"below\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),xZt(t,r,i,a,{prefix:\"\",cLetter:\"z\"})}});var iWe=ye((Qbr,rWe)=>{\"use strict\";var WJ=Eo(),wZt=Dr().isArrayOrTypedArray,XJ=fs().BADNUM,TZt=gv(),tWe=Dr()._;rWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=wZt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=WJ(u)&&WJ(c)?[+u,+c]:[XJ,XJ],o){var f=a[s];l.z=WJ(f)?f:XJ}}return TZt(t,r,{vals:o?a:[0,1],containerStr:\"\",cLetter:\"z\"}),n&&(i[0].t={labels:{lat:tWe(t,\"lat:\")+\" \",lon:tWe(t,\"lon:\")+\" \"}}),i}});var lWe=ye((e2r,sWe)=>{\"use strict\";var AZt=Eo(),ZJ=Dr(),nWe=ka(),aWe=tc(),oWe=fs().BADNUM,SZt=cx().makeBlank;sWe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:\"none\"},paint:{}},a=r._opts={heatmap:i,geojson:SZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=ZJ.isArrayOrTypedArray(l)&&l.length,f=ZJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==oWe){var v={};if(c){var _=h.z;v.z=_!==oWe?_:0}f&&(v.r=AZt(u[s])&&u[s]>0?+u[s]:0),o.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:d},properties:v})}}var b=aWe.extractOpts(r),p=b.reversescale?aWe.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=nWe.opacity(k)<1?k:nWe.addOpacity(k,0),T=[\"interpolate\",[\"linear\"],[\"heatmap-density\"],0,E];for(s=1;s<p.length;s++)T.push(p[s][0],p[s][1]);var L=[\"interpolate\",[\"linear\"],[\"get\",\"z\"],b.min,0,b.max,1];return ZJ.extendFlat(a.heatmap.paint,{\"heatmap-weight\":c?L:1/(b.max-b.min),\"heatmap-color\":T,\"heatmap-radius\":f?{type:\"identity\",property:\"r\"}:r.radius,\"heatmap-opacity\":r.opacity}),a.geojson={type:\"FeatureCollection\",features:o},a.heatmap.layout.visibility=\"visible\",a}});var hWe=ye((t2r,fWe)=>{\"use strict\";var uWe=lWe(),MZt=Px().traceLayerPrefix;function cWe(e,t){this.type=\"densitymap\",this.subplot=e,this.uid=t,this.sourceId=\"source-\"+t,this.layerList=[[\"heatmap\",MZt+t+\"-heatmap\"]],this.below=null}var _7=cWe.prototype;_7.update=function(e){var t=this.subplot,r=this.layerList,n=uWe(e),i=t.belowLookup[\"trace-\"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,\"setLayoutProperty\",u.layout),u.layout.visibility===\"visible\"&&t.setOptions(l,\"setPaintProperty\",u.paint)}};_7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};_7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};_7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};fWe.exports=function(t,r){var n=r[0].trace,i=new cWe(t,n.uid),a=i.sourceId,o=uWe(r),s=i.below=t.belowLookup[\"trace-\"+n.uid];return t.map.addSource(a,{type:\"geojson\",data:o.geojson}),i._addLayers(o,s),i}});var vWe=ye((r2r,dWe)=>{\"use strict\";var EZt=ho(),kZt=d7().hoverPoints,CZt=d7().getExtraText;dWe.exports=function(t,r,n){var i=kZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,\"z\"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=EZt.tickText(u,u.c2l(l.z),\"hover\").text}return a.extraText=CZt(s,l,o[0].t.labels),[a]}}});var gWe=ye((i2r,pWe)=>{\"use strict\";pWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var yWe=ye((n2r,mWe)=>{\"use strict\";mWe.exports={attributes:jJ(),supplyDefaults:eWe(),colorbar:D_(),formatLabels:PJ(),calc:iWe(),plot:hWe(),hoverPoints:vWe(),eventData:gWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type===\"symbol\"&&typeof a==\"string\"&&a.indexOf(\"plotly-\")===-1)return a}},moduleType:\"trace\",name:\"densitymap\",basePlotModule:m7(),categories:[\"map\",\"gl\",\"showLegend\"],meta:{hr_name:\"density_map\"}}});var xWe=ye((a2r,_We)=>{\"use strict\";_We.exports=yWe()});var KJ=ye((s2r,SWe)=>{\"use strict\";var LZt=ec(),PZt=Gl(),bWe=Ih(),YJ=v3(),IZt=Cc().attributes,{hovertemplateAttrs:wWe,templatefallbackAttrs:TWe}=Ll(),RZt=Tu(),DZt=vl().templatedArray,FZt=df().descriptionOnlyNumbers,AWe=Ao().extendFlat,zZt=mc().overrideAll,o2r=SWe.exports=zZt({hoverinfo:AWe({},PZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:YJ.hoverlabel,domain:IZt({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\",description:FZt(\"value\")},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:LZt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:\"data_array\",dflt:[]},groups:{valType:\"info_array\",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:\"number\",editType:\"calc\"}},x:{valType:\"data_array\",dflt:[]},y:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:bWe.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:YJ.hoverlabel,hovertemplate:wWe({},{keys:[\"value\",\"label\"]}),hovertemplatefallback:TWe(),align:{valType:\"enumerated\",values:[\"justify\",\"left\",\"right\",\"center\"],dflt:\"justify\"}},link:{arrowlen:{valType:\"number\",min:0,dflt:0},label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},hovercolor:{valType:\"color\",arrayOk:!0},customdata:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:bWe.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]},hoverinfo:{valType:\"enumerated\",values:[\"all\",\"none\",\"skip\"],dflt:\"all\"},hoverlabel:YJ.hoverlabel,hovertemplate:wWe({},{keys:[\"value\",\"label\"]}),hovertemplatefallback:TWe(),colorscales:DZt(\"concentrationscales\",{editType:\"calc\",label:{valType:\"string\",editType:\"calc\",dflt:\"\"},cmax:{valType:\"number\",editType:\"calc\",dflt:1},cmin:{valType:\"number\",editType:\"calc\",dflt:0},colorscale:AWe(RZt().colorscale,{dflt:[[0,\"white\"],[1,\"black\"]]})})}},\"calc\",\"nested\")});var LWe=ye((l2r,CWe)=>{\"use strict\";var F5=Dr(),x7=KJ(),OZt=ka(),MWe=fd(),qZt=Cc().defaults,EWe=_M(),kWe=vl(),BZt=Zd();CWe.exports=function(t,r,n,i){function a(T,L){return F5.coerce(t,r,x7,T,L)}var o=F5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=kWe.newContainer(r,\"node\");function u(T,L){return F5.coerce(s,l,x7.node,T,L)}u(\"label\"),u(\"groups\"),u(\"x\"),u(\"y\"),u(\"pad\"),u(\"thickness\"),u(\"line.color\"),u(\"line.width\"),u(\"hoverinfo\",t.hoverinfo),EWe(s,l,u,o),u(\"hovertemplate\"),u(\"align\");var c=i.colorway,f=function(T){return c[T%c.length]};u(\"color\",l.label.map(function(T,L){return OZt.addOpacity(f(L),.8)})),u(\"customdata\");var h=t.link||{},d=kWe.newContainer(r,\"link\");function v(T,L){return F5.coerce(h,d,x7.link,T,L)}v(\"label\"),v(\"arrowlen\"),v(\"source\"),v(\"target\"),v(\"value\"),v(\"line.color\"),v(\"line.width\"),v(\"hoverinfo\",t.hoverinfo),EWe(h,d,v,o),v(\"hovertemplate\");var _=MWe(i.paper_bgcolor).getLuminance()<.333,b=_?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\",p=v(\"color\",b);function k(T){var L=MWe(T);if(!L.isValid())return T;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=_?L.brighten():L.darken(),L.toRgbString()}v(\"hovercolor\",Array.isArray(p)?p.map(k):k(p)),v(\"customdata\"),BZt(h,d,{name:\"colorscales\",handleItemDefaults:NZt}),qZt(r,i,a),a(\"orientation\"),a(\"valueformat\"),a(\"valuesuffix\");var E;l.x.length&&l.y.length&&(E=\"freeform\"),a(\"arrangement\",E),F5.coerceFont(a,\"textfont\",i.font,{autoShadowDflt:!0}),r._length=null};function NZt(e,t){function r(n,i){return F5.coerce(e,t,x7.link.colorscales,n,i)}r(\"label\"),r(\"cmin\"),r(\"cmax\"),r(\"colorscale\")}});var JJ=ye((u2r,PWe)=>{\"use strict\";PWe.exports=UZt;function UZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l<t;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var u=0,c=[],f=[];function h(b){var p=[b],k=[b];for(r[b]=n[b]=u,i[b]=!0,u+=1;k.length>0;){b=k[k.length-1];var E=e[b];if(a[b]<E.length){for(var T=a[b];T<E.length;++T){var L=E[T];if(r[L]<0){r[L]=n[L]=u,i[L]=!0,u+=1,p.push(L),k.push(L);break}else i[L]&&(n[b]=Math.min(n[b],n[L])|0);o[L]>=0&&s[b].push(o[L])}a[b]=T}else{if(n[b]===r[b]){for(var x=[],C=[],M=0,T=p.length-1;T>=0;--T){var g=p[T];if(i[g]=!1,x.push(g),C.push(s[g]),M+=s[g].length,o[g]=c.length,g===b){p.length=T;break}}c.push(x);for(var P=new Array(M),T=0;T<C.length;T++)for(var A=0;A<C[T].length;A++)P[--M]=C[T][A];f.push(P)}k.pop()}}}for(var l=0;l<t;++l)r[l]<0&&h(l);for(var d,l=0;l<f.length;l++){var v=f[l];if(v.length!==0){v.sort(function(p,k){return p-k}),d=[v[0]];for(var _=1;_<v.length;_++)v[_]!==v[_-1]&&d.push(v[_]);f[l]=d}}return{components:c,adjacencyList:f}}});var FWe=ye((c2r,DWe)=>{\"use strict\";var VZt=JJ(),z5=Dr(),GZt=iy().wrap,nC=z5.isArrayOrTypedArray,IWe=z5.isIndex,RWe=tc();function HZt(e){var t=e.node,r=e.link,n=[],i=nC(r.color),a=nC(r.hovercolor),o=nC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;c<u;c++){var f=r.colorscales[c],h=RWe.extractScale(f,{cLetter:\"c\"}),d=RWe.makeColorScaleFunc(h);l[f.label]=d}var v=0;for(c=0;c<r.value.length;c++)r.source[c]>v&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var _=v+1;e.node._count=_;var b,p=e.node.groups,k={};for(c=0;c<p.length;c++){var E=p[c];for(b=0;b<E.length;b++){var T=E[b],L=_+c;k.hasOwnProperty(T)?z5.warn(\"Node \"+T+\" is already part of a group.\"):k[T]=L}}var x={source:[],target:[]};for(c=0;c<r.value.length;c++){var C=r.value[c],M=r.source[c],g=r.target[c];if(C>0&&IWe(M,_)&&IWe(g,_)&&!(k.hasOwnProperty(M)&&k.hasOwnProperty(g)&&k[M]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(M)&&(M=k[M]),M=+M,g=+g,s[M]=s[g]=!0;var P=\"\";r.label&&r.label[c]&&(P=r.label[c]);var A=null;P&&l.hasOwnProperty(P)&&(A=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:A,source:M,target:g,value:+C}),x.source.push(M),x.target.push(g)}}var z=_+p.length,O=nC(t.color),U=nC(t.customdata),G=[];for(c=0;c<z;c++)if(s[c]){var Z=t.label[c];G.push({group:c>_-1,childrenNodes:[],pointNumber:c,label:Z,color:O?t.color[c]:t.color,customdata:U?t.customdata[c]:t.customdata})}var j=!1;return jZt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function jZt(e,t,r){for(var n=z5.init2dArray(e,0),i=0;i<Math.min(t.length,r.length);i++)if(z5.isIndex(t[i],e)&&z5.isIndex(r[i],e)){if(t[i]===r[i])return!0;n[t[i]].push(r[i])}var a=VZt(n);return a.components.some(function(o){return o.length>1})}DWe.exports=function(t,r){var n=HZt(r);return GZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var OWe=ye((b7,zWe)=>{(function(e,t){typeof b7==\"object\"&&typeof zWe!=\"undefined\"?t(b7):(e=e||self,t(e.d3=e.d3||{}))})(b7,function(e){\"use strict\";function t(C){var M=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(M,g),M,g,C)}function r(C,M,g,P){if(isNaN(M)||isNaN(g))return C;var A,z=C._root,O={data:P},U=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,re,oe,_e,Ce,Le,ge;if(!z)return C._root=O,C;for(;z.length;)if((_e=M>=(N=(U+Z)/2))?U=N:Z=N,(Ce=g>=(H=(G+j)/2))?G=H:j=H,A=z,!(z=z[Le=Ce<<1|_e]))return A[Le]=O,C;if(re=+C._x.call(null,z.data),oe=+C._y.call(null,z.data),M===re&&g===oe)return O.next=z,A?A[Le]=O:C._root=O,C;do A=A?A[Le]=new Array(4):C._root=new Array(4),(_e=M>=(N=(U+Z)/2))?U=N:Z=N,(Ce=g>=(H=(G+j)/2))?G=H:j=H;while((Le=Ce<<1|_e)===(ge=(oe>=H)<<1|re>=N));return A[ge]=z,A[Le]=O,C}function n(C){var M,g,P=C.length,A,z,O=new Array(P),U=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;g<P;++g)isNaN(A=+this._x.call(null,M=C[g]))||isNaN(z=+this._y.call(null,M))||(O[g]=A,U[g]=z,A<G&&(G=A),A>j&&(j=A),z<Z&&(Z=z),z>N&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;g<P;++g)r(this,O[g],U[g],C[g]);return this}function i(C,M){if(isNaN(C=+C)||isNaN(M=+M))return this;var g=this._x0,P=this._y0,A=this._x1,z=this._y1;if(isNaN(g))A=(g=Math.floor(C))+1,z=(P=Math.floor(M))+1;else{for(var O=A-g,U=this._root,G,Z;g>C||C>=A||P>M||M>=z;)switch(Z=(M<P)<<1|C<g,G=new Array(4),G[Z]=U,U=G,O*=2,Z){case 0:A=g+O,z=P+O;break;case 1:g=A-O,z=P+O;break;case 2:A=g+O,P=z-O;break;case 3:g=A-O,P=z-O;break}this._root&&this._root.length&&(this._root=U)}return this._x0=g,this._y0=P,this._x1=A,this._y1=z,this}function a(){var C=[];return this.visit(function(M){if(!M.length)do C.push(M.data);while(M=M.next)}),C}function o(C){return arguments.length?this.cover(+C[0][0],+C[0][1]).cover(+C[1][0],+C[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function s(C,M,g,P,A){this.node=C,this.x0=M,this.y0=g,this.x1=P,this.y1=A}function l(C,M,g){var P,A=this._x0,z=this._y0,O,U,G,Z,j=this._x1,N=this._y1,H=[],re=this._root,oe,_e;for(re&&H.push(new s(re,A,z,j,N)),g==null?g=1/0:(A=C-g,z=M-g,j=C+g,N=M+g,g*=g);oe=H.pop();)if(!(!(re=oe.node)||(O=oe.x0)>j||(U=oe.y0)>N||(G=oe.x1)<A||(Z=oe.y1)<z))if(re.length){var Ce=(O+G)/2,Le=(U+Z)/2;H.push(new s(re[3],Ce,Le,G,Z),new s(re[2],O,Le,Ce,Z),new s(re[1],Ce,U,G,Le),new s(re[0],O,U,Ce,Le)),(_e=(M>=Le)<<1|C>=Ce)&&(oe=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=oe)}else{var ge=C-+this._x.call(null,re.data),ie=M-+this._y.call(null,re.data),Se=ge*ge+ie*ie;if(Se<g){var Ee=Math.sqrt(g=Se);A=C-Ee,z=M-Ee,j=C+Ee,N=M+Ee,P=re.data}}return P}function u(C){if(isNaN(j=+this._x.call(null,C))||isNaN(N=+this._y.call(null,C)))return this;var M,g=this._root,P,A,z,O=this._x0,U=this._y0,G=this._x1,Z=this._y1,j,N,H,re,oe,_e,Ce,Le;if(!g)return this;if(g.length)for(;;){if((oe=j>=(H=(O+G)/2))?O=H:G=H,(_e=N>=(re=(U+Z)/2))?U=re:Z=re,M=g,!(g=g[Ce=_e<<1|oe]))return this;if(!g.length)break;(M[Ce+1&3]||M[Ce+2&3]||M[Ce+3&3])&&(P=M,Le=Ce)}for(;g.data!==C;)if(A=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,A?(z?A.next=z:delete A.next,this):M?(z?M[Ce]=z:delete M[Ce],(g=M[0]||M[1]||M[2]||M[3])&&g===(M[3]||M[2]||M[1]||M[0])&&!g.length&&(P?P[Le]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var M=0,g=C.length;M<g;++M)this.remove(C[M]);return this}function f(){return this._root}function h(){var C=0;return this.visit(function(M){if(!M.length)do++C;while(M=M.next)}),C}function d(C){var M=[],g,P=this._root,A,z,O,U,G;for(P&&M.push(new s(P,this._x0,this._y0,this._x1,this._y1));g=M.pop();)if(!C(P=g.node,z=g.x0,O=g.y0,U=g.x1,G=g.y1)&&P.length){var Z=(z+U)/2,j=(O+G)/2;(A=P[3])&&M.push(new s(A,Z,j,U,G)),(A=P[2])&&M.push(new s(A,z,j,Z,G)),(A=P[1])&&M.push(new s(A,Z,O,U,j)),(A=P[0])&&M.push(new s(A,z,O,Z,j))}return this}function v(C){var M=[],g=[],P;for(this._root&&M.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));P=M.pop();){var A=P.node;if(A.length){var z,O=P.x0,U=P.y0,G=P.x1,Z=P.y1,j=(O+G)/2,N=(U+Z)/2;(z=A[0])&&M.push(new s(z,O,U,j,N)),(z=A[1])&&M.push(new s(z,j,U,G,N)),(z=A[2])&&M.push(new s(z,O,N,j,Z)),(z=A[3])&&M.push(new s(z,j,N,G,Z))}g.push(P)}for(;P=g.pop();)C(P.node,P.x0,P.y0,P.x1,P.y1);return this}function _(C){return C[0]}function b(C){return arguments.length?(this._x=C,this):this._x}function p(C){return C[1]}function k(C){return arguments.length?(this._y=C,this):this._y}function E(C,M,g){var P=new T(M==null?_:M,g==null?p:g,NaN,NaN,NaN,NaN);return C==null?P:P.addAll(C)}function T(C,M,g,P,A,z){this._x=C,this._y=M,this._x0=g,this._y0=P,this._x1=A,this._y1=z,this._root=void 0}function L(C){for(var M={data:C.data},g=M;C=C.next;)g=g.next={data:C.data};return M}var x=E.prototype=T.prototype;x.copy=function(){var C=new T(this._x,this._y,this._x0,this._y0,this._x1,this._y1),M=this._root,g,P;if(!M)return C;if(!M.length)return C._root=L(M),C;for(g=[{source:M,target:C._root=new Array(4)}];M=g.pop();)for(var A=0;A<4;++A)(P=M.source[A])&&(P.length?g.push({source:P,target:M.target[A]=new Array(4)}):M.target[A]=L(P));return C},x.add=t,x.addAll=n,x.cover=i,x.data=a,x.extent=o,x.find=l,x.remove=u,x.removeAll=c,x.root=f,x.size=h,x.visit=d,x.visitAfter=v,x.x=b,x.y=k,e.quadtree=E,Object.defineProperty(e,\"__esModule\",{value:!0})})});var T7=ye((w7,qWe)=>{(function(e,t){t(typeof w7==\"object\"&&typeof qWe!=\"undefined\"?w7:e.d3=e.d3||{})})(w7,function(e){\"use strict\";var t=\"$\";function r(){}r.prototype=n.prototype={constructor:r,has:function(_){return t+_ in this},get:function(_){return this[t+_]},set:function(_,b){return this[t+_]=b,this},remove:function(_){var b=t+_;return b in this&&delete this[b]},clear:function(){for(var _ in this)_[0]===t&&delete this[_]},keys:function(){var _=[];for(var b in this)b[0]===t&&_.push(b.slice(1));return _},values:function(){var _=[];for(var b in this)b[0]===t&&_.push(this[b]);return _},entries:function(){var _=[];for(var b in this)b[0]===t&&_.push({key:b.slice(1),value:this[b]});return _},size:function(){var _=0;for(var b in this)b[0]===t&&++_;return _},empty:function(){for(var _ in this)if(_[0]===t)return!1;return!0},each:function(_){for(var b in this)b[0]===t&&_(this[b],b.slice(1),this)}};function n(_,b){var p=new r;if(_ instanceof r)_.each(function(x,C){p.set(C,x)});else if(Array.isArray(_)){var k=-1,E=_.length,T;if(b==null)for(;++k<E;)p.set(k,_[k]);else for(;++k<E;)p.set(b(T=_[k],k,_),T)}else if(_)for(var L in _)p.set(L,_[L]);return p}function i(){var _=[],b=[],p,k,E;function T(x,C,M,g){if(C>=_.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,A=x.length,z=_[C++],O,U,G=n(),Z,j=M();++P<A;)(Z=G.get(O=z(U=x[P])+\"\"))?Z.push(U):G.set(O,[U]);return G.each(function(N,H){g(j,H,T(N,C,M,g))}),j}function L(x,C){if(++C>_.length)return x;var M,g=b[C-1];return k!=null&&C>=_.length?M=x.entries():(M=[],x.each(function(P,A){M.push({key:A,values:L(P,C)})})),g!=null?M.sort(function(P,A){return g(P.key,A.key)}):M}return E={object:function(x){return T(x,0,a,o)},map:function(x){return T(x,0,s,l)},entries:function(x){return L(T(x,0,s,l),0)},key:function(x){return _.push(x),E},sortKeys:function(x){return b[_.length-1]=x,E},sortValues:function(x){return p=x,E},rollup:function(x){return k=x,E}}}function a(){return{}}function o(_,b,p){_[b]=p}function s(){return n()}function l(_,b,p){_.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(_){return _+=\"\",this[t+_]=_,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(_,b){var p=new u;if(_ instanceof u)_.each(function(T){p.add(T)});else if(_){var k=-1,E=_.length;if(b==null)for(;++k<E;)p.add(_[k]);else for(;++k<E;)p.add(b(_[k],k,_))}return p}function h(_){var b=[];for(var p in _)b.push(p);return b}function d(_){var b=[];for(var p in _)b.push(_[p]);return b}function v(_){var b=[];for(var p in _)b.push({key:p,value:_[p]});return b}e.nest=i,e.set=f,e.map=n,e.keys=h,e.values=d,e.entries=v,Object.defineProperty(e,\"__esModule\",{value:!0})})});var NWe=ye((A7,BWe)=>{(function(e,t){typeof A7==\"object\"&&typeof BWe!=\"undefined\"?t(A7):(e=e||self,t(e.d3=e.d3||{}))})(A7,function(e){\"use strict\";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s<l;++s){if(!(c=arguments[s]+\"\")||c in u||/[\\s.]/.test(c))throw new Error(\"illegal type: \"+c);u[c]=[]}return new n(u)}function n(s){this._=s}function i(s,l){return s.trim().split(/^|\\s+/).map(function(u){var c=\"\",f=u.indexOf(\".\");if(f>=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error(\"unknown type: \"+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+\"\",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h<d;)if((f=(s=c[h]).type)&&(f=a(u[f],s.name)))return f;return}if(l!=null&&typeof l!=\"function\")throw new Error(\"invalid callback: \"+l);for(;++h<d;)if(f=(s=c[h]).type)u[f]=o(u[f],s.name,l);else if(l==null)for(f in u)u[f]=o(u[f],s.name,null);return this},copy:function(){var s={},l=this._;for(var u in l)s[u]=l[u].slice();return new n(s)},call:function(s,l){if((f=arguments.length-2)>0)for(var u=new Array(f),c=0,f,h;c<f;++c)u[c]=arguments[c+2];if(!this._.hasOwnProperty(s))throw new Error(\"unknown type: \"+s);for(h=this._[s],c=0,f=h.length;c<f;++c)h[c].value.apply(l,u)},apply:function(s,l,u){if(!this._.hasOwnProperty(s))throw new Error(\"unknown type: \"+s);for(var c=this._[s],f=0,h=c.length;f<h;++f)c[f].value.apply(l,u)}};function a(s,l){for(var u=0,c=s.length,f;u<c;++u)if((f=s[u]).name===l)return f.value}function o(s,l,u){for(var c=0,f=s.length;c<f;++c)if(s[c].name===l){s[c]=t,s=s.slice(0,c).concat(s.slice(c+1));break}return u!=null&&s.push({name:l,value:u}),s}e.dispatch=r,Object.defineProperty(e,\"__esModule\",{value:!0})})});var VWe=ye((S7,UWe)=>{(function(e,t){typeof S7==\"object\"&&typeof UWe!=\"undefined\"?t(S7):(e=e||self,t(e.d3=e.d3||{}))})(S7,function(e){\"use strict\";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance==\"object\"&&performance.now?performance:Date,f=typeof window==\"object\"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=_.prototype={constructor:v,restart:function(C,M,g){if(typeof C!=\"function\")throw new TypeError(\"callback is not a function\");g=(g==null?h():+g)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}};function _(C,M,g){var P=new v;return P.restart(C,M,g),P}function b(){h(),++t;for(var C=a,M;C;)(M=l-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,E(),l=0}}function k(){var C=c.now(),M=C-s;M>i&&(u-=M,s=C)}function E(){for(var C,M=a,g,P=1/0;M;)M._call?(P>M._time&&(P=M._time),C=M,M=M._next):(g=M._next,M._next=null,M=C?C._next=g:a=g);o=C,T(P)}function T(C){if(!t){r&&(r=clearTimeout(r));var M=C-l;M>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,M,g){var P=new v;return M=M==null?0:+M,P.restart(function(A){P.stop(),C(A+M)},M,g),P}function x(C,M,g){var P=new v,A=M;return M==null?(P.restart(C,M,g),P):(M=+M,g=g==null?h():+g,P.restart(function z(O){O+=A,P.restart(z,A+=M,g),C(O)},M,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=_,e.timerFlush=b,Object.defineProperty(e,\"__esModule\",{value:!0})})});var HWe=ye((M7,GWe)=>{(function(e,t){typeof M7==\"object\"&&typeof GWe!=\"undefined\"?t(M7,OWe(),T7(),NWe(),VWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(M7,function(e,t,r,n,i){\"use strict\";function a(C,M){var g;C==null&&(C=0),M==null&&(M=0);function P(){var A,z=g.length,O,U=0,G=0;for(A=0;A<z;++A)O=g[A],U+=O.x,G+=O.y;for(U=U/z-C,G=G/z-M,A=0;A<z;++A)O=g[A],O.x-=U,O.y-=G}return P.initialize=function(A){g=A},P.x=function(A){return arguments.length?(C=+A,P):C},P.y=function(A){return arguments.length?(M=+A,P):M},P}function o(C){return function(){return C}}function s(){return(Math.random()-.5)*1e-6}function l(C){return C.x+C.vx}function u(C){return C.y+C.vy}function c(C){var M,g,P=1,A=1;typeof C!=\"function\"&&(C=o(C==null?1:+C));function z(){for(var G,Z=M.length,j,N,H,re,oe,_e,Ce=0;Ce<A;++Ce)for(j=t.quadtree(M,l,u).visitAfter(O),G=0;G<Z;++G)N=M[G],oe=g[N.index],_e=oe*oe,H=N.x+N.vx,re=N.y+N.vy,j.visit(Le);function Le(ge,ie,Se,Ee,Ae){var Be=ge.data,Pe=ge.r,me=oe+Pe;if(Be){if(Be.index>N.index){var De=H-Be.x-Be.vx,ce=re-Be.y-Be.vy,je=De*De+ce*ce;je<me*me&&(De===0&&(De=s(),je+=De*De),ce===0&&(ce=s(),je+=ce*ce),je=(me-(je=Math.sqrt(je)))/je*P,N.vx+=(De*=je)*(me=(Pe*=Pe)/(_e+Pe)),N.vy+=(ce*=je)*me,Be.vx-=De*(me=1-me),Be.vy-=ce*me)}return}return ie>H+me||Ee<H-me||Se>re+me||Ae<re-me}}function O(G){if(G.data)return G.r=g[G.data.index];for(var Z=G.r=0;Z<4;++Z)G[Z]&&G[Z].r>G.r&&(G.r=G[Z].r)}function U(){if(M){var G,Z=M.length,j;for(g=new Array(Z),G=0;G<Z;++G)j=M[G],g[j.index]=+C(j,G,M)}}return z.initialize=function(G){M=G,U()},z.iterations=function(G){return arguments.length?(A=+G,z):A},z.strength=function(G){return arguments.length?(P=+G,z):P},z.radius=function(G){return arguments.length?(C=typeof G==\"function\"?G:o(+G),U(),z):C},z}function f(C){return C.index}function h(C,M){var g=C.get(M);if(!g)throw new Error(\"missing: \"+M);return g}function d(C){var M=f,g=j,P,A=o(30),z,O,U,G,Z=1;C==null&&(C=[]);function j(_e){return 1/Math.min(U[_e.source.index],U[_e.target.index])}function N(_e){for(var Ce=0,Le=C.length;Ce<Z;++Ce)for(var ge=0,ie,Se,Ee,Ae,Be,Pe,me;ge<Le;++ge)ie=C[ge],Se=ie.source,Ee=ie.target,Ae=Ee.x+Ee.vx-Se.x-Se.vx||s(),Be=Ee.y+Ee.vy-Se.y-Se.vy||s(),Pe=Math.sqrt(Ae*Ae+Be*Be),Pe=(Pe-z[ge])/Pe*_e*P[ge],Ae*=Pe,Be*=Pe,Ee.vx-=Ae*(me=G[ge]),Ee.vy-=Be*me,Se.vx+=Ae*(me=1-me),Se.vy+=Be*me}function H(){if(O){var _e,Ce=O.length,Le=C.length,ge=r.map(O,M),ie;for(_e=0,U=new Array(Ce);_e<Le;++_e)ie=C[_e],ie.index=_e,typeof ie.source!=\"object\"&&(ie.source=h(ge,ie.source)),typeof ie.target!=\"object\"&&(ie.target=h(ge,ie.target)),U[ie.source.index]=(U[ie.source.index]||0)+1,U[ie.target.index]=(U[ie.target.index]||0)+1;for(_e=0,G=new Array(Le);_e<Le;++_e)ie=C[_e],G[_e]=U[ie.source.index]/(U[ie.source.index]+U[ie.target.index]);P=new Array(Le),re(),z=new Array(Le),oe()}}function re(){if(O)for(var _e=0,Ce=C.length;_e<Ce;++_e)P[_e]=+g(C[_e],_e,C)}function oe(){if(O)for(var _e=0,Ce=C.length;_e<Ce;++_e)z[_e]=+A(C[_e],_e,C)}return N.initialize=function(_e){O=_e,H()},N.links=function(_e){return arguments.length?(C=_e,H(),N):C},N.id=function(_e){return arguments.length?(M=_e,N):M},N.iterations=function(_e){return arguments.length?(Z=+_e,N):Z},N.strength=function(_e){return arguments.length?(g=typeof _e==\"function\"?_e:o(+_e),re(),N):g},N.distance=function(_e){return arguments.length?(A=typeof _e==\"function\"?_e:o(+_e),oe(),N):A},N}function v(C){return C.x}function _(C){return C.y}var b=10,p=Math.PI*(3-Math.sqrt(5));function k(C){var M,g=1,P=.001,A=1-Math.pow(P,1/300),z=0,O=.6,U=r.map(),G=i.timer(j),Z=n.dispatch(\"tick\",\"end\");C==null&&(C=[]);function j(){N(),Z.call(\"tick\",M),g<P&&(G.stop(),Z.call(\"end\",M))}function N(oe){var _e,Ce=C.length,Le;oe===void 0&&(oe=1);for(var ge=0;ge<oe;++ge)for(g+=(z-g)*A,U.each(function(ie){ie(g)}),_e=0;_e<Ce;++_e)Le=C[_e],Le.fx==null?Le.x+=Le.vx*=O:(Le.x=Le.fx,Le.vx=0),Le.fy==null?Le.y+=Le.vy*=O:(Le.y=Le.fy,Le.vy=0);return M}function H(){for(var oe=0,_e=C.length,Ce;oe<_e;++oe){if(Ce=C[oe],Ce.index=oe,Ce.fx!=null&&(Ce.x=Ce.fx),Ce.fy!=null&&(Ce.y=Ce.fy),isNaN(Ce.x)||isNaN(Ce.y)){var Le=b*Math.sqrt(oe),ge=oe*p;Ce.x=Le*Math.cos(ge),Ce.y=Le*Math.sin(ge)}(isNaN(Ce.vx)||isNaN(Ce.vy))&&(Ce.vx=Ce.vy=0)}}function re(oe){return oe.initialize&&oe.initialize(C),oe}return H(),M={tick:N,restart:function(){return G.restart(j),M},stop:function(){return G.stop(),M},nodes:function(oe){return arguments.length?(C=oe,H(),U.each(re),M):C},alpha:function(oe){return arguments.length?(g=+oe,M):g},alphaMin:function(oe){return arguments.length?(P=+oe,M):P},alphaDecay:function(oe){return arguments.length?(A=+oe,M):+A},alphaTarget:function(oe){return arguments.length?(z=+oe,M):z},velocityDecay:function(oe){return arguments.length?(O=1-oe,M):1-O},force:function(oe,_e){return arguments.length>1?(_e==null?U.remove(oe):U.set(oe,re(_e)),M):U.get(oe)},find:function(oe,_e,Ce){var Le=0,ge=C.length,ie,Se,Ee,Ae,Be;for(Ce==null?Ce=1/0:Ce*=Ce,Le=0;Le<ge;++Le)Ae=C[Le],ie=oe-Ae.x,Se=_e-Ae.y,Ee=ie*ie+Se*Se,Ee<Ce&&(Be=Ae,Ce=Ee);return Be},on:function(oe,_e){return arguments.length>1?(Z.on(oe,_e),M):Z.on(oe)}}}function E(){var C,M,g,P=o(-30),A,z=1,O=1/0,U=.81;function G(H){var re,oe=C.length,_e=t.quadtree(C,v,_).visitAfter(j);for(g=H,re=0;re<oe;++re)M=C[re],_e.visit(N)}function Z(){if(C){var H,re=C.length,oe;for(A=new Array(re),H=0;H<re;++H)oe=C[H],A[oe.index]=+P(oe,H,C)}}function j(H){var re=0,oe,_e,Ce=0,Le,ge,ie;if(H.length){for(Le=ge=ie=0;ie<4;++ie)(oe=H[ie])&&(_e=Math.abs(oe.value))&&(re+=oe.value,Ce+=_e,Le+=_e*oe.x,ge+=_e*oe.y);H.x=Le/Ce,H.y=ge/Ce}else{oe=H,oe.x=oe.data.x,oe.y=oe.data.y;do re+=A[oe.data.index];while(oe=oe.next)}H.value=re}function N(H,re,oe,_e){if(!H.value)return!0;var Ce=H.x-M.x,Le=H.y-M.y,ge=_e-re,ie=Ce*Ce+Le*Le;if(ge*ge/U<ie)return ie<O&&(Ce===0&&(Ce=s(),ie+=Ce*Ce),Le===0&&(Le=s(),ie+=Le*Le),ie<z&&(ie=Math.sqrt(z*ie)),M.vx+=Ce*H.value*g/ie,M.vy+=Le*H.value*g/ie),!0;if(H.length||ie>=O)return;(H.data!==M||H.next)&&(Ce===0&&(Ce=s(),ie+=Ce*Ce),Le===0&&(Le=s(),ie+=Le*Le),ie<z&&(ie=Math.sqrt(z*ie)));do H.data!==M&&(ge=A[H.data.index]*g/ie,M.vx+=Ce*ge,M.vy+=Le*ge);while(H=H.next)}return G.initialize=function(H){C=H,Z()},G.strength=function(H){return arguments.length?(P=typeof H==\"function\"?H:o(+H),Z(),G):P},G.distanceMin=function(H){return arguments.length?(z=H*H,G):Math.sqrt(z)},G.distanceMax=function(H){return arguments.length?(O=H*H,G):Math.sqrt(O)},G.theta=function(H){return arguments.length?(U=H*H,G):Math.sqrt(U)},G}function T(C,M,g){var P,A=o(.1),z,O;typeof C!=\"function\"&&(C=o(+C)),M==null&&(M=0),g==null&&(g=0);function U(Z){for(var j=0,N=P.length;j<N;++j){var H=P[j],re=H.x-M||1e-6,oe=H.y-g||1e-6,_e=Math.sqrt(re*re+oe*oe),Ce=(O[j]-_e)*z[j]*Z/_e;H.vx+=re*Ce,H.vy+=oe*Ce}}function G(){if(P){var Z,j=P.length;for(z=new Array(j),O=new Array(j),Z=0;Z<j;++Z)O[Z]=+C(P[Z],Z,P),z[Z]=isNaN(O[Z])?0:+A(P[Z],Z,P)}}return U.initialize=function(Z){P=Z,G()},U.strength=function(Z){return arguments.length?(A=typeof Z==\"function\"?Z:o(+Z),G(),U):A},U.radius=function(Z){return arguments.length?(C=typeof Z==\"function\"?Z:o(+Z),G(),U):C},U.x=function(Z){return arguments.length?(M=+Z,U):M},U.y=function(Z){return arguments.length?(g=+Z,U):g},U}function L(C){var M=o(.1),g,P,A;typeof C!=\"function\"&&(C=o(C==null?0:+C));function z(U){for(var G=0,Z=g.length,j;G<Z;++G)j=g[G],j.vx+=(A[G]-j.x)*P[G]*U}function O(){if(g){var U,G=g.length;for(P=new Array(G),A=new Array(G),U=0;U<G;++U)P[U]=isNaN(A[U]=+C(g[U],U,g))?0:+M(g[U],U,g)}}return z.initialize=function(U){g=U,O()},z.strength=function(U){return arguments.length?(M=typeof U==\"function\"?U:o(+U),O(),z):M},z.x=function(U){return arguments.length?(C=typeof U==\"function\"?U:o(+U),O(),z):C},z}function x(C){var M=o(.1),g,P,A;typeof C!=\"function\"&&(C=o(C==null?0:+C));function z(U){for(var G=0,Z=g.length,j;G<Z;++G)j=g[G],j.vy+=(A[G]-j.y)*P[G]*U}function O(){if(g){var U,G=g.length;for(P=new Array(G),A=new Array(G),U=0;U<G;++U)P[U]=isNaN(A[U]=+C(g[U],U,g))?0:+M(g[U],U,g)}}return z.initialize=function(U){g=U,O()},z.strength=function(U){return arguments.length?(M=typeof U==\"function\"?U:o(+U),O(),z):M},z.y=function(U){return arguments.length?(C=typeof U==\"function\"?U:o(+U),O(),z):C},z}e.forceCenter=a,e.forceCollide=c,e.forceLink=d,e.forceManyBody=E,e.forceRadial=T,e.forceSimulation=k,e.forceX=L,e.forceY=x,Object.defineProperty(e,\"__esModule\",{value:!0})})});var WWe=ye((E7,jWe)=>{(function(e,t){typeof E7==\"object\"&&typeof jWe!=\"undefined\"?t(E7):(e=e||self,t(e.d3=e.d3||{}))})(E7,function(e){\"use strict\";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\"}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+=\"M\"+(this._x0=this._x1=+s)+\",\"+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\")},lineTo:function(s,l){this._+=\"L\"+(this._x1=+s)+\",\"+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+=\"Q\"+ +s+\",\"+ +l+\",\"+(this._x1=+u)+\",\"+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+=\"C\"+ +s+\",\"+ +l+\",\"+ +u+\",\"+ +c+\",\"+(this._x1=+f)+\",\"+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,_=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error(\"negative radius: \"+f);if(this._x1===null)this._+=\"M\"+(this._x1=s)+\",\"+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-_*b)>n)||!f)this._+=\"L\"+(this._x1=s)+\",\"+(this._y1=l);else{var E=u-h,T=c-d,L=v*v+_*_,x=E*E+T*T,C=Math.sqrt(L),M=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*M)))/2),P=g/M,A=g/C;Math.abs(P-1)>n&&(this._+=\"L\"+(s+P*b)+\",\"+(l+P*p)),this._+=\"A\"+f+\",\"+f+\",0,0,\"+ +(p*E>b*T)+\",\"+(this._x1=s+A*v)+\",\"+(this._y1=l+A*_)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),_=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error(\"negative radius: \"+u);this._x1===null?this._+=\"M\"+_+\",\"+b:(Math.abs(this._x1-_)>n||Math.abs(this._y1-b)>n)&&(this._+=\"L\"+_+\",\"+b),u&&(k<0&&(k=k%r+r),k>i?this._+=\"A\"+u+\",\"+u+\",0,1,\"+p+\",\"+(s-d)+\",\"+(l-v)+\"A\"+u+\",\"+u+\",0,1,\"+p+\",\"+(this._x1=_)+\",\"+(this._y1=b):k>n&&(this._+=\"A\"+u+\",\"+u+\",0,\"+ +(k>=t)+\",\"+p+\",\"+(this._x1=s+u*Math.cos(f))+\",\"+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+=\"M\"+(this._x0=this._x1=+s)+\",\"+(this._y0=this._y1=+l)+\"h\"+ +u+\"v\"+ +c+\"h\"+-u+\"Z\"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,\"__esModule\",{value:!0})})});var $J=ye((k7,XWe)=>{(function(e,t){typeof k7==\"object\"&&typeof XWe!=\"undefined\"?t(k7,WWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(k7,function(e,t){\"use strict\";function r(Mt){return function(){return Mt}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Mt){return Mt>1?0:Mt<-1?f:Math.acos(Mt)}function _(Mt){return Mt>=1?h:Mt<=-1?-h:Math.asin(Mt)}function b(Mt){return Mt.innerRadius}function p(Mt){return Mt.outerRadius}function k(Mt){return Mt.startAngle}function E(Mt){return Mt.endAngle}function T(Mt){return Mt&&Mt.padAngle}function L(Mt,kr,Jr,vi,hn,An,Mn,Li){var _n=Jr-Mt,ya=vi-kr,$n=Mn-hn,Ma=Li-An,_o=Ma*_n-$n*ya;if(!(_o*_o<c))return _o=($n*(kr-An)-Ma*(Mt-hn))/_o,[Mt+_o*_n,kr+_o*ya]}function x(Mt,kr,Jr,vi,hn,An,Mn){var Li=Mt-Jr,_n=kr-vi,ya=(Mn?An:-An)/u(Li*Li+_n*_n),$n=ya*_n,Ma=-ya*Li,_o=Mt+$n,No=kr+Ma,po=Jr+$n,Lo=vi+Ma,ko=(_o+po)/2,Ds=(No+Lo)/2,Fs=po-_o,ll=Lo-No,ul=Fs*Fs+ll*ll,zl=hn-An,us=_o*Lo-po*No,il=(ll<0?-1:1)*u(o(0,zl*zl*ul-us*us)),As=(us*ll-Fs*il)/ul,cl=(-us*Fs-ll*il)/ul,Ks=(us*ll+Fs*il)/ul,zs=(-us*Fs+ll*il)/ul,Io=As-ko,ls=cl-Ds,Yl=Ks-ko,Su=zs-Ds;return Io*Io+ls*ls>Yl*Yl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-$n,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Mt=b,kr=p,Jr=r(0),vi=null,hn=k,An=E,Mn=T,Li=null;function _n(){var ya,$n,Ma=+Mt.apply(this,arguments),_o=+kr.apply(this,arguments),No=hn.apply(this,arguments)-h,po=An.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(Li||(Li=ya=t.path()),_o<Ma&&($n=_o,_o=Ma,Ma=$n),!(_o>c))Li.moveTo(0,0);else if(Lo>d-c)Li.moveTo(_o*a(No),_o*l(No)),Li.arc(0,0,_o,No,po,!ko),Ma>c&&(Li.moveTo(Ma*a(po),Ma*l(po)),Li.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=Mn.apply(this,arguments)/2,As=il>c&&(vi?+vi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Yl=_(As/Ma*l(il)),Su=_(As/_o*l(il));(zl-=Yl*2)>c?(Yl*=ko?1:-1,ll+=Yl,ul-=Yl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),Ol=_o*l(Fs),xo=Ma*a(ll),Kl=Ma*l(ll),Ns;if(Lo<f&&(Ns=L(nc,bs,xo,Kl,Vu,Ol,Rn,_a))){var Hl=nc-Ns[0],ac=bs-Ns[1],aa=Vu-Ns[0],Oo=Ol-Ns[1],qo=1/l(v((Hl*aa+ac*Oo)/(u(Hl*Hl+ac*ac)*u(aa*aa+Oo*Oo)))/2),ql=u(Ns[0]*Ns[0]+Ns[1]*Ns[1]);Ks=s(cl,(Ma-ql)/(qo-1)),zs=s(cl,(_o-ql)/(qo+1))}}us>c?zs>c?(Io=x(xo,Kl,nc,bs,_o,zs,ko),ls=x(Vu,Ol,Rn,_a,_o,zs,ko),Li.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zs<cl?Li.arc(Io.cx,Io.cy,zs,i(Io.y01,Io.x01),i(ls.y01,ls.x01),!ko):(Li.arc(Io.cx,Io.cy,zs,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!ko),Li.arc(0,0,_o,i(Io.cy+Io.y11,Io.cx+Io.x11),i(ls.cy+ls.y11,ls.cx+ls.x11),!ko),Li.arc(ls.cx,ls.cy,zs,i(ls.y11,ls.x11),i(ls.y01,ls.x01),!ko))):(Li.moveTo(nc,bs),Li.arc(0,0,_o,Ds,Fs,!ko)):Li.moveTo(nc,bs),!(Ma>c)||!(zl>c)?Li.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,Ol,Ma,-Ks,ko),ls=x(nc,bs,xo,Kl,Ma,-Ks,ko),Li.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks<cl?Li.arc(Io.cx,Io.cy,Ks,i(Io.y01,Io.x01),i(ls.y01,ls.x01),!ko):(Li.arc(Io.cx,Io.cy,Ks,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!ko),Li.arc(0,0,Ma,i(Io.cy+Io.y11,Io.cx+Io.x11),i(ls.cy+ls.y11,ls.cx+ls.x11),ko),Li.arc(ls.cx,ls.cy,Ks,i(ls.y11,ls.x11),i(ls.y01,ls.x01),!ko))):Li.arc(0,0,Ma,ul,ll,ko)}if(Li.closePath(),ya)return Li=null,ya+\"\"||null}return _n.centroid=function(){var ya=(+Mt.apply(this,arguments)+ +kr.apply(this,arguments))/2,$n=(+hn.apply(this,arguments)+ +An.apply(this,arguments))/2-f/2;return[a($n)*ya,l($n)*ya]},_n.innerRadius=function(ya){return arguments.length?(Mt=typeof ya==\"function\"?ya:r(+ya),_n):Mt},_n.outerRadius=function(ya){return arguments.length?(kr=typeof ya==\"function\"?ya:r(+ya),_n):kr},_n.cornerRadius=function(ya){return arguments.length?(Jr=typeof ya==\"function\"?ya:r(+ya),_n):Jr},_n.padRadius=function(ya){return arguments.length?(vi=ya==null?null:typeof ya==\"function\"?ya:r(+ya),_n):vi},_n.startAngle=function(ya){return arguments.length?(hn=typeof ya==\"function\"?ya:r(+ya),_n):hn},_n.endAngle=function(ya){return arguments.length?(An=typeof ya==\"function\"?ya:r(+ya),_n):An},_n.padAngle=function(ya){return arguments.length?(Mn=typeof ya==\"function\"?ya:r(+ya),_n):Mn},_n.context=function(ya){return arguments.length?(Li=ya==null?null:ya,_n):Li},_n}function M(Mt){this._context=Mt}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;default:this._context.lineTo(Mt,kr);break}}};function g(Mt){return new M(Mt)}function P(Mt){return Mt[0]}function A(Mt){return Mt[1]}function z(){var Mt=P,kr=A,Jr=r(!0),vi=null,hn=g,An=null;function Mn(Li){var _n,ya=Li.length,$n,Ma=!1,_o;for(vi==null&&(An=hn(_o=t.path())),_n=0;_n<=ya;++_n)!(_n<ya&&Jr($n=Li[_n],_n,Li))===Ma&&((Ma=!Ma)?An.lineStart():An.lineEnd()),Ma&&An.point(+Mt($n,_n,Li),+kr($n,_n,Li));if(_o)return An=null,_o+\"\"||null}return Mn.x=function(Li){return arguments.length?(Mt=typeof Li==\"function\"?Li:r(+Li),Mn):Mt},Mn.y=function(Li){return arguments.length?(kr=typeof Li==\"function\"?Li:r(+Li),Mn):kr},Mn.defined=function(Li){return arguments.length?(Jr=typeof Li==\"function\"?Li:r(!!Li),Mn):Jr},Mn.curve=function(Li){return arguments.length?(hn=Li,vi!=null&&(An=hn(vi)),Mn):hn},Mn.context=function(Li){return arguments.length?(Li==null?vi=An=null:An=hn(vi=Li),Mn):vi},Mn}function O(){var Mt=P,kr=null,Jr=r(0),vi=A,hn=r(!0),An=null,Mn=g,Li=null;function _n($n){var Ma,_o,No,po=$n.length,Lo,ko=!1,Ds,Fs=new Array(po),ll=new Array(po);for(An==null&&(Li=Mn(Ds=t.path())),Ma=0;Ma<=po;++Ma){if(!(Ma<po&&hn(Lo=$n[Ma],Ma,$n))===ko)if(ko=!ko)_o=Ma,Li.areaStart(),Li.lineStart();else{for(Li.lineEnd(),Li.lineStart(),No=Ma-1;No>=_o;--No)Li.point(Fs[No],ll[No]);Li.lineEnd(),Li.areaEnd()}ko&&(Fs[Ma]=+Mt(Lo,Ma,$n),ll[Ma]=+Jr(Lo,Ma,$n),Li.point(kr?+kr(Lo,Ma,$n):Fs[Ma],vi?+vi(Lo,Ma,$n):ll[Ma]))}if(Ds)return Li=null,Ds+\"\"||null}function ya(){return z().defined(hn).curve(Mn).context(An)}return _n.x=function($n){return arguments.length?(Mt=typeof $n==\"function\"?$n:r(+$n),kr=null,_n):Mt},_n.x0=function($n){return arguments.length?(Mt=typeof $n==\"function\"?$n:r(+$n),_n):Mt},_n.x1=function($n){return arguments.length?(kr=$n==null?null:typeof $n==\"function\"?$n:r(+$n),_n):kr},_n.y=function($n){return arguments.length?(Jr=typeof $n==\"function\"?$n:r(+$n),vi=null,_n):Jr},_n.y0=function($n){return arguments.length?(Jr=typeof $n==\"function\"?$n:r(+$n),_n):Jr},_n.y1=function($n){return arguments.length?(vi=$n==null?null:typeof $n==\"function\"?$n:r(+$n),_n):vi},_n.lineX0=_n.lineY0=function(){return ya().x(Mt).y(Jr)},_n.lineY1=function(){return ya().x(Mt).y(vi)},_n.lineX1=function(){return ya().x(kr).y(Jr)},_n.defined=function($n){return arguments.length?(hn=typeof $n==\"function\"?$n:r(!!$n),_n):hn},_n.curve=function($n){return arguments.length?(Mn=$n,An!=null&&(Li=Mn(An)),_n):Mn},_n.context=function($n){return arguments.length?($n==null?An=Li=null:Li=Mn(An=$n),_n):An},_n}function U(Mt,kr){return kr<Mt?-1:kr>Mt?1:kr>=Mt?0:NaN}function G(Mt){return Mt}function Z(){var Mt=G,kr=U,Jr=null,vi=r(0),hn=r(d),An=r(0);function Mn(Li){var _n,ya=Li.length,$n,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+vi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,An.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n<ya;++_n)(ul=po[No[_n]=_n]=+Mt(Li[_n],_n,Li))>0&&(_o+=ul);for(kr!=null?No.sort(function(zl,us){return kr(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(Li[zl],Li[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n<ya;++_n,Lo=Ds)$n=No[_n],ul=po[$n],Ds=Lo+(ul>0?ul*Ma:0)+ll,po[$n]={data:Li[$n],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return Mn.value=function(Li){return arguments.length?(Mt=typeof Li==\"function\"?Li:r(+Li),Mn):Mt},Mn.sortValues=function(Li){return arguments.length?(kr=Li,Jr=null,Mn):kr},Mn.sort=function(Li){return arguments.length?(Jr=Li,kr=null,Mn):Jr},Mn.startAngle=function(Li){return arguments.length?(vi=typeof Li==\"function\"?Li:r(+Li),Mn):vi},Mn.endAngle=function(Li){return arguments.length?(hn=typeof Li==\"function\"?Li:r(+Li),Mn):hn},Mn.padAngle=function(Li){return arguments.length?(An=typeof Li==\"function\"?Li:r(+Li),Mn):An},Mn}var j=H(g);function N(Mt){this._curve=Mt}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Mt,kr){this._curve.point(kr*Math.sin(Mt),kr*-Math.cos(Mt))}};function H(Mt){function kr(Jr){return new N(Mt(Jr))}return kr._curve=Mt,kr}function re(Mt){var kr=Mt.curve;return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt.curve=function(Jr){return arguments.length?kr(H(Jr)):kr()._curve},Mt}function oe(){return re(z().curve(j))}function _e(){var Mt=O().curve(j),kr=Mt.curve,Jr=Mt.lineX0,vi=Mt.lineX1,hn=Mt.lineY0,An=Mt.lineY1;return Mt.angle=Mt.x,delete Mt.x,Mt.startAngle=Mt.x0,delete Mt.x0,Mt.endAngle=Mt.x1,delete Mt.x1,Mt.radius=Mt.y,delete Mt.y,Mt.innerRadius=Mt.y0,delete Mt.y0,Mt.outerRadius=Mt.y1,delete Mt.y1,Mt.lineStartAngle=function(){return re(Jr())},delete Mt.lineX0,Mt.lineEndAngle=function(){return re(vi())},delete Mt.lineX1,Mt.lineInnerRadius=function(){return re(hn())},delete Mt.lineY0,Mt.lineOuterRadius=function(){return re(An())},delete Mt.lineY1,Mt.curve=function(Mn){return arguments.length?kr(H(Mn)):kr()._curve},Mt}function Ce(Mt,kr){return[(kr=+kr)*Math.cos(Mt-=Math.PI/2),kr*Math.sin(Mt)]}var Le=Array.prototype.slice;function ge(Mt){return Mt.source}function ie(Mt){return Mt.target}function Se(Mt){var kr=ge,Jr=ie,vi=P,hn=A,An=null;function Mn(){var Li,_n=Le.call(arguments),ya=kr.apply(this,_n),$n=Jr.apply(this,_n);if(An||(An=Li=t.path()),Mt(An,+vi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+vi.apply(this,(_n[0]=$n,_n)),+hn.apply(this,_n)),Li)return An=null,Li+\"\"||null}return Mn.source=function(Li){return arguments.length?(kr=Li,Mn):kr},Mn.target=function(Li){return arguments.length?(Jr=Li,Mn):Jr},Mn.x=function(Li){return arguments.length?(vi=typeof Li==\"function\"?Li:r(+Li),Mn):vi},Mn.y=function(Li){return arguments.length?(hn=typeof Li==\"function\"?Li:r(+Li),Mn):hn},Mn.context=function(Li){return arguments.length?(An=Li==null?null:Li,Mn):An},Mn}function Ee(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr=(kr+vi)/2,Jr,kr,hn,vi,hn)}function Ae(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr,Jr=(Jr+hn)/2,vi,Jr,vi,hn)}function Be(Mt,kr,Jr,vi,hn){var An=Ce(kr,Jr),Mn=Ce(kr,Jr=(Jr+hn)/2),Li=Ce(vi,Jr),_n=Ce(vi,hn);Mt.moveTo(An[0],An[1]),Mt.bezierCurveTo(Mn[0],Mn[1],Li[0],Li[1],_n[0],_n[1])}function Pe(){return Se(Ee)}function me(){return Se(Ae)}function De(){var Mt=Se(Be);return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt}var ce={draw:function(Mt,kr){var Jr=Math.sqrt(kr/f);Mt.moveTo(Jr,0),Mt.arc(0,0,Jr,0,d)}},je={draw:function(Mt,kr){var Jr=Math.sqrt(kr/5)/2;Mt.moveTo(-3*Jr,-Jr),Mt.lineTo(-Jr,-Jr),Mt.lineTo(-Jr,-3*Jr),Mt.lineTo(Jr,-3*Jr),Mt.lineTo(Jr,-Jr),Mt.lineTo(3*Jr,-Jr),Mt.lineTo(3*Jr,Jr),Mt.lineTo(Jr,Jr),Mt.lineTo(Jr,3*Jr),Mt.lineTo(-Jr,3*Jr),Mt.lineTo(-Jr,Jr),Mt.lineTo(-3*Jr,Jr),Mt.closePath()}},lt=Math.sqrt(1/3),pt=lt*2,Vt={draw:function(Mt,kr){var Jr=Math.sqrt(kr/pt),vi=Jr*lt;Mt.moveTo(0,-Jr),Mt.lineTo(vi,0),Mt.lineTo(0,Jr),Mt.lineTo(-vi,0),Mt.closePath()}},ot=.8908130915292852,ut=Math.sin(f/10)/Math.sin(7*f/10),Wt=Math.sin(d/10)*ut,Nt=-Math.cos(d/10)*ut,$t={draw:function(Mt,kr){var Jr=Math.sqrt(kr*ot),vi=Wt*Jr,hn=Nt*Jr;Mt.moveTo(0,-Jr),Mt.lineTo(vi,hn);for(var An=1;An<5;++An){var Mn=d*An/5,Li=Math.cos(Mn),_n=Math.sin(Mn);Mt.lineTo(_n*Jr,-Li*Jr),Mt.lineTo(Li*vi-_n*hn,_n*vi+Li*hn)}Mt.closePath()}},sr={draw:function(Mt,kr){var Jr=Math.sqrt(kr),vi=-Jr/2;Mt.rect(vi,vi,Jr,Jr)}},Tr=Math.sqrt(3),fr={draw:function(Mt,kr){var Jr=-Math.sqrt(kr/(Tr*3));Mt.moveTo(0,Jr*2),Mt.lineTo(-Tr*Jr,-Jr),Mt.lineTo(Tr*Jr,-Jr),Mt.closePath()}},$e=-.5,St=Math.sqrt(3)/2,Qt=1/Math.sqrt(12),Gt=(Qt/2+1)*3,_t={draw:function(Mt,kr){var Jr=Math.sqrt(kr/Gt),vi=Jr/2,hn=Jr*Qt,An=vi,Mn=Jr*Qt+Jr,Li=-An,_n=Mn;Mt.moveTo(vi,hn),Mt.lineTo(An,Mn),Mt.lineTo(Li,_n),Mt.lineTo($e*vi-St*hn,St*vi+$e*hn),Mt.lineTo($e*An-St*Mn,St*An+$e*Mn),Mt.lineTo($e*Li-St*_n,St*Li+$e*_n),Mt.lineTo($e*vi+St*hn,$e*hn-St*vi),Mt.lineTo($e*An+St*Mn,$e*Mn-St*An),Mt.lineTo($e*Li+St*_n,$e*_n-St*Li),Mt.closePath()}},It=[ce,je,Vt,sr,$t,fr,_t];function mt(){var Mt=r(ce),kr=r(64),Jr=null;function vi(){var hn;if(Jr||(Jr=hn=t.path()),Mt.apply(this,arguments).draw(Jr,+kr.apply(this,arguments)),hn)return Jr=null,hn+\"\"||null}return vi.type=function(hn){return arguments.length?(Mt=typeof hn==\"function\"?hn:r(hn),vi):Mt},vi.size=function(hn){return arguments.length?(kr=typeof hn==\"function\"?hn:r(+hn),vi):kr},vi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,vi):Jr},vi}function er(){}function lr(Mt,kr,Jr){Mt._context.bezierCurveTo((2*Mt._x0+Mt._x1)/3,(2*Mt._y0+Mt._y1)/3,(Mt._x0+2*Mt._x1)/3,(Mt._y0+2*Mt._y1)/3,(Mt._x0+4*Mt._x1+kr)/6,(Mt._y0+4*Mt._y1+Jr)/6)}function wr(Mt){this._context=Mt}wr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Lr(Mt){return new wr(Mt)}function ti(Mt){this._context=Mt}ti.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x2=Mt,this._y2=kr;break;case 1:this._point=2,this._x3=Mt,this._y3=kr;break;case 2:this._point=3,this._x4=Mt,this._y4=kr,this._context.moveTo((this._x0+4*this._x1+Mt)/6,(this._y0+4*this._y1+kr)/6);break;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Br(Mt){return new ti(Mt)}function Vr(Mt){this._context=Mt}Vr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Mt)/6,vi=(this._y0+4*this._y1+kr)/6;this._line?this._context.lineTo(Jr,vi):this._context.moveTo(Jr,vi);break;case 3:this._point=4;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function dt(Mt){return new Vr(Mt)}function Ge(Mt,kr){this._basis=new wr(Mt),this._beta=kr}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length-1;if(Jr>0)for(var vi=Mt[0],hn=kr[0],An=Mt[Jr]-vi,Mn=kr[Jr]-hn,Li=-1,_n;++Li<=Jr;)_n=Li/Jr,this._basis.point(this._beta*Mt[Li]+(1-this._beta)*(vi+_n*An),this._beta*kr[Li]+(1-this._beta)*(hn+_n*Mn));this._x=this._y=null,this._basis.lineEnd()},point:function(Mt,kr){this._x.push(+Mt),this._y.push(+kr)}};var Je=function Mt(kr){function Jr(vi){return kr===1?new wr(vi):new Ge(vi,kr)}return Jr.beta=function(vi){return Mt(+vi)},Jr}(.85);function We(Mt,kr,Jr){Mt._context.bezierCurveTo(Mt._x1+Mt._k*(Mt._x2-Mt._x0),Mt._y1+Mt._k*(Mt._y2-Mt._y0),Mt._x2+Mt._k*(Mt._x1-kr),Mt._y2+Mt._k*(Mt._y1-Jr),Mt._x2,Mt._y2)}function tt(Mt,kr){this._context=Mt,this._k=(1-kr)/6}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:We(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2,this._x1=Mt,this._y1=kr;break;case 2:this._point=3;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xt=function Mt(kr){function Jr(vi){return new tt(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function Ie(Mt,kr){this._context=Mt,this._k=(1-kr)/6}Ie.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xe=function Mt(kr){function Jr(vi){return new Ie(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ke(Mt,kr){this._context=Mt,this._k=(1-kr)/6}ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vt=function Mt(kr){function Jr(vi){return new ke(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ir(Mt,kr,Jr){var vi=Mt._x1,hn=Mt._y1,An=Mt._x2,Mn=Mt._y2;if(Mt._l01_a>c){var Li=2*Mt._l01_2a+3*Mt._l01_a*Mt._l12_a+Mt._l12_2a,_n=3*Mt._l01_a*(Mt._l01_a+Mt._l12_a);vi=(vi*Li-Mt._x0*Mt._l12_2a+Mt._x2*Mt._l01_2a)/_n,hn=(hn*Li-Mt._y0*Mt._l12_2a+Mt._y2*Mt._l01_2a)/_n}if(Mt._l23_a>c){var ya=2*Mt._l23_2a+3*Mt._l23_a*Mt._l12_a+Mt._l12_2a,$n=3*Mt._l23_a*(Mt._l23_a+Mt._l12_a);An=(An*ya+Mt._x1*Mt._l23_2a-kr*Mt._l12_2a)/$n,Mn=(Mn*ya+Mt._y1*Mt._l23_2a-Jr*Mt._l12_2a)/$n}Mt._context.bezierCurveTo(vi,hn,An,Mn,Mt._x2,Mt._y2)}function ar(Mt,kr){this._context=Mt,this._alpha=kr}ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vr=function Mt(kr){function Jr(vi){return kr?new ar(vi,kr):new tt(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ii(Mt,kr){this._context=Mt,this._alpha=kr}ii.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var pi=function Mt(kr){function Jr(vi){return kr?new ii(vi,kr):new Ie(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function $r(Mt,kr){this._context=Mt,this._alpha=kr}$r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var di=function Mt(kr){function Jr(vi){return kr?new $r(vi,kr):new ke(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ji(Mt){this._context=Mt}ji.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Mt,kr){Mt=+Mt,kr=+kr,this._point?this._context.lineTo(Mt,kr):(this._point=1,this._context.moveTo(Mt,kr))}};function In(Mt){return new ji(Mt)}function wi(Mt){return Mt<0?-1:1}function On(Mt,kr,Jr){var vi=Mt._x1-Mt._x0,hn=kr-Mt._x1,An=(Mt._y1-Mt._y0)/(vi||hn<0&&-0),Mn=(Jr-Mt._y1)/(hn||vi<0&&-0),Li=(An*hn+Mn*vi)/(vi+hn);return(wi(An)+wi(Mn))*Math.min(Math.abs(An),Math.abs(Mn),.5*Math.abs(Li))||0}function qn(Mt,kr){var Jr=Mt._x1-Mt._x0;return Jr?(3*(Mt._y1-Mt._y0)/Jr-kr)/2:kr}function Fn(Mt,kr,Jr){var vi=Mt._x0,hn=Mt._y0,An=Mt._x1,Mn=Mt._y1,Li=(An-vi)/3;Mt._context.bezierCurveTo(vi+Li,hn+Li*kr,An-Li,Mn-Li*Jr,An,Mn)}function ra(Mt){this._context=Mt}ra.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Fn(this,this._t0,qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){var Jr=NaN;if(Mt=+Mt,kr=+kr,!(Mt===this._x1&&kr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3,Fn(this,qn(this,Jr=On(this,Mt,kr)),Jr);break;default:Fn(this,this._t0,Jr=On(this,Mt,kr));break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr,this._t0=Jr}}};function la(Mt){this._context=new Ut(Mt)}(la.prototype=Object.create(ra.prototype)).point=function(Mt,kr){ra.prototype.point.call(this,kr,Mt)};function Ut(Mt){this._context=Mt}Ut.prototype={moveTo:function(Mt,kr){this._context.moveTo(kr,Mt)},closePath:function(){this._context.closePath()},lineTo:function(Mt,kr){this._context.lineTo(kr,Mt)},bezierCurveTo:function(Mt,kr,Jr,vi,hn,An){this._context.bezierCurveTo(kr,Mt,vi,Jr,An,hn)}};function wt(Mt){return new ra(Mt)}function rr(Mt){return new la(Mt)}function nr(Mt){this._context=Mt}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length;if(Jr)if(this._line?this._context.lineTo(Mt[0],kr[0]):this._context.moveTo(Mt[0],kr[0]),Jr===2)this._context.lineTo(Mt[1],kr[1]);else for(var vi=Er(Mt),hn=Er(kr),An=0,Mn=1;Mn<Jr;++An,++Mn)this._context.bezierCurveTo(vi[0][An],hn[0][An],vi[1][An],hn[1][An],Mt[Mn],kr[Mn]);(this._line||this._line!==0&&Jr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(Mt,kr){this._x.push(+Mt),this._y.push(+kr)}};function Er(Mt){var kr,Jr=Mt.length-1,vi,hn=new Array(Jr),An=new Array(Jr),Mn=new Array(Jr);for(hn[0]=0,An[0]=2,Mn[0]=Mt[0]+2*Mt[1],kr=1;kr<Jr-1;++kr)hn[kr]=1,An[kr]=4,Mn[kr]=4*Mt[kr]+2*Mt[kr+1];for(hn[Jr-1]=2,An[Jr-1]=7,Mn[Jr-1]=8*Mt[Jr-1]+Mt[Jr],kr=1;kr<Jr;++kr)vi=hn[kr]/An[kr-1],An[kr]-=vi,Mn[kr]-=vi*Mn[kr-1];for(hn[Jr-1]=Mn[Jr-1]/An[Jr-1],kr=Jr-2;kr>=0;--kr)hn[kr]=(Mn[kr]-hn[kr+1])/An[kr];for(An[Jr-1]=(Mt[Jr]+hn[Jr-1])/2,kr=0;kr<Jr-1;++kr)An[kr]=2*Mt[kr+1]-hn[kr+1];return[hn,An]}function Xr(Mt){return new nr(Mt)}function ri(Mt,kr){this._context=Mt,this._t=kr}ri.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kr),this._context.lineTo(Mt,kr);else{var Jr=this._x*(1-this._t)+Mt*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,kr)}break}}this._x=Mt,this._y=kr}};function Qr(Mt){return new ri(Mt,.5)}function Oi(Mt){return new ri(Mt,0)}function $i(Mt){return new ri(Mt,1)}function tn(Mt,kr){if((Mn=Mt.length)>1)for(var Jr=1,vi,hn,An=Mt[kr[0]],Mn,Li=An.length;Jr<Mn;++Jr)for(hn=An,An=Mt[kr[Jr]],vi=0;vi<Li;++vi)An[vi][1]+=An[vi][0]=isNaN(hn[vi][1])?hn[vi][0]:hn[vi][1]}function fn(Mt){for(var kr=Mt.length,Jr=new Array(kr);--kr>=0;)Jr[kr]=kr;return Jr}function yn(Mt,kr){return Mt[kr]}function Sn(){var Mt=r([]),kr=fn,Jr=tn,vi=yn;function hn(An){var Mn=Mt.apply(this,arguments),Li,_n=An.length,ya=Mn.length,$n=new Array(ya),Ma;for(Li=0;Li<ya;++Li){for(var _o=Mn[Li],No=$n[Li]=new Array(_n),po=0,Lo;po<_n;++po)No[po]=Lo=[0,+vi(An[po],_o,po,An)],Lo.data=An[po];No.key=_o}for(Li=0,Ma=kr($n);Li<ya;++Li)$n[Ma[Li]].index=Li;return Jr($n,Ma),$n}return hn.keys=function(An){return arguments.length?(Mt=typeof An==\"function\"?An:r(Le.call(An)),hn):Mt},hn.value=function(An){return arguments.length?(vi=typeof An==\"function\"?An:r(+An),hn):vi},hn.order=function(An){return arguments.length?(kr=An==null?fn:typeof An==\"function\"?An:r(Le.call(An)),hn):kr},hn.offset=function(An){return arguments.length?(Jr=An==null?tn:An,hn):Jr},hn}function Ba(Mt,kr){if((vi=Mt.length)>0){for(var Jr,vi,hn=0,An=Mt[0].length,Mn;hn<An;++hn){for(Mn=Jr=0;Jr<vi;++Jr)Mn+=Mt[Jr][hn][1]||0;if(Mn)for(Jr=0;Jr<vi;++Jr)Mt[Jr][hn][1]/=Mn}tn(Mt,kr)}}function ua(Mt,kr){if((_n=Mt.length)>0)for(var Jr,vi=0,hn,An,Mn,Li,_n,ya=Mt[kr[0]].length;vi<ya;++vi)for(Mn=Li=0,Jr=0;Jr<_n;++Jr)(An=(hn=Mt[kr[Jr]][vi])[1]-hn[0])>0?(hn[0]=Mn,hn[1]=Mn+=An):An<0?(hn[1]=Li,hn[0]=Li+=An):(hn[0]=0,hn[1]=An)}function ma(Mt,kr){if((hn=Mt.length)>0){for(var Jr=0,vi=Mt[kr[0]],hn,An=vi.length;Jr<An;++Jr){for(var Mn=0,Li=0;Mn<hn;++Mn)Li+=Mt[Mn][Jr][1]||0;vi[Jr][1]+=vi[Jr][0]=-Li/2}tn(Mt,kr)}}function Wa(Mt,kr){if(!(!((Mn=Mt.length)>0)||!((An=(hn=Mt[kr[0]]).length)>0))){for(var Jr=0,vi=1,hn,An,Mn;vi<An;++vi){for(var Li=0,_n=0,ya=0;Li<Mn;++Li){for(var $n=Mt[kr[Li]],Ma=$n[vi][1]||0,_o=$n[vi-1][1]||0,No=(Ma-_o)/2,po=0;po<Li;++po){var Lo=Mt[kr[po]],ko=Lo[vi][1]||0,Ds=Lo[vi-1][1]||0;No+=ko-Ds}_n+=Ma,ya+=No*Ma}hn[vi-1][1]+=hn[vi-1][0]=Jr,_n&&(Jr-=ya/_n)}hn[vi-1][1]+=hn[vi-1][0]=Jr,tn(Mt,kr)}}function Fa(Mt){var kr=Mt.map(Xo);return fn(Mt).sort(function(Jr,vi){return kr[Jr]-kr[vi]})}function Xo(Mt){for(var kr=-1,Jr=0,vi=Mt.length,hn,An=-1/0;++kr<vi;)(hn=+Mt[kr][1])>An&&(An=hn,Jr=kr);return Jr}function da(Mt){var kr=Mt.map(Wn);return fn(Mt).sort(function(Jr,vi){return kr[Jr]-kr[vi]})}function Wn(Mt){for(var kr=0,Jr=-1,vi=Mt.length,hn;++Jr<vi;)(hn=+Mt[Jr][1])&&(kr+=hn);return kr}function Ha(Mt){return da(Mt).reverse()}function vo(Mt){var kr=Mt.length,Jr,vi,hn=Mt.map(Wn),An=Fa(Mt),Mn=0,Li=0,_n=[],ya=[];for(Jr=0;Jr<kr;++Jr)vi=An[Jr],Mn<Li?(Mn+=hn[vi],_n.push(vi)):(Li+=hn[vi],ya.push(vi));return ya.reverse().concat(_n)}function jn(Mt){return fn(Mt).reverse()}e.arc=C,e.area=O,e.areaRadial=_e,e.curveBasis=Lr,e.curveBasisClosed=Br,e.curveBasisOpen=dt,e.curveBundle=Je,e.curveCardinal=xt,e.curveCardinalClosed=xe,e.curveCardinalOpen=vt,e.curveCatmullRom=vr,e.curveCatmullRomClosed=pi,e.curveCatmullRomOpen=di,e.curveLinear=g,e.curveLinearClosed=In,e.curveMonotoneX=wt,e.curveMonotoneY=rr,e.curveNatural=Xr,e.curveStep=Qr,e.curveStepAfter=$i,e.curveStepBefore=Oi,e.line=z,e.lineRadial=oe,e.linkHorizontal=Pe,e.linkRadial=De,e.linkVertical=me,e.pie=Z,e.pointRadial=Ce,e.radialArea=_e,e.radialLine=oe,e.stack=Sn,e.stackOffsetDiverging=ua,e.stackOffsetExpand=Ba,e.stackOffsetNone=tn,e.stackOffsetSilhouette=ma,e.stackOffsetWiggle=Wa,e.stackOrderAppearance=Fa,e.stackOrderAscending=da,e.stackOrderDescending=Ha,e.stackOrderInsideOut=vo,e.stackOrderNone=fn,e.stackOrderReverse=jn,e.symbol=mt,e.symbolCircle=ce,e.symbolCross=je,e.symbolDiamond=Vt,e.symbolSquare=sr,e.symbolStar=$t,e.symbolTriangle=fr,e.symbolWye=_t,e.symbols=It,Object.defineProperty(e,\"__esModule\",{value:!0})})});var YWe=ye((C7,ZWe)=>{(function(e,t){typeof C7==\"object\"&&typeof ZWe!=\"undefined\"?t(C7,hk(),T7(),$J()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(C7,function(e,t,r,n){\"use strict\";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function _(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function E(g){return g.links}function T(g,P){var A=g.get(P);if(!A)throw new Error(\"missing: \"+P);return A}var L=function(){var g=0,P=0,A=1,z=1,O=24,U=8,G=p,Z=s,j=k,N=E,H=32,re=2/3;function oe(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),Ce(Se),Le(Se),ge(Se,H),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se==\"function\"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se==\"function\"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(O=+Se,oe):O},oe.nodePadding=function(Se){return arguments.length?(U=+Se,oe):U},oe.nodes=function(Se){return arguments.length?(j=typeof Se==\"function\"?Se:u(Se),oe):j},oe.links=function(Se){return arguments.length?(N=typeof Se==\"function\"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,A=+Se[0],z=+Se[1],oe):[A-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],A=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[A,z]]},oe.iterations=function(Se){return arguments.length?(H=+Se,oe):H};function _e(Se){Se.nodes.forEach(function(Ae,Be){Ae.index=Be,Ae.sourceLinks=[],Ae.targetLinks=[]});var Ee=r.map(Se.nodes,G);Se.links.forEach(function(Ae,Be){Ae.index=Be;var Pe=Ae.source,me=Ae.target;typeof Pe!=\"object\"&&(Pe=Ae.source=T(Ee,Pe)),typeof me!=\"object\"&&(me=Ae.target=T(Ee,me)),Pe.sourceLinks.push(Ae),me.targetLinks.push(Ae)})}function Ce(Se){Se.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Le(Se){var Ee,Ae,Be;for(Ee=Se.nodes,Ae=[],Be=0;Ee.length;++Be,Ee=Ae,Ae=[])Ee.forEach(function(me){me.depth=Be,me.sourceLinks.forEach(function(De){Ae.indexOf(De.target)<0&&Ae.push(De.target)})});for(Ee=Se.nodes,Ae=[],Be=0;Ee.length;++Be,Ee=Ae,Ae=[])Ee.forEach(function(me){me.height=Be,me.targetLinks.forEach(function(De){Ae.indexOf(De.source)<0&&Ae.push(De.source)})});var Pe=(A-g-O)/(Be-1);Se.nodes.forEach(function(me){me.x1=(me.x0=g+Math.max(0,Math.min(Be-1,Math.floor(Z.call(null,me,Be))))*Pe)+O})}function ge(Se){var Ee=r.nest().key(function(je){return je.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(je){return je.values});Pe(),ce();for(var Ae=1,Be=H;Be>0;--Be)De(Ae*=.99),ce(),me(Ae),ce();function Pe(){var je=t.max(Ee,function(Vt){return Vt.length}),lt=re*(z-P)/(je-1);U>lt&&(U=lt);var pt=t.min(Ee,function(Vt){return(z-P-(Vt.length-1)*U)/t.sum(Vt,d)});Ee.forEach(function(Vt){Vt.forEach(function(ot,ut){ot.y1=(ot.y0=ut)+ot.value*pt})}),Se.links.forEach(function(Vt){Vt.width=Vt.value*pt})}function me(je){Ee.forEach(function(lt){lt.forEach(function(pt){if(pt.targetLinks.length){var Vt=(t.sum(pt.targetLinks,_)/t.sum(pt.targetLinks,d)-v(pt))*je;pt.y0+=Vt,pt.y1+=Vt}})})}function De(je){Ee.slice().reverse().forEach(function(lt){lt.forEach(function(pt){if(pt.sourceLinks.length){var Vt=(t.sum(pt.sourceLinks,b)/t.sum(pt.sourceLinks,d)-v(pt))*je;pt.y0+=Vt,pt.y1+=Vt}})})}function ce(){Ee.forEach(function(je){var lt,pt,Vt=P,ot=je.length,ut;for(je.sort(h),ut=0;ut<ot;++ut)lt=je[ut],pt=Vt-lt.y0,pt>0&&(lt.y0+=pt,lt.y1+=pt),Vt=lt.y1+U;if(pt=Vt-U-z,pt>0)for(Vt=lt.y0-=pt,lt.y1-=pt,ut=ot-2;ut>=0;--ut)lt=je[ut],pt=lt.y1+U-Vt,pt>0&&(lt.y0-=pt,lt.y1-=pt),Vt=lt.y0})}}function ie(Se){Se.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Se.nodes.forEach(function(Ee){var Ae=Ee.y0,Be=Ae;Ee.sourceLinks.forEach(function(Pe){Pe.y0=Ae+Pe.width/2,Ae+=Pe.width}),Ee.targetLinks.forEach(function(Pe){Pe.y1=Be+Pe.width/2,Be+=Pe.width})})}return oe};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var M=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,\"__esModule\",{value:!0})})});var JWe=ye((f2r,KWe)=>{var WZt=JJ();KWe.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(T){delete o[E][T],a[T]&&u(T)})}function c(E){var T=!1;i.push(E),a[E]=!0;var L,x;for(L=0;L<s[E].length;L++)x=s[E][L],x===l?(f(l,i),T=!0):a[x]||(T=c(x));if(T)u(E);else for(L=0;L<s[E].length;L++){x=s[E][L];var C=o[x];C||(C={},o[x]=C),C[x]=!0}return i.pop(),T}function f(E,T){var L=[].concat(T).concat(E);r?r(c):n.push(L)}function h(E){for(var T=0;T<t.length;T++)T<E&&(t[T]=[]),t[T]=t[T].filter(function(L){return L>=E})}function d(E){h(E);for(var T=t,L=WZt(T),x=L.components.filter(function(O){return O.length>1}),C=1/0,M,g=0;g<x.length;g++)for(var P=0;P<x[g].length;P++)x[g][P]<C&&(C=x[g][P],M=g);var A=x[M];if(!A)return!1;var z=t.map(function(O,U){return A.indexOf(U)===-1?[]:O.filter(function(G){return A.indexOf(G)!==-1})});return{leastVertex:C,adjList:z}}l=0;for(var v=t.length;l<v;){var _=d(l);if(l=_.leastVertex,s=_.adjList,s){for(var b=0;b<s.length;b++)for(var p=0;p<s[b].length;p++){var k=s[b][p];a[+k]=!1,o[k]={}}c(l),l=l+1}else l=v}if(!r)return n}});var QWe=ye((L7,$We)=>{(function(e,t){typeof L7==\"object\"&&typeof $We!=\"undefined\"?t(L7,hk(),T7(),$J(),JWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(L7,function(e,t,r,n,i){\"use strict\";i=i&&i.hasOwnProperty(\"default\")?i.default:i;function a(ot){return ot.target.depth}function o(ot){return ot.depth}function s(ot,ut){return ut-1-ot.height}function l(ot,ut){return ot.sourceLinks.length?ot.depth:ut-1}function u(ot){return ot.targetLinks.length?ot.depth:ot.sourceLinks.length?t.min(ot.sourceLinks,a)-1:0}function c(ot){return function(){return ot}}var f=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol==\"function\"&&ot.constructor===Symbol&&ot!==Symbol.prototype?\"symbol\":typeof ot};function h(ot,ut){return v(ot.source,ut.source)||ot.index-ut.index}function d(ot,ut){return v(ot.target,ut.target)||ot.index-ut.index}function v(ot,ut){return ot.partOfCycle===ut.partOfCycle?ot.y0-ut.y0:ot.circularLinkType===\"top\"||ut.circularLinkType===\"bottom\"?-1:1}function _(ot){return ot.value}function b(ot){return(ot.y0+ot.y1)/2}function p(ot){return b(ot.source)}function k(ot){return b(ot.target)}function E(ot){return ot.index}function T(ot){return ot.nodes}function L(ot){return ot.links}function x(ot,ut){var Wt=ot.get(ut);if(!Wt)throw new Error(\"missing: \"+ut);return Wt}function C(ot,ut){return ut(ot)}var M=25,g=10,P=.3;function A(){var ot=0,ut=0,Wt=1,Nt=1,$t=24,sr,Tr=E,fr=l,$e=T,St=L,Qt=32,Gt=2,_t,It=null;function mt(){var dt={nodes:$e.apply(null,arguments),links:St.apply(null,arguments)};er(dt),z(dt,Tr,It),lr(dt),ti(dt),O(dt,Tr),Br(dt,Qt,Tr),Vr(dt);for(var Ge=4,Je=0;Je<Ge;Je++)De(dt,Nt,Tr),ce(dt,Nt,Tr),Be(dt,ut,Nt,Tr),De(dt,Nt,Tr),ce(dt,Nt,Tr);return Vt(dt,ut,Nt),H(dt,Gt,Nt,Tr),dt}mt.nodeId=function(dt){return arguments.length?(Tr=typeof dt==\"function\"?dt:c(dt),mt):Tr},mt.nodeAlign=function(dt){return arguments.length?(fr=typeof dt==\"function\"?dt:c(dt),mt):fr},mt.nodeWidth=function(dt){return arguments.length?($t=+dt,mt):$t},mt.nodePadding=function(dt){return arguments.length?(sr=+dt,mt):sr},mt.nodes=function(dt){return arguments.length?($e=typeof dt==\"function\"?dt:c(dt),mt):$e},mt.links=function(dt){return arguments.length?(St=typeof dt==\"function\"?dt:c(dt),mt):St},mt.size=function(dt){return arguments.length?(ot=ut=0,Wt=+dt[0],Nt=+dt[1],mt):[Wt-ot,Nt-ut]},mt.extent=function(dt){return arguments.length?(ot=+dt[0][0],Wt=+dt[1][0],ut=+dt[0][1],Nt=+dt[1][1],mt):[[ot,ut],[Wt,Nt]]},mt.iterations=function(dt){return arguments.length?(Qt=+dt,mt):Qt},mt.circularLinkGap=function(dt){return arguments.length?(Gt=+dt,mt):Gt},mt.nodePaddingRatio=function(dt){return arguments.length?(_t=+dt,mt):_t},mt.sortNodes=function(dt){return arguments.length?(It=dt,mt):It},mt.update=function(dt){return O(dt,Tr),Vr(dt),dt.links.forEach(function(Ge){Ge.circular&&(Ge.circularLinkType=Ge.y0+Ge.y1<Nt?\"top\":\"bottom\",Ge.source.circularLinkType=Ge.circularLinkType,Ge.target.circularLinkType=Ge.circularLinkType)}),De(dt,Nt,Tr,!1),ce(dt,Nt,Tr),H(dt,Gt,Nt,Tr),dt};function er(dt){dt.nodes.forEach(function(Je,We){Je.index=We,Je.sourceLinks=[],Je.targetLinks=[]});var Ge=r.map(dt.nodes,Tr);return dt.links.forEach(function(Je,We){Je.index=We;var tt=Je.source,xt=Je.target;(typeof tt==\"undefined\"?\"undefined\":f(tt))!==\"object\"&&(tt=Je.source=x(Ge,tt)),(typeof xt==\"undefined\"?\"undefined\":f(xt))!==\"object\"&&(xt=Je.target=x(Ge,xt)),tt.sourceLinks.push(Je),xt.targetLinks.push(Je)}),dt}function lr(dt){dt.nodes.forEach(function(Ge){Ge.partOfCycle=!1,Ge.value=Math.max(t.sum(Ge.sourceLinks,_),t.sum(Ge.targetLinks,_)),Ge.sourceLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)}),Ge.targetLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)})})}function wr(dt){var Ge=0,Je=0,We=0,tt=0,xt=t.max(dt.nodes,function(Ie){return Ie.column});return dt.links.forEach(function(Ie){Ie.circular&&(Ie.circularLinkType==\"top\"?Ge=Ge+Ie.width:Je=Je+Ie.width,Ie.target.column==0&&(tt=tt+Ie.width),Ie.source.column==xt&&(We=We+Ie.width))}),Ge=Ge>0?Ge+M+g:Ge,Je=Je>0?Je+M+g:Je,We=We>0?We+M+g:We,tt=tt>0?tt+M+g:tt,{top:Ge,bottom:Je,left:tt,right:We}}function Lr(dt,Ge){var Je=t.max(dt.nodes,function(vt){return vt.column}),We=Wt-ot,tt=Nt-ut,xt=We+Ge.right+Ge.left,Ie=tt+Ge.top+Ge.bottom,xe=We/xt,ke=tt/Ie;return ot=ot*xe+Ge.left,Wt=Ge.right==0?Wt:Wt*xe,ut=ut*ke+Ge.top,Nt=Nt*ke,dt.nodes.forEach(function(vt){vt.x0=ot+vt.column*((Wt-ot-$t)/Je),vt.x1=vt.x0+$t}),ke}function ti(dt){var Ge,Je,We;for(Ge=dt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(tt){tt.depth=We,tt.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=dt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(tt){tt.height=We,tt.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});dt.nodes.forEach(function(tt){tt.column=Math.floor(fr.call(null,tt,We))})}function Br(dt,Ge,Je){var We=r.nest().key(function(vt){return vt.column}).sortKeys(t.ascending).entries(dt.nodes).map(function(vt){return vt.values});Ie(Je),ke();for(var tt=1,xt=Ge;xt>0;--xt)xe(tt*=.99,Je),ke();function Ie(vt){if(_t){var ir=1/0;We.forEach(function(pi){var $r=Nt*_t/(pi.length+1);ir=$r<ir?$r:ir}),sr=ir}var ar=t.min(We,function(pi){return(Nt-ut-(pi.length-1)*sr)/t.sum(pi,_)});ar=ar*P,dt.links.forEach(function(pi){pi.width=pi.value*ar});var vr=wr(dt),ii=Lr(dt,vr);ar=ar*ii,dt.links.forEach(function(pi){pi.width=pi.value*ar}),We.forEach(function(pi){var $r=pi.length;pi.forEach(function(di,ji){di.depth==We.length-1&&$r==1||di.depth==0&&$r==1?(di.y0=Nt/2-di.value*ar,di.y1=di.y0+di.value*ar):di.partOfCycle?Z(di,vt)==0?(di.y0=Nt/2+ji,di.y1=di.y0+di.value*ar):di.circularLinkType==\"top\"?(di.y0=ut+ji,di.y1=di.y0+di.value*ar):(di.y0=Nt-di.value*ar-ji,di.y1=di.y0+di.value*ar):vr.top==0||vr.bottom==0?(di.y0=(Nt-ut)/$r*ji,di.y1=di.y0+di.value*ar):(di.y0=(Nt-ut)/2-$r/2+ji,di.y1=di.y0+di.value*ar)})})}function xe(vt,ir){var ar=We.length;We.forEach(function(vr){var ii=vr.length,pi=vr[0].depth;vr.forEach(function($r){var di;if(($r.sourceLinks.length||$r.targetLinks.length)&&!($r.partOfCycle&&Z($r,ir)>0))if(pi==0&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else if(pi==ar-1&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else{var ji=0,In=t.mean($r.sourceLinks,k),wi=t.mean($r.targetLinks,p);In&&wi?ji=(In+wi)/2:ji=In||wi;var On=(ji-b($r))*vt;$r.y0+=On,$r.y1+=On}})})}function ke(){We.forEach(function(vt){var ir,ar,vr=ut,ii=vt.length,pi;for(vt.sort(v),pi=0;pi<ii;++pi)ir=vt[pi],ar=vr-ir.y0,ar>0&&(ir.y0+=ar,ir.y1+=ar),vr=ir.y1+sr;if(ar=vr-sr-Nt,ar>0)for(vr=ir.y0-=ar,ir.y1-=ar,pi=ii-2;pi>=0;--pi)ir=vt[pi],ar=ir.y1+sr-vr,ar>0&&(ir.y0-=ar,ir.y1-=ar),vr=ir.y0})}}function Vr(dt){dt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),dt.nodes.forEach(function(Ge){var Je=Ge.y0,We=Je,tt=Ge.y1,xt=tt;Ge.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=tt-Ie.width/2,tt=tt-Ie.width):(Ie.y0=Je+Ie.width/2,Je+=Ie.width)}),Ge.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=xt-Ie.width/2,xt=xt-Ie.width):(Ie.y1=We+Ie.width/2,We+=Ie.width)})})}return mt}function z(ot,ut,Wt){var Nt=0;if(Wt===null){for(var $t=[],sr=0;sr<ot.links.length;sr++){var Tr=ot.links[sr],fr=Tr.source.index,$e=Tr.target.index;$t[fr]||($t[fr]=[]),$t[$e]||($t[$e]=[]),$t[fr].indexOf($e)===-1&&$t[fr].push($e)}var St=i($t);St.sort(function(It,mt){return It.length-mt.length});var Qt={};for(sr=0;sr<St.length;sr++){var Gt=St[sr],_t=Gt.slice(-2);Qt[_t[0]]||(Qt[_t[0]]={}),Qt[_t[0]][_t[1]]=!0}ot.links.forEach(function(It){var mt=It.target.index,er=It.source.index;mt===er||Qt[er]&&Qt[er][mt]?(It.circular=!0,It.circularLinkID=Nt,Nt=Nt+1):It.circular=!1})}else ot.links.forEach(function(It){It.source[Wt]<It.target[Wt]?It.circular=!1:(It.circular=!0,It.circularLinkID=Nt,Nt=Nt+1)})}function O(ot,ut){var Wt=0,Nt=0;ot.links.forEach(function($t){$t.circular&&($t.source.circularLinkType||$t.target.circularLinkType?$t.circularLinkType=$t.source.circularLinkType?$t.source.circularLinkType:$t.target.circularLinkType:$t.circularLinkType=Wt<Nt?\"top\":\"bottom\",$t.circularLinkType==\"top\"?Wt=Wt+1:Nt=Nt+1,ot.nodes.forEach(function(sr){(C(sr,ut)==C($t.source,ut)||C(sr,ut)==C($t.target,ut))&&(sr.circularLinkType=$t.circularLinkType)}))}),ot.links.forEach(function($t){$t.circular&&($t.source.circularLinkType==$t.target.circularLinkType&&($t.circularLinkType=$t.source.circularLinkType),pt($t,ut)&&($t.circularLinkType=$t.source.circularLinkType))})}function U(ot){var ut=Math.abs(ot.y1-ot.y0),Wt=Math.abs(ot.target.x0-ot.source.x1);return Math.atan(Wt/ut)}function G(ot,ut){return ot.source.column<ut.target.column?!1:!(ot.target.column>ut.source.column)}function Z(ot,ut){var Wt=0;ot.sourceLinks.forEach(function($t){Wt=$t.circular&&!pt($t,ut)?Wt+1:Wt});var Nt=0;return ot.targetLinks.forEach(function($t){Nt=$t.circular&&!pt($t,ut)?Nt+1:Nt}),Wt+Nt}function j(ot){var ut=ot.source.sourceLinks,Wt=0;ut.forEach(function(sr){Wt=sr.circular?Wt+1:Wt});var Nt=ot.target.targetLinks,$t=0;return Nt.forEach(function(sr){$t=sr.circular?$t+1:$t}),!(Wt>1||$t>1)}function N(ot,ut,Wt){return ot.sort(oe),ot.forEach(function(Nt,$t){var sr=0;if(pt(Nt,Wt)&&j(Nt))Nt.circularPathData.verticalBuffer=sr+Nt.width/2;else{var Tr=0;for(Tr;Tr<$t;Tr++)if(G(ot[$t],ot[Tr])){var fr=ot[Tr].circularPathData.verticalBuffer+ot[Tr].width/2+ut;sr=fr>sr?fr:sr}Nt.circularPathData.verticalBuffer=sr+Nt.width/2}}),ot}function H(ot,ut,Wt,Nt){var $t=5,sr=t.min(ot.links,function($e){return $e.source.y0});ot.links.forEach(function($e){$e.circular&&($e.circularPathData={})});var Tr=ot.links.filter(function($e){return $e.circularLinkType==\"top\"});N(Tr,ut,Nt);var fr=ot.links.filter(function($e){return $e.circularLinkType==\"bottom\"});N(fr,ut,Nt),ot.links.forEach(function($e){if($e.circular){if($e.circularPathData.arcRadius=$e.width+g,$e.circularPathData.leftNodeBuffer=$t,$e.circularPathData.rightNodeBuffer=$t,$e.circularPathData.sourceWidth=$e.source.x1-$e.source.x0,$e.circularPathData.sourceX=$e.source.x0+$e.circularPathData.sourceWidth,$e.circularPathData.targetX=$e.target.x0,$e.circularPathData.sourceY=$e.y0,$e.circularPathData.targetY=$e.y1,pt($e,Nt)&&j($e))$e.circularPathData.leftSmallArcRadius=g+$e.width/2,$e.circularPathData.leftLargeArcRadius=g+$e.width/2,$e.circularPathData.rightSmallArcRadius=g+$e.width/2,$e.circularPathData.rightLargeArcRadius=g+$e.width/2,$e.circularLinkType==\"bottom\"?($e.circularPathData.verticalFullExtent=$e.source.y1+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=$e.source.y0-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius);else{var St=$e.source.column,Qt=$e.circularLinkType,Gt=ot.links.filter(function(mt){return mt.source.column==St&&mt.circularLinkType==Qt});$e.circularLinkType==\"bottom\"?Gt.sort(Ce):Gt.sort(_e);var _t=0;Gt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.leftSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.leftLargeArcRadius=g+$e.width/2+er*ut+_t),_t=_t+mt.width}),St=$e.target.column,Gt=ot.links.filter(function(mt){return mt.target.column==St&&mt.circularLinkType==Qt}),$e.circularLinkType==\"bottom\"?Gt.sort(ge):Gt.sort(Le),_t=0,Gt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.rightSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.rightLargeArcRadius=g+$e.width/2+er*ut+_t),_t=_t+mt.width}),$e.circularLinkType==\"bottom\"?($e.circularPathData.verticalFullExtent=Math.max(Wt,$e.source.y1,$e.target.y1)+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=sr-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius)}$e.circularPathData.leftInnerExtent=$e.circularPathData.sourceX+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightInnerExtent=$e.circularPathData.targetX-$e.circularPathData.rightNodeBuffer,$e.circularPathData.leftFullExtent=$e.circularPathData.sourceX+$e.circularPathData.leftLargeArcRadius+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightFullExtent=$e.circularPathData.targetX-$e.circularPathData.rightLargeArcRadius-$e.circularPathData.rightNodeBuffer}if($e.circular)$e.path=re($e);else{var It=n.linkHorizontal().source(function(mt){var er=mt.source.x0+(mt.source.x1-mt.source.x0),lr=mt.y0;return[er,lr]}).target(function(mt){var er=mt.target.x0,lr=mt.y1;return[er,lr]});$e.path=It($e)}})}function re(ot){var ut=\"\";return ot.circularLinkType==\"top\"?ut=\"M\"+ot.circularPathData.sourceX+\" \"+ot.circularPathData.sourceY+\" L\"+ot.circularPathData.leftInnerExtent+\" \"+ot.circularPathData.sourceY+\" A\"+ot.circularPathData.leftLargeArcRadius+\" \"+ot.circularPathData.leftSmallArcRadius+\" 0 0 0 \"+ot.circularPathData.leftFullExtent+\" \"+(ot.circularPathData.sourceY-ot.circularPathData.leftSmallArcRadius)+\" L\"+ot.circularPathData.leftFullExtent+\" \"+ot.circularPathData.verticalLeftInnerExtent+\" A\"+ot.circularPathData.leftLargeArcRadius+\" \"+ot.circularPathData.leftLargeArcRadius+\" 0 0 0 \"+ot.circularPathData.leftInnerExtent+\" \"+ot.circularPathData.verticalFullExtent+\" L\"+ot.circularPathData.rightInnerExtent+\" \"+ot.circularPathData.verticalFullExtent+\" A\"+ot.circularPathData.rightLargeArcRadius+\" \"+ot.circularPathData.rightLargeArcRadius+\" 0 0 0 \"+ot.circularPathData.rightFullExtent+\" \"+ot.circularPathData.verticalRightInnerExtent+\" L\"+ot.circularPathData.rightFullExtent+\" \"+(ot.circularPathData.targetY-ot.circularPathData.rightSmallArcRadius)+\" A\"+ot.circularPathData.rightLargeArcRadius+\" \"+ot.circularPathData.rightSmallArcRadius+\" 0 0 0 \"+ot.circularPathData.rightInnerExtent+\" \"+ot.circularPathData.targetY+\" L\"+ot.circularPathData.targetX+\" \"+ot.circularPathData.targetY:ut=\"M\"+ot.circularPathData.sourceX+\" \"+ot.circularPathData.sourceY+\" L\"+ot.circularPathData.leftInnerExtent+\" \"+ot.circularPathData.sourceY+\" A\"+ot.circularPathData.leftLargeArcRadius+\" \"+ot.circularPathData.leftSmallArcRadius+\" 0 0 1 \"+ot.circularPathData.leftFullExtent+\" \"+(ot.circularPathData.sourceY+ot.circularPathData.leftSmallArcRadius)+\" L\"+ot.circularPathData.leftFullExtent+\" \"+ot.circularPathData.verticalLeftInnerExtent+\" A\"+ot.circularPathData.leftLargeArcRadius+\" \"+ot.circularPathData.leftLargeArcRadius+\" 0 0 1 \"+ot.circularPathData.leftInnerExtent+\" \"+ot.circularPathData.verticalFullExtent+\" L\"+ot.circularPathData.rightInnerExtent+\" \"+ot.circularPathData.verticalFullExtent+\" A\"+ot.circularPathData.rightLargeArcRadius+\" \"+ot.circularPathData.rightLargeArcRadius+\" 0 0 1 \"+ot.circularPathData.rightFullExtent+\" \"+ot.circularPathData.verticalRightInnerExtent+\" L\"+ot.circularPathData.rightFullExtent+\" \"+(ot.circularPathData.targetY+ot.circularPathData.rightSmallArcRadius)+\" A\"+ot.circularPathData.rightLargeArcRadius+\" \"+ot.circularPathData.rightSmallArcRadius+\" 0 0 1 \"+ot.circularPathData.rightInnerExtent+\" \"+ot.circularPathData.targetY+\" L\"+ot.circularPathData.targetX+\" \"+ot.circularPathData.targetY,ut}function oe(ot,ut){return ie(ot)==ie(ut)?ot.circularLinkType==\"bottom\"?Ce(ot,ut):_e(ot,ut):ie(ut)-ie(ot)}function _e(ot,ut){return ot.y0-ut.y0}function Ce(ot,ut){return ut.y0-ot.y0}function Le(ot,ut){return ot.y1-ut.y1}function ge(ot,ut){return ut.y1-ot.y1}function ie(ot){return ot.target.column-ot.source.column}function Se(ot){return ot.target.x0-ot.source.x1}function Ee(ot,ut){var Wt=U(ot),Nt=Se(ut)/Math.tan(Wt),$t=lt(ot)==\"up\"?ot.y1+Nt:ot.y1-Nt;return $t}function Ae(ot,ut){var Wt=U(ot),Nt=Se(ut)/Math.tan(Wt),$t=lt(ot)==\"up\"?ot.y1-Nt:ot.y1+Nt;return $t}function Be(ot,ut,Wt,Nt){ot.links.forEach(function($t){if(!$t.circular&&$t.target.column-$t.source.column>1){var sr=$t.source.column+1,Tr=$t.target.column-1,fr=1,$e=Tr-sr+1;for(fr=1;sr<=Tr;sr++,fr++)ot.nodes.forEach(function(St){if(St.column==sr){var Qt=fr/($e+1),Gt=Math.pow(1-Qt,3),_t=3*Qt*Math.pow(1-Qt,2),It=3*Math.pow(Qt,2)*(1-Qt),mt=Math.pow(Qt,3),er=Gt*$t.y0+_t*$t.y0+It*$t.y1+mt*$t.y1,lr=er-$t.width/2,wr=er+$t.width/2,Lr;lr>St.y0&&lr<St.y1?(Lr=St.y1-lr+10,Lr=St.circularLinkType==\"bottom\"?Lr:-Lr,St=me(St,Lr,ut,Wt),ot.nodes.forEach(function(ti){C(ti,Nt)==C(St,Nt)||ti.column!=St.column||Pe(St,ti)&&me(ti,Lr,ut,Wt)})):wr>St.y0&&wr<St.y1?(Lr=wr-St.y0+10,St=me(St,Lr,ut,Wt),ot.nodes.forEach(function(ti){C(ti,Nt)==C(St,Nt)||ti.column!=St.column||ti.y0<St.y1&&ti.y1>St.y1&&me(ti,Lr,ut,Wt)})):lr<St.y0&&wr>St.y1&&(Lr=wr-St.y0+10,St=me(St,Lr,ut,Wt),ot.nodes.forEach(function(ti){C(ti,Nt)==C(St,Nt)||ti.column!=St.column||ti.y0<St.y1&&ti.y1>St.y1&&me(ti,Lr,ut,Wt)}))}})}})}function Pe(ot,ut){return ot.y0>ut.y0&&ot.y0<ut.y1||ot.y1>ut.y0&&ot.y1<ut.y1?!0:ot.y0<ut.y0&&ot.y1>ut.y1}function me(ot,ut,Wt,Nt){return ot.y0+ut>=Wt&&ot.y1+ut<=Nt&&(ot.y0=ot.y0+ut,ot.y1=ot.y1+ut,ot.targetLinks.forEach(function($t){$t.y1=$t.y1+ut}),ot.sourceLinks.forEach(function($t){$t.y0=$t.y0+ut})),ot}function De(ot,ut,Wt,Nt){ot.nodes.forEach(function($t){Nt&&$t.y+($t.y1-$t.y0)>ut&&($t.y=$t.y-($t.y+($t.y1-$t.y0)-ut));var sr=ot.links.filter(function($e){return C($e.source,Wt)==C($t,Wt)}),Tr=sr.length;Tr>1&&sr.sort(function($e,St){if(!$e.circular&&!St.circular){if($e.target.column==St.target.column)return $e.y1-St.y1;if(je($e,St)){if($e.target.column>St.target.column){var Qt=Ae(St,$e);return $e.y1-Qt}if(St.target.column>$e.target.column){var Gt=Ae($e,St);return Gt-St.y1}}else return $e.y1-St.y1}if($e.circular&&!St.circular)return $e.circularLinkType==\"top\"?-1:1;if(St.circular&&!$e.circular)return St.circularLinkType==\"top\"?1:-1;if($e.circular&&St.circular)return $e.circularLinkType===St.circularLinkType&&$e.circularLinkType==\"top\"?$e.target.column===St.target.column?$e.target.y1-St.target.y1:St.target.column-$e.target.column:$e.circularLinkType===St.circularLinkType&&$e.circularLinkType==\"bottom\"?$e.target.column===St.target.column?St.target.y1-$e.target.y1:$e.target.column-St.target.column:$e.circularLinkType==\"top\"?-1:1});var fr=$t.y0;sr.forEach(function($e){$e.y0=fr+$e.width/2,fr=fr+$e.width}),sr.forEach(function($e,St){if($e.circularLinkType==\"bottom\"){var Qt=St+1,Gt=0;for(Qt;Qt<Tr;Qt++)Gt=Gt+sr[Qt].width;$e.y0=$t.y1-Gt-$e.width/2}})})}function ce(ot,ut,Wt){ot.nodes.forEach(function(Nt){var $t=ot.links.filter(function(fr){return C(fr.target,Wt)==C(Nt,Wt)}),sr=$t.length;sr>1&&$t.sort(function(fr,$e){if(!fr.circular&&!$e.circular){if(fr.source.column==$e.source.column)return fr.y0-$e.y0;if(je(fr,$e)){if($e.source.column<fr.source.column){var St=Ee($e,fr);return fr.y0-St}if(fr.source.column<$e.source.column){var Qt=Ee(fr,$e);return Qt-$e.y0}}else return fr.y0-$e.y0}if(fr.circular&&!$e.circular)return fr.circularLinkType==\"top\"?-1:1;if($e.circular&&!fr.circular)return $e.circularLinkType==\"top\"?1:-1;if(fr.circular&&$e.circular)return fr.circularLinkType===$e.circularLinkType&&fr.circularLinkType==\"top\"?fr.source.column===$e.source.column?fr.source.y1-$e.source.y1:fr.source.column-$e.source.column:fr.circularLinkType===$e.circularLinkType&&fr.circularLinkType==\"bottom\"?fr.source.column===$e.source.column?fr.source.y1-$e.source.y1:$e.source.column-fr.source.column:fr.circularLinkType==\"top\"?-1:1});var Tr=Nt.y0;$t.forEach(function(fr){fr.y1=Tr+fr.width/2,Tr=Tr+fr.width}),$t.forEach(function(fr,$e){if(fr.circularLinkType==\"bottom\"){var St=$e+1,Qt=0;for(St;St<sr;St++)Qt=Qt+$t[St].width;fr.y1=Nt.y1-Qt-fr.width/2}})})}function je(ot,ut){return lt(ot)==lt(ut)}function lt(ot){return ot.y0-ot.y1>0?\"up\":\"down\"}function pt(ot,ut){return C(ot.source,ut)==C(ot.target,ut)}function Vt(ot,ut,Wt){var Nt=ot.nodes,$t=ot.links,sr=!1,Tr=!1;if($t.forEach(function(_t){_t.circularLinkType==\"top\"?sr=!0:_t.circularLinkType==\"bottom\"&&(Tr=!0)}),sr==!1||Tr==!1){var fr=t.min(Nt,function(_t){return _t.y0}),$e=t.max(Nt,function(_t){return _t.y1}),St=$e-fr,Qt=Wt-ut,Gt=Qt/St;Nt.forEach(function(_t){var It=(_t.y1-_t.y0)*Gt;_t.y0=(_t.y0-fr)*Gt,_t.y1=_t.y0+It}),$t.forEach(function(_t){_t.y0=(_t.y0-fr)*Gt,_t.y1=(_t.y1-fr)*Gt,_t.width=_t.width*Gt})}}e.sankeyCircular=A,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,\"__esModule\",{value:!0})})});var QJ=ye((h2r,eXe)=>{\"use strict\";eXe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"linear\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeLabel:\"node-label\"}}});var dXe=ye((d2r,hXe)=>{\"use strict\";var tXe=HWe(),XZt=(H2(),pb(G2)).interpolateNumber,O5=Oa(),aC=YWe(),ZZt=QWe(),Nu=QJ(),q5=fd(),gw=ka(),YZt=So(),w1=Dr(),r$=w1.strTranslate,KZt=w1.strRotate,i$=iy(),oC=i$.keyFun,P7=i$.repeat,sXe=i$.unwrap,rXe=Zl(),JZt=qa(),lXe=Dh(),$Zt=lXe.CAP_SHIFT,QZt=lXe.LINE_SPACING,eYt=3;function tYt(e,t,r){var n=sXe(t),i=n.trace,a=i.domain,o=i.orientation===\"h\",s=i.node.pad,l=i.node.thickness,u={justify:aC.sankeyJustify,left:aC.sankeyLeft,right:aC.sankeyRight,center:aC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,_;v?_=ZZt.sankeyCircular().circularLinkGap(0):_=aC.sankey(),_.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=_();_.nodePadding()<s&&w1.warn(\"node.pad was reduced to \",_.nodePadding(),\" to fit within the figure.\");var p,k,E;for(var T in n._groupLookup){var L=parseInt(n._groupLookup[T]),x;for(p=0;p<b.nodes.length;p++)if(b.nodes[p].pointNumber===L){x=b.nodes[p];break}if(x){var C={pointNumber:parseInt(T),x0:x.x0,x1:x.x1,y0:x.y0,y1:x.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};b.nodes.unshift(C),x.childrenNodes.unshift(C)}}function M(){for(p=0;p<b.nodes.length;p++){var U=b.nodes[p],G={},Z,j;for(k=0;k<U.targetLinks.length;k++)j=U.targetLinks[k],Z=j.source.pointNumber+\":\"+j.target.pointNumber,G.hasOwnProperty(Z)||(G[Z]=[]),G[Z].push(j);var N=Object.keys(G);for(k=0;k<N.length;k++){Z=N[k];var H=G[Z],re=0,oe={};for(E=0;E<H.length;E++)j=H[E],oe[j.label]||(oe[j.label]=0),oe[j.label]+=j.value,re+=j.value;for(E=0;E<H.length;E++)j=H[E],j.flow={value:re,labelConcentration:oe[j.label]/re,concentration:j.value/re,links:H},j.concentrationscale&&(j.color=q5(j.concentrationscale(j.flow.labelConcentration)))}var _e=0;for(k=0;k<U.sourceLinks.length;k++)_e+=U.sourceLinks[k].value;for(k=0;k<U.sourceLinks.length;k++)j=U.sourceLinks[k],j.concentrationOut=j.value/_e;var Ce=0;for(k=0;k<U.targetLinks.length;k++)Ce+=U.targetLinks[k].value;for(k=0;k<U.targetLinks.length;k++)j=U.targetLinks[k],j.concenrationIn=j.value/Ce}}M();function g(U){U.forEach(function(G){var Z,j,N=0,H=G.length,re;for(G.sort(function(oe,_e){return oe.y0-_e.y0}),re=0;re<H;++re)Z=G[re],Z.y0>=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(U){var G=U.map(function(_e,Ce){return{x0:_e.x0,index:Ce}}).sort(function(_e,Ce){return _e.x0-Ce.x0}),Z=[],j=-1,N,H=-1/0,re;for(p=0;p<G.length;p++){var oe=U[G[p].index];oe.x0>H+l&&(j+=1,N=oe.x0),H=oe.x0,Z[j]||(Z[j]=[]),Z[j].push(oe),re=N-oe.x0,oe.x0+=re,oe.x1+=re}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p<Math.min(i.node.x.length,i.node.y.length,b.nodes.length);p++)if(i.node.x[p]&&i.node.y[p]){var A=[i.node.x[p]*c,i.node.y[p]*f];b.nodes[p].x0=A[0]-l/2,b.nodes[p].x1=A[0]+l/2;var z=b.nodes[p].y1-b.nodes[p].y0;b.nodes[p].y0=A[1]-z/2,b.nodes[p].y1=A[1]+z/2}if(i.arrangement===\"snap\"){h=b.nodes;var O=P(h);g(O)}_.update(b)}return{circular:v,key:r,trace:i,guid:w1.randstr(),horizontal:o,width:c,height:f,nodePad:i.node.pad,nodeLineColor:i.node.line.color,nodeLineWidth:i.node.line.width,linkLineColor:i.link.line.color,linkLineWidth:i.link.line.width,linkArrowLength:i.link.arrowlen,valueFormat:i.valueformat,valueSuffix:i.valuesuffix,textFont:i.textfont,translateX:a.x[0]*e.width+e.margin.l,translateY:e.height-a.y[1]*e.height+e.margin.t,dragParallel:o?f:c,dragPerpendicular:o?c:f,arrangement:i.arrangement,sankey:_,graph:b,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function rYt(e,t,r){var n=q5(t.color),i=q5(t.hovercolor),a=t.source.label+\"|\"+t.target.label,o=a+\"__\"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:o,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:gw.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:gw.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:n$,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function iYt(e,t){var r=\"\",n=e.width/2,i=e.circularPathData,a=i.sourceX+i.verticalBuffer<i.targetX,o=i.rightFullExtent-i.rightLargeArcRadius-t<=i.leftFullExtent-n,s=Math.abs(i.rightFullExtent-i.leftFullExtent-n)<n;return e.circularLinkType===\"top\"?(r=\"M \"+(i.targetX-t)+\" \"+(i.targetY+n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.targetY+n)+\"A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightSmallArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent-n-t)+\" \"+(i.targetY-i.rightSmallArcRadius)+\"L \"+(i.rightFullExtent-n-t)+\" \"+i.verticalRightInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+\" L \"+(i.rightFullExtent+n-(i.rightLargeArcRadius-n)-t)+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 0 \"+(i.rightFullExtent-n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+\" L \"+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+\" \"+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 1 \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent-n)+\" L \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent,r+=\" L \"+(i.leftFullExtent+n)+\" \"+(i.sourceY-i.leftSmallArcRadius)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+i.leftInnerExtent+\" \"+(i.sourceY+n)+\" L \"+i.sourceX+\" \"+(i.sourceY+n)+\" L \"+i.sourceX+\" \"+(i.sourceY-n)+\" L \"+i.leftInnerExtent+\" \"+(i.sourceY-n)+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftSmallArcRadius-n)+\" 0 0 0 \"+(i.leftFullExtent-n)+\" \"+(i.sourceY-i.leftSmallArcRadius)+\" L \"+(i.leftFullExtent-n)+\" \"+i.verticalLeftInnerExtent,a&&o?r+=\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent-n)+\" \"+(i.verticalFullExtent+n)+\"L\"+(i.rightFullExtent+n-t)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightFullExtent-n-t)+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:r+=\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 0 \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent,r+=\" L \"+(i.rightFullExtent+n-t)+\" \"+(i.targetY-i.rightSmallArcRadius)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 0 \"+(i.rightInnerExtent-t)+\" \"+(i.targetY-n)+\" L \"+(i.targetX-t)+\" \"+(i.targetY-n)+(t>0?\" L \"+i.targetX+\" \"+i.targetY:\"\")+\"Z\"):(r=\"M \"+(i.targetX-t)+\" \"+(i.targetY-n)+\"  L \"+(i.rightInnerExtent-t)+\" \"+(i.targetY-n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightSmallArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent-n-t)+\" \"+(i.targetY+i.rightSmallArcRadius)+\" L \"+(i.rightFullExtent-n-t)+\" \"+i.verticalRightInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightInnerExtent-n-t)+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent:r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent+n)+\" L \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+i.verticalLeftInnerExtent,r+=\" L \"+(i.leftFullExtent+n)+\" \"+(i.sourceY+i.leftSmallArcRadius)+\" A \"+(i.leftLargeArcRadius+n)+\" \"+(i.leftSmallArcRadius+n)+\" 0 0 0 \"+i.leftInnerExtent+\" \"+(i.sourceY-n)+\" L \"+i.sourceX+\" \"+(i.sourceY-n)+\" L \"+i.sourceX+\" \"+(i.sourceY+n)+\" L \"+i.leftInnerExtent+\" \"+(i.sourceY+n)+\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent-n)+\" \"+(i.sourceY+i.leftSmallArcRadius)+\" L \"+(i.leftFullExtent-n)+\" \"+i.verticalLeftInnerExtent,a&&o?r+=\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:a?r+=\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.leftFullExtent+n)+\" \"+(i.verticalFullExtent+n)+\" L \"+(i.rightFullExtent-t-n)+\" \"+(i.verticalFullExtent+n)+\" A \"+(i.rightLargeArcRadius+n)+\" \"+(i.rightLargeArcRadius+n)+\" 0 0 0 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent:r+=\" A \"+(i.leftLargeArcRadius-n)+\" \"+(i.leftLargeArcRadius-n)+\" 0 0 1 \"+i.leftInnerExtent+\" \"+(i.verticalFullExtent-n)+\" L \"+(i.rightInnerExtent-t)+\" \"+(i.verticalFullExtent-n)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightLargeArcRadius-n)+\" 0 0 1 \"+(i.rightFullExtent+n-t)+\" \"+i.verticalRightInnerExtent,r+=\" L \"+(i.rightFullExtent+n-t)+\" \"+(i.targetY+i.rightSmallArcRadius)+\" A \"+(i.rightLargeArcRadius-n)+\" \"+(i.rightSmallArcRadius-n)+\" 0 0 1 \"+(i.rightInnerExtent-t)+\" \"+(i.targetY+n)+\" L \"+(i.targetX-t)+\" \"+(i.targetY+n)+(t>0?\" L \"+i.targetX+\" \"+i.targetY:\"\")+\"Z\"),r}function n$(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return iYt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=XZt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v=\"M\"+a+\",\"+c,_=\"C\"+l+\",\"+c+\" \"+u+\",\"+h+\" \"+o+\",\"+h,b=\"C\"+u+\",\"+d+\" \"+l+\",\"+f+\" \"+a+\",\"+f,p=n>0?\"L\"+(o+n)+\",\"+(h+r.link.width/2):\"\";return p+=\"L\"+o+\",\"+d,v+_+p+b+\"Z\"}return t}function nYt(e,t){var r=q5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s=\"node_\"+t.pointNumber;return t.group&&(s=w1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:gw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join(\"_\"),interactionState:e.interactionState,figure:e}}function t$(e){e.attr(\"transform\",function(t){return r$(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function aYt(e){e.call(t$)}function uXe(e,t){e.call(aYt),t.attr(\"d\",n$())}function iXe(e){e.attr(\"width\",function(t){return t.node.x1-t.node.x0}).attr(\"height\",function(t){return t.visibleHeight})}function e$(e){return e.link.width>1||e.linkLineWidth>0}function nXe(e){var t=r$(e.translateX,e.translateY);return t+(e.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function aXe(e,t,r){e.on(\".basic\",null).on(\"mouseover.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on(\"mousemove.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on(\"mouseout.basic\",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on(\"click.basic\",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function oYt(e,t,r,n){var i=O5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on(\"dragstart\",function(a){if(a.arrangement!==\"fixed\"&&(w1.ensureSingle(n._fullLayout._infolayer,\"g\",\"dragcover\",function(s){n._fullLayout._dragCover=s}),w1.raiseToTop(this),a.interactionState.dragInProgress=a.node,oXe(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement===\"snap\")){var o=a.traceId+\"|\"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):sYt(e,o,a,n),lYt(e,t,a,o,n)}}).on(\"drag\",function(a){if(a.arrangement!==\"fixed\"){var o=O5.event.x,s=O5.event.y;a.arrangement===\"snap\"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement===\"freeform\"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),oXe(a.node),a.arrangement!==\"snap\"&&(a.sankey.update(a.graph),uXe(e.filter(fXe(a)),t))}}).on(\"dragend\",function(a){if(a.arrangement!==\"fixed\"){a.interactionState.dragInProgress=!1;for(var o=0;o<a.node.childrenNodes.length;o++)a.node.childrenNodes[o].x=a.node.x,a.node.childrenNodes[o].y=a.node.y;a.arrangement!==\"snap\"&&cXe(a,n)}});e.on(\".drag\",null).call(i)}function sYt(e,t,r,n){fYt(r.graph.nodes);var i=r.graph.nodes.filter(function(a){return a.originalX===r.node.originalX}).filter(function(a){return!a.partOfGroup});r.forceLayouts[t]=tXe.forceSimulation(i).alphaDecay(0).force(\"collide\",tXe.forceCollide().radius(function(a){return a.dy/2+r.nodePad/2}).strength(1).iterations(Nu.forceIterations)).force(\"constrain\",uYt(e,t,i,r,n)).stop()}function lYt(e,t,r,n,i){window.requestAnimationFrame(function a(){var o;for(o=0;o<Nu.forceTicksPerFrame;o++)r.forceLayouts[n].tick();var s=r.graph.nodes;if(hYt(s),r.sankey.update(r.graph),uXe(e.filter(fXe(r)),t),r.forceLayouts[n].alpha()>0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,cXe(r,i)}})}function uYt(e,t,r,n){return function(){for(var a=0,o=0;o<r.length;o++){var s=r[o];s===n.interactionState.dragInProgress?(s.x=s.lastDraggedX,s.y=s.lastDraggedY):(s.vx=(s.originalX-s.x)/Nu.forceTicksPerFrame,s.y=Math.min(n.size-s.dy/2,Math.max(s.dy/2,s.y))),a=Math.max(a,Math.abs(s.vx),Math.abs(s.vy))}!n.interactionState.dragInProgress&&a<.1&&n.forceLayouts[t].alpha()>0&&n.forceLayouts[t].alpha(0)}}function cXe(e,t){for(var r=[],n=[],i=0;i<e.graph.nodes.length;i++){var a=(e.graph.nodes[i].x0+e.graph.nodes[i].x1)/2,o=(e.graph.nodes[i].y0+e.graph.nodes[i].y1)/2;r.push(a/e.figure.width),n.push(o/e.figure.height)}JZt.call(\"_guiRestyle\",t,{\"node.x\":[r],\"node.y\":[n]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function cYt(e){var t=[],r;for(r=0;r<e.length;r++)e[r].originalX=(e[r].x0+e[r].x1)/2,e[r].originalY=(e[r].y0+e[r].y1)/2,t.indexOf(e[r].originalX)===-1&&t.push(e[r].originalX);for(t.sort(function(n,i){return n-i}),r=0;r<e.length;r++)e[r].originalLayerIndex=t.indexOf(e[r].originalX),e[r].originalLayer=e[r].originalLayerIndex/(t.length-1)}function oXe(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function fXe(e){return function(t){return t.node.originalX===e.node.originalX}}function fYt(e){for(var t=0;t<e.length;t++)e[t].y=(e[t].y0+e[t].y1)/2,e[t].x=(e[t].x0+e[t].x1)/2}function hYt(e){for(var t=0;t<e.length;t++)e[t].y0=e[t].y-e[t].dy/2,e[t].y1=e[t].y0+e[t].dy,e[t].x0=e[t].x-e[t].dx/2,e[t].x1=e[t].x0+e[t].dx}hXe.exports=function(e,t,r,n,i){var a=e._context.staticPlot,o=!1;w1.ensureSingle(e._fullLayout._infolayer,\"g\",\"first-render\",function(){o=!0});var s=e._fullLayout._dragCover,l=r.filter(function(b){return sXe(b).trace.visible}).map(tYt.bind(null,n)),u=t.selectAll(\".\"+Nu.cn.sankey).data(l,oC);u.exit().remove(),u.enter().append(\"g\").classed(Nu.cn.sankey,!0).style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"shape-rendering\",\"geometricPrecision\").style(\"pointer-events\",a?\"none\":\"auto\").attr(\"transform\",nXe),u.each(function(b,p){e._fullData[p]._sankey=b;var k=\"bgsankey-\"+b.trace.uid+\"-\"+p;w1.ensureSingle(e._fullLayout._draggers,\"rect\",k),e._fullData[p]._bgRect=O5.select(\".\"+k),e._fullData[p]._bgRect.style(\"pointer-events\",a?\"none\":\"all\").attr(\"width\",b.width).attr(\"height\",b.height).attr(\"x\",b.translateX).attr(\"y\",b.translateY).classed(\"bgsankey\",!0).style({fill:\"transparent\",\"stroke-width\":0})}),u.transition().ease(Nu.ease).duration(Nu.duration).attr(\"transform\",nXe);var c=u.selectAll(\".\"+Nu.cn.sankeyLinks).data(P7,oC);c.enter().append(\"g\").classed(Nu.cn.sankeyLinks,!0).style(\"fill\",\"none\");var f=c.selectAll(\".\"+Nu.cn.sankeyLink).data(function(b){var p=b.graph.links;return p.filter(function(k){return k.value}).map(rYt.bind(null,b))},oC);f.enter().append(\"path\").classed(Nu.cn.sankeyLink,!0).call(aXe,u,i.linkEvents),f.style(\"stroke\",function(b){return e$(b)?gw.tinyRGB(q5(b.linkLineColor)):b.tinyColorHue}).style(\"stroke-opacity\",function(b){return e$(b)?gw.opacity(b.linkLineColor):b.tinyColorAlpha}).style(\"fill\",function(b){return b.tinyColorHue}).style(\"fill-opacity\",function(b){return b.tinyColorAlpha}).style(\"stroke-width\",function(b){return e$(b)?b.linkLineWidth:1}).attr(\"d\",n$()),f.style(\"opacity\",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",1),f.exit().transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",0).remove();var h=u.selectAll(\".\"+Nu.cn.sankeyNodeSet).data(P7,oC);h.enter().append(\"g\").classed(Nu.cn.sankeyNodeSet,!0),h.style(\"cursor\",function(b){switch(b.arrangement){case\"fixed\":return\"default\";case\"perpendicular\":return\"ns-resize\";default:return\"move\"}});var d=h.selectAll(\".\"+Nu.cn.sankeyNode).data(function(b){var p=b.graph.nodes;return cYt(p),p.map(nYt.bind(null,b))},oC);d.enter().append(\"g\").classed(Nu.cn.sankeyNode,!0).call(t$).style(\"opacity\",function(b){return(e._context.staticPlot||o)&&!b.partOfGroup?1:0}),d.call(aXe,u,i.nodeEvents).call(oYt,f,i,e),d.transition().ease(Nu.ease).duration(Nu.duration).call(t$).style(\"opacity\",function(b){return b.partOfGroup?0:1}),d.exit().transition().ease(Nu.ease).duration(Nu.duration).style(\"opacity\",0).remove();var v=d.selectAll(\".\"+Nu.cn.nodeRect).data(P7);v.enter().append(\"rect\").classed(Nu.cn.nodeRect,!0).call(iXe),v.style(\"stroke-width\",function(b){return b.nodeLineWidth}).style(\"stroke\",function(b){return gw.tinyRGB(q5(b.nodeLineColor))}).style(\"stroke-opacity\",function(b){return gw.opacity(b.nodeLineColor)}).style(\"fill\",function(b){return b.tinyColorHue}).style(\"fill-opacity\",function(b){return b.tinyColorAlpha}),v.transition().ease(Nu.ease).duration(Nu.duration).call(iXe);var _=d.selectAll(\".\"+Nu.cn.nodeLabel).data(P7);_.enter().append(\"text\").classed(Nu.cn.nodeLabel,!0).style(\"cursor\",\"default\"),_.attr(\"data-notex\",1).text(function(b){return b.node.label}).each(function(b){var p=O5.select(this);YZt.font(p,b.textFont),rXe.convertToTspans(p,e)}).attr(\"text-anchor\",function(b){return b.horizontal&&b.left?\"end\":\"start\"}).attr(\"transform\",function(b){var p=O5.select(this),k=rXe.lineCount(p),E=b.textFont.size*((k-1)*QZt-$Zt),T=b.nodeLineWidth/2+eYt,L=((b.horizontal?b.visibleHeight:b.visibleWidth)-E)/2;b.horizontal&&(b.left?T=-T:T+=b.visibleWidth);var x=b.horizontal?\"\":\"scale(-1,1)\"+KZt(90);return r$(b.horizontal?T:L,b.horizontal?L:T)+x}),_.transition().ease(Nu.ease).duration(Nu.duration)}});var s$=ye((v2r,wXe)=>{\"use strict\";var Zv=Oa(),o$=Dr(),I7=o$.numberFormat,dYt=dXe(),B5=vf(),vYt=ka(),Dx=QJ().cn,sC=o$._;function vXe(e){return e!==\"\"}function N5(e,t){return e.filter(function(r){return r.key===t.traceId})}function pXe(e,t){Zv.select(e).select(\"path\").style(\"fill-opacity\",t),Zv.select(e).select(\"rect\").style(\"fill-opacity\",t)}function gXe(e){Zv.select(e).select(\"text.name\").style(\"fill\",\"black\")}function mXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function yXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function _Xe(e,t,r){t&&r&&N5(r,t).selectAll(\".\"+Dx.sankeyLink).filter(mXe(t)).call(xXe.bind(0,t,r,!1))}function a$(e,t,r){t&&r&&N5(r,t).selectAll(\".\"+Dx.sankeyLink).filter(mXe(t)).call(bXe.bind(0,t,r,!1))}function xXe(e,t,r,n){n.style(\"fill\",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style(\"fill-opacity\",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==\"\"&&N5(t,e).selectAll(\".\"+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style(\"fill\",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style(\"fill-opacity\",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&N5(t,e).selectAll(\".\"+Dx.sankeyNode).filter(yXe(e)).call(_Xe)}function bXe(e,t,r,n){n.style(\"fill\",function(i){return i.tinyColorHue}).style(\"fill-opacity\",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==\"\"&&N5(t,e).selectAll(\".\"+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style(\"fill\",function(o){return o.tinyColorHue}).style(\"fill-opacity\",function(o){return o.tinyColorAlpha})}),r&&N5(t,e).selectAll(Dx.sankeyNode).filter(yXe(e)).call(a$)}function kf(e,t){var r=e.hoverlabel||{},n=o$.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}wXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o<t._fullData.length;o++)if(t._fullData[o].visible&&t._fullData[o].type===Dx.sankey&&!t._fullData[o]._viewInitial){var s=t._fullData[o].node;t._fullData[o]._viewInitial={node:{groups:s.groups.slice(),x:s.x.slice(),y:s.y.slice()}}}var l=function(L,x){var C=x.link;C.originalEvent=Zv.event,t._hoverdata=[C],B5.click(t,{target:!0})},u=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(xXe.bind(0,x,C,!0)),x.link.trace.link.hoverinfo!==\"skip\"&&(x.link.fullData=x.link.trace,t.emit(\"plotly_hover\",{event:Zv.event,points:[x.link]})))},c=sC(t,\"source:\")+\" \",f=sC(t,\"target:\")+\" \",h=sC(t,\"concentration:\")+\" \",d=sC(t,\"incoming flow count:\")+\" \",v=sC(t,\"outgoing flow count:\")+\" \",_=function(L,x){if(t._fullLayout.hovermode===!1)return;var C=x.link.trace.link;if(C.hoverinfo===\"none\"||C.hoverinfo===\"skip\")return;var M=[];function g(Z){var j,N;Z.circular?(j=(Z.circularPathData.leftInnerExtent+Z.circularPathData.rightInnerExtent)/2,N=Z.circularPathData.verticalFullExtent):(j=(Z.source.x1+Z.target.x0)/2,N=(Z.y0+Z.y1)/2);var H=[j,N];return Z.trace.orientation===\"v\"&&H.reverse(),H[0]+=x.parent.translateX,H[1]+=x.parent.translateY,H}for(var P=0,A=0;A<x.flow.links.length;A++){var z=x.flow.links[A];if(!(t._fullLayout.hovermode===\"closest\"&&x.link.pointNumber!==z.pointNumber)){x.link.pointNumber===z.pointNumber&&(P=A),z.fullData=z.trace,C=x.link.trace.link;var O=g(z),U={valueLabel:I7(x.valueFormat)(z.value)+x.valueSuffix};M.push({x:O[0],y:O[1],name:U.valueLabel,text:[z.label||\"\",c+z.source.label,f+z.target.label,z.concentrationscale?h+I7(\"%0.2f\")(z.flow.labelConcentration):\"\"].filter(vXe).join(\"<br>\"),color:kf(C,\"bgcolor\")||vYt.addOpacity(z.color,1),borderColor:kf(C,\"bordercolor\"),fontFamily:kf(C,\"font.family\"),fontSize:kf(C,\"font.size\"),fontColor:kf(C,\"font.color\"),fontWeight:kf(C,\"font.weight\"),fontStyle:kf(C,\"font.style\"),fontVariant:kf(C,\"font.variant\"),fontTextcase:kf(C,\"font.textcase\"),fontLineposition:kf(C,\"font.lineposition\"),fontShadow:kf(C,\"font.shadow\"),nameLength:kf(C,\"namelength\"),textAlign:kf(C,\"align\"),idealAlign:Zv.event.x<O[0]?\"right\":\"left\",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[z]})}}var G=B5.loneHover(M,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,anchorIndex:P});G.each(function(){var Z=this;x.link.concentrationscale||pXe(Z,.65),gXe(Z)})},b=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(bXe.bind(0,x,C,!0)),x.link.trace.link.hoverinfo!==\"skip\"&&(x.link.fullData=x.link.trace,t.emit(\"plotly_unhover\",{event:Zv.event,points:[x.link]})),B5.loneUnhover(n._hoverlayer.node()))},p=function(L,x,C){var M=x.node;M.originalEvent=Zv.event,t._hoverdata=[M],Zv.select(L).call(a$,x,C),B5.click(t,{target:!0})},k=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(_Xe,x,C),x.node.trace.node.hoverinfo!==\"skip\"&&(x.node.fullData=x.node.trace,t.emit(\"plotly_hover\",{event:Zv.event,points:[x.node]})))},E=function(L,x){if(t._fullLayout.hovermode!==!1){var C=x.node.trace.node;if(!(C.hoverinfo===\"none\"||C.hoverinfo===\"skip\")){var M=Zv.select(L).select(\".\"+Dx.nodeRect),g=t._fullLayout._paperdiv.node().getBoundingClientRect(),P=M.node().getBoundingClientRect(),A=P.left-2-g.left,z=P.right+2-g.left,O=P.top+P.height/4-g.top,U={valueLabel:I7(x.valueFormat)(x.node.value)+x.valueSuffix};x.node.fullData=x.node.trace,t._fullLayout._calcInverseTransform(t);var G=t._fullLayout._invScaleX,Z=t._fullLayout._invScaleY,j=B5.loneHover({x0:G*A,x1:G*z,y:Z*O,name:I7(x.valueFormat)(x.node.value)+x.valueSuffix,text:[x.node.label,d+x.node.targetLinks.length,v+x.node.sourceLinks.length].filter(vXe).join(\"<br>\"),color:kf(C,\"bgcolor\")||x.tinyColorHue,borderColor:kf(C,\"bordercolor\"),fontFamily:kf(C,\"font.family\"),fontSize:kf(C,\"font.size\"),fontColor:kf(C,\"font.color\"),fontWeight:kf(C,\"font.weight\"),fontStyle:kf(C,\"font.style\"),fontVariant:kf(C,\"font.variant\"),fontTextcase:kf(C,\"font.textcase\"),fontLineposition:kf(C,\"font.lineposition\"),fontShadow:kf(C,\"font.shadow\"),nameLength:kf(C,\"namelength\"),textAlign:kf(C,\"align\"),idealAlign:\"left\",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});pXe(j,.85),gXe(j)}}},T=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(a$,x,C),x.node.trace.node.hoverinfo!==\"skip\"&&(x.node.fullData=x.node.trace,t.emit(\"plotly_unhover\",{event:Zv.event,points:[x.node]})),B5.loneUnhover(n._hoverlayer.node()))};dYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:_,unhover:b,select:l},nodeEvents:{hover:k,follow:E,unhover:T,select:p}})}});var TXe=ye(mw=>{\"use strict\";var pYt=mc().overrideAll,gYt=Id().getModuleCalcData,mYt=s$(),yYt=W1(),_Yt=Eg(),xYt=yv(),bYt=Of().prepSelect,l$=Dr(),wYt=qa(),R7=\"sankey\";mw.name=R7;mw.baseLayoutAttrOverrides=pYt({hoverlabel:yYt.hoverlabel},\"plot\",\"nested\");mw.plot=function(e){var t=gYt(e.calcdata,R7)[0];mYt(e,t),mw.updateFx(e)};mw.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&(n._paperdiv.selectAll(\".sankey\").remove(),n._paperdiv.selectAll(\".bgsankey\").remove())};mw.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)TYt(e,t)};function TYt(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,a=n.dragmode===\"pan\"?\"move\":\"crosshair\",o=r._bgRect;if(o&&!(i===\"pan\"||i===\"zoom\")){_Yt(o,a);var s={_id:\"x\",c2p:l$.identity,_offset:r._sankey.translateX,_length:r._sankey.width},l={_id:\"y\",c2p:l$.identity,_offset:r._sankey.translateY,_length:r._sankey.height},u={gd:e,element:o.node(),plotinfo:{id:t,xaxis:s,yaxis:l,fillRangeItems:l$.noop},subplot:t,xaxes:[s],yaxes:[l],doneFnCompleted:function(c){var f=e._fullData[t],h,d=f.node.groups.slice(),v=[];function _(E){for(var T=f._sankey.graph.nodes,L=0;L<T.length;L++)if(T[L].pointNumber===E)return T[L]}for(var b=0;b<c.length;b++){var p=_(c[b].pointNumber);if(p)if(p.group){for(var k=0;k<p.childrenNodes.length;k++)v.push(p.childrenNodes[k].pointNumber);d[p.pointNumber-f.node._count]=!1}else v.push(p.pointNumber)}h=d.filter(Boolean).concat([v]),wYt.call(\"_guiRestyle\",e,{\"node.groups\":[h]},t)}};u.prepFn=function(c,f,h){bYt(c,f,h,u,i)},xYt.init(u)}}});var SXe=ye((g2r,AXe)=>{\"use strict\";AXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s<o.length;s++){var l=o[s];if(!l.partOfGroup){var u=[(l.x0+l.x1)/2,(l.y0+l.y1)/2];a.orientation===\"v\"&&u.reverse(),r&&r.contains(u,!1,s,t)&&i.push({pointNumber:l.pointNumber})}}return i}});var EXe=ye((m2r,MXe)=>{\"use strict\";MXe.exports={attributes:KJ(),supplyDefaults:LWe(),calc:FWe(),plot:s$(),moduleType:\"trace\",name:\"sankey\",basePlotModule:TXe(),selectPoints:SXe(),categories:[\"noOpacity\"],meta:{}}});var CXe=ye((y2r,kXe)=>{\"use strict\";kXe.exports=EXe()});var PXe=ye(U5=>{\"use strict\";var LXe=Mc();U5.name=\"indicator\";U5.plot=function(e,t,r,n){LXe.plotBasePlot(U5.name,e,t,r,n)};U5.clean=function(e,t,r,n){LXe.cleanBasePlot(U5.name,e,t,r,n)}});var c$=ye((x2r,OXe)=>{\"use strict\";var Fx=Ao().extendFlat,RXe=Ao().extendDeep,AYt=mc().overrideAll,DXe=ec(),FXe=Ih(),SYt=Cc().attributes,Nf=Rd(),MYt=vl().templatedArray,D7=JT(),IXe=df().descriptionOnlyNumbers,u$=DXe({editType:\"plot\",colorEditType:\"plot\"}),lC={color:{valType:\"color\",editType:\"plot\"},line:{color:{valType:\"color\",dflt:FXe.defaultLine,editType:\"plot\"},width:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"calc\"},thickness:{valType:\"number\",min:0,max:1,dflt:1,editType:\"plot\"},editType:\"calc\"},zXe={valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],editType:\"plot\"},EYt=MYt(\"step\",RXe({},lC,{range:zXe}));OXe.exports={mode:{valType:\"flaglist\",editType:\"calc\",flags:[\"number\",\"delta\",\"gauge\"],dflt:\"number\"},value:{valType:\"number\",editType:\"calc\",anim:!0},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},domain:SYt({name:\"indicator\",trace:!0,editType:\"calc\"}),title:{text:{valType:\"string\",editType:\"plot\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],editType:\"plot\"},font:Fx({},u$,{}),editType:\"plot\"},number:{valueformat:{valType:\"string\",dflt:\"\",editType:\"plot\",description:IXe(\"value\")},font:Fx({},u$,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"plot\"},delta:{reference:{valType:\"number\",editType:\"calc\"},position:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],dflt:\"bottom\",editType:\"plot\"},relative:{valType:\"boolean\",editType:\"plot\",dflt:!1},valueformat:{valType:\"string\",editType:\"plot\",description:IXe(\"value\")},increasing:{symbol:{valType:\"string\",dflt:D7.INCREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:D7.INCREASING.COLOR,editType:\"plot\"},editType:\"plot\"},decreasing:{symbol:{valType:\"string\",dflt:D7.DECREASING.SYMBOL,editType:\"plot\"},color:{valType:\"color\",dflt:D7.DECREASING.COLOR,editType:\"plot\"},editType:\"plot\"},font:Fx({},u$,{}),prefix:{valType:\"string\",dflt:\"\",editType:\"plot\"},suffix:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"calc\"},gauge:{shape:{valType:\"enumerated\",editType:\"plot\",dflt:\"angular\",values:[\"angular\",\"bullet\"]},bar:RXe({},lC,{color:{dflt:\"green\"}}),bgcolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:FXe.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},axis:AYt({range:zXe,visible:Fx({},Nf.visible,{dflt:!0}),tickmode:Nf.minor.tickmode,nticks:Nf.nticks,tick0:Nf.tick0,dtick:Nf.dtick,tickvals:Nf.tickvals,ticktext:Nf.ticktext,ticks:Fx({},Nf.ticks,{dflt:\"outside\"}),ticklen:Nf.ticklen,tickwidth:Nf.tickwidth,tickcolor:Nf.tickcolor,ticklabelstep:Nf.ticklabelstep,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,tickfont:DXe({}),tickangle:Nf.tickangle,tickformat:Nf.tickformat,tickformatstops:Nf.tickformatstops,tickprefix:Nf.tickprefix,showtickprefix:Nf.showtickprefix,ticksuffix:Nf.ticksuffix,showticksuffix:Nf.showticksuffix,separatethousands:Nf.separatethousands,exponentformat:Nf.exponentformat,minexponent:Nf.minexponent,showexponent:Nf.showexponent,editType:\"plot\"},\"plot\"),steps:EYt,threshold:{line:{color:Fx({},lC.line.color,{}),width:Fx({},lC.line.width,{dflt:1}),editType:\"plot\"},thickness:Fx({},lC.thickness,{dflt:.85}),value:{valType:\"number\",editType:\"calc\",dflt:!1},editType:\"plot\"},editType:\"plot\"}}});var f$=ye((b2r,qXe)=>{\"use strict\";qXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var UXe=ye((w2r,NXe)=>{\"use strict\";var sy=Dr(),z7=c$(),kYt=Cc().defaults,BXe=vl(),CYt=Zd(),F7=f$(),LYt=Lb(),PYt=F3(),IYt=s_(),RYt=l_();function DYt(e,t,r,n){function i(x,C){return sy.coerce(e,t,z7,x,C)}kYt(t,n,i),i(\"mode\"),t._hasNumber=t.mode.indexOf(\"number\")!==-1,t._hasDelta=t.mode.indexOf(\"delta\")!==-1,t._hasGauge=t.mode.indexOf(\"gauge\")!==-1;var a=i(\"value\");t._range=[0,typeof a==\"number\"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i(\"number.valueformat\");var l=sy.extendFlat({},n.font);l.size=void 0,sy.coerceFont(i,\"number.font\",l),t.number.font.size===void 0&&(t.number.font.size=F7.defaultNumberFontSize,o[0]=!0),i(\"number.prefix\"),i(\"number.suffix\"),s=t.number.font.size}var u;if(t._hasDelta){var c=sy.extendFlat({},n.font);c.size=void 0,sy.coerceFont(i,\"delta.font\",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||F7.defaultNumberFontSize),o[1]=!0),i(\"delta.reference\",t.value),i(\"delta.relative\"),i(\"delta.valueformat\",t.delta.relative?\"2%\":\"\"),i(\"delta.increasing.symbol\"),i(\"delta.increasing.color\"),i(\"delta.decreasing.symbol\"),i(\"delta.decreasing.color\"),i(\"delta.position\"),i(\"delta.prefix\"),i(\"delta.suffix\"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=sy.extendFlat({},n.font);f.size=.25*(s||u||F7.defaultNumberFontSize),sy.coerceFont(i,\"title.font\",f),i(\"title.text\");var h,d,v,_;function b(x,C){return sy.coerce(h,d,z7.gauge,x,C)}function p(x,C){return sy.coerce(v,_,z7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=BXe.newContainer(t,\"gauge\"),b(\"shape\");var k=t._isBullet=t.gauge.shape===\"bullet\";k||i(\"title.align\",\"center\");var E=t._isAngular=t.gauge.shape===\"angular\";E||i(\"align\",\"center\"),b(\"bgcolor\",n.paper_bgcolor),b(\"borderwidth\"),b(\"bordercolor\"),b(\"bar.color\"),b(\"bar.line.color\"),b(\"bar.line.width\");var T=F7.valueThickness*(t.gauge.shape===\"bullet\"?.5:1);b(\"bar.thickness\",T),CYt(h,d,{name:\"steps\",handleItemDefaults:FYt}),b(\"threshold.value\"),b(\"threshold.thickness\"),b(\"threshold.line.width\"),b(\"threshold.line.color\"),v={},h&&(v=h.axis||{}),_=BXe.newContainer(d,\"axis\"),p(\"visible\"),t._range=p(\"range\",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};LYt(v,_,p,\"linear\"),RYt(v,_,p,\"linear\",L),IYt(v,_,p,\"linear\",L),PYt(v,_,p,L)}else i(\"title.align\",\"center\"),i(\"align\",\"center\"),t._isAngular=t._isBullet=!1;t._length=null}function FYt(e,t){function r(n,i){return sy.coerce(e,t,z7.gauge.steps,n,i)}r(\"color\"),r(\"line.color\"),r(\"line.width\"),r(\"range\"),r(\"thickness\")}NXe.exports={supplyDefaults:DYt}});var GXe=ye((T2r,VXe)=>{\"use strict\";function zYt(e,t){var r=[],n=t.value;typeof t._lastValue!=\"number\"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference==\"number\"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}VXe.exports={calc:zYt}});var YXe=ye((A2r,ZXe)=>{\"use strict\";var ww=Oa(),OYt=(H2(),pb(G2)).interpolate,HXe=(H2(),pb(G2)).interpolateNumber,zx=Dr(),qYt=zx.strScale,cC=zx.strTranslate,BYt=zx.rad2deg,NYt=Dh().MID_SHIFT,bw=So(),yw=f$(),q7=Zl(),sv=ho(),UYt=f4(),VYt=dI(),GYt=Rd(),V5=ka(),h$={left:\"start\",center:\"middle\",right:\"end\"},_w={left:0,center:.5,right:1},jXe=/[yzafpnµmkMGTPEZY]/;function fC(e){return e&&e.duration>0}ZXe.exports=function(t,r,n,i){var a=t._fullLayout,o;fC(n)&&i&&(o=i()),zx.makeTraceGroups(a._indicatorlayer,r,\"trace\").each(function(s){var l=s[0],u=l.trace,c=ww.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,_={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=_.l+_.w/2,p=_.t+_.h/2,k=Math.min(_.w/2,_.h),E=yw.innerRadius*k,T,L,x,C=u.align||\"center\";if(L=p,!f)T=_.l+_w[C]*_.w,x=function(j){return WXe(j,_.w,_.h)};else if(h&&(T=b,L=p+k/2,x=function(j){return ZYt(j,.9*E)}),d){var M=yw.bulletPadding,g=1-yw.bulletNumberDomainSize+M;T=_.l+(g+(1-g)*_w[C])*_.w,x=function(j){return WXe(j,(yw.bulletNumberDomainSize-M)*_.w,_.h)}}WYt(t,c,s,{numbersX:T,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,A;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},A={range:u.gauge.axis.range,color:\"rgba(0, 0, 0, 0)\",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll(\"g.angular\").data(h?s:[]);z.exit().remove();var O=c.selectAll(\"g.angularaxis\").data(h?s:[]);O.exit().remove(),h&&jYt(t,c,s,{radius:k,innerRadius:E,gauge:z,layer:O,size:_,gaugeBg:P,gaugeOutline:A,transitionOpts:n,onComplete:o});var U=c.selectAll(\"g.bullet\").data(d?s:[]);U.exit().remove();var G=c.selectAll(\"g.bulletaxis\").data(d?s:[]);G.exit().remove(),d&&HYt(t,c,s,{gauge:U,layer:G,size:_,gaugeBg:P,gaugeOutline:A,transitionOpts:n,onComplete:o});var Z=c.selectAll(\"text.title\").data(s);Z.exit().remove(),Z.enter().append(\"text\").classed(\"title\",!0),Z.attr(\"text-anchor\",function(){return d?h$.right:h$[u.title.align]}).text(u.title.text).call(bw.font,u.title.font).call(q7.convertToTspans,t),Z.attr(\"transform\",function(){var j=_.l+_.w*_w[u.title.align],N,H=yw.titlePadding,re=bw.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=bw.bBox(O.node());N=oe.top-H-re.bottom}else N=_.t+_.h/2-k/2-re.bottom-H;d&&(N=L-(re.top+re.bottom)/2,j=_.l-yw.bulletPadding*_.w)}else N=u._numbersTop-H-re.bottom;return cC(j,N)})})};function HYt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,_,b,p;a.enter().append(\"g\").classed(\"bullet\",!0),a.attr(\"transform\",cC(u.l,u.t)),o.enter().append(\"g\").classed(\"bulletaxis\",!0).classed(\"crisp\",!0),o.selectAll(\"g.xbulletaxistick,path,text\").remove();var k=u.h,E=i.gauge.bar.thickness*k,T=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-yw.bulletNumberDomainSize:1);d=uC(e,i.gauge.axis),d._id=\"xbulletaxis\",d.domain=[T,L],d.setScale(),v=sv.calcTicks(d),_=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks===\"inside\"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:_}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:_,labelFns:sv.makeLabelFns(d,p)}));function x(O){O.attr(\"width\",function(U){return Math.max(0,d.c2p(U.range[1])-d.c2p(U.range[0]))}).attr(\"x\",function(U){return d.c2p(U.range[0])}).attr(\"y\",function(U){return .5*(1-U.thickness)*k}).attr(\"height\",function(U){return U.thickness*k})}var C=[s].concat(i.gauge.steps),M=a.selectAll(\"g.bg-bullet\").data(C);M.enter().append(\"g\").classed(\"bg-bullet\",!0).append(\"rect\"),M.select(\"rect\").call(x).call(xw),M.exit().remove();var g=a.selectAll(\"g.value-bullet\").data([i.gauge.bar]);g.enter().append(\"g\").classed(\"value-bullet\",!0).append(\"rect\"),g.select(\"rect\").attr(\"height\",E).attr(\"y\",(k-E)/2).call(xw),fC(f)?g.select(\"rect\").transition().duration(f.duration).ease(f.easing).each(\"end\",function(){h&&h()}).each(\"interrupt\",function(){h&&h()}).attr(\"width\",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select(\"rect\").attr(\"width\",typeof r[0].y==\"number\"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),A=a.selectAll(\"g.threshold-bullet\").data(P);A.enter().append(\"g\").classed(\"threshold-bullet\",!0).append(\"line\"),A.select(\"line\").attr(\"x1\",d.c2p(i.gauge.threshold.value)).attr(\"x2\",d.c2p(i.gauge.threshold.value)).attr(\"y1\",(1-i.gauge.threshold.thickness)/2*k).attr(\"y2\",(1-(1-i.gauge.threshold.thickness)/2)*k).call(V5.stroke,i.gauge.threshold.line.color).style(\"stroke-width\",i.gauge.threshold.line.width),A.exit().remove();var z=a.selectAll(\"g.gauge-outline\").data([l]);z.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"rect\"),z.select(\"rect\").call(x).call(xw),z.exit().remove()}function jYt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,_=Math.PI/2;function b(_e){var Ce=i.gauge.axis.range[0],Le=i.gauge.axis.range[1],ge=(_e-Ce)/(Le-Ce)*Math.PI-_;return ge<-_?-_:ge>_?_:ge}function p(_e){return ww.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-_)}function k(_e){_e.attr(\"d\",function(Ce){return p(Ce.thickness).startAngle(b(Ce.range[0])).endAngle(b(Ce.range[1]))()})}var E,T,L,x;f.enter().append(\"g\").classed(\"angular\",!0),f.attr(\"transform\",cC(c[0],c[1])),h.enter().append(\"g\").classed(\"angularaxis\",!0).classed(\"crisp\",!0),h.selectAll(\"g.xangularaxistick,path,text\").remove(),E=uC(e,i.gauge.axis),E.type=\"linear\",E.range=i.gauge.axis.range,E._id=\"xangularaxis\",E.ticklabeloverflow=\"allow\",E.setScale();var C=function(_e){return(E.range[0]-_e.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},g=sv.makeLabelFns(E,0),P=g.labelStandoff;M.xFn=function(_e){var Ce=C(_e);return Math.cos(Ce)*P},M.yFn=function(_e){var Ce=C(_e),Le=Math.sin(Ce)>0?.2:1;return-Math.sin(Ce)*(P+_e.fontSize*Le)+Math.abs(Math.cos(Ce))*(_e.fontSize*NYt)},M.anchorFn=function(_e){var Ce=C(_e),Le=Math.cos(Ce);return Math.abs(Le)<.1?\"middle\":Le>0?\"start\":\"end\"},M.heightFn=function(_e,Ce,Le){var ge=C(_e);return-.5*(1+Math.sin(ge))*Le};var A=function(_e){return cC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return A(C(_e))};var z=function(_e){var Ce=C(_e);return A(Ce)+\"rotate(\"+-BYt(Ce)+\")\"};if(T=sv.calcTicks(E),x=sv.getTickSigns(E)[2],E.visible){x=E.ticks===\"inside\"?-1:1;var O=(E.linewidth||1)/2;sv.drawTicks(e,E,{vals:T,layer:h,path:\"M\"+x*O+\",0h\"+x*E.ticklen,transFn:z}),sv.drawLabels(e,E,{vals:T,layer:h,transFn:L,labelFns:M})}var U=[l].concat(i.gauge.steps),G=f.selectAll(\"g.bg-arc\").data(U);G.enter().append(\"g\").classed(\"bg-arc\",!0).append(\"path\"),G.select(\"path\").call(k).call(xw),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll(\"g.value-arc\").data([i.gauge.bar]);j.enter().append(\"g\").classed(\"value-arc\",!0).append(\"path\");var N=j.select(\"path\");fC(d)?(N.transition().duration(d.duration).ease(d.easing).each(\"end\",function(){v&&v()}).each(\"interrupt\",function(){v&&v()}).attrTween(\"d\",XYt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr(\"d\",typeof r[0].y==\"number\"?Z.endAngle(b(r[0].y)):\"M0,0Z\"),N.call(xw),j.exit().remove(),U=[];var H=i.gauge.threshold.value;(H||H===0)&&U.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll(\"g.threshold-arc\").data(U);re.enter().append(\"g\").classed(\"threshold-arc\",!0).append(\"path\"),re.select(\"path\").call(k).call(xw),re.exit().remove();var oe=f.selectAll(\"g.gauge-outline\").data([u]);oe.enter().append(\"g\").classed(\"gauge-outline\",!0).append(\"path\"),oe.select(\"path\").call(k).call(xw),oe.exit().remove()}function WYt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||\"center\",l=h$[s],u=n.transitionOpts,c=n.onComplete,f=zx.ensureSingle(t,\"g\",\"numbers\"),h,d,v,_=[];i._hasNumber&&_.push(\"number\"),i._hasDelta&&(_.push(\"delta\"),i.delta.position===\"left\"&&_.reverse());var b=f.selectAll(\"text\").data(_);b.enter().append(\"text\"),b.attr(\"text-anchor\",function(){return l}).attr(\"class\",function(A){return A}).attr(\"x\",null).attr(\"y\",null).attr(\"dx\",null).attr(\"dy\",null),b.exit().remove();function p(A,z,O,U){if(A.match(\"s\")&&O>=0!=U>=0&&!z(O).slice(-1).match(jXe)&&!z(U).slice(-1).match(jXe)){var G=A.slice().replace(\"s\",\"f\").replace(/\\d+/,function(j){return parseInt(j)-1}),Z=uC(e,{tickformat:G});return function(j){return Math.abs(j)<1?sv.tickText(Z,j).text:z(j)}}else return z}function k(){var A=uC(e,{tickformat:i.number.valueformat},i._range);A.setScale(),sv.prepTicks(A);var z=function(j){return sv.tickText(A,j).text},O=i.number.suffix,U=i.number.prefix,G=f.select(\"text.number\");function Z(){var j=typeof r[0].y==\"number\"?U+z(r[0].y)+O:\"-\";G.text(j).call(bw.font,i.number.font).call(q7.convertToTspans,e)}return fC(u)?G.transition().duration(u.duration).ease(u.easing).each(\"end\",function(){Z(),c&&c()}).each(\"interrupt\",function(){Z(),c&&c()}).attrTween(\"text\",function(){var j=ww.select(this),N=HXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(re){j.text(U+H(N(re))+O)}}):Z(),h=XXe(U+z(r[0].y)+O,i.number.font,l,e),G}function E(){var A=uC(e,{tickformat:i.delta.valueformat},i._range);A.setScale(),sv.prepTicks(A);var z=function(re){return sv.tickText(A,re).text},O=i.delta.suffix,U=i.delta.prefix,G=function(re){var oe=i.delta.relative?re.relativeDelta:re.delta;return oe},Z=function(re,oe){return re===0||typeof re!=\"number\"||isNaN(re)?\"-\":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+oe(re)+O},j=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select(\"text.delta\");N.call(bw.font,i.delta.font).call(V5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(V5.fill,j(r[0])).call(q7.convertToTspans,e)}return fC(u)?N.transition().duration(u.duration).ease(u.easing).tween(\"text\",function(){var re=ww.select(this),oe=G(r[0]),_e=i._deltaLastValue,Ce=p(i.delta.valueformat,z,_e,oe),Le=HXe(_e,oe);return i._deltaLastValue=oe,function(ge){re.text(Z(Le(ge),Ce)),re.call(V5.fill,j({delta:Le(ge)}))}}).each(\"end\",function(){H(),c&&c()}).each(\"interrupt\",function(){H(),c&&c()}):H(),d=XXe(Z(G(r[0]),z),i.delta.font,l,e),N}var T=i.mode+i.align,L;if(i._hasDelta&&(L=E(),T+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,T+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),T+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,g,P=.75*i.delta.font.size;i.delta.position===\"left\"&&(M=O7(i,\"deltaPos\",0,-1*(h.width*_w[i.align]+d.width*(1-_w[i.align])+P),T,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position===\"right\"&&(M=O7(i,\"deltaPos\",0,h.width*(1-_w[i.align])+d.width*_w[i.align]+P,T,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position===\"bottom\"&&(M=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position===\"top\"&&(M=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:M,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr(\"transform\",function(){var A=n.numbersScaler(v);T+=A[2];var z=O7(i,\"numbersScale\",1,A[0],T,Math.min),O;i._scaleNumbers||(z=1),i._isAngular?O=o-z*v.bottom:O=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+O;var U=v[s];s===\"center\"&&(U=(v.left+v.right)/2);var G=a-z*U;return G=O7(i,\"numbersTranslate\",0,G,T,Math.max),cC(G,O)+qYt(z)})}function xw(e){e.each(function(t){V5.stroke(ww.select(this),t.line.color)}).each(function(t){V5.fill(ww.select(this),t.color)}).style(\"stroke-width\",function(t){return t.line.width})}function XYt(e,t,r){return function(){var n=OYt(t,r);return function(i){return e.endAngle(n(i))()}}}function uC(e,t,r){var n=e._fullLayout,i=zx.extendFlat({type:\"linear\",ticks:\"outside\",range:r,showline:!0},t),a={type:\"linear\",_id:\"x\"+t._id},o={letter:\"x\",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return zx.coerce(i,a,GYt,l,u)}return UYt(i,a,s,o,n),VYt(i,a,s,o),a}function WXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+\"x\"+r]}function ZYt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function XXe(e,t,r,n){var i=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\"),a=ww.select(i);return a.text(e).attr(\"x\",0).attr(\"y\",0).attr(\"text-anchor\",r).attr(\"data-unformatted\",e).call(q7.convertToTspans,n).call(bw.font,t),bw.bBox(a.node())}function O7(e,t,r,n,i,a){var o=\"_cache\"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=zx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var JXe=ye((S2r,KXe)=>{\"use strict\";KXe.exports={moduleType:\"trace\",name:\"indicator\",basePlotModule:PXe(),categories:[\"svg\",\"noOpacity\",\"noHover\"],animatable:!0,attributes:c$(),supplyDefaults:UXe().supplyDefaults,calc:GXe().calc,plot:YXe(),meta:{}}});var QXe=ye((M2r,$Xe)=>{\"use strict\";$Xe.exports=JXe()});var d$=ye((k2r,iZe)=>{\"use strict\";var eZe=Jb(),B7=Ao().extendFlat,YYt=mc().overrideAll,tZe=ec(),KYt=Cc().attributes,rZe=df().descriptionOnlyNumbers,E2r=iZe.exports=YYt({domain:KYt({name:\"table\",trace:!0}),columnwidth:{valType:\"number\",arrayOk:!0,dflt:null},columnorder:{valType:\"data_array\"},header:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:rZe(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:28},align:B7({},eZe.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:B7({},tZe({arrayOk:!0}))},cells:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[],description:rZe(\"cell value\")},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:20},align:B7({},eZe.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:B7({},tZe({arrayOk:!0}))}},\"calc\",\"from-root\")});var aZe=ye((C2r,nZe)=>{\"use strict\";var v$=Dr(),JYt=d$(),$Yt=Cc().defaults;function QYt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s<n;s++)o.push(s);t(\"columnorder\",o)}nZe.exports=function(t,r,n,i){function a(o,s){return v$.coerce(t,r,JYt,o,s)}$Yt(r,i,a),a(\"columnwidth\"),a(\"header.values\"),a(\"header.format\"),a(\"header.align\"),a(\"header.prefix\"),a(\"header.suffix\"),a(\"header.height\"),a(\"header.line.width\"),a(\"header.line.color\"),a(\"header.fill.color\"),v$.coerceFont(a,\"header.font\",i.font),QYt(r,a),a(\"cells.values\"),a(\"cells.format\"),a(\"cells.align\"),a(\"cells.prefix\"),a(\"cells.suffix\"),a(\"cells.height\"),a(\"cells.line.width\"),a(\"cells.line.color\"),a(\"cells.fill.color\"),v$.coerceFont(a,\"cells.font\",i.font),r._length=null}});var sZe=ye((L2r,oZe)=>{\"use strict\";var eKt=iy().wrap;oZe.exports=function(){return eKt({})}});var p$=ye((P2r,lZe)=>{\"use strict\";lZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\\$.*\\$$/,goldenRatio:1.618,lineBreaker:\"<br>\",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:\"cubic-out\",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:\"cubic-out\",uplift:5,wrapSpacer:\" \",wrapSplitCharacter:\" \",cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}});var mZe=ye((I2r,gZe)=>{\"use strict\";var uZe=p$(),m$=Ao().extendFlat,tKt=Eo(),rKt=vv().isTypedArray,N7=vv().isArrayOrTypedArray;gZe.exports=function(t,r){var n=g$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=g$(r.header.values);a.length&&!a[0].length&&(a[0]=[\"\"],a=g$(a));var o=a.concat(i(n).map(function(){return pZe((a[0]||[\"\"]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[uZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(cZe,0),d=u-h,v=d+uZe.uplift,_=dZe(f,v),b=dZe(c,h),p=hZe(b,[]),k=hZe(_,p),E={},T=r._fullInput.columnorder;N7(T)&&(T=Array.from(T)),T=T.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var A=N7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return tKt(A)?Number(A):1}),x=L.reduce(cZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(y$(r.header.line.width),y$(r.cells.line.width)),M={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:T,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:m$({},r.cells,{values:n}),headerCells:m$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var A=E[g];E[g]=(A||0)+1;var z=g+\"__\"+E[g];return{key:z,label:g,specIndex:P,xIndex:T[P],xScale:fZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(g){g.calcdata=M,g.x=fZe(g)}),M};function y$(e){if(N7(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,y$(e[r]));return t}return e}function cZe(e,t){return e+t}function g$(e){var t=e.slice(),r=1/0,n=0,i;for(i=0;i<t.length;i++)rKt(t[i])?t[i]=Array.from(t[i]):N7(t[i])||(t[i]=[t[i]]),r=Math.min(r,t[i].length),n=Math.max(n,t[i].length);if(r!==n)for(i=0;i<t.length;i++){var a=n-t[i].length;a&&(t[i]=t[i].concat(pZe(a)))}return t}function pZe(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=\"\";return t}function fZe(e){return e.calcdata.columns.reduce(function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t},0)}function hZe(e,t){var r=Object.keys(e);return r.map(function(n){return m$({},e[n],{auxiliaryBlocks:t})})}function dZe(e,t){for(var r={},n,i=0,a=0,o=vZe(),s=0,l=0,u=0;u<e.length;u++)n=e[u],o.rows.push({rowIndex:u,rowHeight:n}),a+=n,(a>=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=vZe(),i+=a,s=u+1,a=0);return r}function vZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var yZe=ye(_$=>{\"use strict\";var U7=Ao().extendFlat;_$.splitToPanels=function(e){var t=[0,0],r=U7({},e,{key:\"header\",type:\"header\",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:U7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=U7({},e,{key:\"cells1\",type:\"cells\",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=U7({},e,{key:\"cells2\",type:\"cells\",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};_$.splitToCells=function(e){var t=iKt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r==\"string\"&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function iKt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var C$=ye((D2r,CZe)=>{\"use strict\";var Ya=p$(),tf=Oa(),x$=Dr(),nKt=x$.numberFormat,Uu=iy(),b$=So(),aKt=Zl(),oKt=Dr().raiseToTop,lg=Dr().strTranslate,sKt=Dr().cancelTransition,lKt=mZe(),SZe=yZe(),_Ze=ka();CZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll(\".\"+Ya.cn.table).data(r.map(function(k){var E=Uu.unwrap(k),T=E.trace;return lKt(t,T)}),Uu.keyFun);i.exit().remove(),i.enter().append(\"g\").classed(Ya.cn.table,!0).attr(\"overflow\",\"visible\").style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"overflow\",\"visible\").style(\"shape-rendering\",\"crispEdges\").style(\"pointer-events\",\"all\"),i.attr(\"width\",function(k){return k.width+k.size.l+k.size.r}).attr(\"height\",function(k){return k.height+k.size.t+k.size.b}).attr(\"transform\",function(k){return lg(k.translateX,k.translateY)});var a=i.selectAll(\".\"+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append(\"g\").classed(Ya.cn.tableControlView,!0).style(\"box-sizing\",\"content-box\");if(n){var s=\"onwheel\"in document?\"wheel\":\"mousewheel\";o.on(\"mousemove\",function(k){a.filter(function(E){return k===E}).call(hC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var E=k.scrollY+tf.event.deltaY,T=G7(t,a,null,E)(k);T||(tf.event.stopPropagation(),tf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(hC,t,!0)}a.attr(\"transform\",function(k){return lg(k.size.l,k.size.t)});var l=a.selectAll(\".\"+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append(\"rect\").classed(Ya.cn.scrollBackground,!0).attr(\"fill\",\"none\"),l.attr(\"width\",function(k){return k.width}).attr(\"height\",function(k){return k.height}),a.each(function(k){b$.setClipUrl(tf.select(this),xZe(t,k),t)});var u=a.selectAll(\".\"+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append(\"g\").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr(\"transform\",function(k){return lg(k.x,0)}),n&&u.call(tf.behavior.drag().origin(function(k){var E=tf.select(this);return TZe(E,k,-Ya.uplift),oKt(this),k.calcdata.columnDragInProgress=!0,hC(a.filter(function(T){return k.calcdata.key===T.key}),t),k}).on(\"drag\",function(k){var E=tf.select(this),T=function(C){return(k===C?tf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,tf.event.x));var L=MZe(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,M){return T(C)-T(M)});x.forEach(function(C,M){C.xIndex=M,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr(\"transform\",function(C){return lg(C.x,0)}),E.call(sKt).attr(\"transform\",lg(k.x,-Ya.uplift))}).on(\"dragend\",function(k){var E=tf.select(this),T=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,TZe(E,k,0),yKt(t,T,T.columns.map(function(L){return L.xIndex}))})),u.each(function(k){b$.setClipUrl(tf.select(this),bZe(t,k),t)});var c=u.selectAll(\".\"+Ya.cn.columnBlock).data(SZe.splitToPanels,Uu.keyFun);c.enter().append(\"g\").classed(Ya.cn.columnBlock,!0).attr(\"id\",function(k){return k.key}),c.style(\"cursor\",function(k){return k.dragHandle?\"ew-resize\":k.calcdata.scrollbarState.barWiggleRoom?\"ns-resize\":\"default\"});var f=c.filter(_Kt),h=c.filter(M$);n&&h.call(tf.behavior.drag().origin(function(k){return tf.event.stopPropagation(),k}).on(\"drag\",G7(t,a,-1)).on(\"dragend\",function(){})),w$(t,a,f,c),w$(t,a,h,c);var d=a.selectAll(\".\"+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append(\"clipPath\").classed(Ya.cn.scrollAreaClip,!0).attr(\"id\",function(k){return xZe(t,k)});var v=d.selectAll(\".\"+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append(\"rect\").classed(Ya.cn.scrollAreaClipRect,!0).attr(\"x\",-Ya.overdrag).attr(\"y\",-Ya.uplift).attr(\"fill\",\"none\"),v.attr(\"width\",function(k){return k.width+2*Ya.overdrag}).attr(\"height\",function(k){return k.height+Ya.uplift});var _=u.selectAll(\".\"+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);_.enter().append(\"g\").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll(\".\"+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append(\"clipPath\").classed(Ya.cn.columnBoundaryClippath,!0),b.attr(\"id\",function(k){return bZe(t,k)});var p=b.selectAll(\".\"+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append(\"rect\").classed(Ya.cn.columnBoundaryRect,!0).attr(\"fill\",\"none\"),p.attr(\"width\",function(k){return k.columnWidth+2*V7(k)}).attr(\"height\",function(k){return k.calcdata.height+2*V7(k)+Ya.uplift}).attr(\"x\",function(k){return-V7(k)}).attr(\"y\",function(k){return-V7(k)}),E$(null,h,a)};function V7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function xZe(e,t){return\"clip\"+e._fullLayout._uid+\"_scrollAreaBottomClip_\"+t.key}function bZe(e,t){return\"clip\"+e._fullLayout._uid+\"_columnBoundaryClippath_\"+t.calcdata.key+\"_\"+t.specIndex}function MZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function hC(e,t,r){function n(u){var c=u.rowBlocks;return A$(c,c.length-1)+(c.length?H7(c[c.length-1],1/0):1)}var i=e.selectAll(\".\"+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append(\"g\").classed(Ya.cn.scrollbarKit,!0).style(\"shape-rendering\",\"geometricPrecision\"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-T$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr(\"transform\",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return lg(c,T$(u))});var a=i.selectAll(\".\"+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append(\"g\").classed(Ya.cn.scrollbar,!0);var o=a.selectAll(\".\"+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append(\"g\").classed(Ya.cn.scrollbarSlider,!0),o.attr(\"transform\",function(u){return lg(0,u.scrollbarState.topY||0)});var s=o.selectAll(\".\"+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append(\"line\").classed(Ya.cn.scrollbarGlyph,!0).attr(\"stroke\",\"black\").attr(\"stroke-width\",Ya.scrollbarWidth).attr(\"stroke-linecap\",\"round\").attr(\"y1\",Ya.scrollbarWidth/2),s.attr(\"y2\",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr(\"stroke-opacity\",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr(\"stroke-opacity\",0);var l=a.selectAll(\".\"+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append(\"line\").classed(Ya.cn.scrollbarCaptureZone,!0).attr(\"stroke\",\"white\").attr(\"stroke-opacity\",.01).attr(\"stroke-width\",Ya.scrollbarCaptureWidth).attr(\"stroke-linecap\",\"butt\").attr(\"y1\",0).on(\"mousedown\",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||G7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on(\"drag\",G7(t,e)).on(\"dragend\",function(){})),l.attr(\"y2\",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function w$(e,t,r,n){var i=uKt(r),a=cKt(i);vKt(a);var o=fKt(a);gKt(o);var s=dKt(a),l=hKt(s);pKt(l),EZe(l,t,n,e),k$(a)}function uKt(e){var t=e.selectAll(\".\"+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append(\"g\").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function cKt(e){var t=e.selectAll(\".\"+Ya.cn.columnCell).data(SZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append(\"g\").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function fKt(e){var t=e.selectAll(\".\"+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"rect\").classed(Ya.cn.cellRect,!0),t}function hKt(e){var t=e.selectAll(\".\"+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"text\").classed(Ya.cn.cellText,!0).style(\"cursor\",function(){return\"auto\"}).on(\"mousedown\",function(){tf.event.stopPropagation()}),t}function dKt(e){var t=e.selectAll(\".\"+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append(\"g\").classed(Ya.cn.cellTextHolder,!0).style(\"shape-rendering\",\"geometricPrecision\"),t}function vKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function pKt(e){e.each(function(t){b$.font(tf.select(this),t.font)})}function gKt(e){e.attr(\"width\",function(t){return t.column.columnWidth}).attr(\"stroke-width\",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);_Ze.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),_Ze.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function EZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s==\"string\",u=l&&s.match(/<br>/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=mKt(s);i.latex=f;var h=f?\"\":Yv(i.calcdata.cells.prefix,a,o)||\"\",d=f?\"\":Yv(i.calcdata.cells.suffix,a,o)||\"\",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,_=h+(v?nKt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=wZe(_)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?wZe(_):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===\" \"?_.replace(/<a href=/ig,\"<a_href=\"):_,E=k.split(Ya.wrapSplitCharacter),T=Ya.wrapSplitCharacter===\" \"?E.map(function(L){return L.replace(/<a_href=/ig,\"<a href=\")}):E;i.fragments=T.map(function(L){return{text:L,width:null}}),i.fragments.push({fragment:Ya.wrapSpacer,width:null}),p=T.join(Ya.lineBreaker)+Ya.lineBreaker+Ya.wrapSpacer}else delete i.fragments,p=_;return p}).attr(\"dy\",function(i){return i.needsConvertToTspans?0:\"0.75em\"}).each(function(i){var a=this,o=tf.select(a),s=i.wrappingNeeded?bKt:wKt;i.needsConvertToTspans?aKt.convertToTspans(o,n,s(r,a,t,n,i)):tf.select(a.parentNode).attr(\"transform\",function(l){return lg(kZe(l),Ya.cellPad)}).attr(\"text-anchor\",function(l){return{left:\"start\",center:\"middle\",right:\"end\"}[l.align]})})}function mKt(e){return typeof e==\"string\"&&e.match(Ya.latexCheck)}function wZe(e){return e.indexOf(Ya.wrapSplitCharacter)!==-1}function yKt(e,t,r){var n=t.gdColumnsOriginalOrder;t.gdColumns.sort(function(i,a){return r[n.indexOf(i)]-r[n.indexOf(a)]}),t.columnorder=r,e.emit(\"plotly_restyle\")}function Yv(e,t,r){if(x$.isArrayOrTypedArray(e)){var n=e[Math.min(t,e.length-1)];return x$.isArrayOrTypedArray(n)?n[Math.min(r,n.length-1)]:n}else return e}function TZe(e,t,r){e.transition().ease(Ya.releaseTransitionEase).duration(Ya.releaseTransitionDuration).attr(\"transform\",lg(t.x,r))}function M$(e){return e.type===\"cells\"}function _Kt(e){return e.type===\"header\"}function T$(e){var t=e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[];return t.reduce(function(r,n){return r+H7(n,1/0)},0)}function xKt(e,t,r){for(var n=[],i=0,a=0;a<e.length;a++){for(var o=e[a],s=o.rows,l=0,u=0;u<s.length;u++)l+=s[u].rowHeight;o.allRowsHeight=l;var c=i+l,f=t,h=f+r;f<c&&h>i&&n.push(a),i+=l}return n}function E$(e,t,r){var n=MZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=A$(i,i.length),s=n.calcdata.groupHeight-T$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=xKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr(\"transform\",function(c){var f=A$(c.rowBlocks,c.page)-c.scrollY;return lg(0,f)}),e&&(AZe(e,r,t,u,n.prevPages,n,0),AZe(e,r,t,u,n.prevPages,n,1),hC(r,e))}}function G7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll(\".\"+Ya.cn.yColumn).selectAll(\".\"+Ya.cn.columnBlock).filter(M$);return E$(e,c,s),o.scrollY===u}}function AZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});w$(e,t,l,r),i[o]=n[o]}))}function bKt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll(\"tspan.line\").each(function(_,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value=\"\";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll(\"tspan.line\").remove(),EZe(a.select(\".\"+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(k$)}}function wKt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=S$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll(\".\"+Ya.cn.columnCell).call(k$),E$(null,e.filter(M$),0),hC(r,n,!0)),o.attr(\"transform\",function(){var d=this,v=d.parentNode,_=v.getBoundingClientRect(),b=tf.select(d.parentNode).select(\".\"+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-_.top+(p?p.matrix.f:Ya.cellPad);return lg(kZe(i,tf.select(d.parentNode).select(\".\"+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function kZe(e,t){switch(e.align){case\"left\":return Ya.cellPad;case\"right\":return e.column.columnWidth-(t||0)-Ya.cellPad;case\"center\":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function k$(e){e.attr(\"transform\",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+H7(s,1/0)},0),n=S$(t),i=H7(n,t.key),a=i+r;return lg(0,a)}).selectAll(\".\"+Ya.cn.cellRect).attr(\"height\",function(t){return AKt(S$(t),t.key).rowHeight})}function A$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=TKt(e[n]);return r}function H7(e,t){for(var r=0,n=0;n<e.rows.length&&e.rows[n].rowIndex<t;n++)r+=e.rows[n].rowHeight;return r}function TKt(e){var t=e.allRowsHeight;if(t!==void 0)return t;for(var r=0,n=0;n<e.rows.length;n++)r+=e.rows[n].rowHeight;return e.allRowsHeight=r,r}function S$(e){return e.rowBlocks[e.page]}function AKt(e,t){return e.rows[t-e.firstRowIndex]}});var LZe=ye(W7=>{\"use strict\";var SKt=Id().getModuleCalcData,MKt=C$(),j7=\"table\";W7.name=j7;W7.plot=function(e){var t=SKt(e.calcdata,j7)[0];t.length&&MKt(e,t)};W7.clean=function(e,t,r,n){var i=n._has&&n._has(j7),a=t._has&&t._has(j7);i&&!a&&n._paperdiv.selectAll(\".table\").remove()}});var IZe=ye((z2r,PZe)=>{\"use strict\";PZe.exports={attributes:d$(),supplyDefaults:aZe(),calc:sZe(),plot:C$(),moduleType:\"trace\",name:\"table\",basePlotModule:LZe(),categories:[\"noOpacity\"],meta:{}}});var DZe=ye((O2r,RZe)=>{\"use strict\";RZe.exports=IZe()});var BZe=ye((q2r,qZe)=>{\"use strict\";var FZe=ec(),zZe=Ih(),L$=Rd(),EKt=df().descriptionWithDates,kKt=mc().overrideAll,OZe=Pd().dash,P$=Ao().extendFlat;qZe.exports={color:{valType:\"color\",editType:\"calc\"},smoothing:{valType:\"number\",dflt:1,min:0,max:1.3,editType:\"calc\"},title:{text:{valType:\"string\",dflt:\"\",editType:\"calc\"},font:FZe({editType:\"calc\"}),offset:{valType:\"number\",dflt:10,editType:\"calc\"},editType:\"calc\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autotypenumbers:L$.autotypenumbers,autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",editType:\"calc\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}]},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cheatertype:{valType:\"enumerated\",values:[\"index\",\"value\"],dflt:\"value\",editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"linear\",\"array\"],dflt:\"array\",editType:\"calc\"},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},tickvals:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},showticklabels:{valType:\"enumerated\",values:[\"start\",\"end\",\"both\",\"none\"],dflt:\"start\",editType:\"calc\"},labelalias:P$({},L$.labelalias,{editType:\"calc\"}),tickfont:FZe({editType:\"calc\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\",\"SI extended\"],dflt:\"B\",editType:\"calc\"},minexponent:{valType:\"number\",dflt:3,min:0,editType:\"calc\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"calc\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"calc\",description:EKt(\"tick label\")},tickformatstops:kKt(L$.tickformatstops,\"calc\",\"from-root\"),categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},labelpadding:{valType:\"integer\",dflt:10,editType:\"calc\"},labelprefix:{valType:\"string\",editType:\"calc\"},labelsuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showline:{valType:\"boolean\",dflt:!1,editType:\"calc\"},linecolor:{valType:\"color\",dflt:zZe.defaultLine,editType:\"calc\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},gridcolor:{valType:\"color\",editType:\"calc\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},griddash:P$({},OZe,{editType:\"calc\"}),showgrid:{valType:\"boolean\",dflt:!0,editType:\"calc\"},minorgridcount:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},minorgridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},minorgriddash:P$({},OZe,{editType:\"calc\"}),minorgridcolor:{valType:\"color\",dflt:zZe.lightLine,editType:\"calc\"},startline:{valType:\"boolean\",editType:\"calc\"},startlinecolor:{valType:\"color\",editType:\"calc\"},startlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endline:{valType:\"boolean\",editType:\"calc\"},endlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endlinecolor:{valType:\"color\",editType:\"calc\"},tick0:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},dtick:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},arraytick0:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},arraydtick:{valType:\"integer\",min:1,dflt:1,editType:\"calc\"},editType:\"calc\"}});var Z7=ye((B2r,VZe)=>{\"use strict\";var CKt=ec(),NZe=BZe(),UZe=Ih(),X7=CKt({editType:\"calc\"}),LKt=pf().zorder;X7.family.dflt='\"Open Sans\", verdana, arial, sans-serif';X7.size.dflt=12;X7.color.dflt=UZe.defaultLine;VZe.exports={carpet:{valType:\"string\",editType:\"calc\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},a:{valType:\"data_array\",editType:\"calc\"},a0:{valType:\"number\",dflt:0,editType:\"calc\"},da:{valType:\"number\",dflt:1,editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},b0:{valType:\"number\",dflt:0,editType:\"calc\"},db:{valType:\"number\",dflt:1,editType:\"calc\"},cheaterslope:{valType:\"number\",dflt:1,editType:\"calc\"},aaxis:NZe,baxis:NZe,font:X7,color:{valType:\"color\",dflt:UZe.defaultLine,editType:\"plot\"},zorder:LKt}});var jZe=ye((N2r,HZe)=>{\"use strict\";var GZe=Dr().isArray1D;HZe.exports=function(t,r,n){var i=n(\"x\"),a=i&&i.length,o=n(\"y\"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||GZe(i))&&(!s||GZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var ZZe=ye((U2r,XZe)=>{\"use strict\";var PKt=Z7(),WZe=ka().addOpacity,IKt=qa(),dC=Dr(),RKt=Lb(),DKt=s_(),FKt=l_(),zKt=cI(),OKt=xm(),qKt=V3();XZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=PKt[i+\"axis\"];function s(g,P){return dC.coerce(t,r,o,g,P)}function l(g,P){return dC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s(\"autotypenumbers\",n.autotypenumbersDflt);var u=s(\"type\");if(u===\"-\"&&(n.data&&BKt(r,n.data),r.type===\"-\"?r.type=\"linear\":u=t.type=r.type),s(\"smoothing\"),s(\"cheatertype\"),s(\"showticklabels\"),s(\"labelprefix\",i+\" = \"),s(\"labelsuffix\"),s(\"showtickprefix\"),s(\"showticksuffix\"),s(\"separatethousands\"),s(\"tickformat\"),s(\"exponentformat\"),s(\"minexponent\"),s(\"showexponent\"),s(\"categoryorder\"),s(\"tickmode\"),s(\"tickvals\"),s(\"ticktext\"),s(\"tick0\"),s(\"dtick\"),r.tickmode===\"array\"&&(s(\"arraytick0\"),s(\"arraydtick\")),s(\"labelpadding\"),r._hovertitle=i,u===\"date\"){var c=IKt.getComponentMethod(\"calendars\",\"handleDefaults\");c(t,r,\"calendar\",n.calendar)}OKt(r,n.fullLayout),r.c2p=dC.identity;var f=s(\"color\",n.dfltColor),h=f===t.color?f:a.color,d=s(\"title.text\");d&&(dC.coerceFont(s,\"title.font\",a,{overrideDflt:{size:dC.bigFont(a.size),color:h}}),s(\"title.offset\")),s(\"tickangle\");var v=s(\"autorange\",!r.isValidRange(t.range));v&&s(\"rangemode\"),s(\"range\"),r.cleanRange(),s(\"fixedrange\"),RKt(t,r,s,u),FKt(t,r,s,u,n),DKt(t,r,s,u,n),zKt(t,r,s,{data:n.data,dataAttr:i});var _=l(\"gridcolor\",WZe(f,.3)),b=l(\"gridwidth\"),p=l(\"griddash\"),k=s(\"showgrid\");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=l(\"startlinecolor\",f),T=l(\"startlinewidth\",b),L=s(\"startline\",r.showgrid||!!E||!!T);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l(\"endlinecolor\",f),C=l(\"endlinewidth\",b),M=s(\"endline\",r.showgrid||!!x||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),k?(s(\"minorgridcount\"),s(\"minorgridwidth\",b),s(\"minorgriddash\",p),s(\"minorgridcolor\",WZe(_,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels===\"none\"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s(\"tickmode\"),r};function BKt(e,t){if(e.type===\"-\"){var r=e._id,n=r.charAt(0),i=n+\"calendar\",a=e[i];e.type=qKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var KZe=ye((V2r,YZe)=>{\"use strict\";var NKt=ZZe(),UKt=vl();YZe.exports=function(t,r,n,i,a){var o=i(\"a\");o||(i(\"da\"),i(\"a0\"));var s=i(\"b\");s||(i(\"db\"),i(\"b0\")),VKt(t,r,n,a)};function VKt(e,t,r,n){var i=[\"aaxis\",\"baxis\"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=UKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:\"x\",id:o+\"axis\",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};NKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!==\"-\"&&(e[a]={type:s.type})})}});var QZe=ye((G2r,$Ze)=>{\"use strict\";var JZe=Dr(),GKt=jZe(),HKt=KZe(),jKt=Z7(),WKt=Ih();$Ze.exports=function(t,r,n,i){function a(l,u){return JZe.coerce(t,r,jKt,l,u)}r._clipPathId=\"clip\"+r.uid+\"carpet\";var o=a(\"color\",WKt.defaultLine);if(JZe.coerceFont(a,\"font\",i.font),a(\"carpet\"),HKt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=GKt(t,r,a);s||(r.visible=!1),r._cheater&&a(\"cheaterslope\"),a(\"zorder\")}});var I$=ye((H2r,eYe)=>{\"use strict\";var XKt=Dr().isArrayOrTypedArray;eYe.exports=function(t,r,n){var i;for(XKt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i<r.length;i++)t[i]=n(r[i]);return t}});var R$=ye((j2r,tYe)=>{\"use strict\";tYe.exports=function(t,r,n){if(t.length===0)return\"\";var i,a=[],o=n?3:1;for(i=0;i<t.length;i+=o)a.push(t[i]+\",\"+r[i]),n&&i<t.length-o&&(a.push(\"C\"),a.push([t[i+1]+\",\"+r[i+1],t[i+2]+\",\"+r[i+2]+\" \"].join(\" \")));return a.join(n?\"\":\"L\")}});var iYe=ye((W2r,rYe)=>{\"use strict\";rYe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var fYe=ye((X2r,cYe)=>{\"use strict\";var $7=Oa(),Y7=So(),K7=I$(),oYe=R$(),vC=iYe(),D$=Zl(),Up=Dr(),sYe=Up.strRotate,J7=Up.strTranslate,lYe=Dh();cYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,\"trace\").each(function(c){var f=$7.select(this),h=c[0],d=h.trace,v=d.aaxis,_=d.baxis,b=Up.ensureSingle(f,\"g\",\"minorlayer\"),p=Up.ensureSingle(f,\"g\",\"majorlayer\"),k=Up.ensureSingle(f,\"g\",\"boundarylayer\"),E=Up.ensureSingle(f,\"g\",\"labellayer\");f.style(\"opacity\",d.opacity),G5(o,s,p,v,\"a\",v._gridlines,!0,a),G5(o,s,p,_,\"b\",_._gridlines,!0,a),G5(o,s,b,v,\"a\",v._minorgridlines,!0,a),G5(o,s,b,_,\"b\",_._minorgridlines,!0,a),G5(o,s,k,v,\"a-boundary\",v._boundarylines,a),G5(o,s,k,_,\"b-boundary\",_._boundarylines,a);var T=nYe(t,o,s,d,h,E,v._labels,\"a-label\"),L=nYe(t,o,s,d,h,E,_._labels,\"b-label\");YKt(t,E,d,h,o,s,T,L),ZKt(d,h,u,o,s)})};function ZKt(e,t,r,n,i){var a,o,s,l,u=r.select(\"#\"+e._clipPathId);u.size()||(u=r.append(\"clipPath\").classed(\"carpetclip\",!0));var c=Up.ensureSingle(u,\"path\",\"carpetboundary\"),f=t.clipsegments,h=[];for(l=0;l<f.length;l++)a=f[l],o=K7([],a.x,n.c2p),s=K7([],a.y,i.c2p),h.push(oYe(o,s,a.bicubic));var d=\"M\"+h.join(\"L\")+\"Z\";u.attr(\"id\",e._clipPathId),c.attr(\"d\",d)}function G5(e,t,r,n,i,a,o){var s=\"const-\"+i+\"-lines\",l=r.selectAll(\".\"+s).data(a);l.enter().append(\"path\").classed(s,!0).style(\"vector-effect\",o?\"none\":\"non-scaling-stroke\"),l.each(function(u){var c=u,f=c.x,h=c.y,d=K7([],f,e.c2p),v=K7([],h,t.c2p),_=\"M\"+oYe(d,v,c.smoothing),b=$7.select(this);b.attr(\"d\",_).style(\"stroke-width\",c.width).style(\"stroke\",c.color).style(\"stroke-dasharray\",Y7.dashStyle(c.dash,c.width)).style(\"fill\",\"none\")}),l.exit().remove()}function nYe(e,t,r,n,i,a,o,s){var l=a.selectAll(\"text.\"+s).data(o);l.enter().append(\"text\").classed(s,!0);var u=0,c={};return l.each(function(f,h){var d;if(f.axis.tickangle===\"auto\")d=vC(n,t,r,f.xy,f.dxy);else{var v=(f.axis.tickangle+180)*Math.PI/180;d=vC(n,t,r,f.xy,[Math.cos(v),Math.sin(v)])}h||(c={angle:d.angle,flip:d.flip});var _=(f.endAnchor?-1:1)*d.flip,b=$7.select(this).attr({\"text-anchor\":_>0?\"start\":\"end\",\"data-notex\":1}).call(Y7.font,f.font).text(f.text).call(D$.convertToTspans,e),p=Y7.bBox(this);b.attr(\"transform\",J7(d.p[0],d.p[1])+sYe(d.angle)+J7(f.axis.labelpadding*_,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function YKt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),_=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,vC(r,i,a,c,r.dxydb_rough(l,u))),aYe(e,t,r,n,c,f,r.aaxis,i,a,o,\"a-title\"),l=h,u=.5*(v+_),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,vC(r,i,a,c,r.dxyda_rough(l,u))),aYe(e,t,r,n,c,f,r.baxis,i,a,s,\"b-title\")}var uYe=lYe.LINE_SPACING,KKt=(1-lYe.MID_SHIFT)/uYe+1;function aYe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll(\"text.\"+c).data(f),d=u.maxExtent;h.enter().append(\"text\").classed(c,!0),h.each(function(){var v=vC(r,s,l,i,a);[\"start\",\"both\"].indexOf(o.showticklabels)===-1&&(d=0);var _=o.title.font.size;d+=_+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,E=$7.select(this);E.text(o.title.text).call(D$.convertToTspans,e),k&&(d=(-D$.lineCount(E)+KKt)*uYe*_-d),E.attr(\"transform\",J7(v.p[0],v.p[1])+sYe(v.angle)+J7(0,d)).attr(\"text-anchor\",\"middle\").call(Y7.font,o.title.font)}),h.exit().remove()}});var dYe=ye((Z2r,hYe)=>{\"use strict\";var Q7=Dr().isArrayOrTypedArray;hYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=Q7(e)?e.length:e,f=Q7(t)?t.length:t,h=Q7(e)?e:null,d=Q7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,_=1/0,b=-1/0;for(i=0;i<f;i++)for(u[i]=[],l=d?(d[i]-d[0])*o:i/(f-1),n=0;n<c;n++)s=h?(h[n]-h[0])*a:n/(c-1),v=s-l*r,_=Math.min(v,_),b=Math.max(v,b),u[i][n]=v;var p=1/(b-_),k=-_*p;for(i=0;i<f;i++)for(n=0;n<c;n++)u[i][n]=p*u[i][n]+k;return u}});var mYe=ye((Y2r,gYe)=>{\"use strict\";var vYe=Dr().isArrayOrTypedArray;gYe.exports=function(e){return pYe(e,0)};function pYe(e,t){if(!vYe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a<i;a++){var o=e[a];if(vYe(o)){var s=pYe(o,t+1);s&&(r=Math.min(s[0],r),n=Math.max(s[1],n))}else r=Math.min(o,r),n=Math.max(o,n)}return[r,n]}});var _Ye=ye((K2r,yYe)=>{\"use strict\";var JKt=ho(),Ox=Ao().extendFlat;yYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p,k=t[\"_\"+r],E=t[r+\"axis\"],T=E._gridlines=[],L=E._minorgridlines=[],x=E._boundarylines=[],C=t[\"_\"+n],M=t[n+\"axis\"];E.tickmode===\"array\"&&(E.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,A=g[0].length,z=g.length,O=t._a.length,U=t._b.length;JKt.prepTicks(E),E.tickmode===\"array\"&&delete E.tickvals;var G=E.smoothing?3:1;function Z(N){var H,re,oe,_e,Ce,Le,ge,ie,Se,Ee,Ae,Be,Pe=[],me=[],De={};if(r===\"b\")for(re=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(U-2,re))),_e=re-oe,De.length=U,De.crossLength=O,De.xy=function(ce){return t.evalxy([],ce,re)},De.dxy=function(ce,je){return t.dxydi([],ce,oe,je,_e)},H=0;H<O;H++)Le=Math.min(O-2,H),ge=H-Le,ie=t.evalxy([],H,re),M.smoothing&&H>0&&(Se=t.dxydi([],H-1,oe,0,_e),Pe.push(Ce[0]+Se[0]/3),me.push(Ce[1]+Se[1]/3),Ee=t.dxydi([],H-1,oe,1,_e),Pe.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Pe.push(ie[0]),me.push(ie[1]),Ce=ie;else for(H=t.a2i(N),Le=Math.floor(Math.max(0,Math.min(O-2,H))),ge=H-Le,De.length=O,De.crossLength=U,De.xy=function(ce){return t.evalxy([],H,ce)},De.dxy=function(ce,je){return t.dxydj([],Le,ce,ge,je)},re=0;re<U;re++)oe=Math.min(U-2,re),_e=re-oe,ie=t.evalxy([],H,re),M.smoothing&&re>0&&(Ae=t.dxydj([],Le,re-1,ge,0),Pe.push(Ce[0]+Ae[0]/3),me.push(Ce[1]+Ae[1]/3),Be=t.dxydj([],Le,re-1,ge,1),Pe.push(ie[0]-Be[0]/3),me.push(ie[1]-Be[1]/3)),Pe.push(ie[0]),me.push(ie[1]),Ce=ie;return De.axisLetter=r,De.axis=E,De.crossAxis=M,De.value=N,De.constvar=n,De.index=f,De.x=Pe,De.y=me,De.smoothing=M.smoothing,De}function j(N){var H,re,oe,_e,Ce,Le=[],ge=[],ie={};if(ie.length=k.length,ie.crossLength=C.length,r===\"b\")for(oe=Math.max(0,Math.min(U-2,N)),Ce=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Ee){return t.dxydi([],Se,oe,Ee,Ce)},H=0;H<A;H++)Le[H]=g[N*G][H],ge[H]=P[N*G][H];else for(re=Math.max(0,Math.min(O-2,N)),_e=Math.min(1,Math.max(0,N-re)),ie.xy=function(Se){return t.evalxy([],N,Se)},ie.dxy=function(Se,Ee){return t.dxydj([],re,Se,_e,Ee)},H=0;H<z;H++)Le[H]=g[H][N*G],ge[H]=P[H][N*G];return ie.axisLetter=r,ie.axis=E,ie.crossAxis=M,ie.value=k[N],ie.constvar=n,ie.index=N,ie.x=Le,ie.y=ge,ie.smoothing=M.smoothing,ie}if(E.tickmode===\"array\"){for(s=5e-15,l=[Math.floor((k.length-1-E.arraytick0)/E.arraydtick*(1+s)),Math.ceil(-E.arraytick0/E.arraydtick/(1+s))].sort(function(N,H){return N-H}),u=l[0]-1,c=l[1]+1,f=u;f<c;f++)a=E.arraytick0+E.arraydtick*f,!(a<0||a>k.length-1)&&T.push(Ox(j(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u;f<c;f++)if(o=E.arraytick0+E.arraydtick*f,v=Math.min(o+E.arraydtick,k.length-1),!(o<0||o>k.length-1)&&!(v<0||v>k.length-1))for(_=k[o],b=k[v],i=0;i<E.minorgridcount;i++)p=v-o,!(p<=0)&&(d=_+(b-_)*(i+1)/(E.minorgridcount+1)*(E.arraydtick/p),!(d<k[0]||d>k[k.length-1])&&L.push(Ox(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&x.push(Ox(j(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(Ox(j(k.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((k[0]-E.tick0)/E.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=E.tick0+E.dtick*f,T.push(Ox(Z(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u-1;f<c+1;f++)for(h=E.tick0+E.dtick*f,i=0;i<E.minorgridcount;i++)d=h+E.dtick*(i+1)/(E.minorgridcount+1),!(d<k[0]||d>k[k.length-1])&&L.push(Ox(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&x.push(Ox(Z(k[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(Ox(Z(k[k.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var TYe=ye((J2r,wYe)=>{\"use strict\";var xYe=ho(),bYe=Ao().extendFlat;wYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n<u.length;n++)s=u[n],[\"start\",\"both\"].indexOf(r.showticklabels)!==-1&&(i=xYe.tickText(r,s.value),bYe(i,{prefix:a,suffix:o,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i)),[\"end\",\"both\"].indexOf(r.showticklabels)!==-1&&(i=xYe.tickText(r,s.value),bYe(i,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i))}});var SYe=ye(($2r,AYe)=>{\"use strict\";AYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var EYe=ye((Q2r,MYe)=>{\"use strict\";var $Kt=Dr();MYe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var Ce=0,Le,ge=0;return oe>0&&(Le=t[_e][oe-1])!==void 0&&(ge++,Ce+=Le),oe<u-1&&(Le=t[_e][oe+1])!==void 0&&(ge++,Ce+=Le),_e>0&&(Le=t[_e-1][oe])!==void 0&&(ge++,Ce+=Le),_e<c-1&&(Le=t[_e+1][oe])!==void 0&&(ge++,Ce+=Le),Ce/Math.max(1,ge)}var h=0;for(i=0;i<u;i++)for(a=0;a<c;a++)t[a][i]===void 0&&(s.push(i),l.push(a),t[a][i]=f(i,a)),h=Math.max(h,Math.abs(t[a][i]));if(!s.length)return t;var d,v,_,b,p,k,E,T,L,x,C,M=1e-5,g=0,P=100,A=0,z=s.length;do{for(g=0,o=0;o<z;o++){i=s[o],a=l[o];var O=0,U=0,G,Z,j,N,H,re;i===0?(H=Math.min(u-1,2),j=r[H],N=r[1],G=t[a][H],Z=t[a][1],U+=Z+(Z-G)*(r[0]-N)/(N-j),O++):i===u-1&&(H=Math.max(0,u-3),j=r[H],N=r[u-2],G=t[a][H],Z=t[a][u-2],U+=Z+(Z-G)*(r[u-1]-N)/(N-j),O++),(i===0||i===u-1)&&a>0&&a<c-1&&(d=n[a+1]-n[a],v=n[a]-n[a-1],U+=(v*t[a+1][i]+d*t[a-1][i])/(v+d),O++),a===0?(re=Math.min(c-1,2),j=n[re],N=n[1],G=t[re][i],Z=t[1][i],U+=Z+(Z-G)*(n[0]-N)/(N-j),O++):a===c-1&&(re=Math.max(0,c-3),j=n[re],N=n[c-2],G=t[re][i],Z=t[c-2][i],U+=Z+(Z-G)*(n[c-1]-N)/(N-j),O++),(a===0||a===c-1)&&i>0&&i<u-1&&(d=r[i+1]-r[i],v=r[i]-r[i-1],U+=(v*t[a][i+1]+d*t[a][i-1])/(v+d),O++),O?U/=O:(_=r[i+1]-r[i],b=r[i]-r[i-1],p=n[a+1]-n[a],k=n[a]-n[a-1],E=_*b*(_+b),T=p*k*(p+k),U=(E*(k*t[a+1][i]+p*t[a-1][i])+T*(b*t[a][i+1]+_*t[a][i-1]))/(T*(b+_)+E*(k+p))),L=U-t[a][i],x=L/h,g+=x*x,C=O?0:.85,t[a][i]+=L*(1+C)}g=Math.sqrt(g)}while(A++<P&&g>M);return $Kt.log(\"Smoother converged to\",g,\"after\",A,\"iterations\"),t}});var CYe=ye((ewr,kYe)=>{\"use strict\";kYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var IYe=ye((twr,PYe)=>{\"use strict\";var LYe=.5;PYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,LYe/2),c=Math.pow(s*s+l*l,LYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var DYe=ye((rwr,RYe)=>{\"use strict\";var F$=IYe(),e9=Dr().ensureArray;function H5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}RYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,_,b,p=n[0].length,k=n.length,E=a?3*p-2:p,T=o?3*k-2:k;for(t=e9(t,T),r=e9(r,T),u=0;u<T;u++)t[u]=e9(t[u],E),r[u]=e9(r[u],E);for(l=0,c=0;l<k;l++,c+=o?3:1)for(f=t[c],h=r[c],d=n[l],v=i[l],s=0,u=0;s<p;s++,u+=a?3:1)f[u]=d[s],h[u]=v[s];if(a)for(l=0,c=0;l<k;l++,c+=o?3:1){for(s=1,u=3;s<p-1;s++,u+=3)_=F$([n[l][s-1],i[l][s-1]],[n[l][s],i[l][s]],[n[l][s+1],i[l][s+1]],a),t[c][u-1]=_[0][0],r[c][u-1]=_[0][1],t[c][u+1]=_[1][0],r[c][u+1]=_[1][1];b=H5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=b[0],r[c][1]=b[1],b=H5([t[c][E-1],r[c][E-1]],[t[c][E-3],r[c][E-3]],[t[c][E-4],r[c][E-4]]),t[c][E-2]=b[0],r[c][E-2]=b[1]}if(o)for(u=0;u<E;u++){for(c=3;c<T-3;c+=3)_=F$([t[c-3][u],r[c-3][u]],[t[c][u],r[c][u]],[t[c+3][u],r[c+3][u]],o),t[c-1][u]=_[0][0],r[c-1][u]=_[0][1],t[c+1][u]=_[1][0],r[c+1][u]=_[1][1];b=H5([t[0][u],r[0][u]],[t[2][u],r[2][u]],[t[3][u],r[3][u]]),t[1][u]=b[0],r[1][u]=b[1],b=H5([t[T-1][u],r[T-1][u]],[t[T-3][u],r[T-3][u]],[t[T-4][u],r[T-4][u]]),t[T-2][u]=b[0],r[T-2][u]=b[1]}if(a&&o)for(c=1;c<T;c+=(c+1)%3===0?2:1){for(u=3;u<E-3;u+=3)_=F$([t[c][u-3],r[c][u-3]],[t[c][u],r[c][u]],[t[c][u+3],r[c][u+3]],a),t[c][u-1]=.5*(t[c][u-1]+_[0][0]),r[c][u-1]=.5*(r[c][u-1]+_[0][1]),t[c][u+1]=.5*(t[c][u+1]+_[1][0]),r[c][u+1]=.5*(r[c][u+1]+_[1][1]);b=H5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=.5*(t[c][1]+b[0]),r[c][1]=.5*(r[c][1]+b[1]),b=H5([t[c][E-1],r[c][E-1]],[t[c][E-3],r[c][E-3]],[t[c][E-4],r[c][E-4]]),t[c][E-2]=.5*(t[c][E-2]+b[0]),r[c][E-2]=.5*(r[c][E-2]+b[1])}return[t,r]}});var zYe=ye((iwr,FYe)=>{\"use strict\";FYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,_,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),E=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var T=k*k,L=T*k,x=1-k,C=x*x,M=C*x,g=E*E,P=g*E,A=1-E,z=A*A,O=z*A;for(_=0;_<e.length;_++)v=e[_],c=M*v[p][b]+3*(C*k*v[p][b+1]+x*T*v[p][b+2])+L*v[p][b+3],f=M*v[p+1][b]+3*(C*k*v[p+1][b+1]+x*T*v[p+1][b+2])+L*v[p+1][b+3],h=M*v[p+2][b]+3*(C*k*v[p+2][b+1]+x*T*v[p+2][b+2])+L*v[p+2][b+3],d=M*v[p+3][b]+3*(C*k*v[p+3][b+1]+x*T*v[p+3][b+2])+L*v[p+3][b+3],s[_]=O*c+3*(z*E*f+A*g*h)+P*d;return s}:n?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,_,b,p,k,E;c*=3;var T=h*h,L=T*h,x=1-h,C=x*x,M=C*x,g=1-d;for(k=0;k<e.length;k++)E=e[k],v=g*E[f][c]+d*E[f+1][c],_=g*E[f][c+1]+d*E[f+1][c+1],b=g*E[f][c+2]+d*E[f+1][c+1],p=g*E[f][c+3]+d*E[f+1][c+1],s[k]=M*v+3*(C*h*_+x*T*b)+L*p;return s}:i?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,_,b,p,k,E;f*=3;var T=d*d,L=T*d,x=1-d,C=x*x,M=C*x,g=1-h;for(k=0;k<e.length;k++)E=e[k],v=g*E[f][c]+h*E[f][c+1],_=g*E[f+1][c]+h*E[f+1][c+1],b=g*E[f+2][c]+h*E[f+2][c+1],p=g*E[f+3][c]+h*E[f+3][c+1],s[k]=M*v+3*(C*d*_+x*T*b)+L*p;return s}:function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,_,b,p,k=1-d,E=1-h;for(b=0;b<e.length;b++)p=e[b],v=E*p[f][c]+h*p[f][c+1],_=E*p[f+1][c]+h*p[f+1][c+1],s[b]=k*v+d*_;return s}}});var qYe=ye((nwr,OYe)=>{\"use strict\";OYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=1-o,b=_*_,p=_*o*2,k=-3*b,E=3*(b-p),T=3*(p-v),L=3*v,x=s*s,C=x*s,M=1-s,g=M*M,P=g*M;for(d=0;d<e.length;d++)h=e[d],l=k*h[a][i]+E*h[a][i+1]+T*h[a][i+2]+L*h[a][i+3],u=k*h[a+1][i]+E*h[a+1][i+1]+T*h[a+1][i+2]+L*h[a+1][i+3],c=k*h[a+2][i]+E*h[a+2][i+1]+T*h[a+2][i+2]+L*h[a+2][i+3],f=k*h[a+3][i]+E*h[a+3][i+1]+T*h[a+3][i+2]+L*h[a+3][i+3],n[d]=P*l+3*(g*s*u+M*x*c)+C*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;i*=3;var h=o*o,d=1-o,v=d*d,_=d*o*2,b=-3*v,p=3*(v-_),k=3*(_-h),E=3*h,T=1-s;for(c=0;c<e.length;c++)f=e[c],l=b*f[a][i]+p*f[a][i+1]+k*f[a][i+2]+E*f[a][i+3],u=b*f[a+1][i]+p*f[a+1][i+1]+k*f[a+1][i+2]+E*f[a+1][i+3],n[c]=T*l+s*u;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;a*=3;var v=s*s,_=v*s,b=1-s,p=b*b,k=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a][i+1]-d[a][i],u=d[a+1][i+1]-d[a+1][i],c=d[a+2][i+1]-d[a+2][i],f=d[a+3][i+1]-d[a+3][i],n[h]=k*l+3*(p*s*u+b*v*c)+_*f;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-s;for(c=0;c<e.length;c++)f=e[c],l=f[a][i+1]-f[a][i],u=f[a+1][i+1]-f[a+1][i],n[c]=h*l+s*u;return n}}});var NYe=ye((awr,BYe)=>{\"use strict\";BYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=v*o,b=1-o,p=b*b,k=p*b,E=s*s,T=1-s,L=T*T,x=T*s*2,C=-3*L,M=3*(L-x),g=3*(x-E),P=3*E;for(d=0;d<e.length;d++)h=e[d],l=C*h[a][i]+M*h[a+1][i]+g*h[a+2][i]+P*h[a+3][i],u=C*h[a][i+1]+M*h[a+1][i+1]+g*h[a+2][i+1]+P*h[a+3][i+1],c=C*h[a][i+2]+M*h[a+1][i+2]+g*h[a+2][i+2]+P*h[a+3][i+2],f=C*h[a][i+3]+M*h[a+1][i+3]+g*h[a+2][i+3]+P*h[a+3][i+3],n[d]=k*l+3*(p*o*u+b*v*c)+_*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3;var v=s*s,_=v*s,b=1-s,p=b*b,k=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a+1][i]-d[a][i],u=d[a+1][i+1]-d[a][i+1],c=d[a+1][i+2]-d[a][i+2],f=d[a+1][i+3]-d[a][i+3],n[h]=k*l+3*(p*s*u+b*v*c)+_*f;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;a*=3;var h=1-o,d=s*s,v=1-s,_=v*v,b=v*s*2,p=-3*_,k=3*(_-b),E=3*(b-d),T=3*d;for(c=0;c<e.length;c++)f=e[c],l=p*f[a][i]+k*f[a+1][i]+E*f[a+2][i]+T*f[a+3][i],u=p*f[a][i+1]+k*f[a+1][i+1]+E*f[a+2][i+1]+T*f[a+3][i+1],n[c]=h*l+o*u;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-o;for(c=0;c<e.length;c++)f=e[c],l=f[a+1][i]-f[a][i],u=f[a+1][i+1]-f[a][i+1],n[c]=h*l+o*u;return n}}});var HYe=ye((owr,GYe)=>{\"use strict\";var UYe=CYe(),VYe=U6().findBin,QKt=DYe(),eJt=zYe(),tJt=qYe(),rJt=NYe();GYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*UYe.RELATIVE_CULL_TOLERANCE,_=d*UYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=_,f+=_,t.isVisible=function(b,p){return b>l&&b<u&&p>c&&p<f},t.isOccluded=function(b,p){return b<l||b>u||p<c||p>f},t.setScale=function(){var b=t._x,p=t._y,k=QKt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=eJt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=tJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=rJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(VYe(b,r),i-2)),k=r[p],E=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(E-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(VYe(b,n),a-2)),k=n[p],E=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(E-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(b<r[0]||b>r[i-1]|p<n[0]||p>n[a-1]))return[!1,!1];var E=t.a2i(b),T=t.b2j(p),L=t.evalxy([],E,T);if(k){var x=0,C=0,M=[],g,P,A,z;b<r[0]?(g=0,P=0,x=(b-r[0])/(r[1]-r[0])):b>r[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(E))),P=E-g),p<n[0]?(A=0,z=0,C=(p-n[0])/(n[1]-n[0])):p>n[a-1]?(A=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(A=Math.max(0,Math.min(a-2,Math.floor(T))),z=T-A),x&&(t.dxydi(M,g,A,P,z),L[0]+=M[0]*x,L[1]+=M[1]*x),C&&(t.dxydj(M,g,A,P,z),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,E){var T=t.dxydi(null,b,p,k,E),L=t.dadi(b,k);return[T[0]/L,T[1]/L]},t.dxydb=function(b,p,k,E){var T=t.dxydj(null,b,p,k,E),L=t.dbdj(p,E);return[T[0]/L,T[1]/L]},t.dxyda_rough=function(b,p,k){var E=h*(k||.1),T=t.ab2xy(b+E,p,!0),L=t.ab2xy(b-E,p,!0);return[(T[0]-L[0])*.5/E,(T[1]-L[1])*.5/E]},t.dxydb_rough=function(b,p,k){var E=d*(k||.1),T=t.ab2xy(b,p+E,!0),L=t.ab2xy(b,p-E,!0);return[(T[0]-L[0])*.5/E,(T[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var $Ye=ye((swr,JYe)=>{\"use strict\";var t9=ho(),jYe=Dr().isArray1D,iJt=dYe(),WYe=mYe(),XYe=_Ye(),ZYe=TYe(),nJt=SYe(),YYe=u8(),KYe=EYe(),aJt=s8(),oJt=HYe();JYe.exports=function(t,r){var n=t9.getFromId(t,r.xaxis),i=t9.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&jYe(s)&&u.push(\"x\"),l&&jYe(l)&&u.push(\"y\"),u.length&&aJt(r,a,o,\"a\",\"b\",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype===\"index\"?c.length:c,v=o.cheatertype===\"index\"?f.length:f;s=iJt(d,v,r.cheaterslope)}r._x=s=YYe(s),r._y=l=YYe(l),KYe(s,c,f),KYe(l,c,f),oJt(r),r.setScale();var _=WYe(s),b=WYe(l),p=.5*(_[1]-_[0]),k=.5*(_[1]+_[0]),E=.5*(b[1]-b[0]),T=.5*(b[1]+b[0]),L=1.3;return _=[k-p*L,k+p*L],b=[T-E*L,T+E*L],r._extremes[n._id]=t9.findExtremes(n,_,{padded:!0}),r._extremes[i._id]=t9.findExtremes(i,b,{padded:!0}),XYe(r,\"a\",\"b\"),XYe(r,\"b\",\"a\"),ZYe(r,a),ZYe(r,o),h.clipsegments=nJt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var eKe=ye((lwr,QYe)=>{\"use strict\";QYe.exports={attributes:Z7(),supplyDefaults:QZe(),plot:fYe(),calc:$Ye(),animatable:!0,isContainer:!0,moduleType:\"trace\",name:\"carpet\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"carpet\",\"carpetAxis\",\"notLegendIsolatable\",\"noMultiCategory\",\"noHover\",\"noSortingByValue\"],meta:{}}});var rKe=ye((uwr,tKe)=>{\"use strict\";tKe.exports=eKe()});var z$=ye((cwr,oKe)=>{\"use strict\";var sJt=Pg(),c0=pf(),lJt=Gl(),{hovertemplateAttrs:uJt,texttemplateAttrs:cJt,templatefallbackAttrs:iKe}=Ll(),nKe=Tu(),qx=Ao().extendFlat,ug=c0.marker,j5=c0.line,aKe=ug.line;oKe.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:qx({},c0.mode,{dflt:\"markers\"}),text:qx({},c0.text,{}),texttemplate:cJt({editType:\"plot\"},{keys:[\"a\",\"b\",\"text\"]}),texttemplatefallback:iKe({editType:\"plot\"}),hovertext:qx({},c0.hovertext,{}),line:{color:j5.color,width:j5.width,dash:j5.dash,backoff:j5.backoff,shape:qx({},j5.shape,{values:[\"linear\",\"spline\"]}),smoothing:j5.smoothing,editType:\"calc\"},connectgaps:c0.connectgaps,fill:qx({},c0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:sJt(),marker:qx({symbol:ug.symbol,opacity:ug.opacity,maxdisplayed:ug.maxdisplayed,angle:ug.angle,angleref:ug.angleref,standoff:ug.standoff,size:ug.size,sizeref:ug.sizeref,sizemin:ug.sizemin,sizemode:ug.sizemode,line:qx({width:aKe.width,dash:aKe.dash,editType:\"calc\"},nKe(\"marker.line\")),gradient:ug.gradient,editType:\"calc\"},nKe(\"marker\")),textfont:c0.textfont,textposition:c0.textposition,selected:c0.selected,unselected:c0.unselected,hoverinfo:qx({},lJt.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:c0.hoveron,hovertemplate:uJt(),hovertemplatefallback:iKe(),zorder:c0.zorder}});var cKe=ye((fwr,uKe)=>{\"use strict\";var sKe=Dr(),fJt=Lm(),W5=Ru(),hJt=$p(),dJt=D0(),lKe=sT(),vJt=F0(),pJt=Fg(),gJt=z$();uKe.exports=function(t,r,n,i){function a(h,d){return sKe.coerce(t,r,gJt,h,d)}a(\"carpet\"),r.xaxis=\"x\",r.yaxis=\"y\";var o=a(\"a\"),s=a(\"b\"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a(\"text\"),a(\"texttemplate\"),a(\"texttemplatefallback\"),a(\"hovertext\");var u=l<fJt.PTS_LINESONLY?\"lines+markers\":\"lines\";a(\"mode\",u),W5.hasMarkers(r)&&hJt(t,r,n,i,a,{gradient:!0}),W5.hasLines(r)&&(dJt(t,r,n,i,a,{backoff:!0}),lKe(t,r,a),a(\"connectgaps\")),W5.hasText(r)&&vJt(t,r,i,a);var c=[];(W5.hasMarkers(r)||W5.hasText(r))&&(a(\"marker.maxdisplayed\"),c.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(pJt(t,r,n,a),W5.hasLines(r)||lKe(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&c.push(\"fills\");var f=a(\"hoveron\",c.join(\"+\")||\"points\");f!==\"fills\"&&(a(\"hovertemplate\"),a(\"hovertemplatefallback\")),a(\"zorder\"),sKe.coerceSelectionMarkerOpacity(r,a)}});var hKe=ye((hwr,fKe)=>{\"use strict\";fKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var r9=ye((dwr,dKe)=>{\"use strict\";dKe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i<r;i++){var a=e._fullData[i];if(a.index!==t.index&&a.type===\"carpet\"&&(n||(n=a),a.carpet===t.carpet))return a}return n}});var gKe=ye((vwr,pKe)=>{\"use strict\";var vKe=Eo(),mJt=z0(),yJt=Rm(),_Jt=O0(),xJt=q0().calcMarkerSize,bJt=r9();pKe.exports=function(t,r){var n=r._carpetTrace=bJt(t,r);if(!(!n||!n.visible||n.visible===\"legendonly\")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i<a;i++)if(s=r.a[i],l=r.b[i],vKe(s)&&vKe(l)){var c=n.ab2xy(+s,+l,!0),f=n.isVisible(+s,+l);f||(u=!0),o[i]={x:c[0],y:c[1],a:s,b:l,vis:f}}else o[i]={x:!1,y:!1};return r._needsCull=u,o[0].carpet=n,o[0].trace=r,xJt(r,a),mJt(t,r),yJt(o,r),_Jt(o,r),o}}});var _Ke=ye((pwr,yKe)=>{\"use strict\";var wJt=dT(),mKe=ho(),TJt=So();yKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=mKe.getFromId(t,l.xaxis||\"x\"),c=mKe.getFromId(t,l.yaxis||\"y\"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a<n.length;a++)o=n[a][0].trace,o._xA=u,o._yA=c;for(wJt(t,f,n,i),a=0;a<n.length;a++)o=n[a][0].trace,s=i.selectAll(\"g.trace\"+o.uid+\" .js-line\"),TJt.setClipUrl(s,n[a][0].carpet._clipPathId,t)}});var bKe=ye((gwr,xKe)=>{\"use strict\";var AJt=mT(),SJt=Dr().fillText;xKe.exports=function(t,r,n,i){var a=AJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),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,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var _=[];function b(E,T){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,\"\"):L=E._hovertitle,_.push(L+\": \"+T.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split(\"+\");k.indexOf(\"all\")!==-1&&(k=[\"a\",\"b\",\"text\"]),k.indexOf(\"a\")!==-1&&b(d.aaxis,f.a),k.indexOf(\"b\")!==-1&&b(d.baxis,f.b),_.push(\"y: \"+o.yLabel),k.indexOf(\"text\")!==-1&&SJt(f,h,_),o.extraText=_.join(\"<br>\")}return a}});var TKe=ye((mwr,wKe)=>{\"use strict\";wKe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var SKe=ye((ywr,AKe)=>{\"use strict\";AKe.exports={attributes:z$(),supplyDefaults:cKe(),colorbar:$d(),formatLabels:hKe(),calc:gKe(),plot:_Ke(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:bKe(),selectPoints:yT(),eventData:TKe(),moduleType:\"trace\",name:\"scattercarpet\",basePlotModule:mh(),categories:[\"svg\",\"carpet\",\"symbols\",\"showLegend\",\"carpetDependent\",\"zoomScale\"],meta:{}}});var EKe=ye((_wr,MKe)=>{\"use strict\";MKe.exports=SKe()});var O$=ye((xwr,kKe)=>{\"use strict\";var cg=FT(),T1=O4(),MJt=Tu(),EJt=Ao().extendFlat,ly=T1.contours;kKe.exports=EJt({carpet:{valType:\"string\",editType:\"calc\"},z:cg.z,a:cg.x,a0:cg.x0,da:cg.dx,b:cg.y,b0:cg.y0,db:cg.dy,text:cg.text,hovertext:cg.hovertext,transpose:cg.transpose,atype:cg.xtype,btype:cg.ytype,fillcolor:T1.fillcolor,autocontour:T1.autocontour,ncontours:T1.ncontours,contours:{type:ly.type,start:ly.start,end:ly.end,size:ly.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:ly.showlines,showlabels:ly.showlabels,labelfont:ly.labelfont,labelformat:ly.labelformat,operation:ly.operation,value:ly.value,editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:T1.line.color,width:T1.line.width,dash:T1.line.dash,smoothing:T1.line.smoothing,editType:\"plot\"},zorder:T1.zorder},MJt(\"\",{cLetter:\"z\",autoColorDflt:!1}))});var q$=ye((bwr,PKe)=>{\"use strict\";var CKe=Dr(),kJt=n8(),LKe=O$(),CJt=RG(),LJt=k8(),PJt=C8();PKe.exports=function(t,r,n,i){function a(u,c){return CKe.coerce(t,r,LKe,u,c)}function o(u){return CKe.coerce2(t,r,LKe,u)}if(a(\"carpet\"),t.a&&t.b){var s=kJt(t,r,a,i,\"a\",\"b\");if(!s){r.visible=!1;return}a(\"text\");var l=a(\"contours.type\")===\"constraint\";l?CJt(t,r,a,i,n,{hasHover:!1}):(LJt(t,r,a,o),PJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a(\"zorder\")}});var FKe=ye((wwr,DKe)=>{\"use strict\";var IJt=gv(),IKe=Dr(),RJt=s8(),DJt=u8(),FJt=c8(),zJt=f8(),RKe=rG(),OJt=q$(),qJt=r9(),BJt=bG();DKe.exports=function(t,r){var n=r._carpetTrace=qJt(t,r);if(!(!n||!n.visible||n.visible===\"legendonly\")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),OJt(a,r,r._defaultColor,t._fullLayout)}var o=NJt(t,r);return BJt(r,r._z),o}};function NJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,IKe.isArray1D(t.z)&&RJt(t,n,i,\"a\",\"b\",[\"z\"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,\"_a\"):[],l=l?i.makeCalcdata(t,\"_b\"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=DJt(t._z||t.z,t.transpose),t._emptypoints=zJt(f),FJt(f,t._emptypoints);var h=IKe.maxRowLength(f),d=t.xtype===\"scaled\"?\"\":a,v=RKe(t,d,o,s,h,n),_=t.ytype===\"scaled\"?\"\":l,b=RKe(t,_,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type===\"levels\"&&t.contours.coloring!==\"none\"&&IJt(e,t,{vals:f,containerStr:\"\",cLetter:\"z\"}),[p]}});var OKe=ye((Twr,zKe)=>{\"use strict\";var UJt=Dr().isArrayOrTypedArray;zKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p=UJt(r)?\"a\":\"b\",k=p===\"a\"?e.aaxis:e.baxis,E=k.smoothing,T=p===\"a\"?e.a2i:e.b2j,L=p===\"a\"?r:n,x=p===\"a\"?n:r,C=p===\"a\"?t.a.length:t.b.length,M=p===\"a\"?t.b.length:t.a.length,g=Math.floor(p===\"a\"?e.b2j(x):e.a2i(x)),P=p===\"a\"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};E&&(o=Math.max(0,Math.min(M-2,g)),s=g-o,a=p===\"a\"?function(_e,Ce){return e.dxydi([],_e,o,Ce,s)}:function(_e,Ce){return e.dxydj([],o,_e,s,Ce)});var A=T(L[0]),z=T(L[1]),O=A<z?1:-1,U=(z-A)*1e-8,G=O>0?Math.floor:Math.ceil,Z=O>0?Math.ceil:Math.floor,j=O>0?Math.min:Math.max,N=O>0?Math.max:Math.min,H=G(A+U),re=Z(z-U);c=P(A);var oe=[[c]];for(i=H;i*O<re*O;i+=O)l=[],v=N(A,i),_=j(z,i+O),b=_-v,u=Math.max(0,Math.min(C-2,Math.floor(.5*(v+_)))),f=P(_),E&&(h=a(u,v-u),d=a(u,_-u),l.push([c[0]+h[0]/3*b,c[1]+h[1]/3*b]),l.push([f[0]-d[0]/3*b,f[1]-d[1]/3*b])),l.push(f),oe.push(l),c=f;return oe}});var HKe=ye((Awr,GKe)=>{\"use strict\";var n9=Oa(),a9=I$(),VKe=R$(),pC=So(),A1=Dr(),VJt=TG(),GJt=AG(),Tw=I8(),i9=B4(),HJt=kG(),jJt=EG(),WJt=CG(),XJt=r9(),qKe=OKe();GKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;A1.makeTraceGroups(i,n,\"contour\").each(function(s){var l=n9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=XJt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible===\"legendonly\")return;var d=u.a,v=u.b,_=c.contours,b=jJt(_,r,u),p=_.type===\"constraint\",k=_._operation,E=p?k===\"=\"?\"lines\":\"fill\":_.coloring;function T(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];VJt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;GJt(b,x,C);var M=b;_.type===\"constraint\"&&(M=HJt(b,k)),ZJt(b,T);var g,P,A,z,O=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=a9([],g.x,a.c2p),A=a9([],g.y,o.c2p),P.reverse(),A.reverse(),O.push(VKe(P,A,g.bicubic));var U=\"M\"+O.join(\"L\")+\"Z\";JJt(l,h.clipsegments,a,o,p,E),$Jt(c,l,a,o,M,L,T,f,h,E,U),YJt(l,b,t,u,_,r,f),pC.setClipUrl(l,f._clipPathId,t)})};function ZJt(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;r<e.length;r++){for(a=e[r],o=a.pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(c=a.edgepaths[n],l=[],i=0;i<c.length;i++)l[i]=t(c[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(c=a.paths[n],u=[],i=0;i<c.length;i++)u[i]=t(c[i]);s.push(u)}}}function YJt(e,t,r,n,i,a,o){var s=r._context.staticPlot,l=A1.ensureSingle(e,\"g\",\"contourlines\"),u=i.showlines!==!1,c=i.showlabels,f=u&&c,h=Tw.createLines(l,u||c,t,s),d=Tw.createLineClip(l,f,r,n.trace.uid),v=e.selectAll(\"g.contourlabels\").data(c?[0]:[]);if(v.exit().remove(),v.enter().append(\"g\").classed(\"contourlabels\",!0),c){var _=a.xaxis,b=a.yaxis,p=_._length,k=b._length,E=[[[0,0],[p,0],[p,k],[0,k]]],T=[];A1.clearLocationCache();var L=Tw.labelFormatter(r,n),x=pC.tester.append(\"text\").attr(\"data-notex\",1).call(pC.font,i.labelfont),C={left:0,right:p,center:p/2,top:0,bottom:k,middle:k/2},M=Math.sqrt(p*p+k*k),g=i9.LABELDISTANCE*M/Math.max(1,t.length/i9.LABELINCREASE);h.each(function(P){var A=Tw.calcTextOpts(P.level,L,x,r);n9.select(this).selectAll(\"path\").each(function(z){var O=this,U=A1.getVisibleSegment(O,C,A.height/2);if(U&&(KJt(O,z,P,U,o,A.height),!(U.len<(A.width+A.height)*i9.LABELMIN)))for(var G=Math.min(Math.ceil(U.len/g),i9.LABELMAX),Z=0;Z<G;Z++){var j=Tw.findBestTextLocation(O,U,A,T,C);if(!j)break;Tw.addLabelData(j,A,T,E)}})}),x.remove(),Tw.drawLabels(v,T,r,d,f?E:null)}c&&!u&&h.remove()}function KJt(e,t,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)t===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],u=i.a[i.a.length-1],c=i.b[0],f=i.b[i.b.length-1];function h(p,k){var E=0,T,L=.1;return(Math.abs(p[0]-l)<L||Math.abs(p[0]-u)<L)&&(T=NKe(i.dxydb_rough(p[0],p[1],L)),E=Math.max(E,a*UKe(k,T)/2)),(Math.abs(p[1]-c)<L||Math.abs(p[1]-f)<L)&&(T=NKe(i.dxyda_rough(p[0],p[1],L)),E=Math.max(E,a*UKe(k,T)/2)),E}var d=BKe(e,0,1),v=BKe(e,n.total,n.total-1),_=h(o[0],d),b=n.total-h(o[o.length-1],v);n.min<_&&(n.min=_),n.max>b&&(n.max=b),n.len=n.max-n.min}function BKe(e,t,r){var n=e.getPointAtLength(t),i=e.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 NKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function UKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function JJt(e,t,r,n,i,a){var o,s,l,u,c=A1.ensureSingle(e,\"g\",\"contourbg\"),f=c.selectAll(\"path\").data(a===\"fill\"&&!i?[0]:[]);f.enter().append(\"path\"),f.exit().remove();var h=[];for(u=0;u<t.length;u++)o=t[u],s=a9([],o.x,r.c2p),l=a9([],o.y,n.c2p),h.push(VKe(s,l,o.bicubic));f.attr(\"d\",\"M\"+h.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}function $Jt(e,t,r,n,i,a,o,s,l,u,c){var f=u===\"fill\";f&&WJt(i,e.contours);var h=A1.ensureSingle(t,\"g\",\"contourfill\"),d=h.selectAll(\"path\").data(f?i:[]);d.enter().append(\"path\"),d.exit().remove(),d.each(function(v){var _=(v.prefixBoundary?c:\"\")+QJt(e,v,a,o,s,l,r,n);_?n9.select(this).attr(\"d\",_).style(\"stroke\",\"none\"):n9.select(this).remove()})}function QJt(e,t,r,n,i,a,o,s){var l,u=\"\",c=t.edgepaths.map(function(A,z){return z}),f=!0,h,d,v,_,b,p,k=Math.abs(r[0][0]-r[2][0])*1e-4,E=Math.abs(r[0][1]-r[2][1])*1e-4;function T(A){return Math.abs(A[1]-r[0][1])<E}function L(A){return Math.abs(A[1]-r[2][1])<E}function x(A){return Math.abs(A[0]-r[0][0])<k}function C(A){return Math.abs(A[0]-r[2][0])<k}function M(A,z){var O,U,G,Z,j=\"\";for(T(A)&&!C(A)||L(A)&&!x(A)?(Z=i.aaxis,G=qKe(i,a,[A[0],z[0]],.5*(A[1]+z[1]))):(Z=i.baxis,G=qKe(i,a,.5*(A[0]+z[0]),[A[1],z[1]])),O=1;O<G.length;O++)for(j+=Z.smoothing?\"C\":\"L\",U=0;U<G[O].length;U++){var N=G[O][U];j+=[o.c2p(N[0]),s.c2p(N[1])]+\" \"}return j}for(l=0,h=null;c.length;){var g=t.edgepaths[l][0];for(h&&(u+=M(h,g)),p=pC.smoothopen(t.edgepaths[l].map(n),t.smoothing),u+=f?p:p.replace(/^M/,\"L\"),c.splice(c.indexOf(l),1),h=t.edgepaths[l][t.edgepaths[l].length-1],_=-1,v=0;v<4;v++){if(!h){A1.log(\"Missing end?\",l,t);break}for(T(h)&&!C(h)?d=r[1]:x(h)?d=r[0]:L(h)?d=r[3]:C(h)&&(d=r[2]),b=0;b<t.edgepaths.length;b++){var P=t.edgepaths[b][0];Math.abs(h[0]-d[0])<k?Math.abs(h[0]-P[0])<k&&(P[1]-h[1])*(d[1]-P[1])>=0&&(d=P,_=b):Math.abs(h[1]-d[1])<E?Math.abs(h[1]-P[1])<E&&(P[0]-h[0])*(d[0]-P[0])>=0&&(d=P,_=b):A1.log(\"endpt to newendpt is not vert. or horz.\",h,d,P)}if(_>=0)break;u+=M(h,d),h=d}if(_===t.edgepaths.length){A1.log(\"unclosed perimeter path\");break}l=_,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+\"Z\",h=null)}for(l=0;l<t.paths.length;l++)u+=pC.smoothclosed(t.paths[l].map(n),t.smoothing);return u}});var WKe=ye((Swr,jKe)=>{\"use strict\";jKe.exports={attributes:O$(),supplyDefaults:q$(),colorbar:F8(),calc:FKe(),plot:HKe(),style:D8(),moduleType:\"trace\",name:\"contourcarpet\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"carpet\",\"contour\",\"symbols\",\"showLegend\",\"hasLines\",\"carpetDependent\",\"noHover\",\"noSortingByValue\"],meta:{}}});var ZKe=ye((Mwr,XKe)=>{\"use strict\";XKe.exports=WKe()});var s9=ye((Ewr,QKe)=>{\"use strict\";var o9=Dr().extendFlat,gC=pf(),YKe=df().axisHoverFormat,{hovertemplateAttrs:e$t,templatefallbackAttrs:t$t}=Ll(),JKe=Pd().dash,r$t=v3(),$Ke=JT(),i$t=$Ke.INCREASING.COLOR,n$t=$Ke.DECREASING.COLOR,B$=gC.line;function KKe(e){return{line:{color:o9({},B$.color,{dflt:e}),width:B$.width,dash:JKe,editType:\"style\"},editType:\"style\"}}QKe.exports={xperiod:gC.xperiod,xperiod0:gC.xperiod0,xperiodalignment:gC.xperiodalignment,xhoverformat:YKe(\"x\"),yhoverformat:YKe(\"y\"),x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},open:{valType:\"data_array\",editType:\"calc\"},high:{valType:\"data_array\",editType:\"calc\"},low:{valType:\"data_array\",editType:\"calc\"},close:{valType:\"data_array\",editType:\"calc\"},line:{width:o9({},B$.width,{}),dash:o9({},JKe,{}),editType:\"style\"},increasing:KKe(i$t),decreasing:KKe(n$t),text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertemplate:e$t({},{keys:[\"open\",\"high\",\"low\",\"close\"]}),hovertemplatefallback:t$t(),tickwidth:{valType:\"number\",min:0,max:.5,dflt:.3,editType:\"calc\"},hoverlabel:o9({},r$t.hoverlabel,{split:{valType:\"boolean\",dflt:!1,editType:\"style\"}}),zorder:gC.zorder}});var N$=ye((kwr,eJe)=>{\"use strict\";var a$t=qa(),o$t=Dr();eJe.exports=function(t,r,n,i){var a=n(\"x\"),o=n(\"open\"),s=n(\"high\"),l=n(\"low\"),u=n(\"close\");n(\"hoverlabel.split\");var c=a$t.getComponentMethod(\"calendars\",\"handleTraceDefaults\");if(c(t,r,[\"x\"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,o$t.minRowLength(a))),r._length=f,f}}});var iJe=ye((Cwr,rJe)=>{\"use strict\";var s$t=Dr(),l$t=N$(),u$t=Dg(),c$t=s9();rJe.exports=function(t,r,n,i){function a(s,l){return s$t.coerce(t,r,c$t,s,l)}var o=l$t(t,r,a,i);if(!o){r.visible=!1;return}u$t(t,r,i,a,{x:!0}),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"line.width\"),a(\"line.dash\"),tJe(t,r,a,\"increasing\"),tJe(t,r,a,\"decreasing\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"tickwidth\"),i._requestRangeslider[r.xaxis]=!0,a(\"zorder\")};function tJe(e,t,r,n){r(n+\".line.color\"),r(n+\".line.width\",t.line.width),r(n+\".line.dash\",t.line.dash)}});var U$=ye((Lwr,aJe)=>{\"use strict\";var X5=Dr(),l9=X5._,u9=ho(),f$t=zg(),mC=fs().BADNUM;function h$t(e,t){var r=u9.getFromId(e,t.xaxis),n=u9.getFromId(e,t.yaxis),i=v$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=nJe(e,t,o,s,n,d$t);return t._extremes[r._id]=u9.findExtremes(r,s,{vpad:a/2}),l.length?(X5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function d$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function nJe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,\"open\"),s=i.makeCalcdata(t,\"high\"),l=i.makeCalcdata(t,\"low\"),u=i.makeCalcdata(t,\"close\"),c=X5.isArrayOrTypedArray(t.text),f=X5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,_=[],b=0;b<n.length;b++){var p=n[b],k=o[b],E=s[b],T=l[b],L=u[b];if(p!==mC&&k!==mC&&E!==mC&&T!==mC&&L!==mC){L===k?d!==null&&L!==d&&(h=L>d):h=L>k,d=L;var x=a(k,E,T,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?\"increasing\":\"decreasing\",x.x=x.pos,x.y=[T,E],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),_.push(x)}else _.push({pos:p,empty:!0})}return t._extremes[i._id]=u9.findExtremes(i,X5.concat(l,s),{padded:!0}),_.length&&(_[0].t={labels:{open:l9(e,\"open:\")+\" \",high:l9(e,\"high:\")+\" \",low:l9(e,\"low:\")+\" \",close:l9(e,\"close:\")+\" \"}}),_}function v$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o<i.length;o++){var s=i[o];if(s.type===\"ohlc\"&&s.visible===!0&&s.xaxis===t._id){a.push(s);var l=t.makeCalcdata(s,\"x\");s._origX=l;var u=f$t(r,t,\"x\",l).vals;s._xcalc=u;var c=X5.distinctVals(u).minDiff;c&&isFinite(c)&&(n=Math.min(n,c))}}for(n===1/0&&(n=1),o=0;o<a.length;o++)a[o]._minDiff=n}return n*r.tickwidth}aJe.exports={calc:h$t,calcCommon:nJe}});var lJe=ye((Pwr,sJe)=>{\"use strict\";var p$t=Oa(),oJe=Dr();sJe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;oJe.makeTraceGroups(i,n,\"trace ohlc\").each(function(l){var u=p$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll(\"path\").data(oJe.identity);v.enter().append(\"path\"),v.exit().remove(),v.attr(\"d\",function(_){if(_.empty)return\"M0,0Z\";var b=o.c2p(_.pos-d,!0),p=o.c2p(_.pos+d,!0),k=s?(b+p)/2:o.c2p(_.pos,!0),E=a.c2p(_.o,!0),T=a.c2p(_.h,!0),L=a.c2p(_.l,!0),x=a.c2p(_.c,!0);return\"M\"+b+\",\"+E+\"H\"+k+\"M\"+k+\",\"+T+\"V\"+L+\"M\"+p+\",\"+x+\"H\"+k})})}});var cJe=ye((Iwr,uJe)=>{\"use strict\";var V$=Oa(),g$t=So(),m$t=ka();uJe.exports=function(t,r,n){var i=n||V$.select(t).selectAll(\"g.ohlclayer\").selectAll(\"g.trace\");i.style(\"opacity\",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;V$.select(this).selectAll(\"path\").each(function(s){if(!s.empty){var l=o[s.dir].line;V$.select(this).style(\"fill\",\"none\").call(m$t.stroke,l.color).call(g$t.dashLine,l.dash,l.width).style(\"opacity\",o.selectedpoints&&!s.selected?.3:1)}})})}});var H$=ye((Rwr,pJe)=>{\"use strict\";var G$=ho(),y$t=Dr(),c9=vf(),_$t=ka(),x$t=Dr().fillText,fJe=JT(),b$t={increasing:fJe.INCREASING.SYMBOL,decreasing:fJe.DECREASING.SYMBOL};function w$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?dJe(e,t,r,n):vJe(e,t,r,n)}function hJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l===\"ohlc\"?\"l\":\"min\",c=l===\"ohlc\"?\"h\":\"max\",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},_=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,_/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var A=v(P);return c9.inbox(A-b,A+b,f)}function E(P){var A=P[u],z=P[c];return A===z||c9.inbox(A-r,z-r,f)}function T(P){return(k(P)+E(P))/2}var L=c9.getDistanceFunction(n,k,E,T);if(c9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,M=o[C],g=M.line.color;return _$t.opacity(g)&&M.line.width?e.color=g:e.color=M.fillcolor,e.x0=a.c2p(x.pos+d-_,!0),e.x1=a.c2p(x.pos+d+_,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=T(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function dJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=hJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||\"\";if(f===\"none\"||f===\"skip\")return[];for(var h=[\"high\",\"open\",\"close\",\"low\"],d={},v=0;v<h.length;v++){var _=h[v],b=o[_][u.index],p=a.c2p(b,!0),k;b in d?(k=d[b],k.yLabel+=\"<br>\"+s.labels[_]+G$.hoverLabelText(a,b,o.yhoverformat)):(k=y$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[_]+G$.hoverLabelText(a,b,o.yhoverformat),k.name=\"\",l.push(k),d[b]=k)}return l}function vJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=hJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(T){return s.labels[T]+G$.hoverLabelText(a,o[T][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||\"\",_=v.split(\"+\"),b=v===\"all\",p=b||_.indexOf(\"y\")!==-1,k=b||_.indexOf(\"text\")!==-1,E=p?[d(\"open\"),d(\"high\"),d(\"low\"),d(\"close\")+\"  \"+b$t[h]]:[];return k&&x$t(c,o,E),l.extraText=E.join(\"<br>\"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}pJe.exports={hoverPoints:w$t,hoverSplit:dJe,hoverOnPoints:vJe}});var j$=ye((Dwr,gJe)=>{\"use strict\";gJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++){var u=n[s];r.contains([i.c2p(u.pos+l),a.c2p(u.yc)],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.pos),y:a.c2d(u.yc)}),u.selected=1):u.selected=0}return o}});var yJe=ye((Fwr,mJe)=>{\"use strict\";mJe.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"showLegend\"],meta:{},attributes:s9(),supplyDefaults:iJe(),calc:U$().calc,plot:lJe(),style:cJe(),hoverPoints:H$().hoverPoints,selectPoints:j$()}});var xJe=ye((zwr,_Je)=>{\"use strict\";_Je.exports=yJe()});var X$=ye((Owr,TJe)=>{\"use strict\";var W$=Dr().extendFlat,bJe=df().axisHoverFormat,vp=s9(),Z5=k4();function wJe(e){return{line:{color:W$({},Z5.line.color,{dflt:e}),width:Z5.line.width,editType:\"style\"},fillcolor:Z5.fillcolor,editType:\"style\"}}TJe.exports={xperiod:vp.xperiod,xperiod0:vp.xperiod0,xperiodalignment:vp.xperiodalignment,xhoverformat:bJe(\"x\"),yhoverformat:bJe(\"y\"),x:vp.x,open:vp.open,high:vp.high,low:vp.low,close:vp.close,line:{width:W$({},Z5.line.width,{}),editType:\"style\"},increasing:wJe(vp.increasing.line.color.dflt),decreasing:wJe(vp.decreasing.line.color.dflt),text:vp.text,hovertext:vp.hovertext,hovertemplate:vp.hovertemplate,hovertemplatefallback:vp.hovertemplatefallback,whiskerwidth:W$({},Z5.whiskerwidth,{dflt:0}),hoverlabel:vp.hoverlabel,zorder:Z5.zorder}});var MJe=ye((qwr,SJe)=>{\"use strict\";var T$t=Dr(),A$t=ka(),S$t=N$(),M$t=Dg(),E$t=X$();SJe.exports=function(t,r,n,i){function a(s,l){return T$t.coerce(t,r,E$t,s,l)}var o=S$t(t,r,a,i);if(!o){r.visible=!1;return}M$t(t,r,i,a,{x:!0}),a(\"xhoverformat\"),a(\"yhoverformat\"),a(\"line.width\"),AJe(t,r,a,\"increasing\"),AJe(t,r,a,\"decreasing\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),a(\"whiskerwidth\"),i._requestRangeslider[r.xaxis]=!0,a(\"zorder\")};function AJe(e,t,r,n){var i=r(n+\".line.color\");r(n+\".line.width\",t.line.width),r(n+\".fillcolor\",A$t.addOpacity(i,.5))}});var LJe=ye((Bwr,CJe)=>{\"use strict\";var EJe=Dr(),kJe=ho(),k$t=zg(),C$t=U$().calcCommon;CJe.exports=function(e,t){var r=e._fullLayout,n=kJe.getFromId(e,t.xaxis),i=kJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,\"x\"),o=k$t(t,n,\"x\",a).vals,s=C$t(e,t,a,o,i,L$t);return s.length?(EJe.extendFlat(s[0].t,{num:r._numBoxes,dPos:EJe.distinctVals(o).minDiff/2,posLetter:\"x\",valLetter:\"y\"}),r._numBoxes++,s):[{t:{empty:!0}}]};function L$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var IJe=ye((Nwr,PJe)=>{\"use strict\";PJe.exports={moduleType:\"trace\",name:\"candlestick\",basePlotModule:mh(),categories:[\"cartesian\",\"svg\",\"showLegend\",\"candlestick\",\"boxLayout\"],meta:{},attributes:X$(),layoutAttributes:C4(),supplyLayoutDefaults:$I().supplyLayoutDefaults,crossTraceCalc:e8().crossTraceCalc,supplyDefaults:MJe(),calc:LJe(),plot:t8().plot,layerName:\"boxlayer\",style:r8().style,hoverPoints:H$().hoverPoints,selectPoints:j$()}});var DJe=ye((Uwr,RJe)=>{\"use strict\";RJe.exports=IJe()});var Y$=ye((Vwr,FJe)=>{\"use strict\";var h9=Dr(),P$t=xm(),f9=h9.deg2rad,Z$=h9.rad2deg;FJe.exports=function(t,r,n){switch(P$t(t,n),t._id){case\"x\":case\"radialaxis\":I$t(t,r);break;case\"angularaxis\":F$t(t,r);break}};function I$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function R$t(e,t){return t===\"degrees\"?f9(e):e}function D$t(e,t){return t===\"degrees\"?Z$(e):e}function F$t(e,t){var r=e.type;if(r===\"linear\"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return R$t(n(a),o)},e.c2d=function(a,o){return i(D$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c<l;c++)u[c]=f(s[c]);else{var h=o+\"0\",d=\"d\"+o,v=h in a?f(a[h]):0,_=a[d]?f(a[d]):(e.period||2*Math.PI)/l;for(u=new Array(l),c=0;c<l;c++)u[c]=v+c*_}return u},e.setGeometry=function(){var a=t.sector,o=a.map(f9),s={clockwise:-1,counterclockwise:1}[e.direction],l=f9(e.rotation),u=function(p){return s*p+l},c=function(p){return(p-l)/s},f,h,d,v;switch(r){case\"linear\":h=f=h9.identity,v=f9,d=Z$,e.range=h9.isFullCircle(o)?[a[0],a[0]+360]:o.map(c).map(Z$);break;case\"category\":var _=e._categories.length,b=e.period?Math.max(e.period,_):_;b===0&&(b=1),h=v=function(p){return p*2*Math.PI/b},f=d=function(p){return p*b/Math.PI/2},e.range=[0,b];break}e.c2g=function(p){return u(h(p))},e.g2c=function(p){return f(c(p))},e.t2g=function(p){return u(v(p))},e.g2t=function(p){return d(c(p))}}}});var d9=ye((Gwr,zJe)=>{\"use strict\";zJe.exports={attr:\"subplot\",name:\"polar\",axisNames:[\"angularaxis\",\"radialaxis\"],axisName2dataArray:{angularaxis:\"theta\",radialaxis:\"r\"},layerNames:[\"draglayer\",\"plotbg\",\"backplot\",\"angular-grid\",\"radial-grid\",\"frontplot\",\"angular-line\",\"radial-line\",\"angular-axis\",\"radial-axis\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var p9=ye((Hwr,UJe)=>{\"use strict\";var Aw=Dr(),OJe=FM().tester,K$=Aw.findIndexOfMin,BJe=Aw.isAngleInsideSector,z$t=Aw.angleDelta,qJe=Aw.angleDist;function O$t(e,t,r,n,i){if(!BJe(t,n))return!1;var a,o;r[0]<r[1]?(a=r[0],o=r[1]):(a=r[1],o=r[0]);var s=OJe(Y5(a,n[0],n[1],i)),l=OJe(Y5(o,n[0],n[1],i)),u=[e*Math.cos(t),e*Math.sin(t)];return l.contains(u)&&!s.contains(u)}function NJe(e,t,r,n){var i,a,o=n[0],s=n[1],l=v9(Math.sin(t)-Math.sin(e)),u=v9(Math.cos(t)-Math.cos(e)),c=Math.tan(r),f=v9(1/c),h=l/u,d=s-h*o;return f?l&&u?(i=d/(c-h),a=c*i):u?(i=s*f,a=s):(i=o,a=o*c):l&&u?(i=0,a=d):u?(i=0,a=s):i=a=NaN,[i,a]}function q$t(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,t*u+i+n],[c,t*c+i+n]]}function B$t(e,t){var r=t.length,n=new Array(r+1),i;for(i=0;i<r;i++){var a=t[i];n[i]=[e*Math.cos(a),e*Math.sin(a)]}return n[i]=n[0].slice(),n}function N$t(e,t,r,n){var i=n.length,a=[],o,s;function l(p){return[e*Math.cos(p),e*Math.sin(p)]}function u(p,k,E){return NJe(p,k,E,l(p))}function c(p){return Aw.mod(p,i)}function f(p){return BJe(p,[t,r])}var h=K$(n,function(p){return f(p)?qJe(p,t):1/0}),d=u(n[h],n[c(h-1)],t);for(a.push(d),o=h,s=0;s<i;o++,s++){var v=n[c(o)];if(!f(v))break;a.push(l(v))}var _=K$(n,function(p){return f(p)?qJe(p,r):1/0}),b=u(n[_],n[c(_+1)],r);return a.push(b),a.push([0,0]),a.push(a[0].slice()),a}function Y5(e,t,r,n){return Aw.isFullCircle([t,r])?B$t(e,n):N$t(e,t,r,n)}function U$t(e,t,r,n){for(var i=1/0,a=1/0,o=Y5(e,t,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]}function V$t(e,t){var r=function(a){var o=z$t(a,e);return o>0?o:1/0},n=K$(t,r),i=Aw.mod(n+1,t.length);return[t[n],t[i]]}function v9(e){return Math.abs(e)>1e-10?e:0}function J$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a<n;a++){var o=e[a];i[a]=[t+o[0],r-o[1]]}return i}function G$t(e,t,r,n,i,a){var o=Y5(e,t,r,n);return\"M\"+J$(o,i,a).join(\"L\")}function H$t(e,t,r,n,i,a,o){var s,l;e<t?(s=e,l=t):(s=t,l=e);var u=J$(Y5(s,r,n,i),a,o),c=J$(Y5(l,r,n,i),a,o);return\"M\"+c.reverse().join(\"L\")+\"M\"+u.join(\"L\")}UJe.exports={isPtInsidePolygon:O$t,findPolygonOffset:U$t,findEnclosingVertexAngles:V$t,findIntersectionXY:NJe,findXYatLength:q$t,clampTiny:v9,pathPolygon:G$t,pathPolygonAnnulus:H$t}});var $$=ye((jwr,HJe)=>{\"use strict\";function VJe(e){return e<0?-1:e>0?1:0}function K5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function J5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function GJe(e,t){return t*e.radius}function j$t(e,t,r,n){var i=J5(e,K5([r,t])),a=i[0],o=i[1],s=J5(e,K5([n,t])),l=s[0],u=s[1];if(t===0)return[\"M\"+a+\",\"+o,\"L\"+l+\",\"+u].join(\" \");var c=GJe(e,1/Math.abs(t));return[\"M\"+a+\",\"+o,\"A\"+c+\",\"+c+\" 0 0,\"+(t<0?1:0)+\" \"+l+\",\"+u].join(\" \")}function W$t(e,t,r,n){var i=GJe(e,1/(t+1)),a=J5(e,K5([t,r])),o=a[0],s=a[1],l=J5(e,K5([t,n])),u=l[0],c=l[1];if(VJe(r)!==VJe(n)){var f=J5(e,K5([t,0])),h=f[0],d=f[1];return[\"M\"+o+\",\"+s,\"A\"+i+\",\"+i+\" 0 0,\"+(0<r?0:1)+\" \"+h+\",\"+d,\"A\"+i+\",\"+i+\" 0 0,\"+(n<0?0:1)+u+\",\"+c].join(\" \")}return[\"M\"+o+\",\"+s,\"A\"+i+\",\"+i+\" 0 0,\"+(n<r?0:1)+\" \"+u+\",\"+c].join(\" \")}HJe.exports={smith:K5,reactanceArc:j$t,resistanceArc:W$t,smithTransform:J5}});var tQ=ye((Wwr,QJe)=>{\"use strict\";var Sw=Oa(),X$t=fd(),Ew=qa(),Xc=Dr(),uy=Xc.strRotate,xd=Xc.strTranslate,Q$=ka(),yC=So(),Z$t=Mc(),pp=ho(),Y$t=xm(),K$t=Y$(),J$t=Mg().doAutoRange,S1=jN(),y9=yv(),jJe=vf(),$$t=zb(),Q$t=Of().prepSelect,eQt=Of().selectOnClick,eQ=Of().clearOutline,WJe=Eg(),XJe=bM(),ZJe=CM().redrawReglTraces,tQt=Dh().MID_SHIFT,Bx=d9(),M1=p9(),_9=$$(),g9=_9.smith,rQt=_9.reactanceArc,iQt=_9.resistanceArc,m9=_9.smithTransform,nQt=Xc._,YJe=Xc.mod,Nx=Xc.deg2rad,Mw=Xc.rad2deg;function KJe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i=\"clip\"+n._uid+t;this.clipIds.forTraces=i+\"-for-traces\",this.clipPaths.forTraces=n._clips.append(\"clipPath\").attr(\"id\",this.clipIds.forTraces),this.clipPaths.forTraces.append(\"path\"),this.framework=n[\"_\"+(r?\"smith\":\"polar\")+\"layer\"].append(\"g\").attr(\"class\",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Bd=KJe.prototype;QJe.exports=function(t,r,n){return new KJe(t,r,n)};Bd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){i=!0;break}}r._hasClipOnAxisFalse=i,r.updateLayers(t,n),r.updateLayout(t,n),Z$t.generalUpdatePerTraceModule(r.gd,r,e,n),r.updateFx(t,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)};Bd.updateLayers=function(e,t){var r=this,n=r.isSmith,i=r.layers,a=r.getRadial(t),o=r.getAngular(t),s=Bx.layerNames,l=s.indexOf(\"frontplot\"),u=s.slice(0,l),c=o.layer===\"below traces\",f=a.layer===\"below traces\";c&&u.push(\"angular-line\"),f&&u.push(\"radial-line\"),c&&u.push(\"angular-axis\"),f&&u.push(\"radial-axis\"),u.push(\"frontplot\"),c||u.push(\"angular-line\"),f||u.push(\"radial-line\"),c||u.push(\"angular-axis\"),f||u.push(\"radial-axis\");var h=(n?\"smith\":\"polar\")+\"sublayer\",d=r.framework.selectAll(\".\"+h).data(u,String);d.enter().append(\"g\").attr(\"class\",function(v){return h+\" \"+v}).each(function(v){var _=i[v]=Sw.select(this);switch(v){case\"frontplot\":n||_.append(\"g\").classed(\"barlayer\",!0),_.append(\"g\").classed(\"scatterlayer\",!0);break;case\"backplot\":_.append(\"g\").classed(\"maplayer\",!0);break;case\"plotbg\":i.bg=_.append(\"path\");break;case\"radial-grid\":_.style(\"fill\",\"none\");break;case\"angular-grid\":_.style(\"fill\",\"none\");break;case\"radial-line\":_.append(\"line\").style(\"fill\",\"none\");break;case\"angular-line\":_.append(\"path\").style(\"fill\",\"none\");break}}),d.order()};Bd.updateLayout=function(e,t){var r=this,n=r.layers,i=e._size,a=r.getRadial(t),o=r.getAngular(t),s=t.domain.x,l=t.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-l[1]);var u=r.xLength=i.w*(s[1]-s[0]),c=r.yLength=i.h*(l[1]-l[0]),f=r.getSector(t);r.sectorInRad=f.map(Nx);var h=r.sectorBBox=aQt(f),d=h[2]-h[0],v=h[3]-h[1],_=c/u,b=Math.abs(v/d),p,k,E,T,L;_>b?(p=u,k=u*b,L=(c-k)/i.h/2,E=[s[0],s[1]],T=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,E=[s[0]+L,s[1]-L],T=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=E,r.yDomain2=T;var x=r.xOffset2=i.l+i.w*E[0],C=r.yOffset2=i.t+i.h*(1-T[1]),M=r.radius=p/d,g=r.innerRadius=r.getHole(t)*M,P=r.cx=x-M*h[0],A=r.cy=C+M*h[3],z=r.cxx=P-x,O=r.cyy=A-C,U=a.side,G;U===\"counterclockwise\"?(G=U,U=\"top\"):U===\"clockwise\"&&(G=U,U=\"bottom\"),r.radialAxis=r.mockAxis(e,t,a,{_id:\"x\",side:U,_trueSide:G,domain:[g/i.w,M/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:\"right\",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:\"x\",domain:E}),r.yaxis=r.mockCartesianAxis(e,t,{_id:\"y\",domain:T});var Z=r.pathSubplot();r.clipPaths.forTraces.select(\"path\").attr(\"d\",Z).attr(\"transform\",xd(z,O)),n.frontplot.attr(\"transform\",xd(x,C)).call(yC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr(\"d\",Z).attr(\"transform\",xd(P,A)).call(Q$.fill,t.bgcolor)};Bd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return K$t(i,t,e),i};Bd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:\"linear\"},r);Y$t(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a===\"x\"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Bd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);J$t(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,\"gregorian\"),i.r2l(o[1],null,\"gregorian\")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]<i._rl[1]?i._rl[1]=Math.min(i._rl[1],l):i._rl[0]=Math.min(i._rl[0],l)}};Bd.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getRadial(t),c=YJe(r.getSector(t)[0],360),f=r.radialAxis,h=o<a,d=r.isSmith;d||(r.fillViewInitialKey(\"radialaxis.angle\",u.angle),r.fillViewInitialKey(\"radialaxis.range\",f.range.slice()),f.setGeometry()),f.tickangle===\"auto\"&&c>90&&c<=270&&(f.tickangle=180);var v=d?function(M){var g=m9(r,g9([M.x,0]));return xd(g[0]-s,g[1]-l)}:function(M){return xd(f.l2p(M.x)+o,0)},_=d?function(M){return iQt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=JJe(u);if(r.radialTickLayout!==b&&(i[\"radial-axis\"].selectAll(\".xtick\").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return pp.tickText(f,M,!0,!1)}):pp.calcTicks(f),E=d?k:pp.clipEnds(f,k),T=pp.getTickSigns(f)[2];d&&((f.ticks===\"top\"&&f.side===\"bottom\"||f.ticks===\"bottom\"&&f.side===\"top\")&&(T=-T),f.ticks===\"top\"&&f.side===\"top\"&&(p=-f.ticklen),f.ticks===\"bottom\"&&f.side===\"bottom\"&&(p=f.ticklen)),pp.drawTicks(n,f,{vals:k,layer:i[\"radial-axis\"],path:pp.makeTickPath(f,0,T),transFn:v,crisp:!1}),pp.drawGrid(n,f,{vals:E,layer:i[\"radial-grid\"],path:_,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,f,{vals:k,layer:i[\"radial-axis\"],transFn:v,labelFns:pp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?Mw($Je(Nx(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+uy(-L);_C(i[\"radial-axis\"],h&&(u.showticklabels||u.ticks),{transform:C}),_C(i[\"radial-grid\"],h&&u.showgrid,{transform:d?\"\":x}),_C(i[\"radial-line\"].select(\"line\"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr(\"stroke-width\",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+\"title\",c=0;if(l.title){var f=yC.bBox(n.layers[\"radial-axis\"].node()).height,h=l.title.font.size,d=l.side;c=d===\"top\"?h:d===\"counterclockwise\"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,_=Nx(v),b=Math.cos(_),p=Math.sin(_),k=o+a/2*b+c*p,E=s-a/2*p+c*b;n.layers[\"radial-axis-title\"]=$$t.draw(i,u,{propContainer:l,propName:n.id+\".radialaxis.title.text\",placeholder:nQt(i,\"Click to enter radial axis title\"),attributes:{x:k,y:E,\"text-anchor\":\"middle\"},transform:{rotate:-v}})}};Bd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey(\"angularaxis.rotation\",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=m9(r,g9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type===\"linear\"&&c.thetaunit===\"radians\"&&(c.tick0=Mw(c.tick0),c.dtick=Mw(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=m9(r,g9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},_=f?function(g){var P=m9(r,g9([0,g.x])),A=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+uy(-Mw(A))}:function(g){var P=h(g);return d(P)+uy(-Mw(P))},b=f?function(g){return rQt(r,g.x,0,1/0)}:function(g){var P=h(g),A=Math.cos(P),z=Math.sin(P);return\"M\"+[s+o*A,l-o*z]+\"L\"+[s+a*A,l-a*z]},p=pp.makeLabelFns(c,0),k=p.labelStandoff,E={};E.xFn=function(g){var P=h(g);return Math.cos(P)*k},E.yFn=function(g){var P=h(g),A=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*A)+Math.abs(Math.cos(P))*(g.fontSize*tQt)},E.anchorFn=function(g){var P=h(g),A=Math.cos(P);return Math.abs(A)<.1?\"middle\":A>0?\"start\":\"end\"},E.heightFn=function(g,P,A){var z=h(g);return-.5*(1+Math.sin(z))*A};var T=JJe(u);r.angularTickLayout!==T&&(i[\"angular-axis\"].selectAll(\".\"+c._id+\"tick\").remove(),r.angularTickLayout=T);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return pp.tickText(c,g,!0,!1)}):pp.calcTicks(c);f&&(L[0].text=\"\\u221E\",L[0].fontSize*=1.75);var x;if(t.gridshape===\"linear\"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type===\"category\"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks===\"inside\"?-1:1,M=(c.linewidth||1)/2;pp.drawTicks(n,c,{vals:L,layer:i[\"angular-axis\"],path:\"M\"+C*M+\",0h\"+C*c.ticklen,transFn:_,crisp:!1}),pp.drawGrid(n,c,{vals:L,layer:i[\"angular-grid\"],path:b,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,c,{vals:L,layer:i[\"angular-axis\"],repositionOnUpdate:!0,transFn:v,labelFns:E})}_C(i[\"angular-line\"].select(\"path\"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr(\"stroke-width\",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Bd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Bx.MINZOOM,s=Bx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,_=t.vangles,b=t.radialAxis,p=M1.clampTiny,k=M1.findXYatLength,E=M1.findEnclosingVertexAngles,T=Bx.cornerHalfWidth,L=Bx.cornerLen/2,x,C,M=S1.makeDragger(i,\"path\",\"maindrag\",e.dragmode===!1?\"none\":\"crosshair\");Sw.select(M).attr(\"d\",t.pathSubplot()).attr(\"transform\",xd(c,f)),M.onmousemove=function(ce){jJe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||y9.unhover(n,ce)};var g={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,A,z,O,U,G,Z,j,N;function H(ce,je){return Math.sqrt(ce*ce+je*je)}function re(ce,je){return H(ce-h,je-d)}function oe(ce,je){return Math.atan2(d-je,ce-h)}function _e(ce,je){return[ce*Math.cos(je),ce*Math.sin(-je)]}function Ce(ce,je){if(ce===0)return t.pathSector(2*T);var lt=L/ce,pt=je-lt,Vt=je+lt,ot=Math.max(0,Math.min(ce,l)),ut=ot-T,Wt=ot+T;return\"M\"+_e(ut,pt)+\"A\"+[ut,ut]+\" 0,0,0 \"+_e(ut,Vt)+\"L\"+_e(Wt,Vt)+\"A\"+[Wt,Wt]+\" 0,0,1 \"+_e(Wt,pt)+\"Z\"}function Le(ce,je,lt){if(ce===0)return t.pathSector(2*T);var pt=_e(ce,je),Vt=_e(ce,lt),ot=p((pt[0]+Vt[0])/2),ut=p((pt[1]+Vt[1])/2),Wt,Nt;if(ot&&ut){var $t=ut/ot,sr=-1/$t,Tr=k(T,$t,ot,ut);Wt=k(L,sr,Tr[0][0],Tr[0][1]),Nt=k(L,sr,Tr[1][0],Tr[1][1])}else{var fr,$e;ut?(fr=L,$e=T):(fr=T,$e=L),Wt=[[ot-fr,ut-$e],[ot+fr,ut-$e]],Nt=[[ot-fr,ut+$e],[ot+fr,ut+$e]]}return\"M\"+Wt.join(\"L\")+\"L\"+Nt.reverse().join(\"L\")+\"Z\"}function ge(){z=null,O=null,U=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=X$t(ce.bgcolor).getLuminance(),j=S1.makeZoombox(a,Z,c,f,U),j.attr(\"fill-rule\",\"evenodd\"),N=S1.makeCorners(a,c,f),eQ(n)}function ie(ce,je){return je=Math.max(Math.min(je,l),u),ce<s?ce=0:l-ce<s?ce=l:je<s?je=0:l-je<s&&(je=l),Math.abs(je-ce)>o?(ce<je?(z=ce,O=je):(z=je,O=ce),!0):(z=null,O=null,!1)}function Se(ce,je){ce=ce||U,je=je||\"M0,0Z\",j.attr(\"d\",ce),N.attr(\"d\",je),S1.transitionZoombox(j,N,G,Z),G=!0;var lt={};me(lt),n.emit(\"plotly_relayouting\",lt)}function Ee(ce,je){ce=ce*x,je=je*C;var lt=P+ce,pt=A+je,Vt=re(P,A),ot=Math.min(re(lt,pt),l),ut=oe(P,A),Wt,Nt;ie(Vt,ot)&&(Wt=U+t.pathSector(O),z&&(Wt+=t.pathSector(z)),Nt=Ce(z,ut)+Ce(O,ut)),Se(Wt,Nt)}function Ae(ce,je,lt,pt){var Vt=M1.findIntersectionXY(lt,pt,lt,[ce-h,d-je]);return H(Vt[0],Vt[1])}function Be(ce,je){var lt=P+ce,pt=A+je,Vt=oe(P,A),ot=oe(lt,pt),ut=E(Vt,_),Wt=E(ot,_),Nt=Ae(P,A,ut[0],ut[1]),$t=Math.min(Ae(lt,pt,Wt[0],Wt[1]),l),sr,Tr;ie(Nt,$t)&&(sr=U+t.pathSector(O),z&&(sr+=t.pathSector(z)),Tr=[Le(z,ut[0],ut[1]),Le(O,ut[0],ut[1])].join(\" \")),Se(sr,Tr)}function Pe(){if(S1.removeZoombox(n),!(z===null||O===null)){var ce={};me(ce),S1.showDoubleClickNotifier(n),Ew.call(\"_guiRelayout\",n,ce)}}function me(ce){var je=b._rl,lt=(je[1]-je[0])/(1-u/l)/l,pt=[je[0]+(z-u)*lt,je[0]+(O-u)*lt];ce[t.id+\".radialaxis.range\"]=pt}function De(ce,je){var lt=n._fullLayout.clickmode;if(S1.removeZoombox(n),ce===2){var pt={};for(var Vt in t.viewInitial)pt[t.id+\".\"+Vt]=t.viewInitial[Vt];n.emit(\"plotly_doubleclick\",null),Ew.call(\"_guiRelayout\",n,pt)}lt.indexOf(\"select\")>-1&&ce===1&&eQt(je,n,[t.xaxis],[t.yaxis],t.id,g),lt.indexOf(\"event\")>-1&&jJe.click(n,je,t.id)}g.prepFn=function(ce,je,lt){var pt=n._fullLayout.dragmode,Vt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var ot=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ut=Xc.apply3DTransform(ot)(je-Vt.left,lt-Vt.top);if(P=ut[0],A=ut[1],_){var Wt=M1.findPolygonOffset(l,v[0],v[1],_);P+=h+Wt[0],A+=d+Wt[1]}switch(pt){case\"zoom\":g.clickFn=De,r||(_?g.moveFn=Be:g.moveFn=Ee,g.doneFn=Pe,ge(ce,je,lt));break;case\"select\":case\"lasso\":Q$t(ce,je,lt,g,pt);break}},y9.init(g)};Bd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Bx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Nx(n.radialAxisAngle),v=c._rl,_=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,E,T,L;r?(E=l+(o+h)*Math.cos(d),T=u-(o+h)*Math.sin(d),L=\"radialdrag\"):(E=l+(s-h)*Math.cos(d),T=u-(s-h)*Math.sin(d),L=\"radialdrag-inner\");var x=S1.makeRectDragger(a,L,\"crosshair\",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),_C(Sw.select(x),c.visible&&s<o,{transform:xd(E,T)});var M,g,P;function A(Z,j){if(M)M(Z,j);else{var N=[Z,-j],H=[Math.cos(d),Math.sin(d)],re=Math.abs(Xc.dot(N,H)/Math.sqrt(Xc.dot(N,N)));isNaN(re)||(M=re<.5?U:G)}var oe={};z(oe),i.emit(\"plotly_relayouting\",oe)}function z(Z){g!==null?Z[n.id+\".radialaxis.angle\"]=g:P!==null&&(Z[n.id+\".radialaxis.range[\"+r+\"]\"]=P)}function O(){g!==null?Ew.call(\"_guiRelayout\",i,n.id+\".radialaxis.angle\",g):P!==null&&Ew.call(\"_guiRelayout\",i,n.id+\".radialaxis.range[\"+r+\"]\",P)}function U(Z,j){if(r!==0){var N=E+Z,H=T+j;g=Math.atan2(u-H,N-l),n.vangles&&(g=$Je(g,n.vangles)),g=Mw(g);var re=xd(l,u)+uy(-g);a[\"radial-axis\"].attr(\"transform\",re),a[\"radial-line\"].select(\"line\").attr(\"transform\",re);var oe=n.gd._fullLayout,_e=oe[n.id];n.updateRadialAxisTitle(oe,_e,g)}}function G(Z,j){var N=Xc.dot([Z,-j],[Math.cos(d),Math.sin(d)]);if(P=p-k*N,k>0!=(r?P>_:P<b)){P=null;return}var H=i._fullLayout,re=H[n.id];c.range[r]=P,c._rl[r]=P,n.updateRadialAxis(H,re),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var oe=!1;for(var _e in n.traceHash){var Ce=n.traceHash[_e],Le=Xc.filterVisible(Ce),ge=Ce[0][0].trace._module;ge.plot(i,n,Le,re),Ew.traceIs(_e,\"gl\")&&Le.length&&(oe=!0)}oe&&(XJe(i),ZJe(i))}C.prepFn=function(){M=null,g=null,P=null,C.moveFn=A,C.doneFn=O,eQ(i)},C.clampFn=function(Z,j){return Math.sqrt(Z*Z+j*j)<Bx.MINDRAG&&(Z=0,j=0),[Z,j]},y9.init(C)};Bd.updateAngularDrag=function(e){var t=this,r=t.gd,n=t.layers,i=t.radius,a=t.angularAxis,o=t.cx,s=t.cy,l=t.cxx,u=t.cyy,c=Bx.angularDragBoxSize,f=S1.makeDragger(n,\"path\",\"angulardrag\",e.dragmode===!1?\"none\":\"move\"),h={element:f,gd:r};e.dragmode===!1?h.dragmode=!1:Sw.select(f).attr(\"d\",t.pathAnnulus(i,i+c)).attr(\"transform\",xd(o,s)).call(WJe,\"move\");function d(P,A){return Math.atan2(u+c-A,P-l-c)}var v=n.frontplot.select(\".scatterlayer\").selectAll(\".trace\"),_=v.selectAll(\".point\"),b=v.selectAll(\".textpoint\"),p,k,E,T,L,x;function C(P,A){var z=t.gd._fullLayout,O=z[t.id],U=p+P*e._invScaleX,G=k+A*e._invScaleY,Z=d(U,G),j=Mw(Z-x);if(T=E+j,n.frontplot.attr(\"transform\",xd(t.xOffset2,t.yOffset2)+uy([-j,l,u])),t.vangles){L=t.radialAxisAngle+j;var N=xd(o,s)+uy(-j),H=xd(o,s)+uy(-L);n.bg.attr(\"transform\",N),n[\"radial-grid\"].attr(\"transform\",N),n[\"radial-axis\"].attr(\"transform\",H),n[\"radial-line\"].select(\"line\").attr(\"transform\",H),t.updateRadialAxisTitle(z,O,L)}else t.clipPaths.forTraces.select(\"path\").attr(\"transform\",xd(l,u)+uy(j));_.each(function(){var ie=Sw.select(this),Se=yC.getTranslate(ie);ie.attr(\"transform\",xd(Se.x,Se.y)+uy([j]))}),b.each(function(){var ie=Sw.select(this),Se=ie.select(\"text\"),Ee=yC.getTranslate(ie);ie.attr(\"transform\",uy([j,Se.attr(\"x\"),Se.attr(\"y\")])+xd(Ee.x,Ee.y))}),a.rotation=Xc.modHalf(T,360),t.updateAngularAxis(z,O),t._hasClipOnAxisFalse&&!Xc.isFullCircle(t.sectorInRad)&&v.call(yC.hideOutsideRangePoints,t);var re=!1;for(var oe in t.traceHash)if(Ew.traceIs(oe,\"gl\")){var _e=t.traceHash[oe],Ce=Xc.filterVisible(_e),Le=_e[0][0].trace._module;Le.plot(r,t,Ce,O),Ce.length&&(re=!0)}re&&(XJe(r),ZJe(r));var ge={};M(ge),r.emit(\"plotly_relayouting\",ge)}function M(P){P[t.id+\".angularaxis.rotation\"]=T,t.vangles&&(P[t.id+\".radialaxis.angle\"]=L)}function g(){b.select(\"text\").attr(\"transform\",null);var P={};M(P),Ew.call(\"_guiRelayout\",r,P)}h.prepFn=function(P,A,z){var O=e[t.id];E=O.angularaxis.rotation;var U=f.getBoundingClientRect();p=A-U.left,k=z-U.top,r._fullLayout._calcInverseTransform(r);var G=Xc.apply3DTransform(e._invTransform)(p,k);p=G[0],k=G[1],x=d(p,k),h.moveFn=C,h.doneFn=g,eQ(r)},t.vangles&&!Xc.isFullCircle(t.sectorInRad)&&(h.prepFn=Xc.noop,WJe(Sw.select(f),null)),y9.init(h)};Bd.isPtInside=function(e){if(this.isSmith)return!0;var t=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(e.theta),i=this.radialAxis,a=i.c2l(e.r),o=i._rl,s=r?M1.isPtInsidePolygon:Xc.isPtInsideSector;return s(a,n,o,t,r)};Bd.pathArc=function(e){var t=this.sectorInRad,r=this.vangles,n=r?M1.pathPolygon:Xc.pathArc;return n(e,t[0],t[1],r)};Bd.pathSector=function(e){var t=this.sectorInRad,r=this.vangles,n=r?M1.pathPolygon:Xc.pathSector;return n(e,t[0],t[1],r)};Bd.pathAnnulus=function(e,t){var r=this.sectorInRad,n=this.vangles,i=n?M1.pathPolygonAnnulus:Xc.pathAnnulus;return i(e,t,r[0],r[1],n)};Bd.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)};Bd.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)};function JJe(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return\"side\"in e&&(t+=e.side),t}function aQt(e){var t=e[0],r=e[1],n=r-t,i=YJe(t,360),a=i+n,o=Math.cos(Nx(i)),s=Math.sin(Nx(i)),l=Math.cos(Nx(a)),u=Math.sin(Nx(a)),c,f,h,d;return i<=90&&a>=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function $Je(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function _C(e,t,r){return t?(e.attr(\"display\",null),e.attr(r)):e&&e.attr(\"display\",\"none\"),e}});var rQ=ye((Xwr,a$e)=>{\"use strict\";var oQt=Ih(),os=Rd(),sQt=Cc().attributes,f0=Dr().extendFlat,e$e=mc().overrideAll,t$e=e$e({color:os.color,showline:f0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:f0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},\"plot\",\"from-root\"),r$e=e$e({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},\"plot\",\"from-root\"),i$e={visible:f0({},os.visible,{dflt:!0}),type:f0({},os.type,{values:[\"-\",\"linear\",\"log\",\"date\",\"category\"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:\"plot\"},autorange:f0({},os.autorange,{editType:\"plot\"}),rangemode:{valType:\"enumerated\",values:[\"tozero\",\"nonnegative\",\"normal\"],dflt:\"tozero\",editType:\"calc\"},minallowed:f0({},os.minallowed,{editType:\"plot\"}),maxallowed:f0({},os.maxallowed,{editType:\"plot\"}),range:f0({},os.range,{items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],editType:\"plot\"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:\"angle\",editType:\"plot\"},autotickangles:os.autotickangles,side:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"clockwise\",editType:\"plot\"},title:{text:f0({},os.title.text,{editType:\"plot\",dflt:\"\"}),font:f0({},os.title.font,{editType:\"plot\"}),editType:\"plot\"},hoverformat:os.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"};f0(i$e,t$e,r$e);var n$e={visible:f0({},os.visible,{dflt:!0}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"category\"],dflt:\"-\",editType:\"calc\",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\"],dflt:\"degrees\",editType:\"calc\"},period:{valType:\"number\",editType:\"calc\",min:0},direction:{valType:\"enumerated\",values:[\"counterclockwise\",\"clockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",editType:\"calc\"},hoverformat:os.hoverformat,uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"};f0(n$e,t$e,r$e);a$e.exports={domain:sQt({name:\"polar\",editType:\"plot\"}),sector:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],dflt:[0,360],editType:\"plot\"},hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},bgcolor:{valType:\"color\",editType:\"plot\",dflt:oQt.background},radialaxis:i$e,angularaxis:n$e,gridshape:{valType:\"enumerated\",values:[\"circular\",\"linear\"],dflt:\"circular\",editType:\"plot\"},uirevision:{valType:\"any\",editType:\"none\"},editType:\"calc\"}});var u$e=ye((Zwr,l$e)=>{\"use strict\";var x9=Dr(),lQt=ka(),uQt=vl(),cQt=O_(),fQt=Id().getSubplotData,hQt=Lb(),dQt=F3(),vQt=s_(),pQt=l_(),gQt=cI(),mQt=u4(),yQt=TB(),_Qt=V3(),s$e=rQ(),xQt=Y$(),b9=d9(),o$e=b9.axisNames;function bQt(e,t,r,n){var i=r(\"bgcolor\");n.bgColor=lQt.combine(i,n.paper_bgcolor);var a=r(\"sector\");r(\"hole\");var o=fQt(n.fullData,b9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+\".\"+j,N)}for(var c=0;c<o$e.length;c++){l=o$e[c],x9.isPlainObject(e[l])||(e[l]={});var f=e[l],h=uQt.newContainer(t,l);h._id=h._name=l,h._attr=n.id+\".\"+l,h._traceIndices=o.map(function(j){return j.index});var d=b9.axisName2dataArray[l],v=wQt(f,h,u,o,d,n);gQt(f,h,u,{axData:o,dataAttr:d});var _=u(\"visible\");switch(xQt(h,t,s),u(\"uirevision\",t.uirevision),h._m=1,l){case\"radialaxis\":u(\"minallowed\"),u(\"maxallowed\");var b=u(\"range\"),p=h.getAutorangeDflt(b),k=u(\"autorange\",p),E;b&&(b[0]===null&&b[1]===null||(b[0]===null||b[1]===null)&&(k===\"reversed\"||k===!0)||b[0]!==null&&(k===\"min\"||k===\"max reversed\")||b[1]!==null&&(k===\"max\"||k===\"min reversed\"))&&(b=void 0,delete h.range,h.autorange=!0,E=!0),E||(p=h.getAutorangeDflt(b),k=u(\"autorange\",p)),f.autorange=k,k&&(yQt(u,k,b),(v===\"linear\"||v===\"-\")&&u(\"rangemode\"),h.isReversed()&&(h._m=-1)),h.cleanRange(\"range\",{dfltRange:[0,1]});break;case\"angularaxis\":if(v===\"date\"){x9.log(\"Polar plots do not support date angular axes yet.\");for(var T=0;T<o.length;T++)o[T].visible=!1;v=f.type=h.type=\"linear\"}u(v===\"linear\"?\"thetaunit\":\"period\");var L=u(\"direction\");u(\"rotation\",{counterclockwise:0,clockwise:90}[L]);break}if(pQt(f,h,u,h.type,{tickSuffixDflt:h.thetaunit===\"degrees\"?\"\\xB0\":void 0}),_){var x,C,M,g,P,A,z,O,U,G,Z=n.font||{};x=u(\"color\"),C=x===f.color?x:Z.color,M=Z.size,g=Z.family,P=Z.weight,A=Z.style,z=Z.variant,O=Z.textcase,U=Z.lineposition,G=Z.shadow,hQt(f,h,u,h.type),vQt(f,h,u,h.type,{font:{weight:P,style:A,variant:z,textcase:O,lineposition:U,shadow:G,color:C,size:M,family:g},noAutotickangles:l===\"angularaxis\",noTicklabelshift:!0,noTicklabelstandoff:!0}),dQt(f,h,u,{outerTicks:!0}),mQt(f,h,u,{dfltColor:x,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s$e[l]}),u(\"layer\"),l===\"radialaxis\"&&(u(\"side\"),u(\"angle\",a[0]),u(\"title.text\"),x9.coerceFont(u,\"title.font\",{weight:P,style:A,variant:z,textcase:O,lineposition:U,shadow:G,color:C,size:x9.bigFont(M),family:g}))}v!==\"category\"&&u(\"hoverformat\"),h._input=f}t.angularaxis.type===\"category\"&&r(\"gridshape\")}function wQt(e,t,r,n,i,a){var o=r(\"autotypenumbers\",a.autotypenumbersDflt),s=r(\"type\");if(s===\"-\"){for(var l,u=0;u<n.length;u++)if(n[u].visible){l=n[u];break}l&&l[i]&&(t.type=_Qt(l[i],\"gregorian\",{noMultiCategory:!0,autotypenumbers:o})),t.type===\"-\"?t.type=\"linear\":e.type=t.type}return t.type}l$e.exports=function(t,r,n){cQt(t,r,n,{type:b9.name,attributes:s$e,handleDefaults:bQt,font:r.font,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})}});var w9=ye((Ywr,v$e)=>{\"use strict\";var TQt=Id().getSubplotCalcData,AQt=Dr().counterRegex,SQt=tQ(),f$e=d9(),h$e=f$e.attr,kw=f$e.name,c$e=AQt(kw),d$e={};d$e[h$e]={valType:\"subplotid\",dflt:kw,editType:\"calc\"};function MQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[kw],i=0;i<n.length;i++){var a=n[i],o=TQt(r,kw,a),s=t[a]._subplot;s||(s=SQt(e,a),t[a]._subplot=s),s.plot(o,t,e._promises)}}function EQt(e,t,r,n){for(var i=n._subplots[kw]||[],a=n._has&&n._has(\"gl\"),o=t._has&&t._has(\"gl\"),s=a&&!o,l=0;l<i.length;l++){var u=i[l],c=n[u]._subplot;if(!t[u]&&c){c.framework.remove(),c.layers[\"radial-axis-title\"].remove();for(var f in c.clipPaths)c.clipPaths[f].remove()}s&&c._scene&&(c._scene.destroy(),c._scene=null)}}v$e.exports={attr:h$e,name:kw,idRoot:kw,idRegex:c$e,attrRegex:c$e,attributes:d$e,layoutAttributes:rQ(),supplyLayoutDefaults:u$e(),plot:MQt,clean:EQt,toSVG:mh().toSVG}});var xC=ye((Kwr,g$e)=>{\"use strict\";var{hovertemplateAttrs:kQt,texttemplateAttrs:CQt,templatefallbackAttrs:p$e}=Ll(),T9=Ao().extendFlat,LQt=Pg(),h0=pf(),PQt=Gl(),$5=h0.line;g$e.exports={mode:h0.mode,r:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},theta:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},r0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dr:{valType:\"number\",dflt:1,editType:\"calc\"},theta0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dtheta:{valType:\"number\",editType:\"calc\"},thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\",\"gradians\"],dflt:\"degrees\",editType:\"calc+clearAxisTypes\"},text:h0.text,texttemplate:CQt({editType:\"plot\"},{keys:[\"r\",\"theta\",\"text\"]}),texttemplatefallback:p$e({editType:\"plot\"}),hovertext:h0.hovertext,line:{color:$5.color,width:$5.width,dash:$5.dash,backoff:$5.backoff,shape:T9({},$5.shape,{values:[\"linear\",\"spline\"]}),smoothing:$5.smoothing,editType:\"calc\"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:T9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:T9({},h0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:LQt(),hoverinfo:T9({},PQt.hoverinfo,{flags:[\"r\",\"theta\",\"text\",\"name\"]}),hoveron:h0.hoveron,hovertemplate:kQt(),hovertemplatefallback:p$e(),selected:h0.selected,unselected:h0.unselected}});var S9=ye((Jwr,_$e)=>{\"use strict\";var A9=Dr(),Q5=Ru(),IQt=$p(),RQt=D0(),m$e=sT(),DQt=F0(),FQt=Fg(),zQt=Lm().PTS_LINESONLY,OQt=xC();function qQt(e,t,r,n){function i(s,l){return A9.coerce(e,t,OQt,s,l)}var a=y$e(e,t,n,i);if(!a){t.visible=!1;return}i(\"thetaunit\"),i(\"mode\",a<zQt?\"lines+markers\":\"lines\"),i(\"text\"),i(\"hovertext\"),t.hoveron!==\"fills\"&&(i(\"hovertemplate\"),i(\"hovertemplatefallback\")),Q5.hasMarkers(t)&&IQt(e,t,r,n,i,{gradient:!0}),Q5.hasLines(t)&&(RQt(e,t,r,n,i,{backoff:!0}),m$e(e,t,i),i(\"connectgaps\")),Q5.hasText(t)&&(i(\"texttemplate\"),i(\"texttemplatefallback\"),DQt(e,t,n,i));var o=[];(Q5.hasMarkers(t)||Q5.hasText(t))&&(i(\"cliponaxis\"),i(\"marker.maxdisplayed\"),o.push(\"points\")),i(\"fill\"),t.fill!==\"none\"&&(FQt(e,t,r,i),Q5.hasLines(t)||m$e(e,t,i)),(t.fill===\"tonext\"||t.fill===\"toself\")&&o.push(\"fills\"),i(\"hoveron\",o.join(\"+\")||\"points\"),A9.coerceSelectionMarkerOpacity(t,i)}function y$e(e,t,r,n){var i=n(\"r\"),a=n(\"theta\");A9.isTypedArray(i)&&(t.r=i=Array.from(i)),A9.isTypedArray(a)&&(t.theta=a=Array.from(a));var o;if(i)a?o=Math.min(i.length,a.length):(o=i.length,n(\"theta0\"),n(\"dtheta\"));else{if(!a)return 0;o=t.theta.length,n(\"r0\"),n(\"dr\")}return t._length=o,o}_$e.exports={handleRThetaDefaults:y$e,supplyDefaults:qQt}});var M9=ye(($wr,b$e)=>{\"use strict\";var BQt=Dr(),x$e=ho();b$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=x$e.tickText(o,l,!0).text;var u=s.thetaunit===\"degrees\"?BQt.rad2deg(t.theta):t.theta;return i.thetaLabel=x$e.tickText(s,u,!0).text,i}});var A$e=ye((Qwr,T$e)=>{\"use strict\";var w$e=Eo(),NQt=fs().BADNUM,UQt=ho(),VQt=z0(),GQt=Rm(),HQt=O0(),jQt=q0().calcMarkerSize;T$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,\"r\"),l=o.makeCalcdata(r,\"theta\"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};w$e(h)&&w$e(d)?(v.r=h,v.theta=d):v.r=NQt}var _=jQt(r,u);return r._extremes.x=UQt.findExtremes(a,s,{ppad:_}),VQt(t,r),GQt(c,r),HQt(c,r),c}});var E$e=ye((e3r,M$e)=>{\"use strict\";var WQt=dT(),S$e=fs().BADNUM;M$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select(\"g.scatterlayer\"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c<n.length;c++)for(var f=n[c],h=0;h<f.length;h++){h===0&&(f[0].trace._xA=a,f[0].trace._yA=o);var d=f[h],v=d.r;if(v===S$e)d.x=d.y=S$e;else{var _=l.c2g(v),b=u.c2g(d.theta);d.x=_*Math.cos(b),d.y=_*Math.sin(b)}}WQt(t,s,n,i)}});var E9=ye((t3r,C$e)=>{\"use strict\";var XQt=mT();function ZQt(e,t,r,n){var i=XQt(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,k$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function k$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"r\",a._hovertitle=\"\\u03B8\";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+\": \"+d)}if(!t.hovertemplate){var f=l.split(\"+\");f.indexOf(\"all\")!==-1&&(f=[\"r\",\"theta\",\"text\"]),f.indexOf(\"r\")!==-1&&c(i,n.rLabel),f.indexOf(\"theta\")!==-1&&c(a,n.thetaLabel),f.indexOf(\"text\")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}C$e.exports={hoverPoints:ZQt,makeHoverPointText:k$e}});var P$e=ye((r3r,L$e)=>{\"use strict\";L$e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:w9(),categories:[\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:xC(),supplyDefaults:S9().supplyDefaults,colorbar:$d(),formatLabels:M9(),calc:A$e(),plot:E$e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:E9().hoverPoints,selectPoints:yT(),meta:{}}});var R$e=ye((i3r,I$e)=>{\"use strict\";I$e.exports=P$e()});var iQ=ye((o3r,F$e)=>{\"use strict\";var D$e=xC(),{cliponaxis:n3r,hoveron:a3r}=D$e,YQt=gee(D$e,[\"cliponaxis\",\"hoveron\"]),{connectgaps:KQt,line:{color:JQt,dash:$Qt,width:QQt},fill:eer,fillcolor:ter,marker:rer,textfont:ier,textposition:ner}=gk();F$e.exports=j1(_g({},YQt),{connectgaps:KQt,fill:eer,fillcolor:ter,line:{color:JQt,dash:$Qt,editType:\"calc\",width:QQt},marker:rer,textfont:ier,textposition:ner})});var q$e=ye((l3r,O$e)=>{\"use strict\";var z$e=Dr(),nQ=Ru(),aer=S9().handleRThetaDefaults,oer=$p(),ser=D0(),ler=F0(),uer=Fg(),cer=Lm().PTS_LINESONLY,fer=iQ();O$e.exports=function(t,r,n,i){function a(s,l){return z$e.coerce(t,r,fer,s,l)}var o=aer(t,r,i,a);if(!o){r.visible=!1;return}a(\"thetaunit\"),a(\"mode\",o<cer?\"lines+markers\":\"lines\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&(a(\"hovertemplate\"),a(\"hovertemplatefallback\")),nQ.hasMarkers(r)&&oer(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),nQ.hasLines(r)&&(ser(t,r,n,i,a),a(\"connectgaps\")),nQ.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),ler(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),a(\"fill\"),r.fill!==\"none\"&&uer(t,r,n,a),z$e.coerceSelectionMarkerOpacity(r,a)}});var N$e=ye((u3r,B$e)=>{\"use strict\";var her=M9();B$e.exports=function(t,r,n){var i=t.i;return\"r\"in t||(t.r=r._r[i]),\"theta\"in t||(t.theta=r._theta[i]),her(t,r,n)}});var V$e=ye((c3r,U$e)=>{\"use strict\";var der=z0(),ver=q0().calcMarkerSize,per=ow(),ger=ho(),mer=px().TOO_MANY_POINTS;U$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,\"r\"),l=r._theta=o.makeCalcdata(r,\"theta\"),u=r._length,c={};u<s.length&&(s=s.slice(0,u)),u<l.length&&(l=l.slice(0,u)),c.r=s,c.theta=l,der(t,r);var f=c.opts=per.style(t,r),h;return u<mer?h=ver(r,u):f.marker&&(h=2*(f.marker.sizeAvg||Math.max(f.marker.size,3))),r._extremes.x=ger.findExtremes(a,s,{ppad:h}),[{x:!1,y:!1,t:c,trace:r}]}});var H$e=ye((f3r,G$e)=>{\"use strict\";var yer=jF(),_er=E9().makeHoverPointText;function xer(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=yer.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,_er(f,h,c,u),l}}G$e.exports={hoverPoints:xer}});var W$e=ye((h3r,j$e)=>{\"use strict\";j$e.exports={moduleType:\"trace\",name:\"scatterpolargl\",basePlotModule:w9(),categories:[\"gl\",\"regl\",\"polar\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:iQ(),supplyDefaults:q$e(),colorbar:$d(),formatLabels:N$e(),calc:V$e(),hoverPoints:H$e().hoverPoints,selectPoints:gY(),meta:{}}});var X$e=ye((d3r,aQ)=>{\"use strict\";var ber=ZF(),wer=Eo(),Ter=xK(),Aer=dY(),k9=ow(),C9=Dr(),Ser=px().TOO_MANY_POINTS,Mer={};aQ.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=Aer(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,_,b=h.slice(),p=d.slice();for(_=0;_<h.length;_++)r.isPtInside({r:h[_],theta:d[_]})||(b[_]=NaN,p[_]=NaN);var k=new Array(f*2),E=Array(f),T=Array(f);for(_=0;_<f;_++){var L=b[_],x,C;if(wer(L)){var M=i.c2g(L),g=a.c2g(p[_],u.thetaunit);x=M*Math.cos(g),C=M*Math.sin(g)}else x=C=NaN;E[_]=k[_*2]=x,T[_]=k[_*2+1]=C}c.tree=ber(k),v.marker&&f>=Ser&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&C9.extendFlat(v.line,k9.linePositions(t,u,k)),v.text&&(C9.extendFlat(v.text,{positions:k},k9.textPosition(t,u,v.text,v.marker)),C9.extendFlat(v.textSel,{positions:k},k9.textPosition(t,u,v.text,v.markerSel)),C9.extendFlat(v.textUnsel,{positions:k},k9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=E,c.y=T,c.rawx=E,c.rawy=T,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),Ter(t,r,n)}};aQ.exports.reglPrecompiled=Mer});var K$e=ye((v3r,Y$e)=>{\"use strict\";var Z$e=W$e();Z$e.plot=X$e();Y$e.exports=Z$e});var $$e=ye((p3r,J$e)=>{\"use strict\";J$e.exports=K$e()});var oQ=ye((g3r,Q$e)=>{\"use strict\";var{hovertemplateAttrs:Eer,templatefallbackAttrs:ker}=Ll(),eS=Ao().extendFlat,Ux=xC(),Vx=zm();Q$e.exports={r:Ux.r,theta:Ux.theta,r0:Ux.r0,dr:Ux.dr,theta0:Ux.theta0,dtheta:Ux.dtheta,thetaunit:Ux.thetaunit,base:eS({},Vx.base,{}),offset:eS({},Vx.offset,{}),width:eS({},Vx.width,{}),text:eS({},Vx.text,{}),hovertext:eS({},Vx.hovertext,{}),marker:Cer(),hoverinfo:Ux.hoverinfo,hovertemplate:Eer(),hovertemplatefallback:ker(),selected:Vx.selected,unselected:Vx.unselected};function Cer(){var e=eS({},Vx.marker);return delete e.cornerradius,e}});var sQ=ye((m3r,eQe)=>{\"use strict\";eQe.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"overlay\"],dflt:\"stack\",editType:\"calc\"},bargap:{valType:\"number\",dflt:.1,min:0,max:1,editType:\"calc\"}}});var iQe=ye((y3r,rQe)=>{\"use strict\";var tQe=Dr(),Ler=S9().handleRThetaDefaults,Per=WI(),Ier=oQ();rQe.exports=function(t,r,n,i){function a(s,l){return tQe.coerce(t,r,Ier,s,l)}var o=Ler(t,r,i,a);if(!o){r.visible=!1;return}a(\"thetaunit\"),a(\"base\"),a(\"offset\"),a(\"width\"),a(\"text\"),a(\"hovertext\"),a(\"hovertemplate\"),a(\"hovertemplatefallback\"),Per(t,r,a,n,i),tQe.coerceSelectionMarkerOpacity(r,a)}});var aQe=ye((_3r,nQe)=>{\"use strict\";var Rer=Dr(),Der=sQ();nQe.exports=function(e,t,r){var n={},i;function a(l,u){return Rer.coerce(e[i]||{},t[i],Der,l,u)}for(var o=0;o<r.length;o++){var s=r[o];s.type===\"barpolar\"&&s.visible===!0&&(i=s.subplot,n[i]||(a(\"barmode\"),a(\"bargap\"),n[i]=1))}}});var lQ=ye((x3r,lQe)=>{\"use strict\";var oQe=pv().hasColorscale,sQe=gv(),Fer=Dr().isArrayOrTypedArray,zer=A4(),Oer=t2().setGroupPositions,qer=O0(),Ber=qa().traceIs,Ner=Dr().extendFlat;function Uer(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,\"r\"),s=a.makeCalcdata(t,\"theta\"),l=t._length,u=new Array(l),c=o,f=s,h=0;h<l;h++)u[h]={p:f[h],s:c[h]};function d(v){var _=t[v];_!==void 0&&(t[\"_\"+v]=Fer(_)?a.makeCalcdata(t,v):a.d2c(_,t.thetaunit))}return a.type===\"linear\"&&(d(\"width\"),d(\"offset\")),oQe(t,\"marker\")&&sQe(e,t,{vals:t.marker.color,containerStr:\"marker\",cLetter:\"c\"}),oQe(t,\"marker.line\")&&sQe(e,t,{vals:t.marker.line.color,containerStr:\"marker.line\",cLetter:\"c\"}),zer(u,t),qer(u,t),u}function Ver(e,t,r){for(var n=e.calcdata,i=[],a=0;a<n.length;a++){var o=n[a],s=o[0].trace;s.visible===!0&&Ber(s,\"bar\")&&s.subplot===r&&i.push(o)}var l=Ner({},t.radialaxis,{_id:\"x\"}),u=t.angularaxis;Oer(e,u,l,i,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}lQe.exports={calc:Uer,crossTraceCalc:Ver}});var fQe=ye((b3r,cQe)=>{\"use strict\";var uQe=Oa(),L9=Eo(),tS=Dr(),Ger=So(),uQ=p9();cQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Her(r),c=r.layers.frontplot.select(\"g.barlayer\");tS.makeTraceGroups(c,n,\"trace bars\").each(function(){var f=uQe.select(this),h=tS.ensureSingle(f,\"g\",\"points\"),d=h.selectAll(\"g.point\").data(tS.identity);d.enter().append(\"g\").style(\"vector-effect\",i?\"none\":\"non-scaling-stroke\").style(\"stroke-miterlimit\",2).classed(\"point\",!0),d.exit().remove(),d.each(function(v){var _=uQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),E=v.thetag1=l.c2g(v.p1),T;if(!L9(b)||!L9(p)||!L9(k)||!L9(E)||b===p||k===E)T=\"M0,0Z\";else{var L=s.c2g(v.s1),x=(k+E)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],T=u(b,p,k,E)}tS.ensureSingle(_,\"path\").attr(\"d\",T)}),Ger.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Her(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;tS.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=uQ.findEnclosingVertexAngles(s,e.vangles)[0],c=uQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return uQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return tS.pathAnnulus(n,i,a,o,t,r)}}});var dQe=ye((w3r,hQe)=>{\"use strict\";var jer=vf(),cQ=Dr(),Wer=PT().getTraceColor,Xer=cQ.fillText,Zer=E9().makeHoverPointText,Yer=p9().isPtInsidePolygon;hQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Yer:cQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var _=function(E){return c(d,v,[E.rp0,E.rp1],[E.thetag0,E.thetag1],u)?f+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(jer.getClosest(i,_,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=cQ.extendFlat({},p,{r:p.s,theta:p.p});return Xer(p,a,t),Zer(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=Wer(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign=\"left\"),[t]}}});var pQe=ye((T3r,vQe)=>{\"use strict\";vQe.exports={moduleType:\"trace\",name:\"barpolar\",basePlotModule:w9(),categories:[\"polar\",\"bar\",\"showLegend\"],attributes:oQ(),layoutAttributes:sQ(),supplyDefaults:iQe(),supplyLayoutDefaults:aQe(),calc:lQ().calc,crossTraceCalc:lQ().crossTraceCalc,plot:fQe(),colorbar:$d(),formatLabels:M9(),style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:dQe(),selectPoints:IT(),meta:{}}});var mQe=ye((A3r,gQe)=>{\"use strict\";gQe.exports=pQe()});var fQ=ye((S3r,yQe)=>{\"use strict\";yQe.exports={attr:\"subplot\",name:\"smith\",axisNames:[\"realaxis\",\"imaginaryaxis\"],axisName2dataArray:{imaginaryaxis:\"imag\",realaxis:\"real\"}}});var hQ=ye((M3r,wQe)=>{\"use strict\";var Ker=Ih(),Uf=Rd(),Jer=Cc().attributes,Gx=Dr().extendFlat,_Qe=mc().overrideAll,xQe=_Qe({color:Uf.color,showline:Gx({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:Gx({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash},\"plot\",\"from-root\"),bQe=_Qe({ticklen:Uf.ticklen,tickwidth:Gx({},Uf.tickwidth,{dflt:2}),tickcolor:Uf.tickcolor,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,tickfont:Uf.tickfont,tickformat:Uf.tickformat,hoverformat:Uf.hoverformat,layer:Uf.layer},\"plot\",\"from-root\"),$er=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:\"data_array\",editType:\"plot\"},tickangle:Gx({},Uf.tickangle,{dflt:90}),ticks:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"\"],editType:\"ticks\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\"],dflt:\"top\",editType:\"plot\"},editType:\"calc\"},xQe,bQe),Qer=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{valType:\"data_array\",editType:\"plot\"},ticks:Uf.ticks,editType:\"calc\"},xQe,bQe);wQe.exports={domain:Jer({name:\"smith\",editType:\"plot\"}),bgcolor:{valType:\"color\",editType:\"plot\",dflt:Ker.background},realaxis:$er,imaginaryaxis:Qer,editType:\"calc\"}});var SQe=ye((E3r,AQe)=>{\"use strict\";var rS=Dr(),etr=ka(),ttr=vl(),rtr=O_(),itr=Id().getSubplotData,ntr=l_(),atr=s_(),otr=u4(),str=xm(),iS=hQ(),dQ=fQ(),TQe=dQ.axisNames,ltr=ctr(function(e){return rS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function utr(e,t,r,n){var i=r(\"bgcolor\");n.bgColor=etr.combine(i,n.paper_bgcolor);var a=itr(n.fullData,dQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+\".\"+L,x)}for(var u=0;u<TQe.length;u++){s=TQe[u],rS.isPlainObject(e[s])||(e[s]={});var c=e[s],f=ttr.newContainer(t,s);f._id=f._name=s,f._attr=n.id+\".\"+s,f._traceIndices=a.map(function(L){return L.index});var h=l(\"visible\");if(f.type=\"linear\",str(f,o),ntr(c,f,l,f.type),h){var d=s===\"realaxis\";if(d&&l(\"side\"),d)l(\"tickvals\");else{var v=ltr(t.realaxis.tickvals||iS.realaxis.tickvals.dflt);l(\"tickvals\",v)}rS.isTypedArray(f.tickvals)&&(f.tickvals=Array.from(f.tickvals));var _,b,p,k,E=n.font||{};h&&(_=l(\"color\"),b=_===c.color?_:E.color,p=E.size,k=E.family),atr(c,f,l,f.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!d,noExp:!0,font:{color:b,size:p,family:k}}),rS.coerce2(e,t,iS,s+\".ticklen\"),rS.coerce2(e,t,iS,s+\".tickwidth\"),rS.coerce2(e,t,iS,s+\".tickcolor\",t.color);var T=l(\"ticks\");T||(delete t[s].ticklen,delete t[s].tickwidth,delete t[s].tickcolor),otr(c,f,l,{dfltColor:_,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:iS[s]}),l(\"layer\")}l(\"hoverformat\"),delete f.type,f._input=c}}AQe.exports=function(t,r,n){rtr(t,r,n,{noUirevision:!0,type:dQ.name,attributes:iS,handleDefaults:utr,font:r.font,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})};function ctr(e,t){var r={};return function(n){var i=t?t(n):n;if(i in r)return r[i];var a=e(n);return r[i]=a,a}}});var PQe=ye((k3r,LQe)=>{\"use strict\";var ftr=Id().getSubplotCalcData,htr=Dr().counterRegex,dtr=tQ(),EQe=fQ(),kQe=EQe.attr,Cw=EQe.name,MQe=htr(Cw),CQe={};CQe[kQe]={valType:\"subplotid\",dflt:Cw,editType:\"calc\"};function vtr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Cw],i=0;i<n.length;i++){var a=n[i],o=ftr(r,Cw,a),s=t[a]._subplot;s||(s=dtr(e,a,!0),t[a]._subplot=s),s.plot(o,t,e._promises)}}function ptr(e,t,r,n){for(var i=n._subplots[Cw]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!t[o]&&s){s.framework.remove();for(var l in s.clipPaths)s.clipPaths[l].remove()}}}LQe.exports={attr:kQe,name:Cw,idRoot:Cw,idRegex:MQe,attrRegex:MQe,attributes:CQe,layoutAttributes:hQ(),supplyLayoutDefaults:SQe(),plot:vtr,clean:ptr,toSVG:mh().toSVG}});var vQ=ye((C3r,RQe)=>{\"use strict\";var{hovertemplateAttrs:gtr,texttemplateAttrs:mtr,templatefallbackAttrs:IQe}=Ll(),P9=Ao().extendFlat,ytr=Pg(),d0=pf(),_tr=Gl(),nS=d0.line;RQe.exports={mode:d0.mode,real:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},imag:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:d0.text,texttemplate:mtr({editType:\"plot\"},{keys:[\"real\",\"imag\",\"text\"]}),texttemplatefallback:IQe({editType:\"plot\"}),hovertext:d0.hovertext,line:{color:nS.color,width:nS.width,dash:nS.dash,backoff:nS.backoff,shape:P9({},nS.shape,{values:[\"linear\",\"spline\"]}),smoothing:nS.smoothing,editType:\"calc\"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:P9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:P9({},d0.fill,{values:[\"none\",\"toself\",\"tonext\"],dflt:\"none\"}),fillcolor:ytr(),hoverinfo:P9({},_tr.hoverinfo,{flags:[\"real\",\"imag\",\"text\",\"name\"]}),hoveron:d0.hoveron,hovertemplate:gtr(),hovertemplatefallback:IQe(),selected:d0.selected,unselected:d0.unselected}});var zQe=ye((L3r,FQe)=>{\"use strict\";var I9=Dr(),aS=Ru(),xtr=$p(),btr=D0(),DQe=sT(),wtr=F0(),Ttr=Fg(),Atr=Lm().PTS_LINESONLY,Str=vQ();FQe.exports=function(t,r,n,i){function a(l,u){return I9.coerce(t,r,Str,l,u)}var o=Mtr(t,r,i,a);if(!o){r.visible=!1;return}a(\"mode\",o<Atr?\"lines+markers\":\"lines\"),a(\"text\"),a(\"hovertext\"),r.hoveron!==\"fills\"&&(a(\"hovertemplate\"),a(\"hovertemplatefallback\")),aS.hasMarkers(r)&&xtr(t,r,n,i,a,{gradient:!0}),aS.hasLines(r)&&(btr(t,r,n,i,a,{backoff:!0}),DQe(t,r,a),a(\"connectgaps\")),aS.hasText(r)&&(a(\"texttemplate\"),a(\"texttemplatefallback\"),wtr(t,r,i,a));var s=[];(aS.hasMarkers(r)||aS.hasText(r))&&(a(\"cliponaxis\"),a(\"marker.maxdisplayed\"),s.push(\"points\")),a(\"fill\"),r.fill!==\"none\"&&(Ttr(t,r,n,a),aS.hasLines(r)||DQe(t,r,a)),(r.fill===\"tonext\"||r.fill===\"toself\")&&s.push(\"fills\"),a(\"hoveron\",s.join(\"+\")||\"points\"),I9.coerceSelectionMarkerOpacity(r,a)};function Mtr(e,t,r,n){var i=n(\"real\"),a=n(\"imag\"),o;return i&&a&&(o=Math.min(i.length,a.length)),I9.isTypedArray(i)&&(t.real=i=Array.from(i)),I9.isTypedArray(a)&&(t.imag=a=Array.from(a)),t._length=o,o}});var BQe=ye((P3r,qQe)=>{\"use strict\";var OQe=ho();qQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=OQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=OQe.tickText(a.angularAxis,t.imag,!0).text,i}});var VQe=ye((I3r,UQe)=>{\"use strict\";var NQe=Eo(),Etr=fs().BADNUM,ktr=z0(),Ctr=Rm(),Ltr=O0(),Ptr=q0().calcMarkerSize;UQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,\"real\"),l=o.makeCalcdata(r,\"imag\"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};NQe(h)&&NQe(d)?(v.real=h,v.imag=d):v.real=Etr}return Ptr(r,u),ktr(t,r),Ctr(c,r),Ltr(c,r),c}});var jQe=ye((R3r,HQe)=>{\"use strict\";var Itr=dT(),GQe=fs().BADNUM,Rtr=$$(),Dtr=Rtr.smith;HQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select(\"g.scatterlayer\"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l<n.length;l++)for(var u=n[l],c=0;c<u.length;c++){c===0&&(u[0].trace._xA=a,u[0].trace._yA=o);var f=u[c],h=f.real;if(h===GQe)f.x=f.y=GQe;else{var d=Dtr([h,f.imag]);f.x=d[0],f.y=d[1]}}Itr(t,s,n,i)}});var ZQe=ye((D3r,XQe)=>{\"use strict\";var Ftr=mT();function ztr(e,t,r,n){var i=Ftr(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,WQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function WQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle=\"real\",a._hovertitle=\"imag\";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+\": \"+d)}if(!t.hovertemplate){var f=l.split(\"+\");f.indexOf(\"all\")!==-1&&(f=[\"real\",\"imag\",\"text\"]),f.indexOf(\"real\")!==-1&&c(i,n.realLabel),f.indexOf(\"imag\")!==-1&&c(a,n.imagLabel),f.indexOf(\"text\")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join(\"<br>\")}}XQe.exports={hoverPoints:ztr,makeHoverPointText:WQe}});var KQe=ye((F3r,YQe)=>{\"use strict\";YQe.exports={moduleType:\"trace\",name:\"scattersmith\",basePlotModule:PQe(),categories:[\"smith\",\"symbols\",\"showLegend\",\"scatter-like\"],attributes:vQ(),supplyDefaults:zQe(),colorbar:$d(),formatLabels:BQe(),calc:VQe(),plot:jQe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:ZQe().hoverPoints,selectPoints:yT(),meta:{}}});var $Qe=ye((z3r,JQe)=>{\"use strict\";JQe.exports=KQe()});var kv=ye((O3r,eet)=>{var D9=Nh();function QQe(){this.regionalOptions=[],this.regionalOptions[\"\"]={invalidCalendar:\"Calendar {0} not found\",invalidDate:\"Invalid {0} date\",invalidMonth:\"Invalid {0} month\",invalidYear:\"Invalid {0} year\",differentCalendars:\"Cannot mix {0} and {1} dates\"},this.local=this.regionalOptions[\"\"],this.calendars={},this._localCals={}}D9(QQe.prototype,{instance:function(e,t){e=(e||\"gregorian\").toLowerCase(),t=t||\"\";var r=this._localCals[e+\"-\"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+\"-\"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[\"\"].invalidCalendar).replace(/\\{0\\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n==\"string\"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+\"\").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n=\"\",i=0;r>0;){var a=r%10;n=(a===0?\"\":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function pQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name)}function R9(e,t){return e=\"\"+e,\"000000\".substring(0,t-e.length)+e}D9(pQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,\"y\")},month:function(e){return arguments.length===0?this._month:this.set(e,\"m\")},day:function(e){return arguments.length===0?this._day:this.set(e,\"d\")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate).replace(/\\{0\\}/,this._calendar.local.name);return this._year=e,this._month=t,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this._calendar.local.name).replace(/\\{1\\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?\"-\":\"\")+R9(Math.abs(this.year()),4)+\"-\"+R9(this.month(),2)+\"-\"+R9(this.day(),2)}});function gQ(){this.shortYearCutoff=\"+10\"}D9(gQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate),r=e.day(),t=e.month(),e=e.year()),new pQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[\"\"].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[\"\"].invalidYear);return(t.year()<0?\"-\":\"\")+R9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[\"\"].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[\"\"].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[\"\"].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[\"\"].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r===\"d\"||r===\"w\"){var n=e.toJD()+t*(r===\"w\"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r===\"y\"?t:0),o=e.monthOfYear()+(r===\"m\"?t:0),i=e.day(),s=function(c){for(;o<c.minMonth;)a--,o+=c.monthsInYear(a);for(var f=c.monthsInYear(a);o>f-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r===\"y\"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r===\"m\"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n===\"y\"||n===\"m\")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,\"y\"],m:[1,this.monthsInYear(-1),\"m\"],w:[this.daysInWeek(),this.daysInYear(-1),\"d\"],d:[1,this.daysInYear(-1),\"d\"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate);var n=r===\"y\"?t:e.year(),i=r===\"m\"?t:e.month(),a=r===\"d\"?t:e.day();return(r===\"y\"||r===\"m\")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate);return Gs.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(Gs.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(this._validateLevel===0&&this.name!==e.calendar().name)throw(Gs.local.differentCalendars||Gs.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this.local.name).replace(/\\{1\\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(e,t,r))throw n.replace(/\\{0\\}/,this.local.name);var i=this.newDate(e,t,r);return this._validateLevel--,i}catch(a){throw this._validateLevel--,a}}});function mQ(e){this.local=this.regionalOptions[e]||this.regionalOptions[\"\"]}mQ.prototype=new gQ;D9(mQ.prototype,{name:\"Gregorian\",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Gregorian\",epochs:[\"BCE\",\"CE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[\"\"].invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===0&&(r%100!==0||r%400===0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[\"\"].invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var i=Math.floor(e/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+a-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-186721625e-2)/36524.25);r=t+1+r-Math.floor(r/4);var n=r+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(o*30.6001),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[\"\"].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()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=eet.exports=new QQe;Gs.cdate=pQ;Gs.baseCalendar=gQ;Gs.calendars.gregorian=mQ});var tet=ye(()=>{var yQ=Nh(),Nd=kv();yQ(Nd.regionalOptions[\"\"],{invalidArguments:\"Invalid arguments\",invalidFormat:\"Cannot format a date from another calendar\",missingNumberAt:\"Missing number at position {0}\",unknownNameAt:\"Unknown name at position {0}\",unexpectedLiteralAt:\"Unexpected literal at position {0}\",unexpectedText:\"Additional text found at end\"});Nd.local=Nd.regionalOptions[\"\"];yQ(Nd.cdate.prototype,{formatDate:function(e,t){return typeof e!=\"string\"&&(t=e,e=\"\"),this._calendar.formatDate(e||\"\",this,t)}});yQ(Nd.baseCalendar.prototype,{UNIX_EPOCH:Nd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Nd.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:\"yyyy-mm-dd\",COOKIE:\"D, dd M yyyy\",FULL:\"DD, MM d, yyyy\",ISO_8601:\"yyyy-mm-dd\",JULIAN:\"J\",RFC_822:\"D, d M yy\",RFC_850:\"DD, dd-M-yy\",RFC_1036:\"D, d M yy\",RFC_1123:\"D, d M yyyy\",RFC_2822:\"D, d M yyyy\",RSS:\"D, d M yy\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yyyy-mm-dd\",formatDate:function(e,t,r){if(typeof e!=\"string\"&&(r=t,t=e,e=\"\"),!t)return\"\";if(t.calendar()!==this)throw Nd.local.invalidFormat||Nd.regionalOptions[\"\"].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(T,L){for(var x=1;E+x<e.length&&e.charAt(E+x)===T;)x++;return E+=x-1,Math.floor(x/(L||1))>1},c=function(T,L,x,C){var M=\"\"+L;if(u(T,C))for(;M.length<x;)M=\"0\"+M;return M},f=function(T,L,x,C){return u(T)?C[L]:x[L]},h=this,d=function(T){return typeof a==\"function\"?a.call(h,T,u(\"m\")):b(c(\"m\",T.month(),2))},v=function(T,L){return L?typeof s==\"function\"?s.call(h,T):s[T.month()-h.minMonth]:typeof o==\"function\"?o.call(h,T):o[T.month()-h.minMonth]},_=this.local.digits,b=function(T){return r.localNumbers&&_?_(T):T},p=\"\",k=!1,E=0;E<e.length;E++)if(k)e.charAt(E)===\"'\"&&!u(\"'\")?k=!1:p+=e.charAt(E);else switch(e.charAt(E)){case\"d\":p+=b(c(\"d\",t.day(),2));break;case\"D\":p+=f(\"D\",t.dayOfWeek(),n,i);break;case\"o\":p+=c(\"o\",t.dayOfYear(),3);break;case\"w\":p+=c(\"w\",t.weekOfYear(),2);break;case\"m\":p+=d(t);break;case\"M\":p+=v(t,u(\"M\"));break;case\"y\":p+=u(\"y\",2)?t.year():(t.year()%100<10?\"0\":\"\")+t.year()%100;break;case\"Y\":u(\"Y\",2),p+=t.formatYear();break;case\"J\":p+=t.toJD();break;case\"@\":p+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\"!\":p+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\"'\":u(\"'\")?p+=\"'\":k=!0;break;default:p+=e.charAt(E)}return p},parseDate:function(e,t,r){if(t==null)throw Nd.local.invalidArguments||Nd.regionalOptions[\"\"].invalidArguments;if(t=typeof t==\"object\"?t.toString():t+\"\",t===\"\")return null;e=e||this.local.dateFormat,r=r||{};var n=r.shortYearCutoff||this.shortYearCutoff;n=typeof n!=\"string\"?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,c=-1,f=-1,h=-1,d=-1,v=-1,_=!1,b=!1,p=function(z,O){for(var U=1;g+U<e.length&&e.charAt(g+U)===z;)U++;return g+=U-1,Math.floor(U/(O||1))>1},k=function(z,O){var U=p(z,O),G=[2,3,U?4:2,U?4:2,10,11,20][\"oyYJ@!\".indexOf(z)+1],Z=new RegExp(\"^-?\\\\d{1,\"+G+\"}\"),j=t.substring(M).match(Z);if(!j)throw(Nd.local.missingNumberAt||Nd.regionalOptions[\"\"].missingNumberAt).replace(/\\{0\\}/,M);return M+=j[0].length,parseInt(j[0],10)},E=this,T=function(){if(typeof s==\"function\"){p(\"m\");var z=s.call(E,t.substring(M));return M+=z.length,z}return k(\"m\")},L=function(z,O,U,G){for(var Z=p(z,G)?U:O,j=0;j<Z.length;j++)if(t.substr(M,Z[j].length).toLowerCase()===Z[j].toLowerCase())return M+=Z[j].length,j+E.minMonth;throw(Nd.local.unknownNameAt||Nd.regionalOptions[\"\"].unknownNameAt).replace(/\\{0\\}/,M)},x=function(){if(typeof u==\"function\"){var z=p(\"M\")?u.call(E,t.substring(M)):l.call(E,t.substring(M));return M+=z.length,z}return L(\"M\",l,u)},C=function(){if(t.charAt(M)!==e.charAt(g))throw(Nd.local.unexpectedLiteralAt||Nd.regionalOptions[\"\"].unexpectedLiteralAt).replace(/\\{0\\}/,M);M++},M=0,g=0;g<e.length;g++)if(b)e.charAt(g)===\"'\"&&!p(\"'\")?b=!1:C();else switch(e.charAt(g)){case\"d\":d=k(\"d\");break;case\"D\":L(\"D\",i,a);break;case\"o\":v=k(\"o\");break;case\"w\":k(\"w\");break;case\"m\":h=T();break;case\"M\":h=x();break;case\"y\":var P=g;_=!p(\"y\",2),g=P,f=k(\"y\",2);break;case\"Y\":f=k(\"Y\",2);break;case\"J\":c=k(\"J\")+.5,t.charAt(M)===\".\"&&(M++,k(\"J\"));break;case\"@\":c=k(\"@\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\"!\":c=k(\"!\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\"*\":M=t.length;break;case\"'\":p(\"'\")?C():b=!0;break;default:C()}if(M<t.length)throw Nd.local.unexpectedText||Nd.regionalOptions[\"\"].unexpectedText;if(f===-1?f=this.today().year():f<100&&_&&(f+=n===-1?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),typeof h==\"string\"&&(h=o.call(this,f,h)),v>-1){h=1,d=v;for(var A=this.daysInMonth(f,h);d>A;A=this.daysInMonth(f,h))h++,d-=A}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!=\"object\"&&(i=n,n=r,r=null),typeof n!=\"string\"&&(i=n,n=\"\");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||\"d\"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e==\"string\"?o(e):typeof e==\"number\"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,\"d\"):a.newDate(e),e}})});var ret=ye(()=>{var Hx=kv(),Otr=Nh(),_Q=Hx.instance();function F9(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}F9.prototype=new Hx.baseCalendar;Otr(F9.prototype,{name:\"Chinese\",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{\"\":{name:\"Chinese\",epochs:[\"BEC\",\"EC\"],monthNumbers:function(e,t){if(typeof e==\"string\"){var r=e.match(Btr);return r?r[0]:\"\"}var n=this._validateYear(e),i=e.month(),a=\"\"+this.toChineseMonth(n,i);return t&&a.length<2&&(a=\"0\"+a),this.isIntercalaryMonth(n,i)&&(a+=\"i\"),a},monthNames:function(e){if(typeof e==\"string\"){var t=e.match(Ntr);return t?t[0]:\"\"}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"][i-1];return this.isIntercalaryMonth(r,n)&&(a=\"\\u95F0\"+a),a},monthNamesShort:function(e){if(typeof e==\"string\"){var t=e.match(Utr);return t?t[0]:\"\"}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=[\"\\u4E00\",\"\\u4E8C\",\"\\u4E09\",\"\\u56DB\",\"\\u4E94\",\"\\u516D\",\"\\u4E03\",\"\\u516B\",\"\\u4E5D\",\"\\u5341\",\"\\u5341\\u4E00\",\"\\u5341\\u4E8C\"][i-1];return this.isIntercalaryMonth(r,n)&&(a=\"\\u95F0\"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]===\"\\u95F0\"&&(n=!0,t=t.substring(1)),t[t.length-1]===\"\\u6708\"&&(t=t.substring(0,t.length-1)),r=1+[\"\\u4E00\",\"\\u4E8C\",\"\\u4E09\",\"\\u56DB\",\"\\u4E94\",\"\\u516D\",\"\\u4E03\",\"\\u516B\",\"\\u4E5D\",\"\\u5341\",\"\\u5341\\u4E00\",\"\\u5341\\u4E8C\"].indexOf(t);else{var i=t[t.length-1];n=i===\"i\"||i===\"I\"}var a=this.toMonthIndex(e,r,n);return a},dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!=\"number\"||e<1888||e>2111)throw t.replace(/\\{0\\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Hx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Hx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var i;return r?t<r?i=t+1:i=t:i=t+1,i},intercalaryMonth:function(e){e=this._validateYear(e);var t=jx[e-jx[0]],r=t>>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Hx.local.invalidyear),i=Wx[n-Wx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=_Q.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),\"d\");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=jx[e-jx[0]],n=r>>13,i=n?12:11;if(t>i)throw Hx.local.invalidMonth.replace(/\\{0\\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Hx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Gtr(e,a,r,i);return _Q.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=_Q.fromJD(e),r=Vtr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(qtr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(F9.prototype).add.call(this,e,t,r);if(r===\"y\"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var qtr=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m,Btr=/^\\d?\\d[iI]?/m,Ntr=/^闰?十?[一二三四五六七八九]?月/m,Utr=/^闰?十?[一二三四五六七八九]?/m;Hx.calendars.chinese=F9;var jx=[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],Wx=[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];function Vtr(e,t,r,n){var i,a;if(typeof e==\"object\")i=e,a=t||{};else{var o=typeof e==\"number\"&&e>=1888&&e<=2111;if(!o)throw new Error(\"Solar year outside range 1888-2111\");var s=typeof t==\"number\"&&t>=1&&t<=12;if(!s)throw new Error(\"Solar month outside range 1 - 12\");var l=typeof r==\"number\"&&r>=1&&r<=31;if(!l)throw new Error(\"Solar day outside range 1 - 31\");i={year:e,month:t,day:r},a=n||{}}var u=Wx[i.year-Wx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Wx[a.year-Wx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,_=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-_)/(24*3600*1e3));var p=jx[a.year-jx[0]],k;for(k=0;k<13;k++){var E=p&1<<12-k?30:29;if(v<E)break;v-=E}var T=p>>13;return!T||k<T?(a.isIntercalary=!1,a.month=1+k):k===T?(a.isIntercalary=!0,a.month=k):(a.isIntercalary=!1,a.month=k),a.day=1+v,a}function Gtr(e,t,r,n,i){var a,o;if(typeof e==\"object\")o=e,a=t||{};else{var s=typeof e==\"number\"&&e>=1888&&e<=2111;if(!s)throw new Error(\"Lunar year outside range 1888-2111\");var l=typeof t==\"number\"&&t>=1&&t<=12;if(!l)throw new Error(\"Lunar month outside range 1 - 12\");var u=typeof r==\"number\"&&r>=1&&r<=30;if(!u)throw new Error(\"Lunar day outside range 1 - 30\");var c;typeof n==\"object\"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=jx[o.year-jx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var _=0;_<v;_++){var b=h&1<<12-_?30:29;f+=b}var p=Wx[o.year-Wx[0]],k=p>>9&4095,E=p>>5&15,T=p&31,L=new Date(k,E-1,T+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var iet=ye(()=>{var Lw=kv(),Htr=Nh();function xQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}xQ.prototype=new Lw.baseCalendar;Htr(xQ.prototype,{name:\"Coptic\",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Coptic\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Thout\",\"Paopi\",\"Hathor\",\"Koiak\",\"Tobi\",\"Meshir\",\"Paremhat\",\"Paremoude\",\"Pashons\",\"Paoni\",\"Epip\",\"Mesori\",\"Pi Kogi Enavot\"],monthNamesShort:[\"Tho\",\"Pao\",\"Hath\",\"Koi\",\"Tob\",\"Mesh\",\"Pat\",\"Pad\",\"Pash\",\"Pao\",\"Epi\",\"Meso\",\"PiK\"],dayNames:[\"Tkyriaka\",\"Pesnau\",\"Pshoment\",\"Peftoou\",\"Ptiou\",\"Psoou\",\"Psabbaton\"],dayNamesShort:[\"Tky\",\"Pes\",\"Psh\",\"Pef\",\"Pti\",\"Pso\",\"Psa\"],dayNamesMin:[\"Tk\",\"Pes\",\"Psh\",\"Pef\",\"Pt\",\"Pso\",\"Psa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Lw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Lw.local.invalidYear||Lw.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Lw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Lw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Lw.calendars.coptic=xQ});var net=ye(()=>{var E1=kv(),jtr=Nh();function bQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}bQ.prototype=new E1.baseCalendar;jtr(bQ.prototype,{name:\"Discworld\",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Discworld\",epochs:[\"BUC\",\"UC\"],monthNames:[\"Ick\",\"Offle\",\"February\",\"March\",\"April\",\"May\",\"June\",\"Grune\",\"August\",\"Spune\",\"Sektober\",\"Ember\",\"December\"],monthNamesShort:[\"Ick\",\"Off\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Gru\",\"Aug\",\"Spu\",\"Sek\",\"Emb\",\"Dec\"],dayNames:[\"Sunday\",\"Octeday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Oct\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Oc\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return{century:Wtr[Math.floor((n.year()-1)/100)+1]||\"\"}},toJD:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var Wtr={20:\"Fruitbat\",21:\"Anchovy\"};E1.calendars.discworld=bQ});var aet=ye(()=>{var Pw=kv(),Xtr=Nh();function wQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}wQ.prototype=new Pw.baseCalendar;Xtr(wQ.prototype,{name:\"Ethiopian\",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Ethiopian\",epochs:[\"BEE\",\"EE\"],monthNames:[\"Meskerem\",\"Tikemet\",\"Hidar\",\"Tahesas\",\"Tir\",\"Yekatit\",\"Megabit\",\"Miazia\",\"Genbot\",\"Sene\",\"Hamle\",\"Nehase\",\"Pagume\"],monthNamesShort:[\"Mes\",\"Tik\",\"Hid\",\"Tah\",\"Tir\",\"Yek\",\"Meg\",\"Mia\",\"Gen\",\"Sen\",\"Ham\",\"Neh\",\"Pag\"],dayNames:[\"Ehud\",\"Segno\",\"Maksegno\",\"Irob\",\"Hamus\",\"Arb\",\"Kidame\"],dayNamesShort:[\"Ehu\",\"Seg\",\"Mak\",\"Iro\",\"Ham\",\"Arb\",\"Kid\"],dayNamesMin:[\"Eh\",\"Se\",\"Ma\",\"Ir\",\"Ha\",\"Ar\",\"Ki\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Pw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pw.local.invalidYear||Pw.regionalOptions[\"\"].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Pw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Pw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Pw.calendars.ethiopian=wQ});var oet=ye(()=>{var Xx=kv(),Ztr=Nh();function TQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}TQ.prototype=new Xx.baseCalendar;Ztr(TQ.prototype,{name:\"Hebrew\",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:{\"\":{name:\"Hebrew\",epochs:[\"BAM\",\"AM\"],monthNames:[\"Nisan\",\"Iyar\",\"Sivan\",\"Tammuz\",\"Av\",\"Elul\",\"Tishrei\",\"Cheshvan\",\"Kislev\",\"Tevet\",\"Shevat\",\"Adar\",\"Adar II\"],monthNamesShort:[\"Nis\",\"Iya\",\"Siv\",\"Tam\",\"Av\",\"Elu\",\"Tis\",\"Che\",\"Kis\",\"Tev\",\"She\",\"Ada\",\"Ad2\"],dayNames:[\"Yom Rishon\",\"Yom Sheni\",\"Yom Shlishi\",\"Yom Revi'i\",\"Yom Chamishi\",\"Yom Shishi\",\"Yom Shabbat\"],dayNamesShort:[\"Ris\",\"She\",\"Shl\",\"Rev\",\"Cha\",\"Shi\",\"Sha\"],dayNamesMin:[\"Ri\",\"She\",\"Shl\",\"Re\",\"Ch\",\"Shi\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,z9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&z9(this.daysInYear(e),10)===5?30:t===9&&z9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);return{yearType:(this.leapYear(n)?\"embolismic\":\"common\")+\" \"+[\"deficient\",\"regular\",\"complete\"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o<t;o++)a+=this.daysInMonth(e,o)}else for(var o=7;o<t;o++)a+=this.daysInMonth(e,o);return a},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return z9(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e),n=this._delay1(e+1);return n-r===356?2:r-t===382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/35975351)-1;e>=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function z9(e,t){return e-t*Math.floor(e/t)}Xx.calendars.hebrew=TQ});var set=ye(()=>{var bC=kv(),Ytr=Nh();function AQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}AQ.prototype=new bC.baseCalendar;Ytr(AQ.prototype,{name:\"Islamic\",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Islamic\",epochs:[\"BH\",\"AH\"],monthNames:[\"Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' al-thani\",\"Jumada al-awwal\",\"Jumada al-thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-ahad\",\"Yawm al-ithnayn\",\"Yawm ath-thulaathaa'\",\"Yawm al-arbi'aa'\",\"Yawm al-kham\\u012Bs\",\"Yawm al-jum'a\",\"Yawm as-sabt\"],dayNamesShort:[\"Aha\",\"Ith\",\"Thu\",\"Arb\",\"Kha\",\"Jum\",\"Sab\"],dayNamesMin:[\"Ah\",\"It\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bC.calendars.islamic=AQ});var uet=ye(()=>{var wC=kv(),Ktr=Nh();function SQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}SQ.prototype=new wC.baseCalendar;Ktr(SQ.prototype,{name:\"Julian\",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Julian\",epochs:[\"BC\",\"AD\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"mm/dd/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,wC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});wC.calendars.julian=SQ});var fet=ye(()=>{var fg=kv(),Jtr=Nh();function EQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}EQ.prototype=new fg.baseCalendar;Jtr(EQ.prototype,{name:\"Mayan\",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{\"\":{name:\"Mayan\",epochs:[\"\",\"\"],monthNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],monthNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],dayNames:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesShort:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],dayNamesMin:[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\"],digits:null,dateFormat:\"YYYY.m.d\",firstDay:0,isRTL:!1,haabMonths:[\"Pop\",\"Uo\",\"Zip\",\"Zotz\",\"Tzec\",\"Xul\",\"Yaxkin\",\"Mol\",\"Chen\",\"Yax\",\"Zac\",\"Ceh\",\"Mac\",\"Kankin\",\"Muan\",\"Pax\",\"Kayab\",\"Cumku\",\"Uayeb\"],tzolkinMonths:[\"Imix\",\"Ik\",\"Akbal\",\"Kan\",\"Chicchan\",\"Cimi\",\"Manik\",\"Lamat\",\"Muluc\",\"Oc\",\"Chuen\",\"Eb\",\"Ben\",\"Ix\",\"Men\",\"Cib\",\"Caban\",\"Etznab\",\"Cauac\",\"Ahau\"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+\".\"+n+\".\"+e%20},forYear:function(e){if(e=e.split(\".\"),e.length<3)throw\"Invalid Mayan year\";for(var t=0,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw\"Invalid Mayan year\";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,fg.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate),i=n.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(e){e-=this.jdEpoch;var t=MQ(e+8+17*20,365);return[Math.floor(t/20)+1,MQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[cet(e+20,20),cet(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function MQ(e,t){return e-t*Math.floor(e/t)}function cet(e,t){return MQ(e-1,t)+1}fg.calendars.mayan=EQ});var det=ye(()=>{var Iw=kv(),$tr=Nh();function kQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}kQ.prototype=new Iw.baseCalendar;var het=Iw.instance(\"gregorian\");$tr(kQ.prototype,{name:\"Nanakshahi\",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Nanakshahi\",epochs:[\"BN\",\"AN\"],monthNames:[\"Chet\",\"Vaisakh\",\"Jeth\",\"Harh\",\"Sawan\",\"Bhadon\",\"Assu\",\"Katak\",\"Maghar\",\"Poh\",\"Magh\",\"Phagun\"],monthNamesShort:[\"Che\",\"Vai\",\"Jet\",\"Har\",\"Saw\",\"Bha\",\"Ass\",\"Kat\",\"Mgr\",\"Poh\",\"Mgh\",\"Pha\"],dayNames:[\"Somvaar\",\"Mangalvar\",\"Budhvaar\",\"Veervaar\",\"Shukarvaar\",\"Sanicharvaar\",\"Etvaar\"],dayNamesShort:[\"Som\",\"Mangal\",\"Budh\",\"Veer\",\"Shukar\",\"Sanichar\",\"Et\"],dayNamesMin:[\"So\",\"Ma\",\"Bu\",\"Ve\",\"Sh\",\"Sa\",\"Et\"],digits:null,dateFormat:\"dd-mm-yyyy\",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Iw.local.invalidYear||Iw.regionalOptions[\"\"].invalidYear);return het.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Iw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Iw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o<n.month();o++)a+=this.daysPerMonth[o-1];return a+het.toJD(i+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});Iw.calendars.nanakshahi=kQ});var vet=ye(()=>{var Rw=kv(),Qtr=Nh();function CQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}CQ.prototype=new Rw.baseCalendar;Qtr(CQ.prototype,{name:\"Nepali\",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{\"\":{name:\"Nepali\",epochs:[\"BBS\",\"ABS\"],monthNames:[\"Baisakh\",\"Jestha\",\"Ashadh\",\"Shrawan\",\"Bhadra\",\"Ashwin\",\"Kartik\",\"Mangsir\",\"Paush\",\"Mangh\",\"Falgun\",\"Chaitra\"],monthNamesShort:[\"Bai\",\"Je\",\"As\",\"Shra\",\"Bha\",\"Ash\",\"Kar\",\"Mang\",\"Pau\",\"Ma\",\"Fal\",\"Chai\"],dayNames:[\"Aaitabaar\",\"Sombaar\",\"Manglbaar\",\"Budhabaar\",\"Bihibaar\",\"Shukrabaar\",\"Shanibaar\"],dayNamesShort:[\"Aaita\",\"Som\",\"Mangl\",\"Budha\",\"Bihi\",\"Shukra\",\"Shani\"],dayNamesMin:[\"Aai\",\"So\",\"Man\",\"Bu\",\"Bi\",\"Shu\",\"Sha\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rw.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]==\"undefined\")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Rw.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]==\"undefined\"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,Rw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Rw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,\"d\").toJD()},fromJD:function(e){var t=Rw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+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>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)typeof this.NEPALI_CALENDAR_DATA[r]==\"undefined\"&&(this.NEPALI_CALENDAR_DATA[r]=t)},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],2e3:[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]}});Rw.calendars.nepali=CQ});var pet=ye(()=>{var oS=kv(),err=Nh();function q9(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}function O9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}q9.prototype=new oS.baseCalendar;err(q9.prototype,{name:\"Persian\",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Persian\",epochs:[\"BP\",\"AP\"],monthNames:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Dey\",\"Bahman\",\"Esfand\"],monthNamesShort:[\"Far\",\"Ord\",\"Kho\",\"Tir\",\"Mor\",\"Sha\",\"Meh\",\"Aba\",\"Aza\",\"Dey\",\"Bah\",\"Esf\"],dayNames:[\"Yekshanbeh\",\"Doshanbeh\",\"Seshanbeh\",\"Chah\\u0101rshanbeh\",\"Panjshanbeh\",\"Jom'eh\",\"Shanbeh\"],dayNamesShort:[\"Yek\",\"Do\",\"Se\",\"Cha\",\"Panj\",\"Jom\",\"Sha\"],dayNamesMin:[\"Ye\",\"Do\",\"Se\",\"Ch\",\"Pa\",\"Jo\",\"Sh\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,oS.local.invalidYear);return O9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,oS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,oS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a<e;a++)O9(a)&&i++;else if(e<0)for(var a=e;a<0;a++)O9(a)&&i--;return r+(t<=7?(t-1)*31:(t-1)*30+6)+(e>0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,O9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});oS.calendars.persian=q9;oS.calendars.jalali=q9});var get=ye(()=>{var Dw=kv(),trr=Nh(),B9=Dw.instance();function LQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}LQ.prototype=new Dw.baseCalendar;trr(LQ.prototype,{name:\"Taiwan\",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Taiwan\",epochs:[\"BROC\",\"ROC\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Dw.local.invalidYear),r=this._t2gYear(t.year());return B9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Dw.local.invalidYear),i=this._t2gYear(n.year());return B9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Dw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Dw.local.invalidDate),i=this._t2gYear(n.year());return B9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Dw.calendars.taiwan=LQ});var met=ye(()=>{var Fw=kv(),rrr=Nh(),N9=Fw.instance();function PQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}PQ.prototype=new Fw.baseCalendar;rrr(PQ.prototype,{name:\"Thai\",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Thai\",epochs:[\"BBE\",\"BE\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],digits:null,dateFormat:\"dd/mm/yyyy\",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Fw.local.invalidYear),r=this._t2gYear(t.year());return N9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Fw.local.invalidYear),i=this._t2gYear(n.year());return N9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Fw.local.invalidDate),i=this._t2gYear(n.year());return N9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=N9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});Fw.calendars.thai=PQ});var yet=ye(()=>{var zw=kv(),irr=Nh();function IQ(e){this.local=this.regionalOptions[e||\"\"]||this.regionalOptions[\"\"]}IQ.prototype=new zw.baseCalendar;irr(IQ.prototype,{name:\"UmmAlQura\",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Umm al-Qura\",epochs:[\"BH\",\"AH\"],monthNames:[\"Al-Muharram\",\"Safar\",\"Rabi' al-awwal\",\"Rabi' Al-Thani\",\"Jumada Al-Awwal\",\"Jumada Al-Thani\",\"Rajab\",\"Sha'aban\",\"Ramadan\",\"Shawwal\",\"Dhu al-Qi'dah\",\"Dhu al-Hijjah\"],monthNamesShort:[\"Muh\",\"Saf\",\"Rab1\",\"Rab2\",\"Jum1\",\"Jum2\",\"Raj\",\"Sha'\",\"Ram\",\"Shaw\",\"DhuQ\",\"DhuH\"],dayNames:[\"Yawm al-Ahad\",\"Yawm al-Ithnain\",\"Yawm al-Thal\\u0101th\\u0101\\u2019\",\"Yawm al-Arba\\u2018\\u0101\\u2019\",\"Yawm al-Kham\\u012Bs\",\"Yawm al-Jum\\u2018a\",\"Yawm al-Sabt\"],dayNamesMin:[\"Ah\",\"Ith\",\"Th\",\"Ar\",\"Kh\",\"Ju\",\"Sa\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,zw.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),\"d\"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,zw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;a<Zx.length;a++){if(Zx[a]>n)return Zx[i]-Zx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,zw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Zx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<Zx.length&&!(Zx[n]>t);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Zx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=zw.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=zw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\\{0\\}/,this.local.name);return i}});zw.calendars.ummalqura=IQ;var Zx=[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]});var xet=ye((vTr,_et)=>{\"use strict\";_et.exports=kv();tet();ret();iet();net();aet();oet();set();uet();fet();det();vet();pet();get();met();yet()});var ket=ye((pTr,Eet)=>{\"use strict\";var wet=xet(),TC=Dr(),Tet=fs(),nrr=Tet.EPOCHJD,arr=Tet.ONEDAY,FQ={valType:\"enumerated\",values:TC.sortObjectKeys(wet.calendars),editType:\"calc\",dflt:\"gregorian\"},Aet=function(e,t,r,n){var i={};return i[r]=FQ,TC.coerce(e,t,i,r,n)},orr=function(e,t,r,n){for(var i=0;i<r.length;i++)Aet(e,t,r[i]+\"calendar\",n.calendar)},srr={chinese:\"2000-01-01\",coptic:\"2000-01-01\",discworld:\"2000-01-01\",ethiopian:\"2000-01-01\",hebrew:\"5000-01-01\",islamic:\"1000-01-01\",julian:\"2000-01-01\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-01\",nepali:\"2000-01-01\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-01\",thai:\"2000-01-01\",ummalqura:\"1400-01-01\"},lrr={chinese:\"2000-01-02\",coptic:\"2000-01-03\",discworld:\"2000-01-03\",ethiopian:\"2000-01-05\",hebrew:\"5000-01-01\",islamic:\"1000-01-02\",julian:\"2000-01-03\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-05\",nepali:\"2000-01-05\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-04\",thai:\"2000-01-04\",ummalqura:\"1400-01-06\"},urr={chinese:[\"2000-01-01\",\"2001-01-01\"],coptic:[\"1700-01-01\",\"1701-01-01\"],discworld:[\"1800-01-01\",\"1801-01-01\"],ethiopian:[\"2000-01-01\",\"2001-01-01\"],hebrew:[\"5700-01-01\",\"5701-01-01\"],islamic:[\"1400-01-01\",\"1401-01-01\"],julian:[\"2000-01-01\",\"2001-01-01\"],mayan:[\"5200-01-01\",\"5201-01-01\"],nanakshahi:[\"0500-01-01\",\"0501-01-01\"],nepali:[\"2000-01-01\",\"2001-01-01\"],persian:[\"1400-01-01\",\"1401-01-01\"],jalali:[\"1400-01-01\",\"1401-01-01\"],taiwan:[\"0100-01-01\",\"0101-01-01\"],thai:[\"2500-01-01\",\"2501-01-01\"],ummalqura:[\"1400-01-01\",\"1401-01-01\"]},U9=\"##\",crr={d:{0:\"dd\",\"-\":\"d\"},e:{0:\"d\",\"-\":\"d\"},a:{0:\"D\",\"-\":\"D\"},A:{0:\"DD\",\"-\":\"DD\"},j:{0:\"oo\",\"-\":\"o\"},W:{0:\"ww\",\"-\":\"w\"},m:{0:\"mm\",\"-\":\"m\"},b:{0:\"M\",\"-\":\"M\"},B:{0:\"MM\",\"-\":\"MM\"},y:{0:\"yy\",\"-\":\"yy\"},Y:{0:\"yyyy\",\"-\":\"yyyy\"},U:U9,w:U9,c:{0:\"D M d %X yyyy\",\"-\":\"D M d %X yyyy\"},x:{0:\"mm/dd/yyyy\",\"-\":\"mm/dd/yyyy\"}};function frr(e,t,r){for(var n=Math.floor((t+.05)/arr)+nrr,i=Met(r).fromJD(n),a=0,o,s,l,u,c;(a=e.indexOf(\"%\",a))!==-1;)o=e.charAt(a+1),o===\"0\"||o===\"-\"||o===\"_\"?(l=3,s=e.charAt(a+2),o===\"_\"&&(o=\"-\")):(s=o,o=\"0\",l=2),u=crr[s],u?(u===U9?c=U9:c=i.formatDate(u[o]),e=e.slice(0,a)+c+e.slice(a+l),a+=c.length):a+=l;return e}var bet={};function Met(e){var t=bet[e];return t||(t=bet[e]=wet.instance(e),t)}function AC(e){return TC.extendFlat({},FQ,{description:e})}function zQ(e){return\"Sets the calendar system to use with `\"+e+\"` date data.\"}var DQ={xcalendar:AC(zQ(\"x\"))},cy=TC.extendFlat({},DQ,{ycalendar:AC(zQ(\"y\"))}),RQ=TC.extendFlat({},cy,{zcalendar:AC(zQ(\"z\"))}),sS=AC([\"Sets the calendar system to use for `range` and `tick0`\",\"if this is a date axis. This does not set the calendar for\",\"interpreting data on this axis, that's specified in the trace\",\"or via the global `layout.calendar`\"].join(\" \"));Eet.exports={moduleType:\"component\",name:\"calendars\",schema:{traces:{scatter:cy,bar:cy,box:cy,heatmap:cy,contour:cy,histogram:cy,histogram2d:cy,histogram2dcontour:cy,scatter3d:RQ,surface:RQ,mesh3d:RQ,scattergl:cy,ohlc:DQ,candlestick:DQ},layout:{calendar:AC([\"Sets the default calendar system to use for interpreting and\",\"displaying dates throughout the plot.\"].join(\" \"))},subplots:{xaxis:{calendar:sS},yaxis:{calendar:sS},scene:{xaxis:{calendar:sS},yaxis:{calendar:sS},zaxis:{calendar:sS}},polar:{radialaxis:{calendar:sS}}}},layoutAttributes:FQ,handleDefaults:Aet,handleTraceDefaults:orr,CANONICAL_SUNDAY:lrr,CANONICAL_TICK:srr,DFLTRANGE:urr,getCal:Met,worldCalFmt:frr}});var Let=ye((gTr,Cet)=>{\"use strict\";Cet.exports=ket()});var hrr=ye((mTr,Iet)=>{var Pet=uye();Pet.register([f1e(),$1e(),hxe(),Rxe(),Xxe(),Gbe(),r2e(),H2e(),_we(),t3e(),V3e(),eke(),Gke(),D6e(),wLe(),QLe(),TPe(),ZIe(),d8e(),P8e(),G8e(),iRe(),yRe(),DRe(),uFe(),CFe(),WBe(),WNe(),rVe(),kVe(),qGe(),QGe(),THe(),Fje(),Kje(),xWe(),CXe(),QXe(),DZe(),rKe(),EKe(),ZKe(),xJe(),DJe(),R$e(),$$e(),mQe(),$Qe(),Let()]);Iet.exports=Pet});return hrr();})();\n",
       "/*!\n",
       " * pad-left <https://github.com/jonschlinkert/pad-left>\n",
       " *\n",
       " * Copyright (c) 2014-2015, Jon Schlinkert.\n",
       " * Licensed under the MIT license.\n",
       " */\n",
       "/*!\n",
       " * repeat-string <https://github.com/jonschlinkert/repeat-string>\n",
       " *\n",
       " * Copyright (c) 2014-2015, Jon Schlinkert.\n",
       " * Licensed under the MIT License.\n",
       " */\n",
       "/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\n",
       "/*!\n",
       " * The buffer module from node.js, for the browser.\n",
       " *\n",
       " * @author   Feross Aboukhadijeh <https://feross.org>\n",
       " * @license  MIT\n",
       " */\n",
       "/*!\n",
       " * Determine if an object is a Buffer\n",
       " *\n",
       " * @author   Feross Aboukhadijeh <https://feross.org>\n",
       " * @license  MIT\n",
       " */\n",
       "/*! Bundled license information:\n",
       "\n",
       "native-promise-only/lib/npo.src.js:\n",
       "  (*! Native Promise Only\n",
       "      v0.8.1 (c) Kyle Simpson\n",
       "      MIT License: http://getify.mit-license.org\n",
       "  *)\n",
       "\n",
       "polybooljs/index.js:\n",
       "  (*\n",
       "   * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc\n",
       "   * @license MIT\n",
       "   * @preserve Project Home: https://github.com/voidqk/polybooljs\n",
       "   *)\n",
       "\n",
       "ieee754/index.js:\n",
       "  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n",
       "\n",
       "buffer/index.js:\n",
       "  (*!\n",
       "   * The buffer module from node.js, for the browser.\n",
       "   *\n",
       "   * @author   Feross Aboukhadijeh <https://feross.org>\n",
       "   * @license  MIT\n",
       "   *)\n",
       "\n",
       "safe-buffer/index.js:\n",
       "  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n",
       "\n",
       "assert/build/internal/util/comparisons.js:\n",
       "  (*!\n",
       "   * The buffer module from node.js, for the browser.\n",
       "   *\n",
       "   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n",
       "   * @license  MIT\n",
       "   *)\n",
       "\n",
       "object-assign/index.js:\n",
       "  (*\n",
       "  object-assign\n",
       "  (c) Sindre Sorhus\n",
       "  @license MIT\n",
       "  *)\n",
       "\n",
       "maplibre-gl/dist/maplibre-gl.js:\n",
       "  (**\n",
       "   * MapLibre GL JS\n",
       "   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt\n",
       "   *)\n",
       "*/\n",
       "\n",
       "window.Plotly = Plotly;\n",
       "return Plotly;\n",
       "}));</script>\n",
       "        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import os\n",
    "import numpy as np\n",
    "from scipy import stats\n",
    "import pandas as pd\n",
    "from pandas import Series, DataFrame\n",
    "from collections import Counter\n",
    "\n",
    "import qollqa_chuspa as qc  # A Khipu Maker is known (in Quechua) as a Khipu Kamayuq\n",
    "import utils_loom as uloom\n",
    "import utils_khipu as ukhipu\n",
    "import utils_pandas as upanda\n",
    "import utils_kfg_locations as uloc\n",
    "    \n",
    "# Plotly\n",
    "import plotly\n",
    "from plotly.offline import iplot, init_notebook_mode\n",
    "import plotly.graph_objects as go\n",
    "import plotly.express as px\n",
    "import plotly.figure_factory as ff\n",
    "plotly.offline.init_notebook_mode(connected = False)\n",
    "# Load all khipus\n",
    "(khipu_dict, all_khipus) = qc.fetch_khipus()\n",
    "\n",
    "KFG_Names = ukhipu.kfg_order(khipu_dict.keys())\n",
    "khipu_cords_dict = {KFG_Name: khipu_dict[KFG_Name].all_cords(include_bottom_cords=True, include_top_cords=True, include_subsidiaries=True) for KFG_Name in KFG_Names}\n",
    "total_num_khipu_cords = sum([len(khipu_cords_dict[KFG_Name]) for KFG_Name in KFG_Names])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91145945",
   "metadata": {},
   "source": [
    "## 2.2 Building the Augmented Sums-and-Eight-Knot Dataframe\n",
    "\n",
    "Why only choose pendant-pendant-sums, indexed-pendant-sums and colored-pendant-sums? \n",
    "\n",
    "It may be useful to recount the number of all pendant ascher sums of the three various types (pendant-pendant-sums, colored-pendant-sums, and indexed-pendant-sums)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "7ec22fff",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "58% (411 of 711) khipus have pendant_pendant_sums\n",
      "29% (204 of 711) khipus have indexed_pendant_sums\n",
      "39% (278 of 711) khipus have colored_pendant_sums\n",
      "21% (149 of 711) khipus have subsidiary_pendant_sums\n"
     ]
    }
   ],
   "source": [
    "from fieldmark_ascher_pendant_pendant_sum import FieldmarkPendantPendantSum\n",
    "from fieldmark_ascher_indexed_pendant_sum import FieldmarkIndexedPendantSum\n",
    "from fieldmark_ascher_colored_pendant_sum import FieldmarkColoredPendantSum\n",
    "from fieldmark_ascher_subsidiary_pendant_sum import FieldmarkSubsidiaryPendantSum\n",
    "\n",
    "pendant_pendant_sums_df = FieldmarkPendantPendantSum().relations_df()\n",
    "indexed_pendant_sums_df = FieldmarkIndexedPendantSum().relations_df()\n",
    "colored_pendant_sums_df = FieldmarkColoredPendantSum().relations_df()\n",
    "subsidiary_pendant_sums_df = FieldmarkSubsidiaryPendantSum().relations_df()\n",
    "\n",
    "num_pps_khipus = pendant_pendant_sums_df['kfg_name'].nunique() \n",
    "num_ips_khipus = indexed_pendant_sums_df['kfg_name'].nunique() \n",
    "num_cps_khipus = colored_pendant_sums_df['kfg_name'].nunique() \n",
    "num_sps_khipus = subsidiary_pendant_sums_df['kfg_name'].nunique()\n",
    "print(f\"{uloom.percent_info(num_pps_khipus, len(all_khipus))} khipus have pendant_pendant_sums\")\n",
    "print(f\"{uloom.percent_info(num_ips_khipus, len(all_khipus))} khipus have indexed_pendant_sums\")\n",
    "print(f\"{uloom.percent_info(num_cps_khipus, len(all_khipus))} khipus have colored_pendant_sums\")\n",
    "print(f\"{uloom.percent_info(num_sps_khipus, len(all_khipus))} khipus have subsidiary_pendant_sums\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "965d7ad2",
   "metadata": {},
   "source": [
    "Only the first three sum relations are chosen. We can then concatenate those resulting dataframes together:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "74d494d5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>kfg_name</th>\n",
       "      <th>cord_name</th>\n",
       "      <th>cord_index</th>\n",
       "      <th>cord_value</th>\n",
       "      <th>cord_color</th>\n",
       "      <th>num_summands</th>\n",
       "      <th>handedness</th>\n",
       "      <th>has_figure8knot_indicator</th>\n",
       "      <th>has_left_exact_8knot_cord</th>\n",
       "      <th>has_right_exact_8knot_cord</th>\n",
       "      <th>...</th>\n",
       "      <th>right_exact_pendant_8knot_cord_name</th>\n",
       "      <th>left_exact_subsidiary_8knot_cord_names</th>\n",
       "      <th>right_exact_subsidiary_8knot_cord_names</th>\n",
       "      <th>left_close_pendant_cord_names</th>\n",
       "      <th>right_close_pendant_cord_names</th>\n",
       "      <th>left_close_subsidiary_8knot_cord_names</th>\n",
       "      <th>right_close_subsidiary_8knot_cord_names</th>\n",
       "      <th>has_parity_bit</th>\n",
       "      <th>summand_string</th>\n",
       "      <th>sum_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>CM009</td>\n",
       "      <td>p24</td>\n",
       "      <td>[4, 2]</td>\n",
       "      <td>60</td>\n",
       "      <td>GG</td>\n",
       "      <td>3</td>\n",
       "      <td>-7</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>p15</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>GG@[2, 6]:3 + W:KB@[2, 7]:1 + W@[3, 0]:56</td>\n",
       "      <td>pendant_pendant_sum</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>CM009</td>\n",
       "      <td>p25</td>\n",
       "      <td>[4, 3]</td>\n",
       "      <td>17</td>\n",
       "      <td>W:KB</td>\n",
       "      <td>11</td>\n",
       "      <td>-18</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>...</td>\n",
       "      <td>p12</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>p1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>GG@[0, 1]:1 + W@[0, 2]:1 + AB@[0, 3]:0 + W:KB@...</td>\n",
       "      <td>pendant_pendant_sum</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>CM009</td>\n",
       "      <td>p38</td>\n",
       "      <td>[7, 0]</td>\n",
       "      <td>57</td>\n",
       "      <td>W</td>\n",
       "      <td>2</td>\n",
       "      <td>-21</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>W:KB@[2, 7]:1 + W@[3, 0]:56</td>\n",
       "      <td>pendant_pendant_sum</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>CM009</td>\n",
       "      <td>p63</td>\n",
       "      <td>[13, 1]</td>\n",
       "      <td>44</td>\n",
       "      <td>AB</td>\n",
       "      <td>7</td>\n",
       "      <td>-8</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>p51</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>True</td>\n",
       "      <td>GG@[10, 2]:1 + W:KB@[10, 3]:0 + W@[11, 0]:6 + ...</td>\n",
       "      <td>pendant_pendant_sum</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>CM009</td>\n",
       "      <td>p64</td>\n",
       "      <td>[13, 2]</td>\n",
       "      <td>39</td>\n",
       "      <td>GG</td>\n",
       "      <td>4</td>\n",
       "      <td>-7</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>p55</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td>GG@[11, 2]:3 + W:KB@[11, 3]:0 + W@[12, 0]:33 +...</td>\n",
       "      <td>pendant_pendant_sum</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  kfg_name cord_name cord_index  cord_value cord_color  num_summands  \\\n",
       "0    CM009       p24     [4, 2]          60         GG             3   \n",
       "1    CM009       p25     [4, 3]          17       W:KB            11   \n",
       "2    CM009       p38     [7, 0]          57          W             2   \n",
       "3    CM009       p63    [13, 1]          44         AB             7   \n",
       "4    CM009       p64    [13, 2]          39         GG             4   \n",
       "\n",
       "   handedness  has_figure8knot_indicator  has_left_exact_8knot_cord  \\\n",
       "0          -7                       True                      False   \n",
       "1         -18                       True                      False   \n",
       "2         -21                       True                       True   \n",
       "3          -8                       True                       True   \n",
       "4          -7                       True                      False   \n",
       "\n",
       "   has_right_exact_8knot_cord  ...  right_exact_pendant_8knot_cord_name  \\\n",
       "0                       False  ...                                        \n",
       "1                        True  ...                                  p12   \n",
       "2                       False  ...                                        \n",
       "3                       False  ...                                        \n",
       "4                       False  ...                                        \n",
       "\n",
       "   left_exact_subsidiary_8knot_cord_names  \\\n",
       "0                                           \n",
       "1                                           \n",
       "2                                           \n",
       "3                                           \n",
       "4                                           \n",
       "\n",
       "  right_exact_subsidiary_8knot_cord_names left_close_pendant_cord_names  \\\n",
       "0                                                                   p15   \n",
       "1                                                                    p1   \n",
       "2                                                                         \n",
       "3                                                                   p51   \n",
       "4                                                                   p55   \n",
       "\n",
       "  right_close_pendant_cord_names left_close_subsidiary_8knot_cord_names  \\\n",
       "0                                                                         \n",
       "1                                                                         \n",
       "2                                                                         \n",
       "3                                                                         \n",
       "4                                                                         \n",
       "\n",
       "  right_close_subsidiary_8knot_cord_names has_parity_bit  \\\n",
       "0                                                  False   \n",
       "1                                                   True   \n",
       "2                                                   True   \n",
       "3                                                   True   \n",
       "4                                                  False   \n",
       "\n",
       "                                      summand_string             sum_type  \n",
       "0          GG@[2, 6]:3 + W:KB@[2, 7]:1 + W@[3, 0]:56  pendant_pendant_sum  \n",
       "1  GG@[0, 1]:1 + W@[0, 2]:1 + AB@[0, 3]:0 + W:KB@...  pendant_pendant_sum  \n",
       "2                        W:KB@[2, 7]:1 + W@[3, 0]:56  pendant_pendant_sum  \n",
       "3  GG@[10, 2]:1 + W:KB@[10, 3]:0 + W@[11, 0]:6 + ...  pendant_pendant_sum  \n",
       "4  GG@[11, 2]:3 + W:KB@[11, 3]:0 + W@[12, 0]:33 +...  pendant_pendant_sum  \n",
       "\n",
       "[5 rows x 23 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Build Concatenated DataFrames for all pendant Ascher Sums\n",
    "pendant_ascher_sums_df = pd.concat([pendant_pendant_sums_df.copy(deep=True),\n",
    "                                 indexed_pendant_sums_df.copy(deep=True),\n",
    "                                 colored_pendant_sums_df.copy(deep=True)])\n",
    "pendant_ascher_sums_df['sum_type'] = ['pendant_pendant_sum']*len(pendant_pendant_sums_df) + ['indexed_pendant_sum']*len(indexed_pendant_sums_df) + ['colored_pendant_sum']*len(colored_pendant_sums_df)\n",
    "pendant_ascher_sums_df.fillna('', inplace=True)   \n",
    "pendant_ascher_sums_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "9974ab67",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generated Pandas2HTML HTML table: file:///Users/ashokkhosla/Desktop/LOOM/khipufieldguide/notebook/fieldmarks/analyses/database/figure8knotsums.html\n"
     ]
    }
   ],
   "source": [
    "from pandas2html import Pandas2HTML\n",
    "\n",
    "file_specs = {\n",
    "        \"output_dir\":f\"{uloc.fieldmark_staging_dir()}/analyses/database\",\n",
    "        \"basename\":\"figure8knotsums\"\n",
    "        }   \n",
    "page_specs = {\n",
    "        \"title\":\"Figure-8 Knot Sums\",\n",
    "        \"description\":\"Khipus whose Ascher Summand Ranges are Marked by Cords W/a Figure-8 Knot\",\n",
    "        }\n",
    "column_specs = {'cord_value':{'label':\"Cord Value\", 'formatter':\"number\"},\n",
    "                'num_summands':{'label':\"# Summands\", 'formatter':\"number\"},\n",
    "                'handedness':{'label':\"Handedness\", 'formatter':\"number\"}}\n",
    "\n",
    "pendant_ascher_sums_df.fillna('', inplace=True)\n",
    "Pandas2HTML(file_specs, page_specs, column_specs, from_df=pendant_ascher_sums_df).make_pandas_html(show_html=False);\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f8d449da",
   "metadata": {},
   "source": [
    "## 2.3 Viewing the Augmented Sums-and-Eight-Knot Dataframe\n",
    "\n",
    "The Sums-and-Eight-Knots Dataframe  [can be viewed here](../fieldmarks/analyses/database/figure8knotsums.html) showing Sum Information for all pendant ascher sums, augmented with information about figure-eight-knot cords in the summand ranges."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d9156590",
   "metadata": {},
   "source": [
    "# 3.0 Building the Eight-Knot-Sum-Summary\n",
    "\n",
    "## 3.1 Fields of the Eight-Knot Sum-Summary Dataframe\n",
    "\n",
    "Once a detailed, sum-by-sum inventory has been done, a summary contigency table, by khipu can be built.\n",
    "Here called **eight_knot_sums_df** which has the following \"frequency count\" information by khipu.\n",
    "\n",
    "**KFG Name Index**\n",
    "\n",
    "* kfg_name\n",
    "\n",
    "**Sum Information**\n",
    "\n",
    "* num_ascher_sums\n",
    "* num_pps_sums\n",
    "* num_cps_sums\n",
    "* num_ips_sums\n",
    "\n",
    "**Summary Frequency Counts of Eight-Knot Cord Markings**\n",
    "\n",
    "* total_8knot_cords - the total number of the khipu's figure-8-knot cords (including subsidiaries), regardless of what or how they are marked.\n",
    "* total_sum8knots - the sum of total_exact_sole8knots + total_close_sole8knots + total_exact_trailing8knots + total_close_sole8knots\n",
    "* total_sole8knots - the number of summand-figure-8-knot marker cords that are sole-8-knots\n",
    "* total_trailing8knots - the number of summand-figure-8-knot marker cords that are trailing-8-knots\n",
    "* total_exact_sole8knots - the number of *pendant* or *subsidiary* summand-figure-8-knot marker cords that are sole-8-knots\n",
    "* total_exact_trailing8knots - the number of  *pendant* or *subsidiary*  summand-figure-8-knot marker cords that are trailing-8-knots\n",
    "* total_close_sole8knots - the number of neigboring *pendant* or *subsidiary*  summand-figure-8-knot marker cords that are trailing-8-knots\n",
    "* total_close_trailing8knots - the number of neigboring *pendant* or *subsidiary*  summand-figure-8-knot marker cords that are trailing-8-knots\n",
    "\n",
    "**Detailed Frequency Counts of Eight-Knot Cord Markings**\n",
    "\n",
    "* left_exact_pendant_8knot_cord_type_sole8knot\n",
    "* left_exact_pendant_8knot_cord_type_trailing8knot\n",
    "* right_exact_pendant_8knot_cord_type_sole8knot\n",
    "* right_exact_pendant_8knot_cord_type_trailing8knot\n",
    "* left_exact_subsidiary_8knot_cord_type_sole8knot\n",
    "* left_exact_subsidiary_8knot_cord_type_trailing8knot\n",
    "* right_exact_subsidiary_8knot_cord_type_sole8knot\n",
    "* right_exact_subsidiary_8knot_cord_type_trailing8knot\n",
    "* left_close_pendant_8knot_cord_type_sole8knot\n",
    "* left_close_pendant_8knot_cord_type_trailing8knot\n",
    "* right_close_pendant_8knot_cord_type_sole8knot\n",
    "* right_close_pendant_8knot_cord_type_trailing8knot\n",
    "* left_close_subsidiary_8knot_cord_type_sole8knot\n",
    "* left_close_subsidiary_8knot_cord_type_trailing8knot\n",
    "* right_close_subsidiary_8knot_cord_type_sole8knot\n",
    "* right_close_subsidiary_8knot_cord_type_trailing8knot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "e1aef6b7",
   "metadata": {},
   "outputs": [],
   "source": [
    "kfg_names = pendant_ascher_sums_df['kfg_name'].tolist()\n",
    "\n",
    "def cord_8knot_type(aKFGName, aCordName):\n",
    "    if len(aCordName) == 0: return \"\"\n",
    "    aCord = khipu_dict[aKFGName].find_cord_named(aCordName)\n",
    "    if aCord is None: return \"\"\n",
    "    if aCord.has_sole_eight_knot(): the_8knot_type = \"sole_8knot\"\n",
    "    elif aCord.has_trailing_eight_knot(): the_8knot_type = \"trailing_8knot\"\n",
    "    else: the_8knot_type = \"\"\n",
    "    return the_8knot_type\n",
    "\n",
    "def eight_knot_cord_types(aColumnName):\n",
    "    cord_names = pendant_ascher_sums_df[aColumnName].tolist()\n",
    "    cord_names = [aName.split(',')[0] for aName in cord_names] # Only use first subsidiary\n",
    "    cord_types = [cord_8knot_type(kfg_names[i], cord_names[i]) for i in range(len(cord_names))]\n",
    "    return cord_types\n",
    "\n",
    "pendant_ascher_sums_df['left_exact_pendant_8knot_cord_type'] = eight_knot_cord_types('left_exact_pendant_8knot_cord_name')\n",
    "pendant_ascher_sums_df['right_exact_pendant_8knot_cord_type'] = eight_knot_cord_types('right_exact_pendant_8knot_cord_name')\n",
    "pendant_ascher_sums_df['left_exact_subsidiary_8knot_cord_type'] = eight_knot_cord_types('left_exact_subsidiary_8knot_cord_names')\n",
    "pendant_ascher_sums_df['right_exact_subsidiary_8knot_cord_type'] = eight_knot_cord_types('right_exact_subsidiary_8knot_cord_names')\n",
    "pendant_ascher_sums_df['left_close_pendant_8knot_cord_type'] = eight_knot_cord_types('left_close_pendant_cord_names')\n",
    "pendant_ascher_sums_df['right_close_pendant_8knot_cord_type'] = eight_knot_cord_types('right_close_pendant_cord_names')\n",
    "pendant_ascher_sums_df['left_close_subsidiary_8knot_cord_type'] = eight_knot_cord_types('left_close_subsidiary_8knot_cord_names')\n",
    "pendant_ascher_sums_df['right_close_subsidiary_8knot_cord_type'] = eight_knot_cord_types('right_close_subsidiary_8knot_cord_names')\n",
    "\n",
    "pendant_ascher_sums_df.to_csv(f\"{uloc.fieldmarks_data_dir()}/figure8knotsums.csv\", index=False)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "4827919b",
   "metadata": {},
   "outputs": [],
   "source": [
    "from collections import Counter\n",
    "from fieldmark_figure8knots import FieldmarkFigure8Knots\n",
    "figure8knots_df = FieldmarkFigure8Knots().relations_df()\n",
    "\n",
    "eight_knot_cord_type_columns = ['left_exact_pendant_8knot_cord_type', 'right_exact_pendant_8knot_cord_type', \n",
    "                                'left_exact_subsidiary_8knot_cord_type', 'right_exact_subsidiary_8knot_cord_type',\n",
    "                                'left_close_pendant_8knot_cord_type', 'right_close_pendant_8knot_cord_type',\n",
    "                                'left_close_subsidiary_8knot_cord_type', 'right_close_subsidiary_8knot_cord_type'] \n",
    "\n",
    "def calc_num_sole_8knot_cords(aDF, aKFGName, aColumnName):\n",
    "    kfg_df = aDF[aDF['kfg_name'] == aKFGName]\n",
    "    sole_8knot_df = kfg_df[kfg_df[aColumnName]=='sole_8knot']\n",
    "    return sole_8knot_df.shape[0]\n",
    "\n",
    "def calc_num_trailing_8knot_cords(aDF, aKFGName, aColumnName):\n",
    "    kfg_df = aDF[aDF['kfg_name'] == aKFGName]\n",
    "    sole_8knot_df = kfg_df[kfg_df[aColumnName]=='trailing_8knot']\n",
    "    return sole_8knot_df.shape[0]\n",
    "\n",
    "def calc_total_8knot_cords(aDF, aKFGName):\n",
    "    kfg_df = figure8knots_df[figure8knots_df['kfg_name'] == aKFGName]\n",
    "    return kfg_df.shape[0]\n",
    "\n",
    "def build_augmented_eight_knot_df(aDF):\n",
    "    kfg_names = aDF['kfg_name'].tolist()\n",
    "    eight_knot_types = []\n",
    "    for kfg_name in ukhipu.lexigraphic_order(uloom.unique(kfg_names)):\n",
    "        kfg_df = aDF[aDF['kfg_name'] == kfg_name]\n",
    "        num_sums = kfg_df.shape[0]  \n",
    "        num_pps_sums = kfg_df[kfg_df['sum_type'] == 'pendant_pendant_sum'].shape[0]\n",
    "        num_ips_sums = kfg_df[kfg_df['sum_type'] == 'indexed_pendant_sum'].shape[0]\n",
    "        num_cps_sums = kfg_df[kfg_df['sum_type'] == 'colored_pendant_sum'].shape[0]\n",
    "\n",
    "        total_exact_sole8knots = (\n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'left_exact_pendant_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'right_exact_pendant_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'left_exact_subsidiary_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'right_exact_subsidiary_8knot_cord_type'))\n",
    "        \n",
    "        total_exact_trailing8knots = (\n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'left_exact_pendant_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'right_exact_pendant_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'left_exact_subsidiary_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'right_exact_subsidiary_8knot_cord_type'))\n",
    "        \n",
    "        total_close_sole8knots = (\n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'left_close_pendant_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'right_close_pendant_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'left_close_subsidiary_8knot_cord_type') + \n",
    "                calc_num_sole_8knot_cords(aDF, kfg_name, 'right_close_subsidiary_8knot_cord_type'))\n",
    "        \n",
    "        total_close_trailing8knots = (\n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'left_close_pendant_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'right_close_pendant_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'left_close_subsidiary_8knot_cord_type') + \n",
    "            calc_num_trailing_8knot_cords(aDF, kfg_name, 'right_close_subsidiary_8knot_cord_type'))\n",
    "        \n",
    "        the_row_dict = {'kfg_name': kfg_name}\n",
    "\n",
    "        the_row_dict['num_ascher_sums'] = num_sums\n",
    "        the_row_dict['num_pps_sums'] = num_pps_sums\n",
    "        the_row_dict['num_cps_sums'] = num_cps_sums\n",
    "        the_row_dict['num_ips_sums'] = num_ips_sums\n",
    "\n",
    "        the_row_dict['total_8knot_cords'] = calc_total_8knot_cords(aDF, kfg_name)\n",
    "        the_row_dict['total_sum8knots'] = total_exact_sole8knots + total_close_sole8knots + total_exact_trailing8knots + total_close_sole8knots\n",
    "        the_row_dict['total_sole8knots'] = total_exact_sole8knots + total_close_sole8knots\n",
    "        the_row_dict['total_trailing8knots'] = total_exact_trailing8knots + total_close_trailing8knots\n",
    "        the_row_dict['total_exact_sole8knots'] = total_exact_sole8knots\n",
    "        the_row_dict['total_exact_trailing8knots'] = total_exact_trailing8knots\n",
    "        the_row_dict['total_close_sole8knots'] = total_close_sole8knots\n",
    "        the_row_dict['total_close_trailing8knots'] = total_close_trailing8knots\n",
    "\n",
    "        for aColumn in eight_knot_cord_type_columns:\n",
    "            the_row_dict[aColumn+'_sole8knot'] = calc_num_sole_8knot_cords(aDF, kfg_name, aColumn)\n",
    "            the_row_dict[aColumn+'_trailing8knot'] = calc_num_trailing_8knot_cords(aDF, kfg_name, aColumn)\n",
    "        eight_knot_types.append(the_row_dict)\n",
    "\n",
    "    return pd.DataFrame(eight_knot_types)\n",
    "\n",
    "left_handed_df = pendant_ascher_sums_df[pendant_ascher_sums_df['handedness'] < 0]\n",
    "right_handed_df = pendant_ascher_sums_df[pendant_ascher_sums_df['handedness'] >= 0]\n",
    "left_handed_eight_knot_types_df = build_augmented_eight_knot_df(left_handed_df)\n",
    "right_handed_eight_knot_types_df = build_augmented_eight_knot_df(right_handed_df)\n",
    "all_eight_knot_types_df = build_augmented_eight_knot_df(pendant_ascher_sums_df)   \n",
    "left_handed_eight_knot_types_df.to_csv(f\"{uloc.fieldmarks_data_dir()}/left_handed_sums_8knot_types.csv\", index=False)\n",
    "right_handed_eight_knot_types_df.to_csv(f\"{uloc.fieldmarks_data_dir()}/right_handed_sums_8knot_types.csv\", index=False)\n",
    "all_eight_knot_types_df.to_csv(f\"{uloc.fieldmarks_data_dir()}/all_sums_8knot_types.csv\", index=False)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "e0855839",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generated Pandas2HTML HTML table: file:///Users/ashokkhosla/Desktop/LOOM/khipufieldguide/notebook/fieldmarks/analyses/database/left_handed_eightknotsumsummary.html\n",
      "Generated Pandas2HTML HTML table: file:///Users/ashokkhosla/Desktop/LOOM/khipufieldguide/notebook/fieldmarks/analyses/database/right_handed_eightknotsumsummary.html\n",
      "Generated Pandas2HTML HTML table: file:///Users/ashokkhosla/Desktop/LOOM/khipufieldguide/notebook/fieldmarks/analyses/database/eightknotsumsummary.html\n"
     ]
    }
   ],
   "source": [
    "class EightKnotSummaryViewer(Pandas2HTML):\n",
    "    def default_type_is_number(self, column_name):\n",
    "        start_adjectives = [\"index\", \"total\", \"right\", \"left\"]\n",
    "        end_adjectives = [\"index\"]\n",
    "        return (any([column_name.lower().startswith(x) for x in start_adjectives]) or \n",
    "                any([column_name.lower().endswith(x) for x in end_adjectives]))\n",
    "\n",
    "    def default_type_is_bar(self, column_name):\n",
    "        return False\n",
    "\n",
    "    def default_label(self, column_name):\n",
    "        the_label = super().default_label(column_name)\n",
    "        is_frequency_count = (column_name.startswith(\"left\") or column_name.startswith(\"right\"))\n",
    "        if is_frequency_count: the_label = \"# \" + the_label.strip() + \"s\"\n",
    "        return the_label\n",
    "\n",
    "column_specs = {}\n",
    "file_specs = {\n",
    "        \"output_dir\":f\"{uloc.fieldmark_staging_dir()}/analyses/database\",\n",
    "        \"basename\":\"left_handed_eightknotsumsummary\"\n",
    "        }   \n",
    "page_specs = {\n",
    "        \"title\":\"Left-Handed Figure-8 Knot Sum Summary\",\n",
    "        \"description\":\"Left-Handed Summary Frequency Counts for Khipus whose Ascher Summand Ranges are Marked by Cords W/Figure-8 Knot\",\n",
    "        }\n",
    "left_handed_eight_knot_types_df.fillna('', inplace=True)\n",
    "EightKnotSummaryViewer(file_specs, page_specs, column_specs, from_df=left_handed_eight_knot_types_df).make_pandas_html(show_html=False);\n",
    "\n",
    "file_specs = {\n",
    "        \"output_dir\":f\"{uloc.fieldmark_staging_dir()}/analyses/database\",\n",
    "        \"basename\":\"right_handed_eightknotsumsummary\"\n",
    "        }   \n",
    "page_specs = {\n",
    "        \"title\":\"Right-Handed Figure-8 Knot Sum Summary\",\n",
    "        \"description\":\"Right-Handed Summary Frequency Counts for Khipus whose Ascher Summand Ranges are Marked by Cords W/Figure-8 Knot\",\n",
    "        }\n",
    "right_handed_eight_knot_types_df.fillna('', inplace=True)\n",
    "EightKnotSummaryViewer(file_specs, page_specs, column_specs, from_df=right_handed_eight_knot_types_df).make_pandas_html(show_html=False);\n",
    "\n",
    "file_specs = {\n",
    "        \"output_dir\":f\"{uloc.fieldmark_staging_dir()}/analyses/database\",\n",
    "        \"basename\":\"eightknotsumsummary\"\n",
    "        }   \n",
    "page_specs = {\n",
    "        \"title\":\"Figure-8 Knot Sum Summary\",\n",
    "        \"description\":\"Ascher Sum Summary Frequency Counts for Khipus whose Ascher Summand Ranges are Marked by Cords W/Figure-8 Knot\",\n",
    "        }\n",
    "all_eight_knot_types_df.fillna('', inplace=True)\n",
    "EightKnotSummaryViewer(file_specs, page_specs, column_specs, from_df=all_eight_knot_types_df).make_pandas_html(show_html=False);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "21b8697c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['kfg_name', 'num_ascher_sums', 'num_pps_sums', 'num_cps_sums',\n",
       "       'num_ips_sums', 'total_8knot_cords', 'total_sum8knots',\n",
       "       'total_sole8knots', 'total_trailing8knots', 'total_exact_sole8knots',\n",
       "       'total_exact_trailing8knots', 'total_close_sole8knots',\n",
       "       'total_close_trailing8knots',\n",
       "       'left_exact_pendant_8knot_cord_type_sole8knot',\n",
       "       'left_exact_pendant_8knot_cord_type_trailing8knot',\n",
       "       'right_exact_pendant_8knot_cord_type_sole8knot',\n",
       "       'right_exact_pendant_8knot_cord_type_trailing8knot',\n",
       "       'left_exact_subsidiary_8knot_cord_type_sole8knot',\n",
       "       'left_exact_subsidiary_8knot_cord_type_trailing8knot',\n",
       "       'right_exact_subsidiary_8knot_cord_type_sole8knot',\n",
       "       'right_exact_subsidiary_8knot_cord_type_trailing8knot',\n",
       "       'left_close_pendant_8knot_cord_type_sole8knot',\n",
       "       'left_close_pendant_8knot_cord_type_trailing8knot',\n",
       "       'right_close_pendant_8knot_cord_type_sole8knot',\n",
       "       'right_close_pendant_8knot_cord_type_trailing8knot',\n",
       "       'left_close_subsidiary_8knot_cord_type_sole8knot',\n",
       "       'left_close_subsidiary_8knot_cord_type_trailing8knot',\n",
       "       'right_close_subsidiary_8knot_cord_type_sole8knot',\n",
       "       'right_close_subsidiary_8knot_cord_type_trailing8knot'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_eight_knot_types_df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "11e8feaf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\tsource=c(\"All Khipus\", \"All Khipus\",\n",
      "\t\t\"( 61% ) W/Pendant Sum\", \"( 61% ) W/Pendant Sum\", \n",
      "\t\t\"( 72% ) W/8Knot Pendant Sum Marker\", \"( 72% ) W/8Knot Pendant Sum Marker\", \"( 72% ) W/8Knot Pendant Sum Marker\"),\n",
      "\ttarget=c(\"( 61% ) W/Pendant Sums\", \"( 39% ) W-Out/Pendant Sums\", \n",
      "\t\t\"( 72% )  W/8Knot Pendant Sum Markers\", \"( 28% )   W-Out/8Knot Pendant Sums Markers\",\n",
      "\t\t\"( 12% ) Only Left-Handed 8Knot Pendant Sums\", \"( 82% )  Left AND Right-Handed 8Knot Pendant Sums\",  \"( 13% ) Only Right-Handed 8Knot Pendant Sums\"),\n",
      "\tvalue=c(434, 277, 313, 121, 39, 256, 40)\n"
     ]
    }
   ],
   "source": [
    "from utils_khipu import pct_kfg_khipus\n",
    "\n",
    "\n",
    "do_make_khipus_by_8knot_type_sankey_diagram = True\n",
    "# Provide data for Khipu Sums by % of Figure-8-Knot Marker Type \n",
    "\n",
    "#   source=c(\"All Khipus\", \"All Khipus\", \n",
    "#            \"(78%) W/Pendant Sums\", \"(78%) W/Pendant Sums\", \n",
    "#            \"(77%) With 8Knot Pendant Sum Markers\", \"(77%) With 8Knot Pendant Sum Markers\", \"(77%) With 8Knot Pendant Sum Markers\"),\n",
    "#   target=c(\"(78%) With Pendant Sums\", \"(22%) With Out Pendant Sums\", \n",
    "#            \"(77%) With 8Knot Pendant Sum Markers\", \"(23%) With Out 8Knot Pendant Sums Markers\",\n",
    "#            \"(16%) Only Left-Handed 8Knot Pendant Sums\",\"(64%) Left AND Right-Handed 8Knot Pendant Sums\",  \"(20%) Only Right-Handed 8Knot Pendant Sums\"),\n",
    "#   value=c(416, 664-416, 320, 416-320, 52, 204, 64)\n",
    "\n",
    "if do_make_khipus_by_8knot_type_sankey_diagram:\n",
    "    def has_left_handed_8knot_pendant_sums(aKFGName):\n",
    "        aDF = all_eight_knot_types_df[all_eight_knot_types_df['kfg_name'] == aKFGName]\n",
    "        has_left_handed_8knot_pendant_sum = (\n",
    "            (len(aDF[aDF['left_exact_pendant_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_exact_pendant_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_exact_subsidiary_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_exact_subsidiary_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_close_pendant_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_close_pendant_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_close_subsidiary_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['left_close_subsidiary_8knot_cord_type_trailing8knot'] > 0]) > 0)\n",
    "            )\n",
    "\n",
    "        return 1 if  has_left_handed_8knot_pendant_sum else 0   \n",
    "\n",
    "    def has_right_handed_8knot_pendant_sums(aKFGName):\n",
    "        aDF = all_eight_knot_types_df[all_eight_knot_types_df['kfg_name'] == aKFGName]\n",
    "        has_right_handed_8knot_pendant_sum = (\n",
    "            (len(aDF[aDF['right_exact_pendant_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_exact_pendant_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_exact_subsidiary_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_exact_subsidiary_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_close_pendant_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_close_pendant_8knot_cord_type_trailing8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_close_subsidiary_8knot_cord_type_sole8knot'] > 0]) > 0) or\n",
    "            (len(aDF[aDF['right_close_subsidiary_8knot_cord_type_trailing8knot'] > 0]) > 0)\n",
    "            )\n",
    "        \n",
    "        return 1 if has_right_handed_8knot_pendant_sum  else 0\n",
    "\n",
    "    def has_both_handed_8knot_trailing_sums(aKFGName):\n",
    "        has_both_handed_8knot_trailing_sum = has_left_handed_8knot_pendant_sums(aKFGName) and has_right_handed_8knot_pendant_sums(aKFGName)\n",
    "        return 1 if has_both_handed_8knot_trailing_sum else 0\n",
    "\n",
    "\n",
    "\n",
    "    num_all_khipus = len(all_khipus)\n",
    "    # Determine the number of khipus with 8-knots\n",
    "    num_khipus_with_all_pendant_sums = len(all_eight_knot_types_df[all_eight_knot_types_df['num_ascher_sums'] > 0])\n",
    "    num_khipus_without_pendant_sums  = num_all_khipus - num_khipus_with_all_pendant_sums\n",
    "    \n",
    "    num_all_pendant_sums_with_8knot_markers = len(all_eight_knot_types_df[all_eight_knot_types_df['total_sum8knots'] > 0])\n",
    "    num_all_pendant_sums_without_8knot_markers = num_khipus_with_all_pendant_sums - num_all_pendant_sums_with_8knot_markers\n",
    "    \n",
    "    num_left_handed_8knot_pendant_sums = sum(has_left_handed_8knot_pendant_sums(kfg_name) and (not has_right_handed_8knot_pendant_sums(kfg_name)) for kfg_name in all_eight_knot_types_df['kfg_name'])\n",
    "    num_right_handed_8knot_pendant_sums = sum(has_right_handed_8knot_pendant_sums(kfg_name) and (not has_left_handed_8knot_pendant_sums(kfg_name)) for kfg_name in all_eight_knot_types_df['kfg_name'])\n",
    "    num_both_handed_8knot_pendant_sums = sum(has_both_handed_8knot_trailing_sums(kfg_name) for kfg_name in all_eight_knot_types_df['kfg_name'])\n",
    "\n",
    "    sums_pct = round(100.0* num_khipus_with_all_pendant_sums / float(num_all_khipus))\n",
    "    sum_markers_pct = round(100.0* num_all_pendant_sums_with_8knot_markers / float(num_khipus_with_all_pendant_sums))\n",
    "    left_handed_sums_pct = round(100.0* num_left_handed_8knot_pendant_sums / float(num_all_pendant_sums_with_8knot_markers))\n",
    "    right_handed_sums_pct = round(100.0* num_right_handed_8knot_pendant_sums / float(num_all_pendant_sums_with_8knot_markers))\n",
    "    both_handed_sums_pct = round(100.0* num_both_handed_8knot_pendant_sums / float(num_all_pendant_sums_with_8knot_markers))\n",
    "\n",
    "    print(f\"\\tsource=c(\\\"All Khipus\\\", \\\"All Khipus\\\",\")\n",
    "    print(f\"\\t\\t\\\"( {sums_pct}% ) W/Pendant Sum\\\", \\\"( {sums_pct}% ) W/Pendant Sum\\\", \")\n",
    "    print(f\"\\t\\t\\\"( {sum_markers_pct}% ) W/8Knot Pendant Sum Marker\\\", \\\"( {sum_markers_pct}% ) W/8Knot Pendant Sum Marker\\\", \\\"( {sum_markers_pct}% ) W/8Knot Pendant Sum Marker\\\"),\")\n",
    "   \n",
    "    print(f\"\\ttarget=c(\\\"( {sums_pct}% ) W/Pendant Sums\\\", \\\"( {100-sums_pct}% ) W-Out/Pendant Sums\\\", \")\n",
    "    print(f\"\\t\\t\\\"( {sum_markers_pct}% )  W/8Knot Pendant Sum Markers\\\", \\\"( {100-sum_markers_pct}% )   W-Out/8Knot Pendant Sums Markers\\\",\")\n",
    "    print(f\"\\t\\t\\\"( {left_handed_sums_pct}% ) Only Left-Handed 8Knot Pendant Sums\\\", \\\"( {both_handed_sums_pct}% )  Left AND Right-Handed 8Knot Pendant Sums\\\",  \\\"( {right_handed_sums_pct}% ) Only Right-Handed 8Knot Pendant Sums\\\"),\")\n",
    "\n",
    "    print(f\"\\tvalue=c({num_khipus_with_all_pendant_sums}, {num_all_khipus-num_khipus_with_all_pendant_sums}, {num_all_pendant_sums_with_8knot_markers}, {num_khipus_with_all_pendant_sums-num_all_pendant_sums_with_8knot_markers}, {num_left_handed_8knot_pendant_sums}, {num_both_handed_8knot_pendant_sums}, {num_right_handed_8knot_pendant_sums})\")\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d1b49c44",
   "metadata": {},
   "source": [
    "## 3.2 Viewers for Left-Handed and Right-Handed Eight Knot Ascher Sum Summaries\n",
    "\n",
    "Viewers are provided for the [Left-Handed](../fieldmarks/analyses/database/left_handed_eightknotsumsummary.html) Eight-Knot Sum Summary \"contingency table\" of sums marked by figure-8-knot cords  and the corresponding [Right Handed](../fieldmarks/analyses/database/right_handed_eightknotsumsummary.html) Eight-Knot Sum Summary."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "107dd898",
   "metadata": {},
   "outputs": [],
   "source": [
    "import tabulate\n",
    "\n",
    "def eight_knot_type_cord_totals(anEightKnotTypesDF, aTitle):\n",
    "    total_edge_pendant_sole_8knot_cords =  anEightKnotTypesDF['left_exact_pendant_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_exact_pendant_8knot_cord_type_sole8knot'].sum()\n",
    "    total_edge_subsidiary_sole_8knot_cords = anEightKnotTypesDF['left_exact_subsidiary_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_exact_subsidiary_8knot_cord_type_sole8knot'].sum()\n",
    "    total_edge_sole_8knot__cords =  total_edge_pendant_sole_8knot_cords + total_edge_subsidiary_sole_8knot_cords\n",
    "    total_close_pendant_sole_8knot_cords =  anEightKnotTypesDF['left_close_pendant_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_close_pendant_8knot_cord_type_sole8knot'].sum()\n",
    "    total_close_subsidiary_sole_8knot_cords = anEightKnotTypesDF['left_close_subsidiary_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_close_subsidiary_8knot_cord_type_sole8knot'].sum()\n",
    "    total_close_sole_8_knot_cords = total_close_pendant_sole_8knot_cords + total_close_subsidiary_sole_8knot_cords\n",
    "    total_sole_8knot_cords =  anEightKnotTypesDF['total_sole8knots'].sum()\n",
    "\n",
    "    total_edge_pendant_trailing_8knot_cords = anEightKnotTypesDF['left_exact_pendant_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_exact_pendant_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_edge_subsidiary_trailing_8knot_cords = anEightKnotTypesDF['left_exact_subsidiary_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_exact_subsidiary_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_edge_trailing_8knot_cords = total_edge_pendant_trailing_8knot_cords + total_edge_subsidiary_trailing_8knot_cords\n",
    "    total_close_pendant_trailing_8knot_cords = anEightKnotTypesDF['left_close_pendant_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_close_pendant_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_close_subsidiary_trailing_8knot_cords = anEightKnotTypesDF['left_close_subsidiary_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_close_subsidiary_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_close_trailing_8knot_cords = total_close_pendant_trailing_8knot_cords + total_close_subsidiary_trailing_8knot_cords\n",
    "    total_trailing_8knot_cords = total_edge_trailing_8knot_cords + total_close_trailing_8knot_cords\n",
    "\n",
    "    total_num_8knot_cords = total_sole_8knot_cords + total_trailing_8knot_cords\n",
    "\n",
    "    print(f\"\\n{aTitle}\\n{'='*len(aTitle)}\")\n",
    "\n",
    "    knot_dict_columns = [\"8-KNOT CORD TYPE\", \"# 8Knot Cord Sum Markers\", \"# Edge Matches\",  \"# Pendant Edge Matches\", \"# Subsidiary Edge Matches\", \"# Neighbor Matches\", \"# Neighbor Pendant Matches\", \"# Neighbor Subsidiary Matches\"]\n",
    "    sole_8_knot_dict = {\"8-KNOT CORD TYPE\": \"SOLE 8KNOT CORDS\",\n",
    "                        \"# 8Knot Cord Sum Markers\": uloom.percent_info(total_sole_8knot_cords, total_num_8knot_cords),\n",
    "                        \"# Edge Matches\": uloom.percent_info(total_edge_sole_8knot__cords, total_sole_8knot_cords),\n",
    "                        \"# Pendant Edge Matches\": uloom.percent_info(total_edge_pendant_sole_8knot_cords, total_edge_sole_8knot__cords),\n",
    "                        \"# Subsidiary Edge Matches\": uloom.percent_info(total_edge_subsidiary_sole_8knot_cords, total_edge_sole_8knot__cords),\n",
    "                        \"# Neighbor Matches\": uloom.percent_info(total_close_sole_8_knot_cords, total_sole_8knot_cords),\n",
    "                        \"# Neighbor Pendant Matches\": uloom.percent_info(total_close_pendant_sole_8knot_cords, total_close_sole_8_knot_cords),\n",
    "                        \"# Neighbor Subsidiary Matches\": uloom.percent_info(total_close_subsidiary_sole_8knot_cords, total_close_sole_8_knot_cords)}\n",
    "    trailing_8_knot_dict = {\"8-KNOT CORD TYPE\": \"TRAILING 8KNOT CORDS\",\n",
    "                            \"# 8Knot Cord Sum Markers\": uloom.percent_info(total_trailing_8knot_cords, total_num_8knot_cords),\n",
    "                            \"# Edge Matches\": uloom.percent_info(total_edge_trailing_8knot_cords, total_trailing_8knot_cords),\n",
    "                            \"# Pendant Edge Matches\": uloom.percent_info(total_edge_pendant_trailing_8knot_cords, total_edge_trailing_8knot_cords),\n",
    "                            \"# Subsidiary Edge Matches\": uloom.percent_info(total_edge_subsidiary_trailing_8knot_cords, total_edge_trailing_8knot_cords),\n",
    "                            \"# Neighbor Matches\": uloom.percent_info(total_close_trailing_8knot_cords, total_trailing_8knot_cords),\n",
    "                            \"# Neighbor Pendant Matches\": uloom.percent_info(total_close_pendant_trailing_8knot_cords, total_close_trailing_8knot_cords),\n",
    "                            \"# Neighbor Subsidiary Matches\": uloom.percent_info(total_close_subsidiary_trailing_8knot_cords, total_close_trailing_8knot_cords)\n",
    "                    }\n",
    "    the_df = pd.DataFrame([sole_8_knot_dict, trailing_8_knot_dict], columns=knot_dict_columns)\n",
    "    return the_df\n",
    "\n",
    "def eight_knot_type_khipu_totals(anEightKnotTypesDF, aTitle):\n",
    "    total_edge_pendant_sole_8knot_cords =  anEightKnotTypesDF['left_exact_pendant_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_exact_pendant_8knot_cord_type_sole8knot'].sum()\n",
    "    total_edge_subsidiary_sole_8knot_cords = anEightKnotTypesDF['left_exact_subsidiary_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_exact_subsidiary_8knot_cord_type_sole8knot'].sum()\n",
    "    total_edge_sole_8knot__cords =  total_edge_pendant_sole_8knot_cords + total_edge_subsidiary_sole_8knot_cords\n",
    "    total_close_pendant_sole_8knot_cords =  anEightKnotTypesDF['left_close_pendant_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_close_pendant_8knot_cord_type_sole8knot'].sum()\n",
    "    total_close_subsidiary_sole_8knot_cords = anEightKnotTypesDF['left_close_subsidiary_8knot_cord_type_sole8knot'].sum() + anEightKnotTypesDF['right_close_subsidiary_8knot_cord_type_sole8knot'].sum()\n",
    "    total_close_sole_8_knot_cords = total_close_pendant_sole_8knot_cords + total_close_subsidiary_sole_8knot_cords\n",
    "    total_sole_8knot_cords =  anEightKnotTypesDF['total_sole8knots'].sum()\n",
    "\n",
    "    total_edge_pendant_trailing_8knot_cords = anEightKnotTypesDF['left_exact_pendant_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_exact_pendant_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_edge_subsidiary_trailing_8knot_cords = anEightKnotTypesDF['left_exact_subsidiary_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_exact_subsidiary_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_edge_trailing_8knot_cords = total_edge_pendant_trailing_8knot_cords + total_edge_subsidiary_trailing_8knot_cords\n",
    "    total_close_pendant_trailing_8knot_cords = anEightKnotTypesDF['left_close_pendant_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_close_pendant_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_close_subsidiary_trailing_8knot_cords = anEightKnotTypesDF['left_close_subsidiary_8knot_cord_type_trailing8knot'].sum() + anEightKnotTypesDF['right_close_subsidiary_8knot_cord_type_trailing8knot'].sum()\n",
    "    total_close_trailing_8knot_cords = total_close_pendant_trailing_8knot_cords + total_close_subsidiary_trailing_8knot_cords\n",
    "    total_trailing_8knot_cords = total_edge_trailing_8knot_cords + total_close_trailing_8knot_cords\n",
    "\n",
    "    total_num_8knot_cords = total_sole_8knot_cords + total_trailing_8knot_cords\n",
    "\n",
    "    print(f\"\\n{aTitle}\\n{'='*len(aTitle)}\")\n",
    "\n",
    "    knot_dict_columns = [\"8-KNOT CORD TYPE\", \"# 8Knot Cord Sum Markers\", \"# Edge Matches\", \"# Neighbor Matches\", \"# Pendant Edge Matches\", \"# Subsidiary Edge Matches\", \"# Neighbor Pendant Matches\", \"# Neighbor Subsidiary Matches\"]\n",
    "    sole_8_knot_dict = {\"8-KNOT CORD TYPE\": \"SOLE 8KNOT CORDS\",\n",
    "                        \"# 8Knot Cord Sum Markers\": uloom.percent_info(total_sole_8knot_cords, total_num_8knot_cords),\n",
    "                        \"# Edge Matches\": uloom.percent_info(total_edge_sole_8knot__cords, total_sole_8knot_cords),\n",
    "                        \"# Pendant Edge Matches\": uloom.percent_info(total_edge_pendant_sole_8knot_cords, total_edge_sole_8knot__cords),\n",
    "                        \"# Subsidiary Edge Matches\": uloom.percent_info(total_edge_subsidiary_sole_8knot_cords, total_edge_sole_8knot__cords),\n",
    "                        \"# Neighbor Matches\": uloom.percent_info(total_close_sole_8_knot_cords, total_sole_8knot_cords),\n",
    "                        \"# Neighbor Pendant Matches\": uloom.percent_info(total_close_pendant_sole_8knot_cords, total_close_sole_8_knot_cords),\n",
    "                        \"# Neighbor Subsidiary Matches\": uloom.percent_info(total_close_subsidiary_sole_8knot_cords, total_close_sole_8_knot_cords)}\n",
    "    trailing_8_knot_dict = {\"8-KNOT CORD TYPE\": \"TRAILING 8KNOT CORDS\",\n",
    "                            \"# 8Knot Cord Sum Markers\": uloom.percent_info(total_trailing_8knot_cords, total_num_8knot_cords),\n",
    "                            \"# Edge Matches\": uloom.percent_info(total_edge_trailing_8knot_cords, total_trailing_8knot_cords),\n",
    "                            \"# Pendant Edge Matches\": uloom.percent_info(total_edge_pendant_trailing_8knot_cords, total_edge_trailing_8knot_cords),\n",
    "                            \"# Subsidiary Edge Matches\": uloom.percent_info(total_edge_subsidiary_trailing_8knot_cords, total_edge_trailing_8knot_cords),\n",
    "                            \"# Neighbor Matches\": uloom.percent_info(total_close_trailing_8knot_cords, total_trailing_8knot_cords),\n",
    "                            \"# Neighbor Pendant Matches\": uloom.percent_info(total_close_pendant_trailing_8knot_cords, total_close_trailing_8knot_cords),\n",
    "                            \"# Neighbor Subsidiary Matches\": uloom.percent_info(total_close_subsidiary_trailing_8knot_cords, total_close_trailing_8knot_cords)\n",
    "                    }\n",
    "    the_df = pd.DataFrame([sole_8_knot_dict, trailing_8_knot_dict], columns=knot_dict_columns)\n",
    "    return the_df\n",
    "\n",
    "def print_eight_knot_type_totals(aDF, table_format='html'):\n",
    "    if table_format == 'html':\n",
    "        the_html_rep = tabulate.tabulate(aDF, headers='keys', tablefmt='html')   \n",
    "        the_html_rep = the_html_rep.replace(\"<table>\", \"<table class=\\\"sortable\\\" style=\\\"border: 1px solid #ddd;font-size:.8rem;\\\">\")  \n",
    "        the_html_rep = the_html_rep.replace(\"<tr>\", \"<tr style=\\\"border: 1px solid #ddd;font-size:.8rem;background-color: #444444;color: white;\\\">\", count=1)  \n",
    "        print(the_html_rep)\n",
    "    elif table_format == 'markdown':\n",
    "        print(aDF.to_markdown(index=False)) \n",
    "    else:\n",
    "        the_html_rep = tabulate.tabulate(aDF, headers='keys', tablefmt=table_format)   \n",
    "        print(the_html_rep)\n",
    "\n",
    "do_print = False\n",
    "if do_print:\n",
    "    lh_8knotsums_cords_total_df = eight_knot_type_cord_totals(left_handed_eight_knot_types_df, \"Summary of Left-Handed Eight Knot Ascher Sum Types\")\n",
    "    print_eight_knot_type_totals(lh_8knotsums_cords_total_df, table_format='html')\n",
    "    rh_8knotsums_cords_total_df = eight_knot_type_cord_totals(right_handed_eight_knot_types_df, \"Summary of Right-Handed Eight Knot Ascher Sum Types\") \n",
    "    print_eight_knot_type_totals(rh_8knotsums_cords_total_df, table_format='html')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f04715e",
   "metadata": {},
   "source": [
    "## 3.3 Summary of Left-Handed and Right Handed Eight Knot Ascher Sum Types\n",
    "\n",
    "### 3.3.1 Left-Handed Eight Knot Ascher Sums Summary\n",
    "\n",
    "\n",
    "Summary of Left-Handed Eight Knot Ascher Sum Types\n",
    "==================================================\n",
    "<table class=\"sortable\" style=\"border: 1px solid #ddd;font-size:.8rem;\">\n",
    "<thead>\n",
    "<tr style=\"border: 1px solid #ddd;font-size:.8rem;background-color: #444444;color: white;\"><th style=\"text-align: right;\">  </th><th>8-KNOT CORD TYPE    </th><th># 8Knot Cord Sum Markers  </th><th># Edge Matches    </th><th># Pendant Edge Matches  </th><th># Subsidiary Edge Matches  </th><th># Neighbor Matches  </th><th># Neighbor Pendant Matches  </th><th># Neighbor Subsidiary Matches  </th></tr>\n",
    "</thead>\n",
    "<tbody>\n",
    "<tr><td style=\"text-align: right;\"> 0</td><td>SOLE 8KNOT CORDS    </td><td>59% (2346 of 3969)        </td><td>56% (1312 of 2346)</td><td>66% (867 of 1312)       </td><td>34% (445 of 1312)          </td><td>44% (1034 of 2346)  </td><td>59% (611 of 1034)           </td><td>41% (423 of 1034)              </td></tr>\n",
    "<tr><td style=\"text-align: right;\"> 1</td><td>TRAILING 8KNOT CORDS</td><td>41% (1623 of 3969)        </td><td>56% (909 of 1623) </td><td>88% (796 of 909)        </td><td>12% (113 of 909)           </td><td>44% (714 of 1623)   </td><td>84% (599 of 714)            </td><td>16% (115 of 714)               </td></tr>\n",
    "</tbody>\n",
    "</table>\n",
    "\n",
    "\n",
    "### 3.3.2 Right-Handed Eight Knot Ascher Sums Summary\n",
    "\n",
    "<table class=\"sortable\" style=\"border: 1px solid #ddd;font-size:.8rem;\">\n",
    "<thead>\n",
    "<tr style=\"border: 1px solid #ddd;font-size:.8rem;background-color: #444444;color: white;\"><th style=\"text-align: right;\">  </th><th>8-KNOT CORD TYPE    </th><th># 8Knot Cord Sum Markers  </th><th># Edge Matches    </th><th># Pendant Edge Matches  </th><th># Subsidiary Edge Matches  </th><th># Neighbor Matches  </th><th># Neighbor Pendant Matches  </th><th># Neighbor Subsidiary Matches  </th></tr>\n",
    "</thead>\n",
    "<tbody>\n",
    "<tr><td style=\"text-align: right;\"> 0</td><td>SOLE 8KNOT CORDS    </td><td>58% (2997 of 5156)        </td><td>54% (1613 of 2997)</td><td>58% (928 of 1613)       </td><td>42% (685 of 1613)          </td><td>46% (1384 of 2997)  </td><td>51% (709 of 1384)           </td><td>49% (675 of 1384)              </td></tr>\n",
    "<tr><td style=\"text-align: right;\"> 1</td><td>TRAILING 8KNOT CORDS</td><td>42% (2159 of 5156)        </td><td>51% (1107 of 2159)</td><td>86% (951 of 1107)       </td><td>14% (156 of 1107)          </td><td>49% (1052 of 2159)  </td><td>83% (873 of 1052)           </td><td>17% (179 of 1052)              </td></tr>\n",
    "</tbody>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "595b4050",
   "metadata": {},
   "source": [
    "# 4.0 Sankey Diagram of Figure-8-Knot Sum Cords by Type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "09a45668",
   "metadata": {},
   "outputs": [],
   "source": [
    "num_all_khipus = len(all_khipus)\n",
    "num_khipus_with_pendant_ascher_sums = pendant_ascher_sums_df['kfg_name'].nunique()\n",
    "\n",
    "only_eight_knot_ascher_sums_df = pendant_ascher_sums_df[pendant_ascher_sums_df['has_figure8knot_indicator']]    \n",
    "num_khipus_with_figure8knot_pendant_ascher_sums = only_eight_knot_ascher_sums_df['kfg_name'].nunique()\n",
    "\n",
    "left_handed_8knotsum_khipus_df = only_eight_knot_ascher_sums_df[only_eight_knot_ascher_sums_df['handedness'] < 0]\n",
    "right_handed_8knotsum_khipus_df = only_eight_knot_ascher_sums_df[only_eight_knot_ascher_sums_df['handedness'] >= 0]\n",
    "\n",
    "num_left_handed_8knotsum_khipus = left_handed_8knotsum_khipus_df['kfg_name'].nunique()\n",
    "num_right_handed_8knotsum_khipus = right_handed_8knotsum_khipus_df['kfg_name'].nunique()\n",
    "left_handed_khipus = set(left_handed_8knotsum_khipus_df['kfg_name'])\n",
    "right_handed_khipus = set(right_handed_8knotsum_khipus_df['kfg_name'])\n",
    "\n",
    "num_left_only_8knotsum_khipus = len(left_handed_khipus - right_handed_khipus)\n",
    "num_left_and_right_8knotsum_khipus = len(left_handed_khipus.intersection(right_handed_khipus))\n",
    "num_right_only_8knotsum_khipus = len(right_handed_khipus - left_handed_khipus)\n",
    "\n",
    "do_print = False\n",
    "if do_print:\n",
    "    print(f\"# of Khipus: {num_all_khipus}\")\n",
    "    print(f\"# of Khipus with All Pendant Ascher Sums: {num_khipus_with_pendant_ascher_sums}\")\n",
    "    print(f\"# of Khipus with All Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_khipus_with_figure8knot_pendant_ascher_sums, num_khipus_with_pendant_ascher_sums)}\")\n",
    "    print(f\"# of Khipus with All Left-Handed Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_left_handed_8knotsum_khipus, num_khipus_with_figure8knot_pendant_ascher_sums)}\")\n",
    "    print(f\"# of Khipus with All Right-Handed Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_right_handed_8knotsum_khipus, num_khipus_with_figure8knot_pendant_ascher_sums)}\")\n",
    "    print(f\"# of Khipus with All Left-Only Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_left_only_8knotsum_khipus, num_khipus_with_figure8knot_pendant_ascher_sums)}\")\n",
    "    print(f\"# of Khipus with All Left & Right Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_left_and_right_8knotsum_khipus, num_khipus_with_figure8knot_pendant_ascher_sums)}\")\n",
    "    print(f\"# of Khipus with All Right-Only Pendant Ascher Sums marked by Figure-8 Knots: {uloom.percent_info(num_right_only_8knotsum_khipus, num_khipus_with_figure8knot_pendant_ascher_sums)}\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "a6ebd3ae",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ALL Figure-8 Knot Pendant Sums: 5751\n",
      "# ONLY Sole-8-Knot Pendant Sums: 48% (2753 of 5751)\n",
      "\t# Sole-8-Knot Edge Match Pendant Sums: 71% (1943 of 2753)\n",
      "\t\t# Pendant Sums: 72% (1405 of 1943)\n",
      "\t\t# Subsidiary Sums: 28% (538 of 1943)\n",
      "\t# Sole-8-Knot Close Match Pendant Sums: 29% (810 of 2753)\n",
      "\t\t# Pendant Sums: 62% (506 of 810)\n",
      "\t\t# Subsidiary Sums: 38% (304 of 810)\n",
      "# BOTH Sole-8-Knot and Trailing-8-Knot Pendant Sums: 13% (762 of 5751)\n",
      "\t# Both-8-Knot Edge Pendant Sums: 88% (670 of 762)\n",
      "\t\t# Pendant Sums: 76% (507 of 670)\n",
      "\t\t# Subsidiary Sums: 24% (163 of 670)\n",
      "\t# Both-8-Knot Only Close Match Pendant Sums: 12% (92 of 762)\n",
      "\t\t# Pendant Sums: 89% (82 of 92)\n",
      "\t\t# Subsidiary Sums: 11% (10 of 92)\n",
      "# ONLY Trailing-8-Knot Pendant Pendant Sums: 38% (2181 of 5751)\n",
      "\t# Trailing-8-Knot Edge Pendant Sums: 64% (1385 of 2181)\n",
      "\t\t# Pendant Sums: 91% (1265 of 1385)\n",
      "\t\t# Subsidiary Sums: 9% (120 of 1385)\n",
      "\t# Trailing-8-Knot Only Close Pendant Ascher Sums: 36% (796 of 2181)\n",
      "\t\t# Pendant Sums: 90% (719 of 796)\n",
      "\t\t# Subsidiary Sums: 10% (77 of 796)\n",
      "# Other Eight-Knot Ascher Sums: 1% (55 of 5751)\n"
     ]
    }
   ],
   "source": [
    "def has_sole_knot(aRow):\n",
    "    return ((aRow['left_exact_pendant_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['right_exact_pendant_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['left_exact_subsidiary_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['right_exact_subsidiary_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['left_close_pendant_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['right_close_pendant_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['left_close_subsidiary_8knot_cord_type'] == 'sole_8knot') or\n",
    "            (aRow['right_close_subsidiary_8knot_cord_type'] == 'sole_8knot'))\n",
    "\n",
    "def has_trailing_knot(aRow):\n",
    "    return ((aRow['left_exact_pendant_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['right_exact_pendant_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['left_exact_subsidiary_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['right_exact_subsidiary_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['left_close_pendant_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['right_close_pendant_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['left_close_subsidiary_8knot_cord_type'] == 'trailing_8knot') or\n",
    "            (aRow['right_close_subsidiary_8knot_cord_type'] == 'trailing_8knot'))\n",
    "\n",
    "def has_edge_match(aRow):\n",
    "    return (aRow['has_left_exact_8knot_cord'] or aRow['has_right_exact_8knot_cord'])\n",
    "\n",
    "def has_close_match(aRow):\n",
    "    return (aRow['has_left_close_8knot_cord'] or aRow['has_right_close_8knot_cord'])\n",
    "\n",
    "def has_pendant_edge_match(aRow):\n",
    "    return has_edge_match(aRow) and ((len(aRow['left_exact_pendant_8knot_cord_name'])>0) or (len(aRow['right_exact_pendant_8knot_cord_name'])>0))\n",
    "\n",
    "def has_subsidiary_edge_match(aRow):\n",
    "    return (has_edge_match(aRow) and \n",
    "            not(has_pendant_edge_match(aRow)) and\n",
    "            ((len(aRow['left_exact_subsidiary_8knot_cord_names'])>0) or (len(aRow['right_exact_subsidiary_8knot_cord_names'])>0)))\n",
    "\n",
    "def has_pendant_close_match(aRow):\n",
    "    return (not (has_edge_match(aRow)) and \n",
    "            has_close_match(aRow) and \n",
    "            ((len(aRow['left_close_pendant_cord_names'])>0) or (len(aRow['right_close_pendant_cord_names'])>0)))\n",
    "\n",
    "def has_subsidiary_close_match(aRow):\n",
    "    return (not (has_edge_match(aRow)) and \n",
    "            has_close_match(aRow) and \n",
    "            (not has_pendant_close_match(aRow)) and \n",
    "            ((len(aRow['left_close_subsidiary_8knot_cord_names'])>0) or (len(aRow['right_close_subsidiary_8knot_cord_names'])>0)))\n",
    "\n",
    "# LEVEL 0\n",
    "num_fig8knot_ascher_sums = only_eight_knot_ascher_sums_df.shape[0]\n",
    "\n",
    "# LEVEL 1 - SOLE-8-KNOT, BOTH-8-KNOT, TRAILING-8-KNOT\n",
    "sole8knot_sum__mask = [has_sole_knot(row) for _, row in pendant_ascher_sums_df.iterrows()]\n",
    "trailing8knot_sum_mask = [has_trailing_knot(row) for _, row in pendant_ascher_sums_df.iterrows()]\n",
    "\n",
    "only_sole8knot_sum__mask =  [(has_sole_knot(row) and (not has_trailing_knot(row)))  for _, row in pendant_ascher_sums_df.iterrows()]\n",
    "both8knot_sum__mask =  [(has_sole_knot(row) and has_trailing_knot(row))  for _, row in pendant_ascher_sums_df.iterrows()]\n",
    "only_trailing8knot_sum__mask =  [((not has_sole_knot(row)) and has_trailing_knot(row))  for _, row in pendant_ascher_sums_df.iterrows()]\n",
    "\n",
    "only_sole8knot_sum_df = pendant_ascher_sums_df[only_sole8knot_sum__mask]\n",
    "both8knot_sum_df = pendant_ascher_sums_df[both8knot_sum__mask]\n",
    "only_trailing8knot_sum_df = pendant_ascher_sums_df[only_trailing8knot_sum__mask]\n",
    "\n",
    "num_only_sole8knot_ascher_sums = sum(only_sole8knot_sum__mask)\n",
    "num_both8knot_ascher_sums = sum(both8knot_sum__mask)\n",
    "num_only_trailing8knot_ascher_sums =  sum(only_trailing8knot_sum__mask)\n",
    "\n",
    "# LEVEL 2 - EDGE vs CLOSE\n",
    "\n",
    "# 2.1\n",
    "edges_only_sole8knot_sum_mask = [has_edge_match(row) for _, row in only_sole8knot_sum_df.iterrows()] \n",
    "edges_only_sole8knot_sum_df = only_sole8knot_sum_df[edges_only_sole8knot_sum_mask]\n",
    "num_edges_only_sole8knot_sums = sum(edges_only_sole8knot_sum_mask)\n",
    "close_only_sole8knot_sum_mask = [((not has_edge_match(row)) and has_close_match(row)) for _, row in only_sole8knot_sum_df.iterrows()]\n",
    "close_only_sole8knot_sum_df = only_sole8knot_sum_df[close_only_sole8knot_sum_mask]\n",
    "num_close_only_sole8knot_sums = sum(close_only_sole8knot_sum_mask)\n",
    "\n",
    "# 2.2\n",
    "edges_both8knot_sum_mask = [has_edge_match(row) for _, row in both8knot_sum_df.iterrows()] \n",
    "edges_both8knot_sum_df = both8knot_sum_df[edges_both8knot_sum_mask]\n",
    "close_both8knot_sum_mask = [((not has_edge_match(row)) and has_close_match(row)) for _, row in both8knot_sum_df.iterrows()]\n",
    "close_both8knot_sum_df = both8knot_sum_df[close_both8knot_sum_mask]\n",
    "num_edges_both8knot_sums = sum(edges_both8knot_sum_mask)\n",
    "num_close_both8knot_sums = sum(close_both8knot_sum_mask)\n",
    "\n",
    "# 2.3\n",
    "edges_only_trailing8knot_sum_mask = [has_edge_match(row) for _, row in only_trailing8knot_sum_df.iterrows()] \n",
    "edges_only_trailing8knot_sum_df = only_trailing8knot_sum_df[edges_only_trailing8knot_sum_mask]\n",
    "close_only_trailing8knot_sum_mask = [((not has_edge_match(row)) and has_close_match(row)) for _, row in only_trailing8knot_sum_df.iterrows()]\n",
    "close_only_trailing8knot_sum_df = only_trailing8knot_sum_df[close_only_trailing8knot_sum_mask]\n",
    "num_edges_only_trailing8knot_edge_match_sums = sum(edges_only_trailing8knot_sum_mask)\n",
    "num_close_only_trailing8knot_edge_match_sums = sum(close_only_trailing8knot_sum_mask)\n",
    "\n",
    "# LEVEL 3\n",
    "# 3.1\n",
    "pendant_edges_only_sole8knot_sum_mask = [has_pendant_edge_match(row) for _, row in edges_only_sole8knot_sum_df.iterrows()] \n",
    "subsidiary_edges_only_sole8knot_sum_mask = [has_subsidiary_edge_match(row) for _, row in edges_only_sole8knot_sum_df.iterrows()] \n",
    "num_pendant_edges_only_sole8knot_sums = sum(pendant_edges_only_sole8knot_sum_mask)\n",
    "num_subsidiary_edges_only_sole8knot_sums = sum(subsidiary_edges_only_sole8knot_sum_mask)\n",
    "\n",
    "pendant_close_only_sole8knot_sum_mask = [has_pendant_close_match(row) for _, row in close_only_sole8knot_sum_df.iterrows()] \n",
    "num_pendant_close_only_sole8knot_sums = sum(pendant_close_only_sole8knot_sum_mask)\n",
    "subsidiary_close_only_sole8knot_sum_mask = [has_subsidiary_close_match(row) for _, row in close_only_sole8knot_sum_df.iterrows()]\n",
    "num_subsidiary_close_only_sole8knot_sums = sum(subsidiary_close_only_sole8knot_sum_mask)\n",
    "\n",
    "# 3.2\n",
    "pendant_edges_both8knot_sum_mask = [has_pendant_edge_match(row) for _, row in edges_both8knot_sum_df.iterrows()] \n",
    "subsidiary_edges_both8knot_sum_mask = [has_subsidiary_edge_match(row) for _, row in edges_both8knot_sum_df.iterrows()] \n",
    "num_pendant_edges_both8knot_sums = sum(pendant_edges_both8knot_sum_mask)\n",
    "num_subsidiary_edges_both8knot_sums = sum(subsidiary_edges_both8knot_sum_mask)\n",
    "\n",
    "pendant_close_both8knot_sum_mask = [has_pendant_close_match(row) for _, row in close_both8knot_sum_df.iterrows()] \n",
    "subsidiary_close_both8knot_sum_mask = [has_subsidiary_close_match(row) for _, row in close_both8knot_sum_df.iterrows()]\n",
    "num_pendant_close_both8knot_sums = sum(pendant_close_both8knot_sum_mask)\n",
    "num_subsidiary_close_both8knot_sums = sum(subsidiary_close_both8knot_sum_mask)\n",
    "\n",
    "# 3.3\n",
    "pendant_edges_only_trailing8knot_sum_mask = [has_pendant_edge_match(row) for _, row in edges_only_trailing8knot_sum_df.iterrows()]\n",
    "subsidiary_edges_only_trailing8knot_sum_mask = [has_subsidiary_edge_match(row) for _, row in edges_only_trailing8knot_sum_df.iterrows()]\n",
    "num_pendant_edges_only_trailing8knot_sums = sum(pendant_edges_only_trailing8knot_sum_mask)\n",
    "num_subsidiary_edges_only_trailing8knot_sums = sum(subsidiary_edges_only_trailing8knot_sum_mask)\n",
    "\n",
    "pendant_close_only_trailing8knot_sum_mask = [has_pendant_close_match(row) for _, row in close_only_trailing8knot_sum_df.iterrows()] \n",
    "subsidiary_close_only_trailing8knot_sum_mask = [has_subsidiary_close_match(row) for _, row in close_only_trailing8knot_sum_df.iterrows()]\n",
    "num_pendant_close_only_trailing8knot_sums = sum(pendant_close_only_trailing8knot_sum_mask)\n",
    "num_subsidiary_close_only_trailing8knot_sums = sum(subsidiary_close_only_trailing8knot_sum_mask)\n",
    "\n",
    "do_print = True\n",
    "if do_print:\n",
    "    print(f\"ALL Figure-8 Knot Pendant Sums: {num_fig8knot_ascher_sums}\")  \n",
    "    print(f\"# ONLY Sole-8-Knot Pendant Sums: {uloom.percent_info(num_only_sole8knot_ascher_sums, num_fig8knot_ascher_sums)}\")\n",
    "    print(f\"\\t# Sole-8-Knot Edge Match Pendant Sums: {uloom.percent_info(num_edges_only_sole8knot_sums, num_only_sole8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_edges_only_sole8knot_sums, num_edges_only_sole8knot_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_edges_only_sole8knot_sums, num_edges_only_sole8knot_sums)}\")\n",
    "    print(f\"\\t# Sole-8-Knot Close Match Pendant Sums: {uloom.percent_info(num_close_only_sole8knot_sums, num_only_sole8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_close_only_sole8knot_sums, num_close_only_sole8knot_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_close_only_sole8knot_sums, num_close_only_sole8knot_sums)}\")\n",
    "    \n",
    "    print(f\"# BOTH Sole-8-Knot and Trailing-8-Knot Pendant Sums: {uloom.percent_info(num_both8knot_ascher_sums, num_fig8knot_ascher_sums)}\")\n",
    "    print(f\"\\t# Both-8-Knot Edge Pendant Sums: {uloom.percent_info(num_edges_both8knot_sums, num_both8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_edges_both8knot_sums, num_edges_both8knot_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_edges_both8knot_sums, num_edges_both8knot_sums)}\")\n",
    "    print(f\"\\t# Both-8-Knot Only Close Match Pendant Sums: {uloom.percent_info(num_close_both8knot_sums, num_both8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_close_both8knot_sums, num_close_both8knot_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_close_both8knot_sums, num_close_both8knot_sums)}\")\n",
    "    \n",
    "    print(f\"# ONLY Trailing-8-Knot Pendant Pendant Sums: {uloom.percent_info(num_only_trailing8knot_ascher_sums, num_fig8knot_ascher_sums)}\")\n",
    "    print(f\"\\t# Trailing-8-Knot Edge Pendant Sums: {uloom.percent_info(num_edges_only_trailing8knot_edge_match_sums, num_only_trailing8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_edges_only_trailing8knot_sums, num_edges_only_trailing8knot_edge_match_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_edges_only_trailing8knot_sums, num_edges_only_trailing8knot_edge_match_sums)}\")\n",
    "    print(f\"\\t# Trailing-8-Knot Only Close Pendant Ascher Sums: {uloom.percent_info(num_close_only_trailing8knot_edge_match_sums, num_only_trailing8knot_ascher_sums)}\")\n",
    "    print(f\"\\t\\t# Pendant Sums: {uloom.percent_info(num_pendant_close_only_trailing8knot_sums, num_close_only_trailing8knot_edge_match_sums)}\")\n",
    "    print(f\"\\t\\t# Subsidiary Sums: {uloom.percent_info(num_subsidiary_close_only_trailing8knot_sums, num_close_only_trailing8knot_edge_match_sums)}\")\n",
    "    print(f\"# Other Eight-Knot Ascher Sums: {uloom.percent_info(num_fig8knot_ascher_sums - (num_only_sole8knot_ascher_sums + num_both8knot_ascher_sums + num_only_trailing8knot_ascher_sums), num_fig8knot_ascher_sums)}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "2fdbc34c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Code to generate R Sankey diagram source code\n",
    "# See src/R_src/figure8knot_sumcords_sankey_2.R\n",
    "\n",
    "do_make_sumcords_sankey_diagram = False\n",
    "if do_make_sumcords_sankey_diagram:\n",
    "\tn_T = num_fig8knot_ascher_sums\t\t\n",
    "\tn_A = num_only_sole8knot_ascher_sums\n",
    "\tn_B = num_both8knot_ascher_sums\n",
    "\tn_C = num_only_trailing8knot_ascher_sums\n",
    "\tn_D = num_fig8knot_ascher_sums - (num_only_sole8knot_ascher_sums + num_both8knot_ascher_sums + num_only_trailing8knot_ascher_sums)\n",
    "\tn_A1 = num_edges_only_sole8knot_sums\n",
    "\tn_A2 = num_close_only_sole8knot_sums\n",
    "\tn_A11 = num_pendant_edges_only_sole8knot_sums\n",
    "\tn_A12 = num_subsidiary_edges_only_sole8knot_sums\t\n",
    "\tn_A21 = num_pendant_close_only_sole8knot_sums\n",
    "\tn_A22 = num_subsidiary_close_only_sole8knot_sums\n",
    "\tn_B1 = num_edges_both8knot_sums\n",
    "\tn_B2 = num_close_both8knot_sums\n",
    "\tn_B11 = num_pendant_edges_both8knot_sums\n",
    "\tn_B12 = num_subsidiary_edges_both8knot_sums\n",
    "\tn_B21 = num_pendant_close_both8knot_sums\n",
    "\tn_B22 = num_subsidiary_close_both8knot_sums\n",
    "\tn_C1 = num_edges_only_trailing8knot_edge_match_sums\n",
    "\tn_C2 = num_close_only_trailing8knot_edge_match_sums\n",
    "\tn_C11 = num_pendant_edges_only_trailing8knot_sums\n",
    "\tn_C12 = num_subsidiary_edges_only_trailing8knot_sums\n",
    "\tn_C21 = num_pendant_close_only_trailing8knot_sums\n",
    "\tn_C22 = num_subsidiary_close_only_trailing8knot_sums\n",
    "\n",
    "\tdef pct(n, d): return int(round(100.0 * float(n) / float(d), 0))\n",
    "\n",
    "\tT = f\"# of 8Knot Pendant Sums ( {n_T} )\"\n",
    "\tA = f\"( {pct(n_A, n_T)}% ) ONLY Sole-8-Knot Pendant Sums\"\n",
    "\tB = f\"( {pct(n_B, n_T)}% ) Sole AND Trailing-8-Knot Pendant Sums\"\n",
    "\tC = f\"( {pct(n_C, n_T)}% ) ONLY Trailing-8-Knot Pendant Sums\"\n",
    "\tD = f\"( {pct(n_D, n_T)}% ) Other 8-Knot Pendant Sums\"\n",
    "\tA1 = f\"( {pct(n_A1, n_A)}% ) ONLY Sole Edge 8Knot Markers\"\n",
    "\tA2 = f\"( {pct(n_A2, n_A)}% ) ONLY Sole Neighbor 8Knot Markers\"\n",
    "\tA11 = f\"( {pct(n_A11, n_A1)}% ) ONLY Sole-8-Knot Pendant Edge 8Knot Markers\"\n",
    "\tA12 = f\"( {pct(n_A12, n_A1)}% ) ONLY Sole-8-Knot Subsidiary Edge 8Knot Markers\"\n",
    "\tA21 = f\"( {pct(n_A21, n_A2)}% ) ONLY Sole-8-Knot Pendant Neighbor 8Knot Markers\"\n",
    "\tA22 = f\"( {pct(n_A22, n_A2)}% ) ONLY Sole-8-Knot Subsidiary Neighbor 8Knot Markers\"\n",
    "\tB1 = f\"( {pct(n_B1, n_B)}% ) Sole & Trailing Edge 8Knot Markers\"\n",
    "\tB2 = f\"( {pct(n_B2, n_B)}% ) Sole & Trailing Neighbor 8Knot Markers\"\n",
    "\tB11 = f\"( {pct(n_B11, n_B1)}% ) Sole & Trailing Pendant Edge 8Knot Markers\"\n",
    "\tB12 = f\"( {pct(n_B12, n_B1)}% ) Sole & Trailing Subsidiary Edge 8Knot Markers\"\n",
    "\tB21 = f\"( {pct(n_B21, n_B2)}% ) Sole & Trailing Pendant Neighbor 8Knot Markers\"\n",
    "\tB22 = f\"( {pct(n_B22, n_B2)}% ) Sole & Trailing Subsidiary Neighbor 8Knot Markers\"\n",
    "\tC1 = f\"( {pct(n_C1, n_C)}% ) ONLY Trailing Edge 8Knot Markers\"\n",
    "\tC2 = f\"( {pct(n_C2, n_C)}% ) ONLY Trailing Neighbor 8Knot Markers\"\n",
    "\tC11 = f\"( {pct(n_C11, n_C1)}% ) ONLY Trailing Pendant Edge 8Knot Markers\"\n",
    "\tC12 = f\"( {pct(n_C12, n_C1)}% ) ONLY Trailing Subsidiary Edge 8Knot Markers\"\n",
    "\tC21 = f\"( {pct(n_C21, n_C2)}% ) ONLY Trailing Pendant Neighbor 8Knot Markers\"\n",
    "\tC22 = f\"( {pct(n_C22, n_C2)}% ) ONLY Trailing Subsidiary Neighbor 8Knot Markers\"\n",
    "\n",
    "\n",
    "\tprint(f\"\\tsource = c(\\\"{T}\\\", \\\"{T}\\\", \\\"{T}\\\", \\\"{T}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{A}\\\", \\\"{A}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{A1}\\\", \\\"{A1}\\\", \\\"{A2}\\\", \\\"{A2}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{B}\\\", \\\"{B}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{B1}\\\", \\\"{B1}\\\", \\\"{B2}\\\", \\\"{B2}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{C}\\\", \\\"{C}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{C1}\\\", \\\"{C1}\\\", \\\"{C2}\\\", \\\"{C2}\\\"),\")\t\n",
    "\tprint(f\"\\ttarget = c(\\\"{A}\\\", \\\"{B}\\\", \\\"{C}\\\", \\\"{D}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{A1}\\\", \\\"{A2}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{A11}\\\", \\\"{A12}\\\", \\\"{A21}\\\", \\\"{A22}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{B1}\\\", \\\"{B2}\\\",\")\t\n",
    "\tprint(f\"\\t\\t\\\"{B11}\\\", \\\"{B12}\\\", \\\"{B21}\\\", \\\"{B22}\\\",\")\n",
    "\tprint(f\"\\t\\t\\\"{C1}\\\", \\\"{C2}\\\",\")\t\n",
    "\tprint(f\"\\t\\t\\\"{C11}\\\", \\\"{C12}\\\", \\\"{C21}\\\", \\\"{C22}\\\"),\")\n",
    "\tprint(f\"\\tvalue=c({n_A}, {n_B}, {n_C}, {n_D},\")\t\n",
    "\tprint(f\"\\t\\t{n_A1}, {n_A2},\")\t\n",
    "\tprint(f\"\\t\\t{n_A11}, {n_A12}, {n_A21}, {n_A22},\")\n",
    "\tprint(f\"\\t\\t{n_B1}, {n_B2},\")\n",
    "\tprint(f\"\\t\\t{n_B11}, {n_B12}, {n_B21}, {n_B22},\")\n",
    "\tprint(f\"\\t\\t{n_C1}, {n_C2},\")\n",
    "\tprint(f\"\\t\\t{n_C11}, {n_C12}, {n_C21}, {n_C22})\")\n",
    "\n",
    "\t# Print color codes for nodes\n",
    "\tprint(\"\\n# Color codes for nodes:\")\n",
    "\tprint(f\"\\tname == \\\"{T}\\\" ~ \\\"{T}\\\",\")\n",
    "\tprint(f\"\\tname %in% c(\\\"{A}\\\",\\\"{B}\\\",\\\"{C}\\\",\\\"{D}\\\") ~ name,\")\n",
    "\tprint(f\"\\tname %in% c(\\\"{A1}\\\", \\\"{A2}\\\",\\\"{A11}\\\", \\\"{A12}\\\", \\\"{A21}\\\", \\\"{A22}\\\") ~ \\\"{A}\\\",\")\n",
    "\tprint(f\"\\tname %in% c(\\\"{B1}\\\", \\\"{B2}\\\",\\\"{B11}\\\", \\\"{B12}\\\", \\\"{B21}\\\", \\\"{B22}\\\") ~ \\\"{B}\\\",\")\n",
    "\tprint(f\"\\tname %in% c(\\\"{C1}\\\", \\\"{C2}\\\",\\\"{C11}\\\", \\\"{C12}\\\", \\\"{C21}\\\", \\\"{C22}\\\") ~ \\\"{C}\\\",\")\n",
    "\n",
    "\tprint(f\"\\nABCD = c(\\\"{A}\\\",\\\"{B}\\\",\\\"{C}\\\",\\\"{D}\\\")\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "437a6bc8",
   "metadata": {},
   "source": [
    "Finally we are ready to  encapsulate this as Sankey diagrams: \n",
    "\n",
    "## 4.1 Figure8Knot Sums by Percentage of Khipus\n",
    "\n",
    "<small>Click on image to view larger</small>\n",
    "<a href=\"./images/figure8knot_sums_khipu_sankey.jpg\" target=\"_blank\"><img width=940 src=\"./images/figure8knot_sums_khipu_sankey.jpg\" alt=\"Figure8Knot Sums Sankey By Khipu\"/></a><br/><br/>\n",
    "\n",
    "## 4.2 Figure8Knot Sums by Percentage of All Pendant Ascher Sums\n",
    "\n",
    "<small>Click on image to view larger</small>\n",
    "<a href=\"./images/figure8knot_sums_sum_sankey.jpg\" target=\"_blank\"><img width=940 src=\"./images/figure8knot_sums_sum_sankey.jpg\" alt=\"Figure8Knot Sums Sankey By Khipu\"/></a><br/><br/>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6261744c",
   "metadata": {},
   "source": [
    "# 5.0 - Diagrammatic Representations of the Ascher Summand Ranges by Figure-8 Knots\n",
    "\n",
    "We can build a *summand map* of Ascher Sums marked by Figure8Knots for Left and Right-Handed Sums. For example here is a zoomed in snapshot of the summand map for [Right-Handed Sums for KH0143](../fieldmarks/pendant_pendant_sum/wormmaps/sketches/KH0143_R.jpg) showing the relationships between Figure-8-Knots, their types, and the Ascher Summand regions.\n",
    "\n",
    "<a href=\"../fieldmarks/pendant_pendant_sum/wormmaps/sketches/KH0143_R.jpg\" target=\"_blank\">\n",
    "    <img src=\"./images/KH0143_figure8knot_summand_map.jpg\" width=940 alt=\"\"/></a>\n",
    "\n",
    "An individual summand map for each khipu is available via its catalog page. For example here is the pendant-pendant sum drawings and information for [KH0143](../fieldmarks/pendant_pendant_sum/html/KH0143.html)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "machu",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
